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

com.google.api.services.file.v1.CloudFilestore Maven / Gradle / Ivy

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

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

* The Cloud Filestore API is used for creating and managing cloud file servers. *

* *

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

* *

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

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

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

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

The typical use is:

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

The typical use is:

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

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

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

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

* * @param name The resource that owns the locations collection, if applicable. * @since 1.13 */ protected List(java.lang.String name) { super(CloudFilestore.this, "GET", REST_PATH, null, com.google.api.services.file.v1.model.ListLocationsResponse.class); this.name = com.google.api.client.util.Preconditions.checkNotNull(name, "Required parameter name must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(NAME_PATTERN.matcher(name).matches(), "Parameter name must conform to the pattern " + "^projects/[^/]+$"); } } @Override public com.google.api.client.http.HttpResponse executeUsingHead() throws java.io.IOException { return super.executeUsingHead(); } @Override public com.google.api.client.http.HttpRequest buildHttpRequestUsingHead() throws java.io.IOException { return super.buildHttpRequestUsingHead(); } @Override public List set$Xgafv(java.lang.String $Xgafv) { return (List) super.set$Xgafv($Xgafv); } @Override public List setAccessToken(java.lang.String accessToken) { return (List) super.setAccessToken(accessToken); } @Override public List setAlt(java.lang.String alt) { return (List) super.setAlt(alt); } @Override public List setCallback(java.lang.String callback) { return (List) super.setCallback(callback); } @Override public List setFields(java.lang.String fields) { return (List) super.setFields(fields); } @Override public List setKey(java.lang.String key) { return (List) super.setKey(key); } @Override public List setOauthToken(java.lang.String oauthToken) { return (List) super.setOauthToken(oauthToken); } @Override public List setPrettyPrint(java.lang.Boolean prettyPrint) { return (List) super.setPrettyPrint(prettyPrint); } @Override public List setQuotaUser(java.lang.String quotaUser) { return (List) super.setQuotaUser(quotaUser); } @Override public List setUploadType(java.lang.String uploadType) { return (List) super.setUploadType(uploadType); } @Override public List setUploadProtocol(java.lang.String uploadProtocol) { return (List) super.setUploadProtocol(uploadProtocol); } /** The resource that owns the locations collection, if applicable. */ @com.google.api.client.util.Key private java.lang.String name; /** The resource that owns the locations collection, if applicable. */ public java.lang.String getName() { return name; } /** The resource that owns the locations collection, if applicable. */ public List setName(java.lang.String name) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(NAME_PATTERN.matcher(name).matches(), "Parameter name must conform to the pattern " + "^projects/[^/]+$"); } this.name = name; return this; } /** * A filter to narrow down results to a preferred subset. The filtering language accepts * strings like `"displayName=tokyo"`, and is documented in more detail in * [AIP-160](https://google.aip.dev/160). */ @com.google.api.client.util.Key private java.lang.String filter; /** A filter to narrow down results to a preferred subset. The filtering language accepts strings like `"displayName=tokyo"`, and is documented in more detail in [AIP-160](https://google.aip.dev/160). */ public java.lang.String getFilter() { return filter; } /** * A filter to narrow down results to a preferred subset. The filtering language accepts * strings like `"displayName=tokyo"`, and is documented in more detail in * [AIP-160](https://google.aip.dev/160). */ public List setFilter(java.lang.String filter) { this.filter = filter; return this; } /** If true, the returned list will include locations which are not yet revealed. */ @com.google.api.client.util.Key private java.lang.Boolean includeUnrevealedLocations; /** If true, the returned list will include locations which are not yet revealed. */ public java.lang.Boolean getIncludeUnrevealedLocations() { return includeUnrevealedLocations; } /** If true, the returned list will include locations which are not yet revealed. */ public List setIncludeUnrevealedLocations(java.lang.Boolean includeUnrevealedLocations) { this.includeUnrevealedLocations = includeUnrevealedLocations; return this; } /** The maximum number of results to return. If not set, the service selects a default. */ @com.google.api.client.util.Key private java.lang.Integer pageSize; /** The maximum number of results to return. If not set, the service selects a default. */ public java.lang.Integer getPageSize() { return pageSize; } /** The maximum number of results to return. If not set, the service selects a default. */ public List setPageSize(java.lang.Integer pageSize) { this.pageSize = pageSize; return this; } /** * A page token received from the `next_page_token` field in the response. Send that page * token to receive the subsequent page. */ @com.google.api.client.util.Key private java.lang.String pageToken; /** A page token received from the `next_page_token` field in the response. Send that page token to receive the subsequent page. */ public java.lang.String getPageToken() { return pageToken; } /** * A page token received from the `next_page_token` field in the response. Send that page * token to receive the subsequent page. */ public List setPageToken(java.lang.String pageToken) { this.pageToken = pageToken; return this; } @Override public List set(String parameterName, Object value) { return (List) super.set(parameterName, value); } } /** * An accessor for creating requests from the Backups collection. * *

The typical use is:

*
       *   {@code CloudFilestore file = new CloudFilestore(...);}
       *   {@code CloudFilestore.Backups.List request = file.backups().list(parameters ...)}
       * 
* * @return the resource collection */ public Backups backups() { return new Backups(); } /** * The "backups" collection of methods. */ public class Backups { /** * Creates a backup. * * Create a request for the method "backups.create". * * This request holds the parameters needed by the file server. After setting any optional * parameters, call the {@link Create#execute()} method to invoke the remote operation. * * @param parent Required. The backup's project and location, in the format * `projects/{project_number}/locations/{location}`. In Filestore, backup locations map to * Google Cloud regions, for example **us-west1**. * @param content the {@link com.google.api.services.file.v1.model.Backup} * @return the request */ public Create create(java.lang.String parent, com.google.api.services.file.v1.model.Backup content) throws java.io.IOException { Create result = new Create(parent, content); initialize(result); return result; } public class Create extends CloudFilestoreRequest { private static final String REST_PATH = "v1/{+parent}/backups"; private final java.util.regex.Pattern PARENT_PATTERN = java.util.regex.Pattern.compile("^projects/[^/]+/locations/[^/]+$"); /** * Creates a backup. * * Create a request for the method "backups.create". * * This request holds the parameters needed by the the file server. After setting any optional * parameters, call the {@link Create#execute()} method to invoke the remote operation.

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

* * @param parent Required. The backup's project and location, in the format * `projects/{project_number}/locations/{location}`. In Filestore, backup locations map to * Google Cloud regions, for example **us-west1**. * @param content the {@link com.google.api.services.file.v1.model.Backup} * @since 1.13 */ protected Create(java.lang.String parent, com.google.api.services.file.v1.model.Backup content) { super(CloudFilestore.this, "POST", REST_PATH, content, com.google.api.services.file.v1.model.Operation.class); this.parent = com.google.api.client.util.Preconditions.checkNotNull(parent, "Required parameter parent must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PARENT_PATTERN.matcher(parent).matches(), "Parameter parent must conform to the pattern " + "^projects/[^/]+/locations/[^/]+$"); } } @Override public Create set$Xgafv(java.lang.String $Xgafv) { return (Create) super.set$Xgafv($Xgafv); } @Override public Create setAccessToken(java.lang.String accessToken) { return (Create) super.setAccessToken(accessToken); } @Override public Create setAlt(java.lang.String alt) { return (Create) super.setAlt(alt); } @Override public Create setCallback(java.lang.String callback) { return (Create) super.setCallback(callback); } @Override public Create setFields(java.lang.String fields) { return (Create) super.setFields(fields); } @Override public Create setKey(java.lang.String key) { return (Create) super.setKey(key); } @Override public Create setOauthToken(java.lang.String oauthToken) { return (Create) super.setOauthToken(oauthToken); } @Override public Create setPrettyPrint(java.lang.Boolean prettyPrint) { return (Create) super.setPrettyPrint(prettyPrint); } @Override public Create setQuotaUser(java.lang.String quotaUser) { return (Create) super.setQuotaUser(quotaUser); } @Override public Create setUploadType(java.lang.String uploadType) { return (Create) super.setUploadType(uploadType); } @Override public Create setUploadProtocol(java.lang.String uploadProtocol) { return (Create) super.setUploadProtocol(uploadProtocol); } /** * Required. The backup's project and location, in the format * `projects/{project_number}/locations/{location}`. In Filestore, backup locations map to * Google Cloud regions, for example **us-west1**. */ @com.google.api.client.util.Key private java.lang.String parent; /** Required. The backup's project and location, in the format `projects/{project_number}/locations/{location}`. In Filestore, backup locations map to Google Cloud regions, for example **us-west1**. */ public java.lang.String getParent() { return parent; } /** * Required. The backup's project and location, in the format * `projects/{project_number}/locations/{location}`. In Filestore, backup locations map to * Google Cloud regions, for example **us-west1**. */ public Create setParent(java.lang.String parent) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PARENT_PATTERN.matcher(parent).matches(), "Parameter parent must conform to the pattern " + "^projects/[^/]+/locations/[^/]+$"); } this.parent = parent; return this; } /** * Required. The ID to use for the backup. The ID must be unique within the specified * project and location. This value must start with a lowercase letter followed by up to * 62 lowercase letters, numbers, or hyphens, and cannot end with a hyphen. Values that do * not match this pattern will trigger an INVALID_ARGUMENT error. */ @com.google.api.client.util.Key private java.lang.String backupId; /** Required. The ID to use for the backup. The ID must be unique within the specified project and location. This value must start with a lowercase letter followed by up to 62 lowercase letters, numbers, or hyphens, and cannot end with a hyphen. Values that do not match this pattern will trigger an INVALID_ARGUMENT error. */ public java.lang.String getBackupId() { return backupId; } /** * Required. The ID to use for the backup. The ID must be unique within the specified * project and location. This value must start with a lowercase letter followed by up to * 62 lowercase letters, numbers, or hyphens, and cannot end with a hyphen. Values that do * not match this pattern will trigger an INVALID_ARGUMENT error. */ public Create setBackupId(java.lang.String backupId) { this.backupId = backupId; return this; } @Override public Create set(String parameterName, Object value) { return (Create) super.set(parameterName, value); } } /** * Deletes a backup. * * Create a request for the method "backups.delete". * * This request holds the parameters needed by the file server. After setting any optional * parameters, call the {@link Delete#execute()} method to invoke the remote operation. * * @param name Required. The backup resource name, in the format * `projects/{project_number}/locations/{location}/backups/{backup_id}` * @return the request */ public Delete delete(java.lang.String name) throws java.io.IOException { Delete result = new Delete(name); initialize(result); return result; } public class Delete extends CloudFilestoreRequest { private static final String REST_PATH = "v1/{+name}"; private final java.util.regex.Pattern NAME_PATTERN = java.util.regex.Pattern.compile("^projects/[^/]+/locations/[^/]+/backups/[^/]+$"); /** * Deletes a backup. * * Create a request for the method "backups.delete". * * This request holds the parameters needed by the the file server. After setting any optional * parameters, call the {@link Delete#execute()} method to invoke the remote operation.

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

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

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

* * @param name Required. The backup resource name, in the format * `projects/{project_number}/locations/{location}/backups/{backup_id}`. * @since 1.13 */ protected Get(java.lang.String name) { super(CloudFilestore.this, "GET", REST_PATH, null, com.google.api.services.file.v1.model.Backup.class); this.name = com.google.api.client.util.Preconditions.checkNotNull(name, "Required parameter name must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(NAME_PATTERN.matcher(name).matches(), "Parameter name must conform to the pattern " + "^projects/[^/]+/locations/[^/]+/backups/[^/]+$"); } } @Override public com.google.api.client.http.HttpResponse executeUsingHead() throws java.io.IOException { return super.executeUsingHead(); } @Override public com.google.api.client.http.HttpRequest buildHttpRequestUsingHead() throws java.io.IOException { return super.buildHttpRequestUsingHead(); } @Override public Get set$Xgafv(java.lang.String $Xgafv) { return (Get) super.set$Xgafv($Xgafv); } @Override public Get setAccessToken(java.lang.String accessToken) { return (Get) super.setAccessToken(accessToken); } @Override public Get setAlt(java.lang.String alt) { return (Get) super.setAlt(alt); } @Override public Get setCallback(java.lang.String callback) { return (Get) super.setCallback(callback); } @Override public Get setFields(java.lang.String fields) { return (Get) super.setFields(fields); } @Override public Get setKey(java.lang.String key) { return (Get) super.setKey(key); } @Override public Get setOauthToken(java.lang.String oauthToken) { return (Get) super.setOauthToken(oauthToken); } @Override public Get setPrettyPrint(java.lang.Boolean prettyPrint) { return (Get) super.setPrettyPrint(prettyPrint); } @Override public Get setQuotaUser(java.lang.String quotaUser) { return (Get) super.setQuotaUser(quotaUser); } @Override public Get setUploadType(java.lang.String uploadType) { return (Get) super.setUploadType(uploadType); } @Override public Get setUploadProtocol(java.lang.String uploadProtocol) { return (Get) super.setUploadProtocol(uploadProtocol); } /** * Required. The backup resource name, in the format * `projects/{project_number}/locations/{location}/backups/{backup_id}`. */ @com.google.api.client.util.Key private java.lang.String name; /** Required. The backup resource name, in the format `projects/{project_number}/locations/{location}/backups/{backup_id}`. */ public java.lang.String getName() { return name; } /** * Required. The backup resource name, in the format * `projects/{project_number}/locations/{location}/backups/{backup_id}`. */ public Get setName(java.lang.String name) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(NAME_PATTERN.matcher(name).matches(), "Parameter name must conform to the pattern " + "^projects/[^/]+/locations/[^/]+/backups/[^/]+$"); } this.name = name; return this; } @Override public Get set(String parameterName, Object value) { return (Get) super.set(parameterName, value); } } /** * Lists all backups in a project for either a specified location or for all locations. * * Create a request for the method "backups.list". * * This request holds the parameters needed by the file server. After setting any optional * parameters, call the {@link List#execute()} method to invoke the remote operation. * * @param parent Required. The project and location for which to retrieve backup information, in the format * `projects/{project_number}/locations/{location}`. In Filestore, backup locations map to * Google Cloud regions, for example **us-west1**. To retrieve backup information for all * locations, use "-" for the `{location}` value. * @return the request */ public List list(java.lang.String parent) throws java.io.IOException { List result = new List(parent); initialize(result); return result; } public class List extends CloudFilestoreRequest { private static final String REST_PATH = "v1/{+parent}/backups"; private final java.util.regex.Pattern PARENT_PATTERN = java.util.regex.Pattern.compile("^projects/[^/]+/locations/[^/]+$"); /** * Lists all backups in a project for either a specified location or for all locations. * * Create a request for the method "backups.list". * * This request holds the parameters needed by the the file server. After setting any optional * parameters, call the {@link List#execute()} method to invoke the remote operation.

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

* * @param parent Required. The project and location for which to retrieve backup information, in the format * `projects/{project_number}/locations/{location}`. In Filestore, backup locations map to * Google Cloud regions, for example **us-west1**. To retrieve backup information for all * locations, use "-" for the `{location}` value. * @since 1.13 */ protected List(java.lang.String parent) { super(CloudFilestore.this, "GET", REST_PATH, null, com.google.api.services.file.v1.model.ListBackupsResponse.class); this.parent = com.google.api.client.util.Preconditions.checkNotNull(parent, "Required parameter parent must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PARENT_PATTERN.matcher(parent).matches(), "Parameter parent must conform to the pattern " + "^projects/[^/]+/locations/[^/]+$"); } } @Override public com.google.api.client.http.HttpResponse executeUsingHead() throws java.io.IOException { return super.executeUsingHead(); } @Override public com.google.api.client.http.HttpRequest buildHttpRequestUsingHead() throws java.io.IOException { return super.buildHttpRequestUsingHead(); } @Override public List set$Xgafv(java.lang.String $Xgafv) { return (List) super.set$Xgafv($Xgafv); } @Override public List setAccessToken(java.lang.String accessToken) { return (List) super.setAccessToken(accessToken); } @Override public List setAlt(java.lang.String alt) { return (List) super.setAlt(alt); } @Override public List setCallback(java.lang.String callback) { return (List) super.setCallback(callback); } @Override public List setFields(java.lang.String fields) { return (List) super.setFields(fields); } @Override public List setKey(java.lang.String key) { return (List) super.setKey(key); } @Override public List setOauthToken(java.lang.String oauthToken) { return (List) super.setOauthToken(oauthToken); } @Override public List setPrettyPrint(java.lang.Boolean prettyPrint) { return (List) super.setPrettyPrint(prettyPrint); } @Override public List setQuotaUser(java.lang.String quotaUser) { return (List) super.setQuotaUser(quotaUser); } @Override public List setUploadType(java.lang.String uploadType) { return (List) super.setUploadType(uploadType); } @Override public List setUploadProtocol(java.lang.String uploadProtocol) { return (List) super.setUploadProtocol(uploadProtocol); } /** * Required. The project and location for which to retrieve backup information, in the * format `projects/{project_number}/locations/{location}`. In Filestore, backup locations * map to Google Cloud regions, for example **us-west1**. To retrieve backup information * for all locations, use "-" for the `{location}` value. */ @com.google.api.client.util.Key private java.lang.String parent; /** Required. The project and location for which to retrieve backup information, in the format `projects/{project_number}/locations/{location}`. In Filestore, backup locations map to Google Cloud regions, for example **us-west1**. To retrieve backup information for all locations, use "-" for the `{location}` value. */ public java.lang.String getParent() { return parent; } /** * Required. The project and location for which to retrieve backup information, in the * format `projects/{project_number}/locations/{location}`. In Filestore, backup locations * map to Google Cloud regions, for example **us-west1**. To retrieve backup information * for all locations, use "-" for the `{location}` value. */ public List setParent(java.lang.String parent) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PARENT_PATTERN.matcher(parent).matches(), "Parameter parent must conform to the pattern " + "^projects/[^/]+/locations/[^/]+$"); } this.parent = parent; return this; } /** List filter. */ @com.google.api.client.util.Key private java.lang.String filter; /** List filter. */ public java.lang.String getFilter() { return filter; } /** List filter. */ public List setFilter(java.lang.String filter) { this.filter = filter; return this; } /** Sort results. Supported values are "name", "name desc" or "" (unsorted). */ @com.google.api.client.util.Key private java.lang.String orderBy; /** Sort results. Supported values are "name", "name desc" or "" (unsorted). */ public java.lang.String getOrderBy() { return orderBy; } /** Sort results. Supported values are "name", "name desc" or "" (unsorted). */ public List setOrderBy(java.lang.String orderBy) { this.orderBy = orderBy; return this; } /** The maximum number of items to return. */ @com.google.api.client.util.Key private java.lang.Integer pageSize; /** The maximum number of items to return. */ public java.lang.Integer getPageSize() { return pageSize; } /** The maximum number of items to return. */ public List setPageSize(java.lang.Integer pageSize) { this.pageSize = pageSize; return this; } /** * The next_page_token value to use if there are additional results to retrieve for this * list request. */ @com.google.api.client.util.Key private java.lang.String pageToken; /** The next_page_token value to use if there are additional results to retrieve for this list request. */ public java.lang.String getPageToken() { return pageToken; } /** * The next_page_token value to use if there are additional results to retrieve for this * list request. */ public List setPageToken(java.lang.String pageToken) { this.pageToken = pageToken; return this; } @Override public List set(String parameterName, Object value) { return (List) super.set(parameterName, value); } } /** * Updates the settings of a specific backup. * * Create a request for the method "backups.patch". * * This request holds the parameters needed by the file server. After setting any optional * parameters, call the {@link Patch#execute()} method to invoke the remote operation. * * @param name Output only. The resource name of the backup, in the format * `projects/{project_number}/locations/{location_id}/backups/{backup_id}`. * @param content the {@link com.google.api.services.file.v1.model.Backup} * @return the request */ public Patch patch(java.lang.String name, com.google.api.services.file.v1.model.Backup content) throws java.io.IOException { Patch result = new Patch(name, content); initialize(result); return result; } public class Patch extends CloudFilestoreRequest { private static final String REST_PATH = "v1/{+name}"; private final java.util.regex.Pattern NAME_PATTERN = java.util.regex.Pattern.compile("^projects/[^/]+/locations/[^/]+/backups/[^/]+$"); /** * Updates the settings of a specific backup. * * Create a request for the method "backups.patch". * * This request holds the parameters needed by the the file server. After setting any optional * parameters, call the {@link Patch#execute()} method to invoke the remote operation.

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

* * @param name Output only. The resource name of the backup, in the format * `projects/{project_number}/locations/{location_id}/backups/{backup_id}`. * @param content the {@link com.google.api.services.file.v1.model.Backup} * @since 1.13 */ protected Patch(java.lang.String name, com.google.api.services.file.v1.model.Backup content) { super(CloudFilestore.this, "PATCH", REST_PATH, content, com.google.api.services.file.v1.model.Operation.class); this.name = com.google.api.client.util.Preconditions.checkNotNull(name, "Required parameter name must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(NAME_PATTERN.matcher(name).matches(), "Parameter name must conform to the pattern " + "^projects/[^/]+/locations/[^/]+/backups/[^/]+$"); } } @Override public Patch set$Xgafv(java.lang.String $Xgafv) { return (Patch) super.set$Xgafv($Xgafv); } @Override public Patch setAccessToken(java.lang.String accessToken) { return (Patch) super.setAccessToken(accessToken); } @Override public Patch setAlt(java.lang.String alt) { return (Patch) super.setAlt(alt); } @Override public Patch setCallback(java.lang.String callback) { return (Patch) super.setCallback(callback); } @Override public Patch setFields(java.lang.String fields) { return (Patch) super.setFields(fields); } @Override public Patch setKey(java.lang.String key) { return (Patch) super.setKey(key); } @Override public Patch setOauthToken(java.lang.String oauthToken) { return (Patch) super.setOauthToken(oauthToken); } @Override public Patch setPrettyPrint(java.lang.Boolean prettyPrint) { return (Patch) super.setPrettyPrint(prettyPrint); } @Override public Patch setQuotaUser(java.lang.String quotaUser) { return (Patch) super.setQuotaUser(quotaUser); } @Override public Patch setUploadType(java.lang.String uploadType) { return (Patch) super.setUploadType(uploadType); } @Override public Patch setUploadProtocol(java.lang.String uploadProtocol) { return (Patch) super.setUploadProtocol(uploadProtocol); } /** * Output only. The resource name of the backup, in the format * `projects/{project_number}/locations/{location_id}/backups/{backup_id}`. */ @com.google.api.client.util.Key private java.lang.String name; /** Output only. The resource name of the backup, in the format `projects/{project_number}/locations/{location_id}/backups/{backup_id}`. */ public java.lang.String getName() { return name; } /** * Output only. The resource name of the backup, in the format * `projects/{project_number}/locations/{location_id}/backups/{backup_id}`. */ public Patch setName(java.lang.String name) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(NAME_PATTERN.matcher(name).matches(), "Parameter name must conform to the pattern " + "^projects/[^/]+/locations/[^/]+/backups/[^/]+$"); } this.name = name; return this; } /** * Required. Mask of fields to update. At least one path must be supplied in this field. */ @com.google.api.client.util.Key private String updateMask; /** Required. Mask of fields to update. At least one path must be supplied in this field. */ public String getUpdateMask() { return updateMask; } /** * Required. Mask of fields to update. At least one path must be supplied in this field. */ 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 Instances collection. * *

The typical use is:

*
       *   {@code CloudFilestore file = new CloudFilestore(...);}
       *   {@code CloudFilestore.Instances.List request = file.instances().list(parameters ...)}
       * 
* * @return the resource collection */ public Instances instances() { return new Instances(); } /** * The "instances" collection of methods. */ public class Instances { /** * Creates an instance. When creating from a backup, the capacity of the new instance needs to be * equal to or larger than the capacity of the backup (and also equal to or larger than the minimum * capacity of the tier). * * Create a request for the method "instances.create". * * This request holds the parameters needed by the file server. After setting any optional * parameters, call the {@link Create#execute()} method to invoke the remote operation. * * @param parent Required. The instance's project and location, in the format * `projects/{project_id}/locations/{location}`. In Filestore, locations map to Google Cloud * zones, for example **us-west1-b**. * @param content the {@link com.google.api.services.file.v1.model.Instance} * @return the request */ public Create create(java.lang.String parent, com.google.api.services.file.v1.model.Instance content) throws java.io.IOException { Create result = new Create(parent, content); initialize(result); return result; } public class Create extends CloudFilestoreRequest { private static final String REST_PATH = "v1/{+parent}/instances"; private final java.util.regex.Pattern PARENT_PATTERN = java.util.regex.Pattern.compile("^projects/[^/]+/locations/[^/]+$"); /** * Creates an instance. When creating from a backup, the capacity of the new instance needs to be * equal to or larger than the capacity of the backup (and also equal to or larger than the * minimum capacity of the tier). * * Create a request for the method "instances.create". * * This request holds the parameters needed by the the file server. After setting any optional * parameters, call the {@link Create#execute()} method to invoke the remote operation.

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

* * @param parent Required. The instance's project and location, in the format * `projects/{project_id}/locations/{location}`. In Filestore, locations map to Google Cloud * zones, for example **us-west1-b**. * @param content the {@link com.google.api.services.file.v1.model.Instance} * @since 1.13 */ protected Create(java.lang.String parent, com.google.api.services.file.v1.model.Instance content) { super(CloudFilestore.this, "POST", REST_PATH, content, com.google.api.services.file.v1.model.Operation.class); this.parent = com.google.api.client.util.Preconditions.checkNotNull(parent, "Required parameter parent must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PARENT_PATTERN.matcher(parent).matches(), "Parameter parent must conform to the pattern " + "^projects/[^/]+/locations/[^/]+$"); } } @Override public Create set$Xgafv(java.lang.String $Xgafv) { return (Create) super.set$Xgafv($Xgafv); } @Override public Create setAccessToken(java.lang.String accessToken) { return (Create) super.setAccessToken(accessToken); } @Override public Create setAlt(java.lang.String alt) { return (Create) super.setAlt(alt); } @Override public Create setCallback(java.lang.String callback) { return (Create) super.setCallback(callback); } @Override public Create setFields(java.lang.String fields) { return (Create) super.setFields(fields); } @Override public Create setKey(java.lang.String key) { return (Create) super.setKey(key); } @Override public Create setOauthToken(java.lang.String oauthToken) { return (Create) super.setOauthToken(oauthToken); } @Override public Create setPrettyPrint(java.lang.Boolean prettyPrint) { return (Create) super.setPrettyPrint(prettyPrint); } @Override public Create setQuotaUser(java.lang.String quotaUser) { return (Create) super.setQuotaUser(quotaUser); } @Override public Create setUploadType(java.lang.String uploadType) { return (Create) super.setUploadType(uploadType); } @Override public Create setUploadProtocol(java.lang.String uploadProtocol) { return (Create) super.setUploadProtocol(uploadProtocol); } /** * Required. The instance's project and location, in the format * `projects/{project_id}/locations/{location}`. In Filestore, locations map to Google * Cloud zones, for example **us-west1-b**. */ @com.google.api.client.util.Key private java.lang.String parent; /** Required. The instance's project and location, in the format `projects/{project_id}/locations/{location}`. In Filestore, locations map to Google Cloud zones, for example **us-west1-b**. */ public java.lang.String getParent() { return parent; } /** * Required. The instance's project and location, in the format * `projects/{project_id}/locations/{location}`. In Filestore, locations map to Google * Cloud zones, for example **us-west1-b**. */ public Create setParent(java.lang.String parent) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PARENT_PATTERN.matcher(parent).matches(), "Parameter parent must conform to the pattern " + "^projects/[^/]+/locations/[^/]+$"); } this.parent = parent; return this; } /** * Required. The name of the instance to create. The name must be unique for the specified * project and location. */ @com.google.api.client.util.Key private java.lang.String instanceId; /** Required. The name of the instance to create. The name must be unique for the specified project and location. */ public java.lang.String getInstanceId() { return instanceId; } /** * Required. The name of the instance to create. The name must be unique for the specified * project and location. */ public Create setInstanceId(java.lang.String instanceId) { this.instanceId = instanceId; return this; } @Override public Create set(String parameterName, Object value) { return (Create) super.set(parameterName, value); } } /** * Deletes an instance. * * Create a request for the method "instances.delete". * * This request holds the parameters needed by the file server. After setting any optional * parameters, call the {@link Delete#execute()} method to invoke the remote operation. * * @param name Required. The instance resource name, in the format * `projects/{project_id}/locations/{location}/instances/{instance_id}` * @return the request */ public Delete delete(java.lang.String name) throws java.io.IOException { Delete result = new Delete(name); initialize(result); return result; } public class Delete extends CloudFilestoreRequest { private static final String REST_PATH = "v1/{+name}"; private final java.util.regex.Pattern NAME_PATTERN = java.util.regex.Pattern.compile("^projects/[^/]+/locations/[^/]+/instances/[^/]+$"); /** * Deletes an instance. * * Create a request for the method "instances.delete". * * This request holds the parameters needed by the the file server. After setting any optional * parameters, call the {@link Delete#execute()} method to invoke the remote operation.

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

* * @param name Required. The instance resource name, in the format * `projects/{project_id}/locations/{location}/instances/{instance_id}` * @since 1.13 */ protected Delete(java.lang.String name) { super(CloudFilestore.this, "DELETE", REST_PATH, null, com.google.api.services.file.v1.model.Operation.class); this.name = com.google.api.client.util.Preconditions.checkNotNull(name, "Required parameter name must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(NAME_PATTERN.matcher(name).matches(), "Parameter name must conform to the pattern " + "^projects/[^/]+/locations/[^/]+/instances/[^/]+$"); } } @Override public Delete set$Xgafv(java.lang.String $Xgafv) { return (Delete) super.set$Xgafv($Xgafv); } @Override public Delete setAccessToken(java.lang.String accessToken) { return (Delete) super.setAccessToken(accessToken); } @Override public Delete setAlt(java.lang.String alt) { return (Delete) super.setAlt(alt); } @Override public Delete setCallback(java.lang.String callback) { return (Delete) super.setCallback(callback); } @Override public Delete setFields(java.lang.String fields) { return (Delete) super.setFields(fields); } @Override public Delete setKey(java.lang.String key) { return (Delete) super.setKey(key); } @Override public Delete setOauthToken(java.lang.String oauthToken) { return (Delete) super.setOauthToken(oauthToken); } @Override public Delete setPrettyPrint(java.lang.Boolean prettyPrint) { return (Delete) super.setPrettyPrint(prettyPrint); } @Override public Delete setQuotaUser(java.lang.String quotaUser) { return (Delete) super.setQuotaUser(quotaUser); } @Override public Delete setUploadType(java.lang.String uploadType) { return (Delete) super.setUploadType(uploadType); } @Override public Delete setUploadProtocol(java.lang.String uploadProtocol) { return (Delete) super.setUploadProtocol(uploadProtocol); } /** * Required. The instance resource name, in the format * `projects/{project_id}/locations/{location}/instances/{instance_id}` */ @com.google.api.client.util.Key private java.lang.String name; /** Required. The instance resource name, in the format `projects/{project_id}/locations/{location}/instances/{instance_id}` */ public java.lang.String getName() { return name; } /** * Required. The instance resource name, in the format * `projects/{project_id}/locations/{location}/instances/{instance_id}` */ public Delete setName(java.lang.String name) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(NAME_PATTERN.matcher(name).matches(), "Parameter name must conform to the pattern " + "^projects/[^/]+/locations/[^/]+/instances/[^/]+$"); } this.name = name; return this; } /** * If set to true, all snapshots of the instance will also be deleted. (Otherwise, the * request will only work if the instance has no snapshots.) */ @com.google.api.client.util.Key private java.lang.Boolean force; /** If set to true, all snapshots of the instance will also be deleted. (Otherwise, the request will only work if the instance has no snapshots.) */ public java.lang.Boolean getForce() { return force; } /** * If set to true, all snapshots of the instance will also be deleted. (Otherwise, the * request will only work if the instance has no snapshots.) */ public Delete setForce(java.lang.Boolean force) { this.force = force; return this; } @Override public Delete set(String parameterName, Object value) { return (Delete) super.set(parameterName, value); } } /** * Gets the details of a specific instance. * * Create a request for the method "instances.get". * * This request holds the parameters needed by the file server. After setting any optional * parameters, call the {@link Get#execute()} method to invoke the remote operation. * * @param name Required. The instance resource name, in the format * `projects/{project_id}/locations/{location}/instances/{instance_id}`. * @return the request */ public Get get(java.lang.String name) throws java.io.IOException { Get result = new Get(name); initialize(result); return result; } public class Get extends CloudFilestoreRequest { private static final String REST_PATH = "v1/{+name}"; private final java.util.regex.Pattern NAME_PATTERN = java.util.regex.Pattern.compile("^projects/[^/]+/locations/[^/]+/instances/[^/]+$"); /** * Gets the details of a specific instance. * * Create a request for the method "instances.get". * * This request holds the parameters needed by the the file server. After setting any optional * parameters, call the {@link Get#execute()} method to invoke the remote operation.

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

* * @param name Required. The instance resource name, in the format * `projects/{project_id}/locations/{location}/instances/{instance_id}`. * @since 1.13 */ protected Get(java.lang.String name) { super(CloudFilestore.this, "GET", REST_PATH, null, com.google.api.services.file.v1.model.Instance.class); this.name = com.google.api.client.util.Preconditions.checkNotNull(name, "Required parameter name must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(NAME_PATTERN.matcher(name).matches(), "Parameter name must conform to the pattern " + "^projects/[^/]+/locations/[^/]+/instances/[^/]+$"); } } @Override public com.google.api.client.http.HttpResponse executeUsingHead() throws java.io.IOException { return super.executeUsingHead(); } @Override public com.google.api.client.http.HttpRequest buildHttpRequestUsingHead() throws java.io.IOException { return super.buildHttpRequestUsingHead(); } @Override public Get set$Xgafv(java.lang.String $Xgafv) { return (Get) super.set$Xgafv($Xgafv); } @Override public Get setAccessToken(java.lang.String accessToken) { return (Get) super.setAccessToken(accessToken); } @Override public Get setAlt(java.lang.String alt) { return (Get) super.setAlt(alt); } @Override public Get setCallback(java.lang.String callback) { return (Get) super.setCallback(callback); } @Override public Get setFields(java.lang.String fields) { return (Get) super.setFields(fields); } @Override public Get setKey(java.lang.String key) { return (Get) super.setKey(key); } @Override public Get setOauthToken(java.lang.String oauthToken) { return (Get) super.setOauthToken(oauthToken); } @Override public Get setPrettyPrint(java.lang.Boolean prettyPrint) { return (Get) super.setPrettyPrint(prettyPrint); } @Override public Get setQuotaUser(java.lang.String quotaUser) { return (Get) super.setQuotaUser(quotaUser); } @Override public Get setUploadType(java.lang.String uploadType) { return (Get) super.setUploadType(uploadType); } @Override public Get setUploadProtocol(java.lang.String uploadProtocol) { return (Get) super.setUploadProtocol(uploadProtocol); } /** * Required. The instance resource name, in the format * `projects/{project_id}/locations/{location}/instances/{instance_id}`. */ @com.google.api.client.util.Key private java.lang.String name; /** Required. The instance resource name, in the format `projects/{project_id}/locations/{location}/instances/{instance_id}`. */ public java.lang.String getName() { return name; } /** * Required. The instance resource name, in the format * `projects/{project_id}/locations/{location}/instances/{instance_id}`. */ public Get setName(java.lang.String name) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(NAME_PATTERN.matcher(name).matches(), "Parameter name must conform to the pattern " + "^projects/[^/]+/locations/[^/]+/instances/[^/]+$"); } this.name = name; return this; } @Override public Get set(String parameterName, Object value) { return (Get) super.set(parameterName, value); } } /** * Lists all instances in a project for either a specified location or for all locations. * * Create a request for the method "instances.list". * * This request holds the parameters needed by the file server. After setting any optional * parameters, call the {@link List#execute()} method to invoke the remote operation. * * @param parent Required. The project and location for which to retrieve instance information, in the format * `projects/{project_id}/locations/{location}`. In Cloud Filestore, locations map to Google * Cloud zones, for example **us-west1-b**. To retrieve instance information for all * locations, use "-" for the `{location}` value. * @return the request */ public List list(java.lang.String parent) throws java.io.IOException { List result = new List(parent); initialize(result); return result; } public class List extends CloudFilestoreRequest { private static final String REST_PATH = "v1/{+parent}/instances"; private final java.util.regex.Pattern PARENT_PATTERN = java.util.regex.Pattern.compile("^projects/[^/]+/locations/[^/]+$"); /** * Lists all instances in a project for either a specified location or for all locations. * * Create a request for the method "instances.list". * * This request holds the parameters needed by the the file server. After setting any optional * parameters, call the {@link List#execute()} method to invoke the remote operation.

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

* * @param parent Required. The project and location for which to retrieve instance information, in the format * `projects/{project_id}/locations/{location}`. In Cloud Filestore, locations map to Google * Cloud zones, for example **us-west1-b**. To retrieve instance information for all * locations, use "-" for the `{location}` value. * @since 1.13 */ protected List(java.lang.String parent) { super(CloudFilestore.this, "GET", REST_PATH, null, com.google.api.services.file.v1.model.ListInstancesResponse.class); this.parent = com.google.api.client.util.Preconditions.checkNotNull(parent, "Required parameter parent must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PARENT_PATTERN.matcher(parent).matches(), "Parameter parent must conform to the pattern " + "^projects/[^/]+/locations/[^/]+$"); } } @Override public com.google.api.client.http.HttpResponse executeUsingHead() throws java.io.IOException { return super.executeUsingHead(); } @Override public com.google.api.client.http.HttpRequest buildHttpRequestUsingHead() throws java.io.IOException { return super.buildHttpRequestUsingHead(); } @Override public List set$Xgafv(java.lang.String $Xgafv) { return (List) super.set$Xgafv($Xgafv); } @Override public List setAccessToken(java.lang.String accessToken) { return (List) super.setAccessToken(accessToken); } @Override public List setAlt(java.lang.String alt) { return (List) super.setAlt(alt); } @Override public List setCallback(java.lang.String callback) { return (List) super.setCallback(callback); } @Override public List setFields(java.lang.String fields) { return (List) super.setFields(fields); } @Override public List setKey(java.lang.String key) { return (List) super.setKey(key); } @Override public List setOauthToken(java.lang.String oauthToken) { return (List) super.setOauthToken(oauthToken); } @Override public List setPrettyPrint(java.lang.Boolean prettyPrint) { return (List) super.setPrettyPrint(prettyPrint); } @Override public List setQuotaUser(java.lang.String quotaUser) { return (List) super.setQuotaUser(quotaUser); } @Override public List setUploadType(java.lang.String uploadType) { return (List) super.setUploadType(uploadType); } @Override public List setUploadProtocol(java.lang.String uploadProtocol) { return (List) super.setUploadProtocol(uploadProtocol); } /** * Required. The project and location for which to retrieve instance information, in the * format `projects/{project_id}/locations/{location}`. In Cloud Filestore, locations map * to Google Cloud zones, for example **us-west1-b**. To retrieve instance information for * all locations, use "-" for the `{location}` value. */ @com.google.api.client.util.Key private java.lang.String parent; /** Required. The project and location for which to retrieve instance information, in the format `projects/{project_id}/locations/{location}`. In Cloud Filestore, locations map to Google Cloud zones, for example **us-west1-b**. To retrieve instance information for all locations, use "-" for the `{location}` value. */ public java.lang.String getParent() { return parent; } /** * Required. The project and location for which to retrieve instance information, in the * format `projects/{project_id}/locations/{location}`. In Cloud Filestore, locations map * to Google Cloud zones, for example **us-west1-b**. To retrieve instance information for * all locations, use "-" for the `{location}` value. */ public List setParent(java.lang.String parent) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PARENT_PATTERN.matcher(parent).matches(), "Parameter parent must conform to the pattern " + "^projects/[^/]+/locations/[^/]+$"); } this.parent = parent; return this; } /** List filter. */ @com.google.api.client.util.Key private java.lang.String filter; /** List filter. */ public java.lang.String getFilter() { return filter; } /** List filter. */ public List setFilter(java.lang.String filter) { this.filter = filter; return this; } /** Sort results. Supported values are "name", "name desc" or "" (unsorted). */ @com.google.api.client.util.Key private java.lang.String orderBy; /** Sort results. Supported values are "name", "name desc" or "" (unsorted). */ public java.lang.String getOrderBy() { return orderBy; } /** Sort results. Supported values are "name", "name desc" or "" (unsorted). */ public List setOrderBy(java.lang.String orderBy) { this.orderBy = orderBy; return this; } /** The maximum number of items to return. */ @com.google.api.client.util.Key private java.lang.Integer pageSize; /** The maximum number of items to return. */ public java.lang.Integer getPageSize() { return pageSize; } /** The maximum number of items to return. */ public List setPageSize(java.lang.Integer pageSize) { this.pageSize = pageSize; return this; } /** * The next_page_token value to use if there are additional results to retrieve for this * list request. */ @com.google.api.client.util.Key private java.lang.String pageToken; /** The next_page_token value to use if there are additional results to retrieve for this list request. */ public java.lang.String getPageToken() { return pageToken; } /** * The next_page_token value to use if there are additional results to retrieve for this * list request. */ public List setPageToken(java.lang.String pageToken) { this.pageToken = pageToken; return this; } @Override public List set(String parameterName, Object value) { return (List) super.set(parameterName, value); } } /** * Updates the settings of a specific instance. * * Create a request for the method "instances.patch". * * This request holds the parameters needed by the file server. After setting any optional * parameters, call the {@link Patch#execute()} method to invoke the remote operation. * * @param name Output only. The resource name of the instance, in the format * `projects/{project}/locations/{location}/instances/{instance}`. * @param content the {@link com.google.api.services.file.v1.model.Instance} * @return the request */ public Patch patch(java.lang.String name, com.google.api.services.file.v1.model.Instance content) throws java.io.IOException { Patch result = new Patch(name, content); initialize(result); return result; } public class Patch extends CloudFilestoreRequest { private static final String REST_PATH = "v1/{+name}"; private final java.util.regex.Pattern NAME_PATTERN = java.util.regex.Pattern.compile("^projects/[^/]+/locations/[^/]+/instances/[^/]+$"); /** * Updates the settings of a specific instance. * * Create a request for the method "instances.patch". * * This request holds the parameters needed by the the file server. After setting any optional * parameters, call the {@link Patch#execute()} method to invoke the remote operation.

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

* * @param name Output only. The resource name of the instance, in the format * `projects/{project}/locations/{location}/instances/{instance}`. * @param content the {@link com.google.api.services.file.v1.model.Instance} * @since 1.13 */ protected Patch(java.lang.String name, com.google.api.services.file.v1.model.Instance content) { super(CloudFilestore.this, "PATCH", REST_PATH, content, com.google.api.services.file.v1.model.Operation.class); this.name = com.google.api.client.util.Preconditions.checkNotNull(name, "Required parameter name must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(NAME_PATTERN.matcher(name).matches(), "Parameter name must conform to the pattern " + "^projects/[^/]+/locations/[^/]+/instances/[^/]+$"); } } @Override public Patch set$Xgafv(java.lang.String $Xgafv) { return (Patch) super.set$Xgafv($Xgafv); } @Override public Patch setAccessToken(java.lang.String accessToken) { return (Patch) super.setAccessToken(accessToken); } @Override public Patch setAlt(java.lang.String alt) { return (Patch) super.setAlt(alt); } @Override public Patch setCallback(java.lang.String callback) { return (Patch) super.setCallback(callback); } @Override public Patch setFields(java.lang.String fields) { return (Patch) super.setFields(fields); } @Override public Patch setKey(java.lang.String key) { return (Patch) super.setKey(key); } @Override public Patch setOauthToken(java.lang.String oauthToken) { return (Patch) super.setOauthToken(oauthToken); } @Override public Patch setPrettyPrint(java.lang.Boolean prettyPrint) { return (Patch) super.setPrettyPrint(prettyPrint); } @Override public Patch setQuotaUser(java.lang.String quotaUser) { return (Patch) super.setQuotaUser(quotaUser); } @Override public Patch setUploadType(java.lang.String uploadType) { return (Patch) super.setUploadType(uploadType); } @Override public Patch setUploadProtocol(java.lang.String uploadProtocol) { return (Patch) super.setUploadProtocol(uploadProtocol); } /** * Output only. The resource name of the instance, in the format * `projects/{project}/locations/{location}/instances/{instance}`. */ @com.google.api.client.util.Key private java.lang.String name; /** Output only. The resource name of the instance, in the format `projects/{project}/locations/{location}/instances/{instance}`. */ public java.lang.String getName() { return name; } /** * Output only. The resource name of the instance, in the format * `projects/{project}/locations/{location}/instances/{instance}`. */ public Patch setName(java.lang.String name) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(NAME_PATTERN.matcher(name).matches(), "Parameter name must conform to the pattern " + "^projects/[^/]+/locations/[^/]+/instances/[^/]+$"); } this.name = name; return this; } /** * Mask of fields to update. At least one path must be supplied in this field. The * elements of the repeated paths field may only include these fields: * "description" * * "file_shares" * "labels" * "performance_config" * "deletion_protection_enabled" * * "deletion_protection_reason" */ @com.google.api.client.util.Key private String updateMask; /** Mask of fields to update. At least one path must be supplied in this field. The elements of the repeated paths field may only include these fields: * "description" * "file_shares" * "labels" * "performance_config" * "deletion_protection_enabled" * "deletion_protection_reason" */ public String getUpdateMask() { return updateMask; } /** * Mask of fields to update. At least one path must be supplied in this field. The * elements of the repeated paths field may only include these fields: * "description" * * "file_shares" * "labels" * "performance_config" * "deletion_protection_enabled" * * "deletion_protection_reason" */ public Patch setUpdateMask(String updateMask) { this.updateMask = updateMask; return this; } @Override public Patch set(String parameterName, Object value) { return (Patch) super.set(parameterName, value); } } /** * Promote the standby instance (replica). * * Create a request for the method "instances.promoteReplica". * * This request holds the parameters needed by the file server. After setting any optional * parameters, call the {@link PromoteReplica#execute()} method to invoke the remote operation. * * @param name Required. The resource name of the instance, in the format * `projects/{project_id}/locations/{location_id}/instances/{instance_id}`. * @param content the {@link com.google.api.services.file.v1.model.PromoteReplicaRequest} * @return the request */ public PromoteReplica promoteReplica(java.lang.String name, com.google.api.services.file.v1.model.PromoteReplicaRequest content) throws java.io.IOException { PromoteReplica result = new PromoteReplica(name, content); initialize(result); return result; } public class PromoteReplica extends CloudFilestoreRequest { private static final String REST_PATH = "v1/{+name}:promoteReplica"; private final java.util.regex.Pattern NAME_PATTERN = java.util.regex.Pattern.compile("^projects/[^/]+/locations/[^/]+/instances/[^/]+$"); /** * Promote the standby instance (replica). * * Create a request for the method "instances.promoteReplica". * * This request holds the parameters needed by the the file server. After setting any optional * parameters, call the {@link PromoteReplica#execute()} method to invoke the remote operation. *

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

* * @param name Required. The resource name of the instance, in the format * `projects/{project_id}/locations/{location_id}/instances/{instance_id}`. * @param content the {@link com.google.api.services.file.v1.model.PromoteReplicaRequest} * @since 1.13 */ protected PromoteReplica(java.lang.String name, com.google.api.services.file.v1.model.PromoteReplicaRequest content) { super(CloudFilestore.this, "POST", REST_PATH, content, com.google.api.services.file.v1.model.Operation.class); this.name = com.google.api.client.util.Preconditions.checkNotNull(name, "Required parameter name must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(NAME_PATTERN.matcher(name).matches(), "Parameter name must conform to the pattern " + "^projects/[^/]+/locations/[^/]+/instances/[^/]+$"); } } @Override public PromoteReplica set$Xgafv(java.lang.String $Xgafv) { return (PromoteReplica) super.set$Xgafv($Xgafv); } @Override public PromoteReplica setAccessToken(java.lang.String accessToken) { return (PromoteReplica) super.setAccessToken(accessToken); } @Override public PromoteReplica setAlt(java.lang.String alt) { return (PromoteReplica) super.setAlt(alt); } @Override public PromoteReplica setCallback(java.lang.String callback) { return (PromoteReplica) super.setCallback(callback); } @Override public PromoteReplica setFields(java.lang.String fields) { return (PromoteReplica) super.setFields(fields); } @Override public PromoteReplica setKey(java.lang.String key) { return (PromoteReplica) super.setKey(key); } @Override public PromoteReplica setOauthToken(java.lang.String oauthToken) { return (PromoteReplica) super.setOauthToken(oauthToken); } @Override public PromoteReplica setPrettyPrint(java.lang.Boolean prettyPrint) { return (PromoteReplica) super.setPrettyPrint(prettyPrint); } @Override public PromoteReplica setQuotaUser(java.lang.String quotaUser) { return (PromoteReplica) super.setQuotaUser(quotaUser); } @Override public PromoteReplica setUploadType(java.lang.String uploadType) { return (PromoteReplica) super.setUploadType(uploadType); } @Override public PromoteReplica setUploadProtocol(java.lang.String uploadProtocol) { return (PromoteReplica) super.setUploadProtocol(uploadProtocol); } /** * Required. The resource name of the instance, in the format * `projects/{project_id}/locations/{location_id}/instances/{instance_id}`. */ @com.google.api.client.util.Key private java.lang.String name; /** Required. The resource name of the instance, in the format `projects/{project_id}/locations/{location_id}/instances/{instance_id}`. */ public java.lang.String getName() { return name; } /** * Required. The resource name of the instance, in the format * `projects/{project_id}/locations/{location_id}/instances/{instance_id}`. */ public PromoteReplica setName(java.lang.String name) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(NAME_PATTERN.matcher(name).matches(), "Parameter name must conform to the pattern " + "^projects/[^/]+/locations/[^/]+/instances/[^/]+$"); } this.name = name; return this; } @Override public PromoteReplica set(String parameterName, Object value) { return (PromoteReplica) super.set(parameterName, value); } } /** * Restores an existing instance's file share from a backup. The capacity of the instance needs to * be equal to or larger than the capacity of the backup (and also equal to or larger than the * minimum capacity of the tier). * * Create a request for the method "instances.restore". * * This request holds the parameters needed by the file server. After setting any optional * parameters, call the {@link Restore#execute()} method to invoke the remote operation. * * @param name Required. The resource name of the instance, in the format * `projects/{project_number}/locations/{location_id}/instances/{instance_id}`. * @param content the {@link com.google.api.services.file.v1.model.RestoreInstanceRequest} * @return the request */ public Restore restore(java.lang.String name, com.google.api.services.file.v1.model.RestoreInstanceRequest content) throws java.io.IOException { Restore result = new Restore(name, content); initialize(result); return result; } public class Restore extends CloudFilestoreRequest { private static final String REST_PATH = "v1/{+name}:restore"; private final java.util.regex.Pattern NAME_PATTERN = java.util.regex.Pattern.compile("^projects/[^/]+/locations/[^/]+/instances/[^/]+$"); /** * Restores an existing instance's file share from a backup. The capacity of the instance needs to * be equal to or larger than the capacity of the backup (and also equal to or larger than the * minimum capacity of the tier). * * Create a request for the method "instances.restore". * * This request holds the parameters needed by the the file server. After setting any optional * parameters, call the {@link Restore#execute()} method to invoke the remote operation.

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

* * @param name Required. The resource name of the instance, in the format * `projects/{project_number}/locations/{location_id}/instances/{instance_id}`. * @param content the {@link com.google.api.services.file.v1.model.RestoreInstanceRequest} * @since 1.13 */ protected Restore(java.lang.String name, com.google.api.services.file.v1.model.RestoreInstanceRequest content) { super(CloudFilestore.this, "POST", REST_PATH, content, com.google.api.services.file.v1.model.Operation.class); this.name = com.google.api.client.util.Preconditions.checkNotNull(name, "Required parameter name must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(NAME_PATTERN.matcher(name).matches(), "Parameter name must conform to the pattern " + "^projects/[^/]+/locations/[^/]+/instances/[^/]+$"); } } @Override public Restore set$Xgafv(java.lang.String $Xgafv) { return (Restore) super.set$Xgafv($Xgafv); } @Override public Restore setAccessToken(java.lang.String accessToken) { return (Restore) super.setAccessToken(accessToken); } @Override public Restore setAlt(java.lang.String alt) { return (Restore) super.setAlt(alt); } @Override public Restore setCallback(java.lang.String callback) { return (Restore) super.setCallback(callback); } @Override public Restore setFields(java.lang.String fields) { return (Restore) super.setFields(fields); } @Override public Restore setKey(java.lang.String key) { return (Restore) super.setKey(key); } @Override public Restore setOauthToken(java.lang.String oauthToken) { return (Restore) super.setOauthToken(oauthToken); } @Override public Restore setPrettyPrint(java.lang.Boolean prettyPrint) { return (Restore) super.setPrettyPrint(prettyPrint); } @Override public Restore setQuotaUser(java.lang.String quotaUser) { return (Restore) super.setQuotaUser(quotaUser); } @Override public Restore setUploadType(java.lang.String uploadType) { return (Restore) super.setUploadType(uploadType); } @Override public Restore setUploadProtocol(java.lang.String uploadProtocol) { return (Restore) super.setUploadProtocol(uploadProtocol); } /** * Required. The resource name of the instance, in the format * `projects/{project_number}/locations/{location_id}/instances/{instance_id}`. */ @com.google.api.client.util.Key private java.lang.String name; /** Required. The resource name of the instance, in the format `projects/{project_number}/locations/{location_id}/instances/{instance_id}`. */ public java.lang.String getName() { return name; } /** * Required. The resource name of the instance, in the format * `projects/{project_number}/locations/{location_id}/instances/{instance_id}`. */ public Restore setName(java.lang.String name) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(NAME_PATTERN.matcher(name).matches(), "Parameter name must conform to the pattern " + "^projects/[^/]+/locations/[^/]+/instances/[^/]+$"); } this.name = name; return this; } @Override public Restore set(String parameterName, Object value) { return (Restore) super.set(parameterName, value); } } /** * Revert an existing instance's file system to a specified snapshot. * * Create a request for the method "instances.revert". * * This request holds the parameters needed by the file server. After setting any optional * parameters, call the {@link Revert#execute()} method to invoke the remote operation. * * @param name Required. The resource name of the instance, in the format * `projects/{project_id}/locations/{location_id}/instances/{instance_id}`. * @param content the {@link com.google.api.services.file.v1.model.RevertInstanceRequest} * @return the request */ public Revert revert(java.lang.String name, com.google.api.services.file.v1.model.RevertInstanceRequest content) throws java.io.IOException { Revert result = new Revert(name, content); initialize(result); return result; } public class Revert extends CloudFilestoreRequest { private static final String REST_PATH = "v1/{+name}:revert"; private final java.util.regex.Pattern NAME_PATTERN = java.util.regex.Pattern.compile("^projects/[^/]+/locations/[^/]+/instances/[^/]+$"); /** * Revert an existing instance's file system to a specified snapshot. * * Create a request for the method "instances.revert". * * This request holds the parameters needed by the the file server. After setting any optional * parameters, call the {@link Revert#execute()} method to invoke the remote operation.

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

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

The typical use is:

*
         *   {@code CloudFilestore file = new CloudFilestore(...);}
         *   {@code CloudFilestore.Snapshots.List request = file.snapshots().list(parameters ...)}
         * 
* * @return the resource collection */ public Snapshots snapshots() { return new Snapshots(); } /** * The "snapshots" collection of methods. */ public class Snapshots { /** * Creates a snapshot. * * Create a request for the method "snapshots.create". * * This request holds the parameters needed by the file server. After setting any optional * parameters, call the {@link Create#execute()} method to invoke the remote operation. * * @param parent Required. The Filestore Instance to create the snapshots of, in the format * `projects/{project_id}/locations/{location}/instances/{instance_id}` * @param content the {@link com.google.api.services.file.v1.model.Snapshot} * @return the request */ public Create create(java.lang.String parent, com.google.api.services.file.v1.model.Snapshot content) throws java.io.IOException { Create result = new Create(parent, content); initialize(result); return result; } public class Create extends CloudFilestoreRequest { private static final String REST_PATH = "v1/{+parent}/snapshots"; private final java.util.regex.Pattern PARENT_PATTERN = java.util.regex.Pattern.compile("^projects/[^/]+/locations/[^/]+/instances/[^/]+$"); /** * Creates a snapshot. * * Create a request for the method "snapshots.create". * * This request holds the parameters needed by the the file server. After setting any optional * parameters, call the {@link Create#execute()} method to invoke the remote operation.

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

* * @param parent Required. The Filestore Instance to create the snapshots of, in the format * `projects/{project_id}/locations/{location}/instances/{instance_id}` * @param content the {@link com.google.api.services.file.v1.model.Snapshot} * @since 1.13 */ protected Create(java.lang.String parent, com.google.api.services.file.v1.model.Snapshot content) { super(CloudFilestore.this, "POST", REST_PATH, content, com.google.api.services.file.v1.model.Operation.class); this.parent = com.google.api.client.util.Preconditions.checkNotNull(parent, "Required parameter parent must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PARENT_PATTERN.matcher(parent).matches(), "Parameter parent must conform to the pattern " + "^projects/[^/]+/locations/[^/]+/instances/[^/]+$"); } } @Override public Create set$Xgafv(java.lang.String $Xgafv) { return (Create) super.set$Xgafv($Xgafv); } @Override public Create setAccessToken(java.lang.String accessToken) { return (Create) super.setAccessToken(accessToken); } @Override public Create setAlt(java.lang.String alt) { return (Create) super.setAlt(alt); } @Override public Create setCallback(java.lang.String callback) { return (Create) super.setCallback(callback); } @Override public Create setFields(java.lang.String fields) { return (Create) super.setFields(fields); } @Override public Create setKey(java.lang.String key) { return (Create) super.setKey(key); } @Override public Create setOauthToken(java.lang.String oauthToken) { return (Create) super.setOauthToken(oauthToken); } @Override public Create setPrettyPrint(java.lang.Boolean prettyPrint) { return (Create) super.setPrettyPrint(prettyPrint); } @Override public Create setQuotaUser(java.lang.String quotaUser) { return (Create) super.setQuotaUser(quotaUser); } @Override public Create setUploadType(java.lang.String uploadType) { return (Create) super.setUploadType(uploadType); } @Override public Create setUploadProtocol(java.lang.String uploadProtocol) { return (Create) super.setUploadProtocol(uploadProtocol); } /** * Required. The Filestore Instance to create the snapshots of, in the format * `projects/{project_id}/locations/{location}/instances/{instance_id}` */ @com.google.api.client.util.Key private java.lang.String parent; /** Required. The Filestore Instance to create the snapshots of, in the format `projects/{project_id}/locations/{location}/instances/{instance_id}` */ public java.lang.String getParent() { return parent; } /** * Required. The Filestore Instance to create the snapshots of, in the format * `projects/{project_id}/locations/{location}/instances/{instance_id}` */ public Create setParent(java.lang.String parent) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PARENT_PATTERN.matcher(parent).matches(), "Parameter parent must conform to the pattern " + "^projects/[^/]+/locations/[^/]+/instances/[^/]+$"); } this.parent = parent; return this; } /** * Required. The ID to use for the snapshot. The ID must be unique within the specified * instance. This value must start with a lowercase letter followed by up to 62 * lowercase letters, numbers, or hyphens, and cannot end with a hyphen. */ @com.google.api.client.util.Key private java.lang.String snapshotId; /** Required. The ID to use for the snapshot. The ID must be unique within the specified instance. This value must start with a lowercase letter followed by up to 62 lowercase letters, numbers, or hyphens, and cannot end with a hyphen. */ public java.lang.String getSnapshotId() { return snapshotId; } /** * Required. The ID to use for the snapshot. The ID must be unique within the specified * instance. This value must start with a lowercase letter followed by up to 62 * lowercase letters, numbers, or hyphens, and cannot end with a hyphen. */ public Create setSnapshotId(java.lang.String snapshotId) { this.snapshotId = snapshotId; return this; } @Override public Create set(String parameterName, Object value) { return (Create) super.set(parameterName, value); } } /** * Deletes a snapshot. * * Create a request for the method "snapshots.delete". * * This request holds the parameters needed by the file server. After setting any optional * parameters, call the {@link Delete#execute()} method to invoke the remote operation. * * @param name Required. The snapshot resource name, in the format * `projects/{project_id}/locations/{location}/instances/{instance_id}/snapshots/{snapshot_id * }` * @return the request */ public Delete delete(java.lang.String name) throws java.io.IOException { Delete result = new Delete(name); initialize(result); return result; } public class Delete extends CloudFilestoreRequest { private static final String REST_PATH = "v1/{+name}"; private final java.util.regex.Pattern NAME_PATTERN = java.util.regex.Pattern.compile("^projects/[^/]+/locations/[^/]+/instances/[^/]+/snapshots/[^/]+$"); /** * Deletes a snapshot. * * Create a request for the method "snapshots.delete". * * This request holds the parameters needed by the the file server. After setting any optional * parameters, call the {@link Delete#execute()} method to invoke the remote operation.

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

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

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

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

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

* * @param parent Required. The instance for which to retrieve snapshot information, in the format * `projects/{project_id}/locations/{location}/instances/{instance_id}`. * @since 1.13 */ protected List(java.lang.String parent) { super(CloudFilestore.this, "GET", REST_PATH, null, com.google.api.services.file.v1.model.ListSnapshotsResponse.class); this.parent = com.google.api.client.util.Preconditions.checkNotNull(parent, "Required parameter parent must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PARENT_PATTERN.matcher(parent).matches(), "Parameter parent must conform to the pattern " + "^projects/[^/]+/locations/[^/]+/instances/[^/]+$"); } } @Override public com.google.api.client.http.HttpResponse executeUsingHead() throws java.io.IOException { return super.executeUsingHead(); } @Override public com.google.api.client.http.HttpRequest buildHttpRequestUsingHead() throws java.io.IOException { return super.buildHttpRequestUsingHead(); } @Override public List set$Xgafv(java.lang.String $Xgafv) { return (List) super.set$Xgafv($Xgafv); } @Override public List setAccessToken(java.lang.String accessToken) { return (List) super.setAccessToken(accessToken); } @Override public List setAlt(java.lang.String alt) { return (List) super.setAlt(alt); } @Override public List setCallback(java.lang.String callback) { return (List) super.setCallback(callback); } @Override public List setFields(java.lang.String fields) { return (List) super.setFields(fields); } @Override public List setKey(java.lang.String key) { return (List) super.setKey(key); } @Override public List setOauthToken(java.lang.String oauthToken) { return (List) super.setOauthToken(oauthToken); } @Override public List setPrettyPrint(java.lang.Boolean prettyPrint) { return (List) super.setPrettyPrint(prettyPrint); } @Override public List setQuotaUser(java.lang.String quotaUser) { return (List) super.setQuotaUser(quotaUser); } @Override public List setUploadType(java.lang.String uploadType) { return (List) super.setUploadType(uploadType); } @Override public List setUploadProtocol(java.lang.String uploadProtocol) { return (List) super.setUploadProtocol(uploadProtocol); } /** * Required. The instance for which to retrieve snapshot information, in the format * `projects/{project_id}/locations/{location}/instances/{instance_id}`. */ @com.google.api.client.util.Key private java.lang.String parent; /** Required. The instance for which to retrieve snapshot information, in the format `projects/{project_id}/locations/{location}/instances/{instance_id}`. */ public java.lang.String getParent() { return parent; } /** * Required. The instance for which to retrieve snapshot information, in the format * `projects/{project_id}/locations/{location}/instances/{instance_id}`. */ public List setParent(java.lang.String parent) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PARENT_PATTERN.matcher(parent).matches(), "Parameter parent must conform to the pattern " + "^projects/[^/]+/locations/[^/]+/instances/[^/]+$"); } this.parent = parent; return this; } /** List filter. */ @com.google.api.client.util.Key private java.lang.String filter; /** List filter. */ public java.lang.String getFilter() { return filter; } /** List filter. */ public List setFilter(java.lang.String filter) { this.filter = filter; return this; } /** Sort results. Supported values are "name", "name desc" or "" (unsorted). */ @com.google.api.client.util.Key private java.lang.String orderBy; /** Sort results. Supported values are "name", "name desc" or "" (unsorted). */ public java.lang.String getOrderBy() { return orderBy; } /** Sort results. Supported values are "name", "name desc" or "" (unsorted). */ public List setOrderBy(java.lang.String orderBy) { this.orderBy = orderBy; return this; } /** The maximum number of items to return. */ @com.google.api.client.util.Key private java.lang.Integer pageSize; /** The maximum number of items to return. */ public java.lang.Integer getPageSize() { return pageSize; } /** The maximum number of items to return. */ public List setPageSize(java.lang.Integer pageSize) { this.pageSize = pageSize; return this; } /** * The next_page_token value to use if there are additional results to retrieve for this * list request. */ @com.google.api.client.util.Key private java.lang.String pageToken; /** The next_page_token value to use if there are additional results to retrieve for this list request. */ public java.lang.String getPageToken() { return pageToken; } /** * The next_page_token value to use if there are additional results to retrieve for this * list request. */ public List setPageToken(java.lang.String pageToken) { this.pageToken = pageToken; return this; } @Override public List set(String parameterName, Object value) { return (List) super.set(parameterName, value); } } /** * Updates the settings of a specific snapshot. * * Create a request for the method "snapshots.patch". * * This request holds the parameters needed by the file server. After setting any optional * parameters, call the {@link Patch#execute()} method to invoke the remote operation. * * @param name Output only. The resource name of the snapshot, in the format * `projects/{project_id}/locations/{location_id}/instances/{instance_id}/snapshots/{snapshot * _id}`. * @param content the {@link com.google.api.services.file.v1.model.Snapshot} * @return the request */ public Patch patch(java.lang.String name, com.google.api.services.file.v1.model.Snapshot content) throws java.io.IOException { Patch result = new Patch(name, content); initialize(result); return result; } public class Patch extends CloudFilestoreRequest { private static final String REST_PATH = "v1/{+name}"; private final java.util.regex.Pattern NAME_PATTERN = java.util.regex.Pattern.compile("^projects/[^/]+/locations/[^/]+/instances/[^/]+/snapshots/[^/]+$"); /** * Updates the settings of a specific snapshot. * * Create a request for the method "snapshots.patch". * * This request holds the parameters needed by the the file server. After setting any optional * parameters, call the {@link Patch#execute()} method to invoke the remote operation.

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

* * @param name Output only. The resource name of the snapshot, in the format * `projects/{project_id}/locations/{location_id}/instances/{instance_id}/snapshots/{snapshot * _id}`. * @param content the {@link com.google.api.services.file.v1.model.Snapshot} * @since 1.13 */ protected Patch(java.lang.String name, com.google.api.services.file.v1.model.Snapshot content) { super(CloudFilestore.this, "PATCH", REST_PATH, content, com.google.api.services.file.v1.model.Operation.class); this.name = com.google.api.client.util.Preconditions.checkNotNull(name, "Required parameter name must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(NAME_PATTERN.matcher(name).matches(), "Parameter name must conform to the pattern " + "^projects/[^/]+/locations/[^/]+/instances/[^/]+/snapshots/[^/]+$"); } } @Override public Patch set$Xgafv(java.lang.String $Xgafv) { return (Patch) super.set$Xgafv($Xgafv); } @Override public Patch setAccessToken(java.lang.String accessToken) { return (Patch) super.setAccessToken(accessToken); } @Override public Patch setAlt(java.lang.String alt) { return (Patch) super.setAlt(alt); } @Override public Patch setCallback(java.lang.String callback) { return (Patch) super.setCallback(callback); } @Override public Patch setFields(java.lang.String fields) { return (Patch) super.setFields(fields); } @Override public Patch setKey(java.lang.String key) { return (Patch) super.setKey(key); } @Override public Patch setOauthToken(java.lang.String oauthToken) { return (Patch) super.setOauthToken(oauthToken); } @Override public Patch setPrettyPrint(java.lang.Boolean prettyPrint) { return (Patch) super.setPrettyPrint(prettyPrint); } @Override public Patch setQuotaUser(java.lang.String quotaUser) { return (Patch) super.setQuotaUser(quotaUser); } @Override public Patch setUploadType(java.lang.String uploadType) { return (Patch) super.setUploadType(uploadType); } @Override public Patch setUploadProtocol(java.lang.String uploadProtocol) { return (Patch) super.setUploadProtocol(uploadProtocol); } /** * Output only. The resource name of the snapshot, in the format `projects/{project_id}/ * locations/{location_id}/instances/{instance_id}/snapshots/{snapshot_id}`. */ @com.google.api.client.util.Key private java.lang.String name; /** Output only. The resource name of the snapshot, in the format `projects/{project_id}/locations/{location_id}/instances/{instance_id}/snapshots/{snapshot_id}`. */ public java.lang.String getName() { return name; } /** * Output only. The resource name of the snapshot, in the format `projects/{project_id}/ * locations/{location_id}/instances/{instance_id}/snapshots/{snapshot_id}`. */ public Patch setName(java.lang.String name) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(NAME_PATTERN.matcher(name).matches(), "Parameter name must conform to the pattern " + "^projects/[^/]+/locations/[^/]+/instances/[^/]+/snapshots/[^/]+$"); } this.name = name; return this; } /** * Required. Mask of fields to update. At least one path must be supplied in this field. */ @com.google.api.client.util.Key private String updateMask; /** Required. Mask of fields to update. At least one path must be supplied in this field. */ public String getUpdateMask() { return updateMask; } /** * Required. Mask of fields to update. At least one path must be supplied in this field. */ 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 Operations collection. * *

The typical use is:

*
       *   {@code CloudFilestore file = new CloudFilestore(...);}
       *   {@code CloudFilestore.Operations.List request = file.operations().list(parameters ...)}
       * 
* * @return the resource collection */ public Operations operations() { return new Operations(); } /** * The "operations" collection of methods. */ public class Operations { /** * Starts asynchronous cancellation on a long-running operation. The server makes a best effort to * cancel the operation, but success is not guaranteed. If the server doesn't support this method, * it returns `google.rpc.Code.UNIMPLEMENTED`. Clients can use Operations.GetOperation or other * methods to check whether the cancellation succeeded or whether the operation completed despite * cancellation. On successful cancellation, the operation is not deleted; instead, it becomes an * operation with an Operation.error value with a google.rpc.Status.code of 1, corresponding to * `Code.CANCELLED`. * * Create a request for the method "operations.cancel". * * This request holds the parameters needed by the file server. After setting any optional * parameters, call the {@link Cancel#execute()} method to invoke the remote operation. * * @param name The name of the operation resource to be cancelled. * @param content the {@link com.google.api.services.file.v1.model.CancelOperationRequest} * @return the request */ public Cancel cancel(java.lang.String name, com.google.api.services.file.v1.model.CancelOperationRequest content) throws java.io.IOException { Cancel result = new Cancel(name, content); initialize(result); return result; } public class Cancel extends CloudFilestoreRequest { private static final String REST_PATH = "v1/{+name}:cancel"; private final java.util.regex.Pattern NAME_PATTERN = java.util.regex.Pattern.compile("^projects/[^/]+/locations/[^/]+/operations/[^/]+$"); /** * Starts asynchronous cancellation on a long-running operation. The server makes a best effort to * cancel the operation, but success is not guaranteed. If the server doesn't support this method, * it returns `google.rpc.Code.UNIMPLEMENTED`. Clients can use Operations.GetOperation or other * methods to check whether the cancellation succeeded or whether the operation completed despite * cancellation. On successful cancellation, the operation is not deleted; instead, it becomes an * operation with an Operation.error value with a google.rpc.Status.code of 1, corresponding to * `Code.CANCELLED`. * * Create a request for the method "operations.cancel". * * This request holds the parameters needed by the the file server. After setting any optional * parameters, call the {@link Cancel#execute()} method to invoke the remote operation.

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

* * @param name The name of the operation resource to be cancelled. * @param content the {@link com.google.api.services.file.v1.model.CancelOperationRequest} * @since 1.13 */ protected Cancel(java.lang.String name, com.google.api.services.file.v1.model.CancelOperationRequest content) { super(CloudFilestore.this, "POST", REST_PATH, content, com.google.api.services.file.v1.model.Empty.class); this.name = com.google.api.client.util.Preconditions.checkNotNull(name, "Required parameter name must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(NAME_PATTERN.matcher(name).matches(), "Parameter name must conform to the pattern " + "^projects/[^/]+/locations/[^/]+/operations/[^/]+$"); } } @Override public Cancel set$Xgafv(java.lang.String $Xgafv) { return (Cancel) super.set$Xgafv($Xgafv); } @Override public Cancel setAccessToken(java.lang.String accessToken) { return (Cancel) super.setAccessToken(accessToken); } @Override public Cancel setAlt(java.lang.String alt) { return (Cancel) super.setAlt(alt); } @Override public Cancel setCallback(java.lang.String callback) { return (Cancel) super.setCallback(callback); } @Override public Cancel setFields(java.lang.String fields) { return (Cancel) super.setFields(fields); } @Override public Cancel setKey(java.lang.String key) { return (Cancel) super.setKey(key); } @Override public Cancel setOauthToken(java.lang.String oauthToken) { return (Cancel) super.setOauthToken(oauthToken); } @Override public Cancel setPrettyPrint(java.lang.Boolean prettyPrint) { return (Cancel) super.setPrettyPrint(prettyPrint); } @Override public Cancel setQuotaUser(java.lang.String quotaUser) { return (Cancel) super.setQuotaUser(quotaUser); } @Override public Cancel setUploadType(java.lang.String uploadType) { return (Cancel) super.setUploadType(uploadType); } @Override public Cancel setUploadProtocol(java.lang.String uploadProtocol) { return (Cancel) super.setUploadProtocol(uploadProtocol); } /** The name of the operation resource to be cancelled. */ @com.google.api.client.util.Key private java.lang.String name; /** The name of the operation resource to be cancelled. */ public java.lang.String getName() { return name; } /** The name of the operation resource to be cancelled. */ public Cancel setName(java.lang.String name) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(NAME_PATTERN.matcher(name).matches(), "Parameter name must conform to the pattern " + "^projects/[^/]+/locations/[^/]+/operations/[^/]+$"); } this.name = name; return this; } @Override public Cancel set(String parameterName, Object value) { return (Cancel) super.set(parameterName, value); } } /** * Deletes a long-running operation. This method indicates that the client is no longer interested * in the operation result. It does not cancel the operation. If the server doesn't support this * method, it returns `google.rpc.Code.UNIMPLEMENTED`. * * Create a request for the method "operations.delete". * * This request holds the parameters needed by the file server. After setting any optional * parameters, call the {@link Delete#execute()} method to invoke the remote operation. * * @param name The name of the operation resource to be deleted. * @return the request */ public Delete delete(java.lang.String name) throws java.io.IOException { Delete result = new Delete(name); initialize(result); return result; } public class Delete extends CloudFilestoreRequest { private static final String REST_PATH = "v1/{+name}"; private final java.util.regex.Pattern NAME_PATTERN = java.util.regex.Pattern.compile("^projects/[^/]+/locations/[^/]+/operations/[^/]+$"); /** * Deletes a long-running operation. This method indicates that the client is no longer interested * in the operation result. It does not cancel the operation. If the server doesn't support this * method, it returns `google.rpc.Code.UNIMPLEMENTED`. * * Create a request for the method "operations.delete". * * This request holds the parameters needed by the the file server. After setting any optional * parameters, call the {@link Delete#execute()} method to invoke the remote operation.

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

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

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

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

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

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

* 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 CloudFilestore}. */ @Override public CloudFilestore build() { return new CloudFilestore(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 CloudFilestoreRequestInitializer}. * * @since 1.12 */ public Builder setCloudFilestoreRequestInitializer( CloudFilestoreRequestInitializer cloudfilestoreRequestInitializer) { return (Builder) super.setGoogleClientRequestInitializer(cloudfilestoreRequestInitializer); } @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