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

com.google.api.services.storage.Storage Maven / Gradle / Ivy

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

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

* Stores and retrieves potentially large, immutable data objects. *

* *

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

* *

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

* * @since 1.3 * @author Google, Inc. */ @SuppressWarnings("javadoc") public class Storage 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 Storage JSON 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://storage.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://storage.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 = "storage/v1/"; /** * The default encoded batch path of the service. This is determined when the library is * generated and normally should not be changed. * * @since 1.23 */ public static final String DEFAULT_BATCH_PATH = "batch/storage/v1"; /** * The default encoded base URL of the service. This is determined when the library is generated * and normally should not be changed. */ public static final String DEFAULT_BASE_URL = DEFAULT_ROOT_URL + DEFAULT_SERVICE_PATH; /** * Constructor. * *

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

* * @param transport HTTP transport, which should normally be: *
    *
  • Google App Engine: * {@code com.google.api.client.extensions.appengine.http.UrlFetchTransport}
  • *
  • Android: {@code newCompatibleTransport} from * {@code com.google.api.client.extensions.android.http.AndroidHttp}
  • *
  • Java: {@link com.google.api.client.googleapis.javanet.GoogleNetHttpTransport#newTrustedTransport()} *
  • *
* @param jsonFactory JSON factory, which may be: *
    *
  • Jackson: {@code com.google.api.client.json.jackson2.JacksonFactory}
  • *
  • Google GSON: {@code com.google.api.client.json.gson.GsonFactory}
  • *
  • Android Honeycomb or higher: * {@code com.google.api.client.extensions.android.json.AndroidJsonFactory}
  • *
* @param httpRequestInitializer HTTP request initializer or {@code null} for none * @since 1.7 */ public Storage(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 */ Storage(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 AnywhereCaches collection. * *

The typical use is:

*
   *   {@code Storage storage = new Storage(...);}
   *   {@code Storage.AnywhereCaches.List request = storage.anywhereCaches().list(parameters ...)}
   * 
* * @return the resource collection */ public AnywhereCaches anywhereCaches() { return new AnywhereCaches(); } /** * The "anywhereCaches" collection of methods. */ public class AnywhereCaches { /** * Disables an Anywhere Cache instance. * * Create a request for the method "anywhereCaches.disable". * * This request holds the parameters needed by the storage server. After setting any optional * parameters, call the {@link Disable#execute()} method to invoke the remote operation. * * @param bucket Name of the parent bucket. * @param anywhereCacheId The ID of requested Anywhere Cache instance. * @return the request */ public Disable disable(java.lang.String bucket, java.lang.String anywhereCacheId) throws java.io.IOException { Disable result = new Disable(bucket, anywhereCacheId); initialize(result); return result; } public class Disable extends StorageRequest { private static final String REST_PATH = "b/{bucket}/anywhereCaches/{anywhereCacheId}/disable"; /** * Disables an Anywhere Cache instance. * * Create a request for the method "anywhereCaches.disable". * * This request holds the parameters needed by the the storage server. After setting any optional * parameters, call the {@link Disable#execute()} method to invoke the remote operation.

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

* * @param bucket Name of the parent bucket. * @param anywhereCacheId The ID of requested Anywhere Cache instance. * @since 1.13 */ protected Disable(java.lang.String bucket, java.lang.String anywhereCacheId) { super(Storage.this, "POST", REST_PATH, null, com.google.api.services.storage.model.AnywhereCache.class); this.bucket = com.google.api.client.util.Preconditions.checkNotNull(bucket, "Required parameter bucket must be specified."); this.anywhereCacheId = com.google.api.client.util.Preconditions.checkNotNull(anywhereCacheId, "Required parameter anywhereCacheId must be specified."); } @Override public Disable setAlt(java.lang.String alt) { return (Disable) super.setAlt(alt); } @Override public Disable setFields(java.lang.String fields) { return (Disable) super.setFields(fields); } @Override public Disable setKey(java.lang.String key) { return (Disable) super.setKey(key); } @Override public Disable setOauthToken(java.lang.String oauthToken) { return (Disable) super.setOauthToken(oauthToken); } @Override public Disable setPrettyPrint(java.lang.Boolean prettyPrint) { return (Disable) super.setPrettyPrint(prettyPrint); } @Override public Disable setQuotaUser(java.lang.String quotaUser) { return (Disable) super.setQuotaUser(quotaUser); } @Override public Disable setUploadType(java.lang.String uploadType) { return (Disable) super.setUploadType(uploadType); } @Override public Disable setUserIp(java.lang.String userIp) { return (Disable) super.setUserIp(userIp); } /** Name of the parent bucket. */ @com.google.api.client.util.Key private java.lang.String bucket; /** Name of the parent bucket. */ public java.lang.String getBucket() { return bucket; } /** Name of the parent bucket. */ public Disable setBucket(java.lang.String bucket) { this.bucket = bucket; return this; } /** The ID of requested Anywhere Cache instance. */ @com.google.api.client.util.Key private java.lang.String anywhereCacheId; /** The ID of requested Anywhere Cache instance. */ public java.lang.String getAnywhereCacheId() { return anywhereCacheId; } /** The ID of requested Anywhere Cache instance. */ public Disable setAnywhereCacheId(java.lang.String anywhereCacheId) { this.anywhereCacheId = anywhereCacheId; return this; } @Override public Disable set(String parameterName, Object value) { return (Disable) super.set(parameterName, value); } } /** * Returns the metadata of an Anywhere Cache instance. * * Create a request for the method "anywhereCaches.get". * * This request holds the parameters needed by the storage server. After setting any optional * parameters, call the {@link Get#execute()} method to invoke the remote operation. * * @param bucket Name of the parent bucket. * @param anywhereCacheId The ID of requested Anywhere Cache instance. * @return the request */ public Get get(java.lang.String bucket, java.lang.String anywhereCacheId) throws java.io.IOException { Get result = new Get(bucket, anywhereCacheId); initialize(result); return result; } public class Get extends StorageRequest { private static final String REST_PATH = "b/{bucket}/anywhereCaches/{anywhereCacheId}"; /** * Returns the metadata of an Anywhere Cache instance. * * Create a request for the method "anywhereCaches.get". * * This request holds the parameters needed by the the storage 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 bucket Name of the parent bucket. * @param anywhereCacheId The ID of requested Anywhere Cache instance. * @since 1.13 */ protected Get(java.lang.String bucket, java.lang.String anywhereCacheId) { super(Storage.this, "GET", REST_PATH, null, com.google.api.services.storage.model.AnywhereCache.class); this.bucket = com.google.api.client.util.Preconditions.checkNotNull(bucket, "Required parameter bucket must be specified."); this.anywhereCacheId = com.google.api.client.util.Preconditions.checkNotNull(anywhereCacheId, "Required parameter anywhereCacheId must be specified."); } @Override public com.google.api.client.http.HttpResponse executeUsingHead() throws java.io.IOException { return super.executeUsingHead(); } @Override public com.google.api.client.http.HttpRequest buildHttpRequestUsingHead() throws java.io.IOException { return super.buildHttpRequestUsingHead(); } @Override public Get setAlt(java.lang.String alt) { return (Get) super.setAlt(alt); } @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 setUserIp(java.lang.String userIp) { return (Get) super.setUserIp(userIp); } /** Name of the parent bucket. */ @com.google.api.client.util.Key private java.lang.String bucket; /** Name of the parent bucket. */ public java.lang.String getBucket() { return bucket; } /** Name of the parent bucket. */ public Get setBucket(java.lang.String bucket) { this.bucket = bucket; return this; } /** The ID of requested Anywhere Cache instance. */ @com.google.api.client.util.Key private java.lang.String anywhereCacheId; /** The ID of requested Anywhere Cache instance. */ public java.lang.String getAnywhereCacheId() { return anywhereCacheId; } /** The ID of requested Anywhere Cache instance. */ public Get setAnywhereCacheId(java.lang.String anywhereCacheId) { this.anywhereCacheId = anywhereCacheId; return this; } @Override public Get set(String parameterName, Object value) { return (Get) super.set(parameterName, value); } } /** * Creates an Anywhere Cache instance. * * Create a request for the method "anywhereCaches.insert". * * This request holds the parameters needed by the storage server. After setting any optional * parameters, call the {@link Insert#execute()} method to invoke the remote operation. * * @param bucket Name of the parent bucket. * @param content the {@link com.google.api.services.storage.model.AnywhereCache} * @return the request */ public Insert insert(java.lang.String bucket, com.google.api.services.storage.model.AnywhereCache content) throws java.io.IOException { Insert result = new Insert(bucket, content); initialize(result); return result; } public class Insert extends StorageRequest { private static final String REST_PATH = "b/{bucket}/anywhereCaches"; /** * Creates an Anywhere Cache instance. * * Create a request for the method "anywhereCaches.insert". * * This request holds the parameters needed by the the storage server. After setting any optional * parameters, call the {@link Insert#execute()} method to invoke the remote operation.

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

* * @param bucket Name of the parent bucket. * @param content the {@link com.google.api.services.storage.model.AnywhereCache} * @since 1.13 */ protected Insert(java.lang.String bucket, com.google.api.services.storage.model.AnywhereCache content) { super(Storage.this, "POST", REST_PATH, content, com.google.api.services.storage.model.GoogleLongrunningOperation.class); this.bucket = com.google.api.client.util.Preconditions.checkNotNull(bucket, "Required parameter bucket must be specified."); } @Override public Insert setAlt(java.lang.String alt) { return (Insert) super.setAlt(alt); } @Override public Insert setFields(java.lang.String fields) { return (Insert) super.setFields(fields); } @Override public Insert setKey(java.lang.String key) { return (Insert) super.setKey(key); } @Override public Insert setOauthToken(java.lang.String oauthToken) { return (Insert) super.setOauthToken(oauthToken); } @Override public Insert setPrettyPrint(java.lang.Boolean prettyPrint) { return (Insert) super.setPrettyPrint(prettyPrint); } @Override public Insert setQuotaUser(java.lang.String quotaUser) { return (Insert) super.setQuotaUser(quotaUser); } @Override public Insert setUploadType(java.lang.String uploadType) { return (Insert) super.setUploadType(uploadType); } @Override public Insert setUserIp(java.lang.String userIp) { return (Insert) super.setUserIp(userIp); } /** Name of the parent bucket. */ @com.google.api.client.util.Key private java.lang.String bucket; /** Name of the parent bucket. */ public java.lang.String getBucket() { return bucket; } /** Name of the parent bucket. */ public Insert setBucket(java.lang.String bucket) { this.bucket = bucket; return this; } @Override public Insert set(String parameterName, Object value) { return (Insert) super.set(parameterName, value); } } /** * Returns a list of Anywhere Cache instances of the bucket matching the criteria. * * Create a request for the method "anywhereCaches.list". * * This request holds the parameters needed by the storage server. After setting any optional * parameters, call the {@link List#execute()} method to invoke the remote operation. * * @param bucket Name of the parent bucket. * @return the request */ public List list(java.lang.String bucket) throws java.io.IOException { List result = new List(bucket); initialize(result); return result; } public class List extends StorageRequest { private static final String REST_PATH = "b/{bucket}/anywhereCaches"; /** * Returns a list of Anywhere Cache instances of the bucket matching the criteria. * * Create a request for the method "anywhereCaches.list". * * This request holds the parameters needed by the the storage 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 bucket Name of the parent bucket. * @since 1.13 */ protected List(java.lang.String bucket) { super(Storage.this, "GET", REST_PATH, null, com.google.api.services.storage.model.AnywhereCaches.class); this.bucket = com.google.api.client.util.Preconditions.checkNotNull(bucket, "Required parameter bucket must be specified."); } @Override public com.google.api.client.http.HttpResponse executeUsingHead() throws java.io.IOException { return super.executeUsingHead(); } @Override public com.google.api.client.http.HttpRequest buildHttpRequestUsingHead() throws java.io.IOException { return super.buildHttpRequestUsingHead(); } @Override public List setAlt(java.lang.String alt) { return (List) super.setAlt(alt); } @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 setUserIp(java.lang.String userIp) { return (List) super.setUserIp(userIp); } /** Name of the parent bucket. */ @com.google.api.client.util.Key private java.lang.String bucket; /** Name of the parent bucket. */ public java.lang.String getBucket() { return bucket; } /** Name of the parent bucket. */ public List setBucket(java.lang.String bucket) { this.bucket = bucket; return this; } /** Maximum number of items to return in a single page of responses. Maximum 1000. */ @com.google.api.client.util.Key private java.lang.Integer pageSize; /** Maximum number of items to return in a single page of responses. Maximum 1000. [minimum: 0] */ public java.lang.Integer getPageSize() { return pageSize; } /** Maximum number of items to return in a single page of responses. Maximum 1000. */ public List setPageSize(java.lang.Integer pageSize) { this.pageSize = pageSize; return this; } /** * A previously-returned page token representing part of the larger set of results to view. */ @com.google.api.client.util.Key private java.lang.String pageToken; /** A previously-returned page token representing part of the larger set of results to view. */ public java.lang.String getPageToken() { return pageToken; } /** * A previously-returned page token representing part of the larger set of results to view. */ 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); } } /** * Pauses an Anywhere Cache instance. * * Create a request for the method "anywhereCaches.pause". * * This request holds the parameters needed by the storage server. After setting any optional * parameters, call the {@link Pause#execute()} method to invoke the remote operation. * * @param bucket Name of the parent bucket. * @param anywhereCacheId The ID of requested Anywhere Cache instance. * @return the request */ public Pause pause(java.lang.String bucket, java.lang.String anywhereCacheId) throws java.io.IOException { Pause result = new Pause(bucket, anywhereCacheId); initialize(result); return result; } public class Pause extends StorageRequest { private static final String REST_PATH = "b/{bucket}/anywhereCaches/{anywhereCacheId}/pause"; /** * Pauses an Anywhere Cache instance. * * Create a request for the method "anywhereCaches.pause". * * This request holds the parameters needed by the the storage server. After setting any optional * parameters, call the {@link Pause#execute()} method to invoke the remote operation.

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

* * @param bucket Name of the parent bucket. * @param anywhereCacheId The ID of requested Anywhere Cache instance. * @since 1.13 */ protected Pause(java.lang.String bucket, java.lang.String anywhereCacheId) { super(Storage.this, "POST", REST_PATH, null, com.google.api.services.storage.model.AnywhereCache.class); this.bucket = com.google.api.client.util.Preconditions.checkNotNull(bucket, "Required parameter bucket must be specified."); this.anywhereCacheId = com.google.api.client.util.Preconditions.checkNotNull(anywhereCacheId, "Required parameter anywhereCacheId must be specified."); } @Override public Pause setAlt(java.lang.String alt) { return (Pause) super.setAlt(alt); } @Override public Pause setFields(java.lang.String fields) { return (Pause) super.setFields(fields); } @Override public Pause setKey(java.lang.String key) { return (Pause) super.setKey(key); } @Override public Pause setOauthToken(java.lang.String oauthToken) { return (Pause) super.setOauthToken(oauthToken); } @Override public Pause setPrettyPrint(java.lang.Boolean prettyPrint) { return (Pause) super.setPrettyPrint(prettyPrint); } @Override public Pause setQuotaUser(java.lang.String quotaUser) { return (Pause) super.setQuotaUser(quotaUser); } @Override public Pause setUploadType(java.lang.String uploadType) { return (Pause) super.setUploadType(uploadType); } @Override public Pause setUserIp(java.lang.String userIp) { return (Pause) super.setUserIp(userIp); } /** Name of the parent bucket. */ @com.google.api.client.util.Key private java.lang.String bucket; /** Name of the parent bucket. */ public java.lang.String getBucket() { return bucket; } /** Name of the parent bucket. */ public Pause setBucket(java.lang.String bucket) { this.bucket = bucket; return this; } /** The ID of requested Anywhere Cache instance. */ @com.google.api.client.util.Key private java.lang.String anywhereCacheId; /** The ID of requested Anywhere Cache instance. */ public java.lang.String getAnywhereCacheId() { return anywhereCacheId; } /** The ID of requested Anywhere Cache instance. */ public Pause setAnywhereCacheId(java.lang.String anywhereCacheId) { this.anywhereCacheId = anywhereCacheId; return this; } @Override public Pause set(String parameterName, Object value) { return (Pause) super.set(parameterName, value); } } /** * Resumes a paused or disabled Anywhere Cache instance. * * Create a request for the method "anywhereCaches.resume". * * This request holds the parameters needed by the storage server. After setting any optional * parameters, call the {@link Resume#execute()} method to invoke the remote operation. * * @param bucket Name of the parent bucket. * @param anywhereCacheId The ID of requested Anywhere Cache instance. * @return the request */ public Resume resume(java.lang.String bucket, java.lang.String anywhereCacheId) throws java.io.IOException { Resume result = new Resume(bucket, anywhereCacheId); initialize(result); return result; } public class Resume extends StorageRequest { private static final String REST_PATH = "b/{bucket}/anywhereCaches/{anywhereCacheId}/resume"; /** * Resumes a paused or disabled Anywhere Cache instance. * * Create a request for the method "anywhereCaches.resume". * * This request holds the parameters needed by the the storage server. After setting any optional * parameters, call the {@link Resume#execute()} method to invoke the remote operation.

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

* * @param bucket Name of the parent bucket. * @param anywhereCacheId The ID of requested Anywhere Cache instance. * @since 1.13 */ protected Resume(java.lang.String bucket, java.lang.String anywhereCacheId) { super(Storage.this, "POST", REST_PATH, null, com.google.api.services.storage.model.AnywhereCache.class); this.bucket = com.google.api.client.util.Preconditions.checkNotNull(bucket, "Required parameter bucket must be specified."); this.anywhereCacheId = com.google.api.client.util.Preconditions.checkNotNull(anywhereCacheId, "Required parameter anywhereCacheId must be specified."); } @Override public Resume setAlt(java.lang.String alt) { return (Resume) super.setAlt(alt); } @Override public Resume setFields(java.lang.String fields) { return (Resume) super.setFields(fields); } @Override public Resume setKey(java.lang.String key) { return (Resume) super.setKey(key); } @Override public Resume setOauthToken(java.lang.String oauthToken) { return (Resume) super.setOauthToken(oauthToken); } @Override public Resume setPrettyPrint(java.lang.Boolean prettyPrint) { return (Resume) super.setPrettyPrint(prettyPrint); } @Override public Resume setQuotaUser(java.lang.String quotaUser) { return (Resume) super.setQuotaUser(quotaUser); } @Override public Resume setUploadType(java.lang.String uploadType) { return (Resume) super.setUploadType(uploadType); } @Override public Resume setUserIp(java.lang.String userIp) { return (Resume) super.setUserIp(userIp); } /** Name of the parent bucket. */ @com.google.api.client.util.Key private java.lang.String bucket; /** Name of the parent bucket. */ public java.lang.String getBucket() { return bucket; } /** Name of the parent bucket. */ public Resume setBucket(java.lang.String bucket) { this.bucket = bucket; return this; } /** The ID of requested Anywhere Cache instance. */ @com.google.api.client.util.Key private java.lang.String anywhereCacheId; /** The ID of requested Anywhere Cache instance. */ public java.lang.String getAnywhereCacheId() { return anywhereCacheId; } /** The ID of requested Anywhere Cache instance. */ public Resume setAnywhereCacheId(java.lang.String anywhereCacheId) { this.anywhereCacheId = anywhereCacheId; return this; } @Override public Resume set(String parameterName, Object value) { return (Resume) super.set(parameterName, value); } } /** * Updates the config(ttl and admissionPolicy) of an Anywhere Cache instance. * * Create a request for the method "anywhereCaches.update". * * This request holds the parameters needed by the storage server. After setting any optional * parameters, call the {@link Update#execute()} method to invoke the remote operation. * * @param bucket Name of the parent bucket. * @param anywhereCacheId The ID of requested Anywhere Cache instance. * @param content the {@link com.google.api.services.storage.model.AnywhereCache} * @return the request */ public Update update(java.lang.String bucket, java.lang.String anywhereCacheId, com.google.api.services.storage.model.AnywhereCache content) throws java.io.IOException { Update result = new Update(bucket, anywhereCacheId, content); initialize(result); return result; } public class Update extends StorageRequest { private static final String REST_PATH = "b/{bucket}/anywhereCaches/{anywhereCacheId}"; /** * Updates the config(ttl and admissionPolicy) of an Anywhere Cache instance. * * Create a request for the method "anywhereCaches.update". * * This request holds the parameters needed by the the storage server. After setting any optional * parameters, call the {@link Update#execute()} method to invoke the remote operation.

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

* * @param bucket Name of the parent bucket. * @param anywhereCacheId The ID of requested Anywhere Cache instance. * @param content the {@link com.google.api.services.storage.model.AnywhereCache} * @since 1.13 */ protected Update(java.lang.String bucket, java.lang.String anywhereCacheId, com.google.api.services.storage.model.AnywhereCache content) { super(Storage.this, "PATCH", REST_PATH, content, com.google.api.services.storage.model.GoogleLongrunningOperation.class); this.bucket = com.google.api.client.util.Preconditions.checkNotNull(bucket, "Required parameter bucket must be specified."); this.anywhereCacheId = com.google.api.client.util.Preconditions.checkNotNull(anywhereCacheId, "Required parameter anywhereCacheId must be specified."); } @Override public Update setAlt(java.lang.String alt) { return (Update) super.setAlt(alt); } @Override public Update setFields(java.lang.String fields) { return (Update) super.setFields(fields); } @Override public Update setKey(java.lang.String key) { return (Update) super.setKey(key); } @Override public Update setOauthToken(java.lang.String oauthToken) { return (Update) super.setOauthToken(oauthToken); } @Override public Update setPrettyPrint(java.lang.Boolean prettyPrint) { return (Update) super.setPrettyPrint(prettyPrint); } @Override public Update setQuotaUser(java.lang.String quotaUser) { return (Update) super.setQuotaUser(quotaUser); } @Override public Update setUploadType(java.lang.String uploadType) { return (Update) super.setUploadType(uploadType); } @Override public Update setUserIp(java.lang.String userIp) { return (Update) super.setUserIp(userIp); } /** Name of the parent bucket. */ @com.google.api.client.util.Key private java.lang.String bucket; /** Name of the parent bucket. */ public java.lang.String getBucket() { return bucket; } /** Name of the parent bucket. */ public Update setBucket(java.lang.String bucket) { this.bucket = bucket; return this; } /** The ID of requested Anywhere Cache instance. */ @com.google.api.client.util.Key private java.lang.String anywhereCacheId; /** The ID of requested Anywhere Cache instance. */ public java.lang.String getAnywhereCacheId() { return anywhereCacheId; } /** The ID of requested Anywhere Cache instance. */ public Update setAnywhereCacheId(java.lang.String anywhereCacheId) { this.anywhereCacheId = anywhereCacheId; return this; } @Override public Update set(String parameterName, Object value) { return (Update) super.set(parameterName, value); } } } /** * An accessor for creating requests from the BucketAccessControls collection. * *

The typical use is:

*
   *   {@code Storage storage = new Storage(...);}
   *   {@code Storage.BucketAccessControls.List request = storage.bucketAccessControls().list(parameters ...)}
   * 
* * @return the resource collection */ public BucketAccessControls bucketAccessControls() { return new BucketAccessControls(); } /** * The "bucketAccessControls" collection of methods. */ public class BucketAccessControls { /** * Permanently deletes the ACL entry for the specified entity on the specified bucket. * * Create a request for the method "bucketAccessControls.delete". * * This request holds the parameters needed by the storage server. After setting any optional * parameters, call the {@link Delete#execute()} method to invoke the remote operation. * * @param bucket Name of a bucket. * @param entity The entity holding the permission. Can be user-userId, user-emailAddress, group-groupId, group- * emailAddress, allUsers, or allAuthenticatedUsers. * @return the request */ public Delete delete(java.lang.String bucket, java.lang.String entity) throws java.io.IOException { Delete result = new Delete(bucket, entity); initialize(result); return result; } public class Delete extends StorageRequest { private static final String REST_PATH = "b/{bucket}/acl/{entity}"; /** * Permanently deletes the ACL entry for the specified entity on the specified bucket. * * Create a request for the method "bucketAccessControls.delete". * * This request holds the parameters needed by the the storage 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 bucket Name of a bucket. * @param entity The entity holding the permission. Can be user-userId, user-emailAddress, group-groupId, group- * emailAddress, allUsers, or allAuthenticatedUsers. * @since 1.13 */ protected Delete(java.lang.String bucket, java.lang.String entity) { super(Storage.this, "DELETE", REST_PATH, null, Void.class); this.bucket = com.google.api.client.util.Preconditions.checkNotNull(bucket, "Required parameter bucket must be specified."); this.entity = com.google.api.client.util.Preconditions.checkNotNull(entity, "Required parameter entity must be specified."); } @Override public Delete setAlt(java.lang.String alt) { return (Delete) super.setAlt(alt); } @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 setUserIp(java.lang.String userIp) { return (Delete) super.setUserIp(userIp); } /** Name of a bucket. */ @com.google.api.client.util.Key private java.lang.String bucket; /** Name of a bucket. */ public java.lang.String getBucket() { return bucket; } /** Name of a bucket. */ public Delete setBucket(java.lang.String bucket) { this.bucket = bucket; return this; } /** * The entity holding the permission. Can be user-userId, user-emailAddress, group-groupId, * group-emailAddress, allUsers, or allAuthenticatedUsers. */ @com.google.api.client.util.Key private java.lang.String entity; /** The entity holding the permission. Can be user-userId, user-emailAddress, group-groupId, group- emailAddress, allUsers, or allAuthenticatedUsers. */ public java.lang.String getEntity() { return entity; } /** * The entity holding the permission. Can be user-userId, user-emailAddress, group-groupId, * group-emailAddress, allUsers, or allAuthenticatedUsers. */ public Delete setEntity(java.lang.String entity) { this.entity = entity; return this; } /** The project to be billed for this request. Required for Requester Pays buckets. */ @com.google.api.client.util.Key private java.lang.String userProject; /** The project to be billed for this request. Required for Requester Pays buckets. */ public java.lang.String getUserProject() { return userProject; } /** The project to be billed for this request. Required for Requester Pays buckets. */ public Delete setUserProject(java.lang.String userProject) { this.userProject = userProject; return this; } @Override public Delete set(String parameterName, Object value) { return (Delete) super.set(parameterName, value); } } /** * Returns the ACL entry for the specified entity on the specified bucket. * * Create a request for the method "bucketAccessControls.get". * * This request holds the parameters needed by the storage server. After setting any optional * parameters, call the {@link Get#execute()} method to invoke the remote operation. * * @param bucket Name of a bucket. * @param entity The entity holding the permission. Can be user-userId, user-emailAddress, group-groupId, group- * emailAddress, allUsers, or allAuthenticatedUsers. * @return the request */ public Get get(java.lang.String bucket, java.lang.String entity) throws java.io.IOException { Get result = new Get(bucket, entity); initialize(result); return result; } public class Get extends StorageRequest { private static final String REST_PATH = "b/{bucket}/acl/{entity}"; /** * Returns the ACL entry for the specified entity on the specified bucket. * * Create a request for the method "bucketAccessControls.get". * * This request holds the parameters needed by the the storage 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 bucket Name of a bucket. * @param entity The entity holding the permission. Can be user-userId, user-emailAddress, group-groupId, group- * emailAddress, allUsers, or allAuthenticatedUsers. * @since 1.13 */ protected Get(java.lang.String bucket, java.lang.String entity) { super(Storage.this, "GET", REST_PATH, null, com.google.api.services.storage.model.BucketAccessControl.class); this.bucket = com.google.api.client.util.Preconditions.checkNotNull(bucket, "Required parameter bucket must be specified."); this.entity = com.google.api.client.util.Preconditions.checkNotNull(entity, "Required parameter entity must be specified."); } @Override public com.google.api.client.http.HttpResponse executeUsingHead() throws java.io.IOException { return super.executeUsingHead(); } @Override public com.google.api.client.http.HttpRequest buildHttpRequestUsingHead() throws java.io.IOException { return super.buildHttpRequestUsingHead(); } @Override public Get setAlt(java.lang.String alt) { return (Get) super.setAlt(alt); } @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 setUserIp(java.lang.String userIp) { return (Get) super.setUserIp(userIp); } /** Name of a bucket. */ @com.google.api.client.util.Key private java.lang.String bucket; /** Name of a bucket. */ public java.lang.String getBucket() { return bucket; } /** Name of a bucket. */ public Get setBucket(java.lang.String bucket) { this.bucket = bucket; return this; } /** * The entity holding the permission. Can be user-userId, user-emailAddress, group-groupId, * group-emailAddress, allUsers, or allAuthenticatedUsers. */ @com.google.api.client.util.Key private java.lang.String entity; /** The entity holding the permission. Can be user-userId, user-emailAddress, group-groupId, group- emailAddress, allUsers, or allAuthenticatedUsers. */ public java.lang.String getEntity() { return entity; } /** * The entity holding the permission. Can be user-userId, user-emailAddress, group-groupId, * group-emailAddress, allUsers, or allAuthenticatedUsers. */ public Get setEntity(java.lang.String entity) { this.entity = entity; return this; } /** The project to be billed for this request. Required for Requester Pays buckets. */ @com.google.api.client.util.Key private java.lang.String userProject; /** The project to be billed for this request. Required for Requester Pays buckets. */ public java.lang.String getUserProject() { return userProject; } /** The project to be billed for this request. Required for Requester Pays buckets. */ public Get setUserProject(java.lang.String userProject) { this.userProject = userProject; return this; } @Override public Get set(String parameterName, Object value) { return (Get) super.set(parameterName, value); } } /** * Creates a new ACL entry on the specified bucket. * * Create a request for the method "bucketAccessControls.insert". * * This request holds the parameters needed by the storage server. After setting any optional * parameters, call the {@link Insert#execute()} method to invoke the remote operation. * * @param bucket Name of a bucket. * @param content the {@link com.google.api.services.storage.model.BucketAccessControl} * @return the request */ public Insert insert(java.lang.String bucket, com.google.api.services.storage.model.BucketAccessControl content) throws java.io.IOException { Insert result = new Insert(bucket, content); initialize(result); return result; } public class Insert extends StorageRequest { private static final String REST_PATH = "b/{bucket}/acl"; /** * Creates a new ACL entry on the specified bucket. * * Create a request for the method "bucketAccessControls.insert". * * This request holds the parameters needed by the the storage server. After setting any optional * parameters, call the {@link Insert#execute()} method to invoke the remote operation.

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

* * @param bucket Name of a bucket. * @param content the {@link com.google.api.services.storage.model.BucketAccessControl} * @since 1.13 */ protected Insert(java.lang.String bucket, com.google.api.services.storage.model.BucketAccessControl content) { super(Storage.this, "POST", REST_PATH, content, com.google.api.services.storage.model.BucketAccessControl.class); this.bucket = com.google.api.client.util.Preconditions.checkNotNull(bucket, "Required parameter bucket must be specified."); checkRequiredParameter(content, "content"); checkRequiredParameter(content.getEntity(), "BucketAccessControl.getEntity()"); checkRequiredParameter(content, "content"); checkRequiredParameter(content.getRole(), "BucketAccessControl.getRole()"); } @Override public Insert setAlt(java.lang.String alt) { return (Insert) super.setAlt(alt); } @Override public Insert setFields(java.lang.String fields) { return (Insert) super.setFields(fields); } @Override public Insert setKey(java.lang.String key) { return (Insert) super.setKey(key); } @Override public Insert setOauthToken(java.lang.String oauthToken) { return (Insert) super.setOauthToken(oauthToken); } @Override public Insert setPrettyPrint(java.lang.Boolean prettyPrint) { return (Insert) super.setPrettyPrint(prettyPrint); } @Override public Insert setQuotaUser(java.lang.String quotaUser) { return (Insert) super.setQuotaUser(quotaUser); } @Override public Insert setUploadType(java.lang.String uploadType) { return (Insert) super.setUploadType(uploadType); } @Override public Insert setUserIp(java.lang.String userIp) { return (Insert) super.setUserIp(userIp); } /** Name of a bucket. */ @com.google.api.client.util.Key private java.lang.String bucket; /** Name of a bucket. */ public java.lang.String getBucket() { return bucket; } /** Name of a bucket. */ public Insert setBucket(java.lang.String bucket) { this.bucket = bucket; return this; } /** The project to be billed for this request. Required for Requester Pays buckets. */ @com.google.api.client.util.Key private java.lang.String userProject; /** The project to be billed for this request. Required for Requester Pays buckets. */ public java.lang.String getUserProject() { return userProject; } /** The project to be billed for this request. Required for Requester Pays buckets. */ public Insert setUserProject(java.lang.String userProject) { this.userProject = userProject; return this; } @Override public Insert set(String parameterName, Object value) { return (Insert) super.set(parameterName, value); } } /** * Retrieves ACL entries on the specified bucket. * * Create a request for the method "bucketAccessControls.list". * * This request holds the parameters needed by the storage server. After setting any optional * parameters, call the {@link List#execute()} method to invoke the remote operation. * * @param bucket Name of a bucket. * @return the request */ public List list(java.lang.String bucket) throws java.io.IOException { List result = new List(bucket); initialize(result); return result; } public class List extends StorageRequest { private static final String REST_PATH = "b/{bucket}/acl"; /** * Retrieves ACL entries on the specified bucket. * * Create a request for the method "bucketAccessControls.list". * * This request holds the parameters needed by the the storage 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 bucket Name of a bucket. * @since 1.13 */ protected List(java.lang.String bucket) { super(Storage.this, "GET", REST_PATH, null, com.google.api.services.storage.model.BucketAccessControls.class); this.bucket = com.google.api.client.util.Preconditions.checkNotNull(bucket, "Required parameter bucket must be specified."); } @Override public com.google.api.client.http.HttpResponse executeUsingHead() throws java.io.IOException { return super.executeUsingHead(); } @Override public com.google.api.client.http.HttpRequest buildHttpRequestUsingHead() throws java.io.IOException { return super.buildHttpRequestUsingHead(); } @Override public List setAlt(java.lang.String alt) { return (List) super.setAlt(alt); } @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 setUserIp(java.lang.String userIp) { return (List) super.setUserIp(userIp); } /** Name of a bucket. */ @com.google.api.client.util.Key private java.lang.String bucket; /** Name of a bucket. */ public java.lang.String getBucket() { return bucket; } /** Name of a bucket. */ public List setBucket(java.lang.String bucket) { this.bucket = bucket; return this; } /** The project to be billed for this request. Required for Requester Pays buckets. */ @com.google.api.client.util.Key private java.lang.String userProject; /** The project to be billed for this request. Required for Requester Pays buckets. */ public java.lang.String getUserProject() { return userProject; } /** The project to be billed for this request. Required for Requester Pays buckets. */ public List setUserProject(java.lang.String userProject) { this.userProject = userProject; return this; } @Override public List set(String parameterName, Object value) { return (List) super.set(parameterName, value); } } /** * Patches an ACL entry on the specified bucket. * * Create a request for the method "bucketAccessControls.patch". * * This request holds the parameters needed by the storage server. After setting any optional * parameters, call the {@link Patch#execute()} method to invoke the remote operation. * * @param bucket Name of a bucket. * @param entity The entity holding the permission. Can be user-userId, user-emailAddress, group-groupId, group- * emailAddress, allUsers, or allAuthenticatedUsers. * @param content the {@link com.google.api.services.storage.model.BucketAccessControl} * @return the request */ public Patch patch(java.lang.String bucket, java.lang.String entity, com.google.api.services.storage.model.BucketAccessControl content) throws java.io.IOException { Patch result = new Patch(bucket, entity, content); initialize(result); return result; } public class Patch extends StorageRequest { private static final String REST_PATH = "b/{bucket}/acl/{entity}"; /** * Patches an ACL entry on the specified bucket. * * Create a request for the method "bucketAccessControls.patch". * * This request holds the parameters needed by the the storage 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 bucket Name of a bucket. * @param entity The entity holding the permission. Can be user-userId, user-emailAddress, group-groupId, group- * emailAddress, allUsers, or allAuthenticatedUsers. * @param content the {@link com.google.api.services.storage.model.BucketAccessControl} * @since 1.13 */ protected Patch(java.lang.String bucket, java.lang.String entity, com.google.api.services.storage.model.BucketAccessControl content) { super(Storage.this, "PATCH", REST_PATH, content, com.google.api.services.storage.model.BucketAccessControl.class); this.bucket = com.google.api.client.util.Preconditions.checkNotNull(bucket, "Required parameter bucket must be specified."); this.entity = com.google.api.client.util.Preconditions.checkNotNull(entity, "Required parameter entity must be specified."); } @Override public Patch setAlt(java.lang.String alt) { return (Patch) super.setAlt(alt); } @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 setUserIp(java.lang.String userIp) { return (Patch) super.setUserIp(userIp); } /** Name of a bucket. */ @com.google.api.client.util.Key private java.lang.String bucket; /** Name of a bucket. */ public java.lang.String getBucket() { return bucket; } /** Name of a bucket. */ public Patch setBucket(java.lang.String bucket) { this.bucket = bucket; return this; } /** * The entity holding the permission. Can be user-userId, user-emailAddress, group-groupId, * group-emailAddress, allUsers, or allAuthenticatedUsers. */ @com.google.api.client.util.Key private java.lang.String entity; /** The entity holding the permission. Can be user-userId, user-emailAddress, group-groupId, group- emailAddress, allUsers, or allAuthenticatedUsers. */ public java.lang.String getEntity() { return entity; } /** * The entity holding the permission. Can be user-userId, user-emailAddress, group-groupId, * group-emailAddress, allUsers, or allAuthenticatedUsers. */ public Patch setEntity(java.lang.String entity) { this.entity = entity; return this; } /** The project to be billed for this request. Required for Requester Pays buckets. */ @com.google.api.client.util.Key private java.lang.String userProject; /** The project to be billed for this request. Required for Requester Pays buckets. */ public java.lang.String getUserProject() { return userProject; } /** The project to be billed for this request. Required for Requester Pays buckets. */ public Patch setUserProject(java.lang.String userProject) { this.userProject = userProject; return this; } @Override public Patch set(String parameterName, Object value) { return (Patch) super.set(parameterName, value); } } /** * Updates an ACL entry on the specified bucket. * * Create a request for the method "bucketAccessControls.update". * * This request holds the parameters needed by the storage server. After setting any optional * parameters, call the {@link Update#execute()} method to invoke the remote operation. * * @param bucket Name of a bucket. * @param entity The entity holding the permission. Can be user-userId, user-emailAddress, group-groupId, group- * emailAddress, allUsers, or allAuthenticatedUsers. * @param content the {@link com.google.api.services.storage.model.BucketAccessControl} * @return the request */ public Update update(java.lang.String bucket, java.lang.String entity, com.google.api.services.storage.model.BucketAccessControl content) throws java.io.IOException { Update result = new Update(bucket, entity, content); initialize(result); return result; } public class Update extends StorageRequest { private static final String REST_PATH = "b/{bucket}/acl/{entity}"; /** * Updates an ACL entry on the specified bucket. * * Create a request for the method "bucketAccessControls.update". * * This request holds the parameters needed by the the storage server. After setting any optional * parameters, call the {@link Update#execute()} method to invoke the remote operation.

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

* * @param bucket Name of a bucket. * @param entity The entity holding the permission. Can be user-userId, user-emailAddress, group-groupId, group- * emailAddress, allUsers, or allAuthenticatedUsers. * @param content the {@link com.google.api.services.storage.model.BucketAccessControl} * @since 1.13 */ protected Update(java.lang.String bucket, java.lang.String entity, com.google.api.services.storage.model.BucketAccessControl content) { super(Storage.this, "PUT", REST_PATH, content, com.google.api.services.storage.model.BucketAccessControl.class); this.bucket = com.google.api.client.util.Preconditions.checkNotNull(bucket, "Required parameter bucket must be specified."); this.entity = com.google.api.client.util.Preconditions.checkNotNull(entity, "Required parameter entity must be specified."); } @Override public Update setAlt(java.lang.String alt) { return (Update) super.setAlt(alt); } @Override public Update setFields(java.lang.String fields) { return (Update) super.setFields(fields); } @Override public Update setKey(java.lang.String key) { return (Update) super.setKey(key); } @Override public Update setOauthToken(java.lang.String oauthToken) { return (Update) super.setOauthToken(oauthToken); } @Override public Update setPrettyPrint(java.lang.Boolean prettyPrint) { return (Update) super.setPrettyPrint(prettyPrint); } @Override public Update setQuotaUser(java.lang.String quotaUser) { return (Update) super.setQuotaUser(quotaUser); } @Override public Update setUploadType(java.lang.String uploadType) { return (Update) super.setUploadType(uploadType); } @Override public Update setUserIp(java.lang.String userIp) { return (Update) super.setUserIp(userIp); } /** Name of a bucket. */ @com.google.api.client.util.Key private java.lang.String bucket; /** Name of a bucket. */ public java.lang.String getBucket() { return bucket; } /** Name of a bucket. */ public Update setBucket(java.lang.String bucket) { this.bucket = bucket; return this; } /** * The entity holding the permission. Can be user-userId, user-emailAddress, group-groupId, * group-emailAddress, allUsers, or allAuthenticatedUsers. */ @com.google.api.client.util.Key private java.lang.String entity; /** The entity holding the permission. Can be user-userId, user-emailAddress, group-groupId, group- emailAddress, allUsers, or allAuthenticatedUsers. */ public java.lang.String getEntity() { return entity; } /** * The entity holding the permission. Can be user-userId, user-emailAddress, group-groupId, * group-emailAddress, allUsers, or allAuthenticatedUsers. */ public Update setEntity(java.lang.String entity) { this.entity = entity; return this; } /** The project to be billed for this request. Required for Requester Pays buckets. */ @com.google.api.client.util.Key private java.lang.String userProject; /** The project to be billed for this request. Required for Requester Pays buckets. */ public java.lang.String getUserProject() { return userProject; } /** The project to be billed for this request. Required for Requester Pays buckets. */ public Update setUserProject(java.lang.String userProject) { this.userProject = userProject; return this; } @Override public Update set(String parameterName, Object value) { return (Update) super.set(parameterName, value); } } } /** * An accessor for creating requests from the Buckets collection. * *

The typical use is:

*
   *   {@code Storage storage = new Storage(...);}
   *   {@code Storage.Buckets.List request = storage.buckets().list(parameters ...)}
   * 
* * @return the resource collection */ public Buckets buckets() { return new Buckets(); } /** * The "buckets" collection of methods. */ public class Buckets { /** * Deletes an empty bucket. Deletions are permanent unless soft delete is enabled on the bucket. * * Create a request for the method "buckets.delete". * * This request holds the parameters needed by the storage server. After setting any optional * parameters, call the {@link Delete#execute()} method to invoke the remote operation. * * @param bucket Name of a bucket. * @return the request */ public Delete delete(java.lang.String bucket) throws java.io.IOException { Delete result = new Delete(bucket); initialize(result); return result; } public class Delete extends StorageRequest { private static final String REST_PATH = "b/{bucket}"; /** * Deletes an empty bucket. Deletions are permanent unless soft delete is enabled on the bucket. * * Create a request for the method "buckets.delete". * * This request holds the parameters needed by the the storage 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 bucket Name of a bucket. * @since 1.13 */ protected Delete(java.lang.String bucket) { super(Storage.this, "DELETE", REST_PATH, null, Void.class); this.bucket = com.google.api.client.util.Preconditions.checkNotNull(bucket, "Required parameter bucket must be specified."); } @Override public Delete setAlt(java.lang.String alt) { return (Delete) super.setAlt(alt); } @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 setUserIp(java.lang.String userIp) { return (Delete) super.setUserIp(userIp); } /** Name of a bucket. */ @com.google.api.client.util.Key private java.lang.String bucket; /** Name of a bucket. */ public java.lang.String getBucket() { return bucket; } /** Name of a bucket. */ public Delete setBucket(java.lang.String bucket) { this.bucket = bucket; return this; } /** If set, only deletes the bucket if its metageneration matches this value. */ @com.google.api.client.util.Key private java.lang.Long ifMetagenerationMatch; /** If set, only deletes the bucket if its metageneration matches this value. */ public java.lang.Long getIfMetagenerationMatch() { return ifMetagenerationMatch; } /** If set, only deletes the bucket if its metageneration matches this value. */ public Delete setIfMetagenerationMatch(java.lang.Long ifMetagenerationMatch) { this.ifMetagenerationMatch = ifMetagenerationMatch; return this; } /** If set, only deletes the bucket if its metageneration does not match this value. */ @com.google.api.client.util.Key private java.lang.Long ifMetagenerationNotMatch; /** If set, only deletes the bucket if its metageneration does not match this value. */ public java.lang.Long getIfMetagenerationNotMatch() { return ifMetagenerationNotMatch; } /** If set, only deletes the bucket if its metageneration does not match this value. */ public Delete setIfMetagenerationNotMatch(java.lang.Long ifMetagenerationNotMatch) { this.ifMetagenerationNotMatch = ifMetagenerationNotMatch; return this; } /** The project to be billed for this request. Required for Requester Pays buckets. */ @com.google.api.client.util.Key private java.lang.String userProject; /** The project to be billed for this request. Required for Requester Pays buckets. */ public java.lang.String getUserProject() { return userProject; } /** The project to be billed for this request. Required for Requester Pays buckets. */ public Delete setUserProject(java.lang.String userProject) { this.userProject = userProject; return this; } @Override public Delete set(String parameterName, Object value) { return (Delete) super.set(parameterName, value); } } /** * Returns metadata for the specified bucket. * * Create a request for the method "buckets.get". * * This request holds the parameters needed by the storage server. After setting any optional * parameters, call the {@link Get#execute()} method to invoke the remote operation. * * @param bucket Name of a bucket. * @return the request */ public Get get(java.lang.String bucket) throws java.io.IOException { Get result = new Get(bucket); initialize(result); return result; } public class Get extends StorageRequest { private static final String REST_PATH = "b/{bucket}"; /** * Returns metadata for the specified bucket. * * Create a request for the method "buckets.get". * * This request holds the parameters needed by the the storage 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 bucket Name of a bucket. * @since 1.13 */ protected Get(java.lang.String bucket) { super(Storage.this, "GET", REST_PATH, null, com.google.api.services.storage.model.Bucket.class); this.bucket = com.google.api.client.util.Preconditions.checkNotNull(bucket, "Required parameter bucket must be specified."); } @Override public com.google.api.client.http.HttpResponse executeUsingHead() throws java.io.IOException { return super.executeUsingHead(); } @Override public com.google.api.client.http.HttpRequest buildHttpRequestUsingHead() throws java.io.IOException { return super.buildHttpRequestUsingHead(); } @Override public Get setAlt(java.lang.String alt) { return (Get) super.setAlt(alt); } @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 setUserIp(java.lang.String userIp) { return (Get) super.setUserIp(userIp); } /** Name of a bucket. */ @com.google.api.client.util.Key private java.lang.String bucket; /** Name of a bucket. */ public java.lang.String getBucket() { return bucket; } /** Name of a bucket. */ public Get setBucket(java.lang.String bucket) { this.bucket = bucket; return this; } /** * If present, specifies the generation of the bucket. This is required if softDeleted is * true. */ @com.google.api.client.util.Key private java.lang.Long generation; /** If present, specifies the generation of the bucket. This is required if softDeleted is true. */ public java.lang.Long getGeneration() { return generation; } /** * If present, specifies the generation of the bucket. This is required if softDeleted is * true. */ public Get setGeneration(java.lang.Long generation) { this.generation = generation; return this; } /** * Makes the return of the bucket metadata conditional on whether the bucket's current * metageneration matches the given value. */ @com.google.api.client.util.Key private java.lang.Long ifMetagenerationMatch; /** Makes the return of the bucket metadata conditional on whether the bucket's current metageneration matches the given value. */ public java.lang.Long getIfMetagenerationMatch() { return ifMetagenerationMatch; } /** * Makes the return of the bucket metadata conditional on whether the bucket's current * metageneration matches the given value. */ public Get setIfMetagenerationMatch(java.lang.Long ifMetagenerationMatch) { this.ifMetagenerationMatch = ifMetagenerationMatch; return this; } /** * Makes the return of the bucket metadata conditional on whether the bucket's current * metageneration does not match the given value. */ @com.google.api.client.util.Key private java.lang.Long ifMetagenerationNotMatch; /** Makes the return of the bucket metadata conditional on whether the bucket's current metageneration does not match the given value. */ public java.lang.Long getIfMetagenerationNotMatch() { return ifMetagenerationNotMatch; } /** * Makes the return of the bucket metadata conditional on whether the bucket's current * metageneration does not match the given value. */ public Get setIfMetagenerationNotMatch(java.lang.Long ifMetagenerationNotMatch) { this.ifMetagenerationNotMatch = ifMetagenerationNotMatch; return this; } /** Set of properties to return. Defaults to noAcl. */ @com.google.api.client.util.Key private java.lang.String projection; /** Set of properties to return. Defaults to noAcl. */ public java.lang.String getProjection() { return projection; } /** Set of properties to return. Defaults to noAcl. */ public Get setProjection(java.lang.String projection) { this.projection = projection; return this; } /** * If true, return the soft-deleted version of this bucket. The default is false. For more * information, see [Soft Delete](https://cloud.google.com/storage/docs/soft-delete). */ @com.google.api.client.util.Key private java.lang.Boolean softDeleted; /** If true, return the soft-deleted version of this bucket. The default is false. For more information, see [Soft Delete](https://cloud.google.com/storage/docs/soft-delete). */ public java.lang.Boolean getSoftDeleted() { return softDeleted; } /** * If true, return the soft-deleted version of this bucket. The default is false. For more * information, see [Soft Delete](https://cloud.google.com/storage/docs/soft-delete). */ public Get setSoftDeleted(java.lang.Boolean softDeleted) { this.softDeleted = softDeleted; return this; } /** The project to be billed for this request. Required for Requester Pays buckets. */ @com.google.api.client.util.Key private java.lang.String userProject; /** The project to be billed for this request. Required for Requester Pays buckets. */ public java.lang.String getUserProject() { return userProject; } /** The project to be billed for this request. Required for Requester Pays buckets. */ public Get setUserProject(java.lang.String userProject) { this.userProject = userProject; return this; } @Override public Get set(String parameterName, Object value) { return (Get) super.set(parameterName, value); } } /** * Returns an IAM policy for the specified bucket. * * Create a request for the method "buckets.getIamPolicy". * * This request holds the parameters needed by the storage server. After setting any optional * parameters, call the {@link GetIamPolicy#execute()} method to invoke the remote operation. * * @param bucket Name of a bucket. * @return the request */ public GetIamPolicy getIamPolicy(java.lang.String bucket) throws java.io.IOException { GetIamPolicy result = new GetIamPolicy(bucket); initialize(result); return result; } public class GetIamPolicy extends StorageRequest { private static final String REST_PATH = "b/{bucket}/iam"; /** * Returns an IAM policy for the specified bucket. * * Create a request for the method "buckets.getIamPolicy". * * This request holds the parameters needed by the the storage server. After setting any optional * parameters, call the {@link GetIamPolicy#execute()} method to invoke the remote operation.

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

* * @param bucket Name of a bucket. * @since 1.13 */ protected GetIamPolicy(java.lang.String bucket) { super(Storage.this, "GET", REST_PATH, null, com.google.api.services.storage.model.Policy.class); this.bucket = com.google.api.client.util.Preconditions.checkNotNull(bucket, "Required parameter bucket must be specified."); } @Override public com.google.api.client.http.HttpResponse executeUsingHead() throws java.io.IOException { return super.executeUsingHead(); } @Override public com.google.api.client.http.HttpRequest buildHttpRequestUsingHead() throws java.io.IOException { return super.buildHttpRequestUsingHead(); } @Override public GetIamPolicy setAlt(java.lang.String alt) { return (GetIamPolicy) super.setAlt(alt); } @Override public GetIamPolicy setFields(java.lang.String fields) { return (GetIamPolicy) super.setFields(fields); } @Override public GetIamPolicy setKey(java.lang.String key) { return (GetIamPolicy) super.setKey(key); } @Override public GetIamPolicy setOauthToken(java.lang.String oauthToken) { return (GetIamPolicy) super.setOauthToken(oauthToken); } @Override public GetIamPolicy setPrettyPrint(java.lang.Boolean prettyPrint) { return (GetIamPolicy) super.setPrettyPrint(prettyPrint); } @Override public GetIamPolicy setQuotaUser(java.lang.String quotaUser) { return (GetIamPolicy) super.setQuotaUser(quotaUser); } @Override public GetIamPolicy setUploadType(java.lang.String uploadType) { return (GetIamPolicy) super.setUploadType(uploadType); } @Override public GetIamPolicy setUserIp(java.lang.String userIp) { return (GetIamPolicy) super.setUserIp(userIp); } /** Name of a bucket. */ @com.google.api.client.util.Key private java.lang.String bucket; /** Name of a bucket. */ public java.lang.String getBucket() { return bucket; } /** Name of a bucket. */ public GetIamPolicy setBucket(java.lang.String bucket) { this.bucket = bucket; return this; } /** * The IAM policy format version to be returned. If the optionsRequestedPolicyVersion is for * an older version that doesn't support part of the requested IAM policy, the request fails. */ @com.google.api.client.util.Key private java.lang.Integer optionsRequestedPolicyVersion; /** The IAM policy format version to be returned. If the optionsRequestedPolicyVersion is for an older version that doesn't support part of the requested IAM policy, the request fails. [minimum: 1] */ public java.lang.Integer getOptionsRequestedPolicyVersion() { return optionsRequestedPolicyVersion; } /** * The IAM policy format version to be returned. If the optionsRequestedPolicyVersion is for * an older version that doesn't support part of the requested IAM policy, the request fails. */ public GetIamPolicy setOptionsRequestedPolicyVersion(java.lang.Integer optionsRequestedPolicyVersion) { this.optionsRequestedPolicyVersion = optionsRequestedPolicyVersion; return this; } /** The project to be billed for this request. Required for Requester Pays buckets. */ @com.google.api.client.util.Key private java.lang.String userProject; /** The project to be billed for this request. Required for Requester Pays buckets. */ public java.lang.String getUserProject() { return userProject; } /** The project to be billed for this request. Required for Requester Pays buckets. */ public GetIamPolicy setUserProject(java.lang.String userProject) { this.userProject = userProject; return this; } @Override public GetIamPolicy set(String parameterName, Object value) { return (GetIamPolicy) super.set(parameterName, value); } } /** * Returns the storage layout configuration for the specified bucket. Note that this operation * requires storage.objects.list permission. * * Create a request for the method "buckets.getStorageLayout". * * This request holds the parameters needed by the storage server. After setting any optional * parameters, call the {@link GetStorageLayout#execute()} method to invoke the remote operation. * * @param bucket Name of a bucket. * @return the request */ public GetStorageLayout getStorageLayout(java.lang.String bucket) throws java.io.IOException { GetStorageLayout result = new GetStorageLayout(bucket); initialize(result); return result; } public class GetStorageLayout extends StorageRequest { private static final String REST_PATH = "b/{bucket}/storageLayout"; /** * Returns the storage layout configuration for the specified bucket. Note that this operation * requires storage.objects.list permission. * * Create a request for the method "buckets.getStorageLayout". * * This request holds the parameters needed by the the storage server. After setting any optional * parameters, call the {@link GetStorageLayout#execute()} method to invoke the remote operation. *

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

* * @param bucket Name of a bucket. * @since 1.13 */ protected GetStorageLayout(java.lang.String bucket) { super(Storage.this, "GET", REST_PATH, null, com.google.api.services.storage.model.BucketStorageLayout.class); this.bucket = com.google.api.client.util.Preconditions.checkNotNull(bucket, "Required parameter bucket must be specified."); } @Override public com.google.api.client.http.HttpResponse executeUsingHead() throws java.io.IOException { return super.executeUsingHead(); } @Override public com.google.api.client.http.HttpRequest buildHttpRequestUsingHead() throws java.io.IOException { return super.buildHttpRequestUsingHead(); } @Override public GetStorageLayout setAlt(java.lang.String alt) { return (GetStorageLayout) super.setAlt(alt); } @Override public GetStorageLayout setFields(java.lang.String fields) { return (GetStorageLayout) super.setFields(fields); } @Override public GetStorageLayout setKey(java.lang.String key) { return (GetStorageLayout) super.setKey(key); } @Override public GetStorageLayout setOauthToken(java.lang.String oauthToken) { return (GetStorageLayout) super.setOauthToken(oauthToken); } @Override public GetStorageLayout setPrettyPrint(java.lang.Boolean prettyPrint) { return (GetStorageLayout) super.setPrettyPrint(prettyPrint); } @Override public GetStorageLayout setQuotaUser(java.lang.String quotaUser) { return (GetStorageLayout) super.setQuotaUser(quotaUser); } @Override public GetStorageLayout setUploadType(java.lang.String uploadType) { return (GetStorageLayout) super.setUploadType(uploadType); } @Override public GetStorageLayout setUserIp(java.lang.String userIp) { return (GetStorageLayout) super.setUserIp(userIp); } /** Name of a bucket. */ @com.google.api.client.util.Key private java.lang.String bucket; /** Name of a bucket. */ public java.lang.String getBucket() { return bucket; } /** Name of a bucket. */ public GetStorageLayout setBucket(java.lang.String bucket) { this.bucket = bucket; return this; } /** * An optional prefix used for permission check. It is useful when the caller only has * storage.objects.list permission under a specific prefix. */ @com.google.api.client.util.Key private java.lang.String prefix; /** An optional prefix used for permission check. It is useful when the caller only has storage.objects.list permission under a specific prefix. */ public java.lang.String getPrefix() { return prefix; } /** * An optional prefix used for permission check. It is useful when the caller only has * storage.objects.list permission under a specific prefix. */ public GetStorageLayout setPrefix(java.lang.String prefix) { this.prefix = prefix; return this; } @Override public GetStorageLayout set(String parameterName, Object value) { return (GetStorageLayout) super.set(parameterName, value); } } /** * Creates a new bucket. * * Create a request for the method "buckets.insert". * * This request holds the parameters needed by the storage server. After setting any optional * parameters, call the {@link Insert#execute()} method to invoke the remote operation. * * @param project A valid API project identifier. * @param content the {@link com.google.api.services.storage.model.Bucket} * @return the request */ public Insert insert(java.lang.String project, com.google.api.services.storage.model.Bucket content) throws java.io.IOException { Insert result = new Insert(project, content); initialize(result); return result; } public class Insert extends StorageRequest { private static final String REST_PATH = "b"; /** * Creates a new bucket. * * Create a request for the method "buckets.insert". * * This request holds the parameters needed by the the storage server. After setting any optional * parameters, call the {@link Insert#execute()} method to invoke the remote operation.

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

* * @param project A valid API project identifier. * @param content the {@link com.google.api.services.storage.model.Bucket} * @since 1.13 */ protected Insert(java.lang.String project, com.google.api.services.storage.model.Bucket content) { super(Storage.this, "POST", REST_PATH, content, com.google.api.services.storage.model.Bucket.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); checkRequiredParameter(content, "content"); checkRequiredParameter(content.getName(), "Bucket.getName()"); } @Override public Insert setAlt(java.lang.String alt) { return (Insert) super.setAlt(alt); } @Override public Insert setFields(java.lang.String fields) { return (Insert) super.setFields(fields); } @Override public Insert setKey(java.lang.String key) { return (Insert) super.setKey(key); } @Override public Insert setOauthToken(java.lang.String oauthToken) { return (Insert) super.setOauthToken(oauthToken); } @Override public Insert setPrettyPrint(java.lang.Boolean prettyPrint) { return (Insert) super.setPrettyPrint(prettyPrint); } @Override public Insert setQuotaUser(java.lang.String quotaUser) { return (Insert) super.setQuotaUser(quotaUser); } @Override public Insert setUploadType(java.lang.String uploadType) { return (Insert) super.setUploadType(uploadType); } @Override public Insert setUserIp(java.lang.String userIp) { return (Insert) super.setUserIp(userIp); } /** A valid API project identifier. */ @com.google.api.client.util.Key private java.lang.String project; /** A valid API project identifier. */ public java.lang.String getProject() { return project; } /** A valid API project identifier. */ public Insert setProject(java.lang.String project) { this.project = project; return this; } /** When set to true, object retention is enabled for this bucket. */ @com.google.api.client.util.Key private java.lang.Boolean enableObjectRetention; /** When set to true, object retention is enabled for this bucket. [default: false] */ public java.lang.Boolean getEnableObjectRetention() { return enableObjectRetention; } /** When set to true, object retention is enabled for this bucket. */ public Insert setEnableObjectRetention(java.lang.Boolean enableObjectRetention) { this.enableObjectRetention = enableObjectRetention; return this; } /** * Convenience method that returns only {@link Boolean#TRUE} or {@link Boolean#FALSE}. * *

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

* *

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

* *

* When set to true, object retention is enabled for this bucket. *

*/ public boolean isEnableObjectRetention() { if (enableObjectRetention == null || enableObjectRetention == com.google.api.client.util.Data.NULL_BOOLEAN) { return false; } return enableObjectRetention; } /** Apply a predefined set of access controls to this bucket. */ @com.google.api.client.util.Key private java.lang.String predefinedAcl; /** Apply a predefined set of access controls to this bucket. */ public java.lang.String getPredefinedAcl() { return predefinedAcl; } /** Apply a predefined set of access controls to this bucket. */ public Insert setPredefinedAcl(java.lang.String predefinedAcl) { this.predefinedAcl = predefinedAcl; return this; } /** Apply a predefined set of default object access controls to this bucket. */ @com.google.api.client.util.Key private java.lang.String predefinedDefaultObjectAcl; /** Apply a predefined set of default object access controls to this bucket. */ public java.lang.String getPredefinedDefaultObjectAcl() { return predefinedDefaultObjectAcl; } /** Apply a predefined set of default object access controls to this bucket. */ public Insert setPredefinedDefaultObjectAcl(java.lang.String predefinedDefaultObjectAcl) { this.predefinedDefaultObjectAcl = predefinedDefaultObjectAcl; return this; } /** * Set of properties to return. Defaults to noAcl, unless the bucket resource specifies acl or * defaultObjectAcl properties, when it defaults to full. */ @com.google.api.client.util.Key private java.lang.String projection; /** Set of properties to return. Defaults to noAcl, unless the bucket resource specifies acl or defaultObjectAcl properties, when it defaults to full. */ public java.lang.String getProjection() { return projection; } /** * Set of properties to return. Defaults to noAcl, unless the bucket resource specifies acl or * defaultObjectAcl properties, when it defaults to full. */ public Insert setProjection(java.lang.String projection) { this.projection = projection; return this; } /** The project to be billed for this request. */ @com.google.api.client.util.Key private java.lang.String userProject; /** The project to be billed for this request. */ public java.lang.String getUserProject() { return userProject; } /** The project to be billed for this request. */ public Insert setUserProject(java.lang.String userProject) { this.userProject = userProject; return this; } @Override public Insert set(String parameterName, Object value) { return (Insert) super.set(parameterName, value); } } /** * Retrieves a list of buckets for a given project. * * Create a request for the method "buckets.list". * * This request holds the parameters needed by the storage server. After setting any optional * parameters, call the {@link List#execute()} method to invoke the remote operation. * * @param project A valid API project identifier. * @return the request */ public List list(java.lang.String project) throws java.io.IOException { List result = new List(project); initialize(result); return result; } public class List extends StorageRequest { private static final String REST_PATH = "b"; /** * Retrieves a list of buckets for a given project. * * Create a request for the method "buckets.list". * * This request holds the parameters needed by the the storage server. After setting any optional * parameters, call the {@link List#execute()} method to invoke the remote operation.

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

* * @param project A valid API project identifier. * @since 1.13 */ protected List(java.lang.String project) { super(Storage.this, "GET", REST_PATH, null, com.google.api.services.storage.model.Buckets.class); this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified."); } @Override public com.google.api.client.http.HttpResponse executeUsingHead() throws java.io.IOException { return super.executeUsingHead(); } @Override public com.google.api.client.http.HttpRequest buildHttpRequestUsingHead() throws java.io.IOException { return super.buildHttpRequestUsingHead(); } @Override public List setAlt(java.lang.String alt) { return (List) super.setAlt(alt); } @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 setUserIp(java.lang.String userIp) { return (List) super.setUserIp(userIp); } /** A valid API project identifier. */ @com.google.api.client.util.Key private java.lang.String project; /** A valid API project identifier. */ public java.lang.String getProject() { return project; } /** A valid API project identifier. */ public List setProject(java.lang.String project) { this.project = project; return this; } /** * Maximum number of buckets to return in a single response. The service will use this * parameter or 1,000 items, whichever is smaller. */ @com.google.api.client.util.Key private java.lang.Long maxResults; /** Maximum number of buckets to return in a single response. The service will use this parameter or 1,000 items, whichever is smaller. [default: 1000] [minimum: 0] */ public java.lang.Long getMaxResults() { return maxResults; } /** * Maximum number of buckets to return in a single response. The service will use this * parameter or 1,000 items, whichever is smaller. */ public List setMaxResults(java.lang.Long maxResults) { this.maxResults = maxResults; return this; } /** * A previously-returned page token representing part of the larger set of results to view. */ @com.google.api.client.util.Key private java.lang.String pageToken; /** A previously-returned page token representing part of the larger set of results to view. */ public java.lang.String getPageToken() { return pageToken; } /** * A previously-returned page token representing part of the larger set of results to view. */ public List setPageToken(java.lang.String pageToken) { this.pageToken = pageToken; return this; } /** Filter results to buckets whose names begin with this prefix. */ @com.google.api.client.util.Key private java.lang.String prefix; /** Filter results to buckets whose names begin with this prefix. */ public java.lang.String getPrefix() { return prefix; } /** Filter results to buckets whose names begin with this prefix. */ public List setPrefix(java.lang.String prefix) { this.prefix = prefix; return this; } /** Set of properties to return. Defaults to noAcl. */ @com.google.api.client.util.Key private java.lang.String projection; /** Set of properties to return. Defaults to noAcl. */ public java.lang.String getProjection() { return projection; } /** Set of properties to return. Defaults to noAcl. */ public List setProjection(java.lang.String projection) { this.projection = projection; return this; } /** * If true, only soft-deleted bucket versions will be returned. The default is false. For more * information, see [Soft Delete](https://cloud.google.com/storage/docs/soft-delete). */ @com.google.api.client.util.Key private java.lang.Boolean softDeleted; /** If true, only soft-deleted bucket versions will be returned. The default is false. For more information, see [Soft Delete](https://cloud.google.com/storage/docs/soft-delete). */ public java.lang.Boolean getSoftDeleted() { return softDeleted; } /** * If true, only soft-deleted bucket versions will be returned. The default is false. For more * information, see [Soft Delete](https://cloud.google.com/storage/docs/soft-delete). */ public List setSoftDeleted(java.lang.Boolean softDeleted) { this.softDeleted = softDeleted; return this; } /** The project to be billed for this request. */ @com.google.api.client.util.Key private java.lang.String userProject; /** The project to be billed for this request. */ public java.lang.String getUserProject() { return userProject; } /** The project to be billed for this request. */ public List setUserProject(java.lang.String userProject) { this.userProject = userProject; return this; } @Override public List set(String parameterName, Object value) { return (List) super.set(parameterName, value); } } /** * Locks retention policy on a bucket. * * Create a request for the method "buckets.lockRetentionPolicy". * * This request holds the parameters needed by the storage server. After setting any optional * parameters, call the {@link LockRetentionPolicy#execute()} method to invoke the remote operation. * * @param bucket Name of a bucket. * @param ifMetagenerationMatch Makes the operation conditional on whether bucket's current metageneration matches the given value. * @return the request */ public LockRetentionPolicy lockRetentionPolicy(java.lang.String bucket, java.lang.Long ifMetagenerationMatch) throws java.io.IOException { LockRetentionPolicy result = new LockRetentionPolicy(bucket, ifMetagenerationMatch); initialize(result); return result; } public class LockRetentionPolicy extends StorageRequest { private static final String REST_PATH = "b/{bucket}/lockRetentionPolicy"; /** * Locks retention policy on a bucket. * * Create a request for the method "buckets.lockRetentionPolicy". * * This request holds the parameters needed by the the storage server. After setting any optional * parameters, call the {@link LockRetentionPolicy#execute()} method to invoke the remote * operation.

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

* * @param bucket Name of a bucket. * @param ifMetagenerationMatch Makes the operation conditional on whether bucket's current metageneration matches the given value. * @since 1.13 */ protected LockRetentionPolicy(java.lang.String bucket, java.lang.Long ifMetagenerationMatch) { super(Storage.this, "POST", REST_PATH, null, com.google.api.services.storage.model.Bucket.class); this.bucket = com.google.api.client.util.Preconditions.checkNotNull(bucket, "Required parameter bucket must be specified."); this.ifMetagenerationMatch = com.google.api.client.util.Preconditions.checkNotNull(ifMetagenerationMatch, "Required parameter ifMetagenerationMatch must be specified."); } @Override public LockRetentionPolicy setAlt(java.lang.String alt) { return (LockRetentionPolicy) super.setAlt(alt); } @Override public LockRetentionPolicy setFields(java.lang.String fields) { return (LockRetentionPolicy) super.setFields(fields); } @Override public LockRetentionPolicy setKey(java.lang.String key) { return (LockRetentionPolicy) super.setKey(key); } @Override public LockRetentionPolicy setOauthToken(java.lang.String oauthToken) { return (LockRetentionPolicy) super.setOauthToken(oauthToken); } @Override public LockRetentionPolicy setPrettyPrint(java.lang.Boolean prettyPrint) { return (LockRetentionPolicy) super.setPrettyPrint(prettyPrint); } @Override public LockRetentionPolicy setQuotaUser(java.lang.String quotaUser) { return (LockRetentionPolicy) super.setQuotaUser(quotaUser); } @Override public LockRetentionPolicy setUploadType(java.lang.String uploadType) { return (LockRetentionPolicy) super.setUploadType(uploadType); } @Override public LockRetentionPolicy setUserIp(java.lang.String userIp) { return (LockRetentionPolicy) super.setUserIp(userIp); } /** Name of a bucket. */ @com.google.api.client.util.Key private java.lang.String bucket; /** Name of a bucket. */ public java.lang.String getBucket() { return bucket; } /** Name of a bucket. */ public LockRetentionPolicy setBucket(java.lang.String bucket) { this.bucket = bucket; return this; } /** * Makes the operation conditional on whether bucket's current metageneration matches the * given value. */ @com.google.api.client.util.Key private java.lang.Long ifMetagenerationMatch; /** Makes the operation conditional on whether bucket's current metageneration matches the given value. */ public java.lang.Long getIfMetagenerationMatch() { return ifMetagenerationMatch; } /** * Makes the operation conditional on whether bucket's current metageneration matches the * given value. */ public LockRetentionPolicy setIfMetagenerationMatch(java.lang.Long ifMetagenerationMatch) { this.ifMetagenerationMatch = ifMetagenerationMatch; return this; } /** The project to be billed for this request. Required for Requester Pays buckets. */ @com.google.api.client.util.Key private java.lang.String userProject; /** The project to be billed for this request. Required for Requester Pays buckets. */ public java.lang.String getUserProject() { return userProject; } /** The project to be billed for this request. Required for Requester Pays buckets. */ public LockRetentionPolicy setUserProject(java.lang.String userProject) { this.userProject = userProject; return this; } @Override public LockRetentionPolicy set(String parameterName, Object value) { return (LockRetentionPolicy) super.set(parameterName, value); } } /** * Patches a bucket. Changes to the bucket will be readable immediately after writing, but * configuration changes may take time to propagate. * * Create a request for the method "buckets.patch". * * This request holds the parameters needed by the storage server. After setting any optional * parameters, call the {@link Patch#execute()} method to invoke the remote operation. * * @param bucket Name of a bucket. * @param content the {@link com.google.api.services.storage.model.Bucket} * @return the request */ public Patch patch(java.lang.String bucket, com.google.api.services.storage.model.Bucket content) throws java.io.IOException { Patch result = new Patch(bucket, content); initialize(result); return result; } public class Patch extends StorageRequest { private static final String REST_PATH = "b/{bucket}"; /** * Patches a bucket. Changes to the bucket will be readable immediately after writing, but * configuration changes may take time to propagate. * * Create a request for the method "buckets.patch". * * This request holds the parameters needed by the the storage 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 bucket Name of a bucket. * @param content the {@link com.google.api.services.storage.model.Bucket} * @since 1.13 */ protected Patch(java.lang.String bucket, com.google.api.services.storage.model.Bucket content) { super(Storage.this, "PATCH", REST_PATH, content, com.google.api.services.storage.model.Bucket.class); this.bucket = com.google.api.client.util.Preconditions.checkNotNull(bucket, "Required parameter bucket must be specified."); } @Override public Patch setAlt(java.lang.String alt) { return (Patch) super.setAlt(alt); } @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 setUserIp(java.lang.String userIp) { return (Patch) super.setUserIp(userIp); } /** Name of a bucket. */ @com.google.api.client.util.Key private java.lang.String bucket; /** Name of a bucket. */ public java.lang.String getBucket() { return bucket; } /** Name of a bucket. */ public Patch setBucket(java.lang.String bucket) { this.bucket = bucket; return this; } /** * Makes the return of the bucket metadata conditional on whether the bucket's current * metageneration matches the given value. */ @com.google.api.client.util.Key private java.lang.Long ifMetagenerationMatch; /** Makes the return of the bucket metadata conditional on whether the bucket's current metageneration matches the given value. */ public java.lang.Long getIfMetagenerationMatch() { return ifMetagenerationMatch; } /** * Makes the return of the bucket metadata conditional on whether the bucket's current * metageneration matches the given value. */ public Patch setIfMetagenerationMatch(java.lang.Long ifMetagenerationMatch) { this.ifMetagenerationMatch = ifMetagenerationMatch; return this; } /** * Makes the return of the bucket metadata conditional on whether the bucket's current * metageneration does not match the given value. */ @com.google.api.client.util.Key private java.lang.Long ifMetagenerationNotMatch; /** Makes the return of the bucket metadata conditional on whether the bucket's current metageneration does not match the given value. */ public java.lang.Long getIfMetagenerationNotMatch() { return ifMetagenerationNotMatch; } /** * Makes the return of the bucket metadata conditional on whether the bucket's current * metageneration does not match the given value. */ public Patch setIfMetagenerationNotMatch(java.lang.Long ifMetagenerationNotMatch) { this.ifMetagenerationNotMatch = ifMetagenerationNotMatch; return this; } /** Apply a predefined set of access controls to this bucket. */ @com.google.api.client.util.Key private java.lang.String predefinedAcl; /** Apply a predefined set of access controls to this bucket. */ public java.lang.String getPredefinedAcl() { return predefinedAcl; } /** Apply a predefined set of access controls to this bucket. */ public Patch setPredefinedAcl(java.lang.String predefinedAcl) { this.predefinedAcl = predefinedAcl; return this; } /** Apply a predefined set of default object access controls to this bucket. */ @com.google.api.client.util.Key private java.lang.String predefinedDefaultObjectAcl; /** Apply a predefined set of default object access controls to this bucket. */ public java.lang.String getPredefinedDefaultObjectAcl() { return predefinedDefaultObjectAcl; } /** Apply a predefined set of default object access controls to this bucket. */ public Patch setPredefinedDefaultObjectAcl(java.lang.String predefinedDefaultObjectAcl) { this.predefinedDefaultObjectAcl = predefinedDefaultObjectAcl; return this; } /** Set of properties to return. Defaults to full. */ @com.google.api.client.util.Key private java.lang.String projection; /** Set of properties to return. Defaults to full. */ public java.lang.String getProjection() { return projection; } /** Set of properties to return. Defaults to full. */ public Patch setProjection(java.lang.String projection) { this.projection = projection; return this; } /** The project to be billed for this request. Required for Requester Pays buckets. */ @com.google.api.client.util.Key private java.lang.String userProject; /** The project to be billed for this request. Required for Requester Pays buckets. */ public java.lang.String getUserProject() { return userProject; } /** The project to be billed for this request. Required for Requester Pays buckets. */ public Patch setUserProject(java.lang.String userProject) { this.userProject = userProject; return this; } @Override public Patch set(String parameterName, Object value) { return (Patch) super.set(parameterName, value); } } /** * Restores a soft-deleted bucket. * * Create a request for the method "buckets.restore". * * This request holds the parameters needed by the storage server. After setting any optional * parameters, call the {@link Restore#execute()} method to invoke the remote operation. * * @param bucket Name of a bucket. * @param generation Generation of a bucket. * @return the request */ public Restore restore(java.lang.String bucket, java.lang.Long generation) throws java.io.IOException { Restore result = new Restore(bucket, generation); initialize(result); return result; } public class Restore extends StorageRequest { private static final String REST_PATH = "b/{bucket}/restore"; /** * Restores a soft-deleted bucket. * * Create a request for the method "buckets.restore". * * This request holds the parameters needed by the the storage 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 bucket Name of a bucket. * @param generation Generation of a bucket. * @since 1.13 */ protected Restore(java.lang.String bucket, java.lang.Long generation) { super(Storage.this, "POST", REST_PATH, null, Void.class); this.bucket = com.google.api.client.util.Preconditions.checkNotNull(bucket, "Required parameter bucket must be specified."); this.generation = com.google.api.client.util.Preconditions.checkNotNull(generation, "Required parameter generation must be specified."); } @Override public Restore setAlt(java.lang.String alt) { return (Restore) super.setAlt(alt); } @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 setUserIp(java.lang.String userIp) { return (Restore) super.setUserIp(userIp); } /** Name of a bucket. */ @com.google.api.client.util.Key private java.lang.String bucket; /** Name of a bucket. */ public java.lang.String getBucket() { return bucket; } /** Name of a bucket. */ public Restore setBucket(java.lang.String bucket) { this.bucket = bucket; return this; } /** Generation of a bucket. */ @com.google.api.client.util.Key private java.lang.Long generation; /** Generation of a bucket. */ public java.lang.Long getGeneration() { return generation; } /** Generation of a bucket. */ public Restore setGeneration(java.lang.Long generation) { this.generation = generation; return this; } /** The project to be billed for this request. Required for Requester Pays buckets. */ @com.google.api.client.util.Key private java.lang.String userProject; /** The project to be billed for this request. Required for Requester Pays buckets. */ public java.lang.String getUserProject() { return userProject; } /** The project to be billed for this request. Required for Requester Pays buckets. */ public Restore setUserProject(java.lang.String userProject) { this.userProject = userProject; return this; } @Override public Restore set(String parameterName, Object value) { return (Restore) super.set(parameterName, value); } } /** * Updates an IAM policy for the specified bucket. * * Create a request for the method "buckets.setIamPolicy". * * This request holds the parameters needed by the storage server. After setting any optional * parameters, call the {@link SetIamPolicy#execute()} method to invoke the remote operation. * * @param bucket Name of a bucket. * @param content the {@link com.google.api.services.storage.model.Policy} * @return the request */ public SetIamPolicy setIamPolicy(java.lang.String bucket, com.google.api.services.storage.model.Policy content) throws java.io.IOException { SetIamPolicy result = new SetIamPolicy(bucket, content); initialize(result); return result; } public class SetIamPolicy extends StorageRequest { private static final String REST_PATH = "b/{bucket}/iam"; /** * Updates an IAM policy for the specified bucket. * * Create a request for the method "buckets.setIamPolicy". * * This request holds the parameters needed by the the storage server. After setting any optional * parameters, call the {@link SetIamPolicy#execute()} method to invoke the remote operation.

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

* * @param bucket Name of a bucket. * @param content the {@link com.google.api.services.storage.model.Policy} * @since 1.13 */ protected SetIamPolicy(java.lang.String bucket, com.google.api.services.storage.model.Policy content) { super(Storage.this, "PUT", REST_PATH, content, com.google.api.services.storage.model.Policy.class); this.bucket = com.google.api.client.util.Preconditions.checkNotNull(bucket, "Required parameter bucket must be specified."); } @Override public SetIamPolicy setAlt(java.lang.String alt) { return (SetIamPolicy) super.setAlt(alt); } @Override public SetIamPolicy setFields(java.lang.String fields) { return (SetIamPolicy) super.setFields(fields); } @Override public SetIamPolicy setKey(java.lang.String key) { return (SetIamPolicy) super.setKey(key); } @Override public SetIamPolicy setOauthToken(java.lang.String oauthToken) { return (SetIamPolicy) super.setOauthToken(oauthToken); } @Override public SetIamPolicy setPrettyPrint(java.lang.Boolean prettyPrint) { return (SetIamPolicy) super.setPrettyPrint(prettyPrint); } @Override public SetIamPolicy setQuotaUser(java.lang.String quotaUser) { return (SetIamPolicy) super.setQuotaUser(quotaUser); } @Override public SetIamPolicy setUploadType(java.lang.String uploadType) { return (SetIamPolicy) super.setUploadType(uploadType); } @Override public SetIamPolicy setUserIp(java.lang.String userIp) { return (SetIamPolicy) super.setUserIp(userIp); } /** Name of a bucket. */ @com.google.api.client.util.Key private java.lang.String bucket; /** Name of a bucket. */ public java.lang.String getBucket() { return bucket; } /** Name of a bucket. */ public SetIamPolicy setBucket(java.lang.String bucket) { this.bucket = bucket; return this; } /** The project to be billed for this request. Required for Requester Pays buckets. */ @com.google.api.client.util.Key private java.lang.String userProject; /** The project to be billed for this request. Required for Requester Pays buckets. */ public java.lang.String getUserProject() { return userProject; } /** The project to be billed for this request. Required for Requester Pays buckets. */ public SetIamPolicy setUserProject(java.lang.String userProject) { this.userProject = userProject; return this; } @Override public SetIamPolicy set(String parameterName, Object value) { return (SetIamPolicy) super.set(parameterName, value); } } /** * Tests a set of permissions on the given bucket to see which, if any, are held by the caller. * * Create a request for the method "buckets.testIamPermissions". * * This request holds the parameters needed by the storage server. After setting any optional * parameters, call the {@link TestIamPermissions#execute()} method to invoke the remote operation. * * @param bucket Name of a bucket. * @param permissions Permissions to test. * @return the request */ public TestIamPermissions testIamPermissions(java.lang.String bucket, java.util.List permissions) throws java.io.IOException { TestIamPermissions result = new TestIamPermissions(bucket, permissions); initialize(result); return result; } public class TestIamPermissions extends StorageRequest { private static final String REST_PATH = "b/{bucket}/iam/testPermissions"; /** * Tests a set of permissions on the given bucket to see which, if any, are held by the caller. * * Create a request for the method "buckets.testIamPermissions". * * This request holds the parameters needed by the the storage server. After setting any optional * parameters, call the {@link TestIamPermissions#execute()} method to invoke the remote * operation.

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

* * @param bucket Name of a bucket. * @param permissions Permissions to test. * @since 1.13 */ protected TestIamPermissions(java.lang.String bucket, java.util.List permissions) { super(Storage.this, "GET", REST_PATH, null, com.google.api.services.storage.model.TestIamPermissionsResponse.class); this.bucket = com.google.api.client.util.Preconditions.checkNotNull(bucket, "Required parameter bucket must be specified."); this.permissions = com.google.api.client.util.Preconditions.checkNotNull(permissions, "Required parameter permissions must be specified."); } @Override public com.google.api.client.http.HttpResponse executeUsingHead() throws java.io.IOException { return super.executeUsingHead(); } @Override public com.google.api.client.http.HttpRequest buildHttpRequestUsingHead() throws java.io.IOException { return super.buildHttpRequestUsingHead(); } @Override public TestIamPermissions setAlt(java.lang.String alt) { return (TestIamPermissions) super.setAlt(alt); } @Override public TestIamPermissions setFields(java.lang.String fields) { return (TestIamPermissions) super.setFields(fields); } @Override public TestIamPermissions setKey(java.lang.String key) { return (TestIamPermissions) super.setKey(key); } @Override public TestIamPermissions setOauthToken(java.lang.String oauthToken) { return (TestIamPermissions) super.setOauthToken(oauthToken); } @Override public TestIamPermissions setPrettyPrint(java.lang.Boolean prettyPrint) { return (TestIamPermissions) super.setPrettyPrint(prettyPrint); } @Override public TestIamPermissions setQuotaUser(java.lang.String quotaUser) { return (TestIamPermissions) super.setQuotaUser(quotaUser); } @Override public TestIamPermissions setUploadType(java.lang.String uploadType) { return (TestIamPermissions) super.setUploadType(uploadType); } @Override public TestIamPermissions setUserIp(java.lang.String userIp) { return (TestIamPermissions) super.setUserIp(userIp); } /** Name of a bucket. */ @com.google.api.client.util.Key private java.lang.String bucket; /** Name of a bucket. */ public java.lang.String getBucket() { return bucket; } /** Name of a bucket. */ public TestIamPermissions setBucket(java.lang.String bucket) { this.bucket = bucket; return this; } /** Permissions to test. */ @com.google.api.client.util.Key private java.util.List permissions; /** Permissions to test. */ public java.util.List getPermissions() { return permissions; } /** Permissions to test. */ public TestIamPermissions setPermissions(java.util.List permissions) { this.permissions = permissions; return this; } /** The project to be billed for this request. Required for Requester Pays buckets. */ @com.google.api.client.util.Key private java.lang.String userProject; /** The project to be billed for this request. Required for Requester Pays buckets. */ public java.lang.String getUserProject() { return userProject; } /** The project to be billed for this request. Required for Requester Pays buckets. */ public TestIamPermissions setUserProject(java.lang.String userProject) { this.userProject = userProject; return this; } @Override public TestIamPermissions set(String parameterName, Object value) { return (TestIamPermissions) super.set(parameterName, value); } } /** * Updates a bucket. Changes to the bucket will be readable immediately after writing, but * configuration changes may take time to propagate. * * Create a request for the method "buckets.update". * * This request holds the parameters needed by the storage server. After setting any optional * parameters, call the {@link Update#execute()} method to invoke the remote operation. * * @param bucket Name of a bucket. * @param content the {@link com.google.api.services.storage.model.Bucket} * @return the request */ public Update update(java.lang.String bucket, com.google.api.services.storage.model.Bucket content) throws java.io.IOException { Update result = new Update(bucket, content); initialize(result); return result; } public class Update extends StorageRequest { private static final String REST_PATH = "b/{bucket}"; /** * Updates a bucket. Changes to the bucket will be readable immediately after writing, but * configuration changes may take time to propagate. * * Create a request for the method "buckets.update". * * This request holds the parameters needed by the the storage server. After setting any optional * parameters, call the {@link Update#execute()} method to invoke the remote operation.

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

* * @param bucket Name of a bucket. * @param content the {@link com.google.api.services.storage.model.Bucket} * @since 1.13 */ protected Update(java.lang.String bucket, com.google.api.services.storage.model.Bucket content) { super(Storage.this, "PUT", REST_PATH, content, com.google.api.services.storage.model.Bucket.class); this.bucket = com.google.api.client.util.Preconditions.checkNotNull(bucket, "Required parameter bucket must be specified."); } @Override public Update setAlt(java.lang.String alt) { return (Update) super.setAlt(alt); } @Override public Update setFields(java.lang.String fields) { return (Update) super.setFields(fields); } @Override public Update setKey(java.lang.String key) { return (Update) super.setKey(key); } @Override public Update setOauthToken(java.lang.String oauthToken) { return (Update) super.setOauthToken(oauthToken); } @Override public Update setPrettyPrint(java.lang.Boolean prettyPrint) { return (Update) super.setPrettyPrint(prettyPrint); } @Override public Update setQuotaUser(java.lang.String quotaUser) { return (Update) super.setQuotaUser(quotaUser); } @Override public Update setUploadType(java.lang.String uploadType) { return (Update) super.setUploadType(uploadType); } @Override public Update setUserIp(java.lang.String userIp) { return (Update) super.setUserIp(userIp); } /** Name of a bucket. */ @com.google.api.client.util.Key private java.lang.String bucket; /** Name of a bucket. */ public java.lang.String getBucket() { return bucket; } /** Name of a bucket. */ public Update setBucket(java.lang.String bucket) { this.bucket = bucket; return this; } /** * Makes the return of the bucket metadata conditional on whether the bucket's current * metageneration matches the given value. */ @com.google.api.client.util.Key private java.lang.Long ifMetagenerationMatch; /** Makes the return of the bucket metadata conditional on whether the bucket's current metageneration matches the given value. */ public java.lang.Long getIfMetagenerationMatch() { return ifMetagenerationMatch; } /** * Makes the return of the bucket metadata conditional on whether the bucket's current * metageneration matches the given value. */ public Update setIfMetagenerationMatch(java.lang.Long ifMetagenerationMatch) { this.ifMetagenerationMatch = ifMetagenerationMatch; return this; } /** * Makes the return of the bucket metadata conditional on whether the bucket's current * metageneration does not match the given value. */ @com.google.api.client.util.Key private java.lang.Long ifMetagenerationNotMatch; /** Makes the return of the bucket metadata conditional on whether the bucket's current metageneration does not match the given value. */ public java.lang.Long getIfMetagenerationNotMatch() { return ifMetagenerationNotMatch; } /** * Makes the return of the bucket metadata conditional on whether the bucket's current * metageneration does not match the given value. */ public Update setIfMetagenerationNotMatch(java.lang.Long ifMetagenerationNotMatch) { this.ifMetagenerationNotMatch = ifMetagenerationNotMatch; return this; } /** Apply a predefined set of access controls to this bucket. */ @com.google.api.client.util.Key private java.lang.String predefinedAcl; /** Apply a predefined set of access controls to this bucket. */ public java.lang.String getPredefinedAcl() { return predefinedAcl; } /** Apply a predefined set of access controls to this bucket. */ public Update setPredefinedAcl(java.lang.String predefinedAcl) { this.predefinedAcl = predefinedAcl; return this; } /** Apply a predefined set of default object access controls to this bucket. */ @com.google.api.client.util.Key private java.lang.String predefinedDefaultObjectAcl; /** Apply a predefined set of default object access controls to this bucket. */ public java.lang.String getPredefinedDefaultObjectAcl() { return predefinedDefaultObjectAcl; } /** Apply a predefined set of default object access controls to this bucket. */ public Update setPredefinedDefaultObjectAcl(java.lang.String predefinedDefaultObjectAcl) { this.predefinedDefaultObjectAcl = predefinedDefaultObjectAcl; return this; } /** Set of properties to return. Defaults to full. */ @com.google.api.client.util.Key private java.lang.String projection; /** Set of properties to return. Defaults to full. */ public java.lang.String getProjection() { return projection; } /** Set of properties to return. Defaults to full. */ public Update setProjection(java.lang.String projection) { this.projection = projection; return this; } /** The project to be billed for this request. Required for Requester Pays buckets. */ @com.google.api.client.util.Key private java.lang.String userProject; /** The project to be billed for this request. Required for Requester Pays buckets. */ public java.lang.String getUserProject() { return userProject; } /** The project to be billed for this request. Required for Requester Pays buckets. */ public Update setUserProject(java.lang.String userProject) { this.userProject = userProject; return this; } @Override public Update set(String parameterName, Object value) { return (Update) super.set(parameterName, value); } } } /** * An accessor for creating requests from the Channels collection. * *

The typical use is:

*
   *   {@code Storage storage = new Storage(...);}
   *   {@code Storage.Channels.List request = storage.channels().list(parameters ...)}
   * 
* * @return the resource collection */ public Channels channels() { return new Channels(); } /** * The "channels" collection of methods. */ public class Channels { /** * Stop watching resources through this channel * * Create a request for the method "channels.stop". * * This request holds the parameters needed by the storage server. After setting any optional * parameters, call the {@link Stop#execute()} method to invoke the remote operation. * * @param content the {@link com.google.api.services.storage.model.Channel} * @return the request */ public Stop stop(com.google.api.services.storage.model.Channel content) throws java.io.IOException { Stop result = new Stop(content); initialize(result); return result; } public class Stop extends StorageRequest { private static final String REST_PATH = "channels/stop"; /** * Stop watching resources through this channel * * Create a request for the method "channels.stop". * * This request holds the parameters needed by the the storage server. After setting any optional * parameters, call the {@link Stop#execute()} method to invoke the remote operation.

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

* * @param content the {@link com.google.api.services.storage.model.Channel} * @since 1.13 */ protected Stop(com.google.api.services.storage.model.Channel content) { super(Storage.this, "POST", REST_PATH, content, Void.class); } @Override public Stop setAlt(java.lang.String alt) { return (Stop) super.setAlt(alt); } @Override public Stop setFields(java.lang.String fields) { return (Stop) super.setFields(fields); } @Override public Stop setKey(java.lang.String key) { return (Stop) super.setKey(key); } @Override public Stop setOauthToken(java.lang.String oauthToken) { return (Stop) super.setOauthToken(oauthToken); } @Override public Stop setPrettyPrint(java.lang.Boolean prettyPrint) { return (Stop) super.setPrettyPrint(prettyPrint); } @Override public Stop setQuotaUser(java.lang.String quotaUser) { return (Stop) super.setQuotaUser(quotaUser); } @Override public Stop setUploadType(java.lang.String uploadType) { return (Stop) super.setUploadType(uploadType); } @Override public Stop setUserIp(java.lang.String userIp) { return (Stop) super.setUserIp(userIp); } @Override public Stop set(String parameterName, Object value) { return (Stop) super.set(parameterName, value); } } } /** * An accessor for creating requests from the DefaultObjectAccessControls collection. * *

The typical use is:

*
   *   {@code Storage storage = new Storage(...);}
   *   {@code Storage.DefaultObjectAccessControls.List request = storage.defaultObjectAccessControls().list(parameters ...)}
   * 
* * @return the resource collection */ public DefaultObjectAccessControls defaultObjectAccessControls() { return new DefaultObjectAccessControls(); } /** * The "defaultObjectAccessControls" collection of methods. */ public class DefaultObjectAccessControls { /** * Permanently deletes the default object ACL entry for the specified entity on the specified * bucket. * * Create a request for the method "defaultObjectAccessControls.delete". * * This request holds the parameters needed by the storage server. After setting any optional * parameters, call the {@link Delete#execute()} method to invoke the remote operation. * * @param bucket Name of a bucket. * @param entity The entity holding the permission. Can be user-userId, user-emailAddress, group-groupId, group- * emailAddress, allUsers, or allAuthenticatedUsers. * @return the request */ public Delete delete(java.lang.String bucket, java.lang.String entity) throws java.io.IOException { Delete result = new Delete(bucket, entity); initialize(result); return result; } public class Delete extends StorageRequest { private static final String REST_PATH = "b/{bucket}/defaultObjectAcl/{entity}"; /** * Permanently deletes the default object ACL entry for the specified entity on the specified * bucket. * * Create a request for the method "defaultObjectAccessControls.delete". * * This request holds the parameters needed by the the storage 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 bucket Name of a bucket. * @param entity The entity holding the permission. Can be user-userId, user-emailAddress, group-groupId, group- * emailAddress, allUsers, or allAuthenticatedUsers. * @since 1.13 */ protected Delete(java.lang.String bucket, java.lang.String entity) { super(Storage.this, "DELETE", REST_PATH, null, Void.class); this.bucket = com.google.api.client.util.Preconditions.checkNotNull(bucket, "Required parameter bucket must be specified."); this.entity = com.google.api.client.util.Preconditions.checkNotNull(entity, "Required parameter entity must be specified."); } @Override public Delete setAlt(java.lang.String alt) { return (Delete) super.setAlt(alt); } @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 setUserIp(java.lang.String userIp) { return (Delete) super.setUserIp(userIp); } /** Name of a bucket. */ @com.google.api.client.util.Key private java.lang.String bucket; /** Name of a bucket. */ public java.lang.String getBucket() { return bucket; } /** Name of a bucket. */ public Delete setBucket(java.lang.String bucket) { this.bucket = bucket; return this; } /** * The entity holding the permission. Can be user-userId, user-emailAddress, group-groupId, * group-emailAddress, allUsers, or allAuthenticatedUsers. */ @com.google.api.client.util.Key private java.lang.String entity; /** The entity holding the permission. Can be user-userId, user-emailAddress, group-groupId, group- emailAddress, allUsers, or allAuthenticatedUsers. */ public java.lang.String getEntity() { return entity; } /** * The entity holding the permission. Can be user-userId, user-emailAddress, group-groupId, * group-emailAddress, allUsers, or allAuthenticatedUsers. */ public Delete setEntity(java.lang.String entity) { this.entity = entity; return this; } /** The project to be billed for this request. Required for Requester Pays buckets. */ @com.google.api.client.util.Key private java.lang.String userProject; /** The project to be billed for this request. Required for Requester Pays buckets. */ public java.lang.String getUserProject() { return userProject; } /** The project to be billed for this request. Required for Requester Pays buckets. */ public Delete setUserProject(java.lang.String userProject) { this.userProject = userProject; return this; } @Override public Delete set(String parameterName, Object value) { return (Delete) super.set(parameterName, value); } } /** * Returns the default object ACL entry for the specified entity on the specified bucket. * * Create a request for the method "defaultObjectAccessControls.get". * * This request holds the parameters needed by the storage server. After setting any optional * parameters, call the {@link Get#execute()} method to invoke the remote operation. * * @param bucket Name of a bucket. * @param entity The entity holding the permission. Can be user-userId, user-emailAddress, group-groupId, group- * emailAddress, allUsers, or allAuthenticatedUsers. * @return the request */ public Get get(java.lang.String bucket, java.lang.String entity) throws java.io.IOException { Get result = new Get(bucket, entity); initialize(result); return result; } public class Get extends StorageRequest { private static final String REST_PATH = "b/{bucket}/defaultObjectAcl/{entity}"; /** * Returns the default object ACL entry for the specified entity on the specified bucket. * * Create a request for the method "defaultObjectAccessControls.get". * * This request holds the parameters needed by the the storage 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 bucket Name of a bucket. * @param entity The entity holding the permission. Can be user-userId, user-emailAddress, group-groupId, group- * emailAddress, allUsers, or allAuthenticatedUsers. * @since 1.13 */ protected Get(java.lang.String bucket, java.lang.String entity) { super(Storage.this, "GET", REST_PATH, null, com.google.api.services.storage.model.ObjectAccessControl.class); this.bucket = com.google.api.client.util.Preconditions.checkNotNull(bucket, "Required parameter bucket must be specified."); this.entity = com.google.api.client.util.Preconditions.checkNotNull(entity, "Required parameter entity must be specified."); } @Override public com.google.api.client.http.HttpResponse executeUsingHead() throws java.io.IOException { return super.executeUsingHead(); } @Override public com.google.api.client.http.HttpRequest buildHttpRequestUsingHead() throws java.io.IOException { return super.buildHttpRequestUsingHead(); } @Override public Get setAlt(java.lang.String alt) { return (Get) super.setAlt(alt); } @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 setUserIp(java.lang.String userIp) { return (Get) super.setUserIp(userIp); } /** Name of a bucket. */ @com.google.api.client.util.Key private java.lang.String bucket; /** Name of a bucket. */ public java.lang.String getBucket() { return bucket; } /** Name of a bucket. */ public Get setBucket(java.lang.String bucket) { this.bucket = bucket; return this; } /** * The entity holding the permission. Can be user-userId, user-emailAddress, group-groupId, * group-emailAddress, allUsers, or allAuthenticatedUsers. */ @com.google.api.client.util.Key private java.lang.String entity; /** The entity holding the permission. Can be user-userId, user-emailAddress, group-groupId, group- emailAddress, allUsers, or allAuthenticatedUsers. */ public java.lang.String getEntity() { return entity; } /** * The entity holding the permission. Can be user-userId, user-emailAddress, group-groupId, * group-emailAddress, allUsers, or allAuthenticatedUsers. */ public Get setEntity(java.lang.String entity) { this.entity = entity; return this; } /** The project to be billed for this request. Required for Requester Pays buckets. */ @com.google.api.client.util.Key private java.lang.String userProject; /** The project to be billed for this request. Required for Requester Pays buckets. */ public java.lang.String getUserProject() { return userProject; } /** The project to be billed for this request. Required for Requester Pays buckets. */ public Get setUserProject(java.lang.String userProject) { this.userProject = userProject; return this; } @Override public Get set(String parameterName, Object value) { return (Get) super.set(parameterName, value); } } /** * Creates a new default object ACL entry on the specified bucket. * * Create a request for the method "defaultObjectAccessControls.insert". * * This request holds the parameters needed by the storage server. After setting any optional * parameters, call the {@link Insert#execute()} method to invoke the remote operation. * * @param bucket Name of a bucket. * @param content the {@link com.google.api.services.storage.model.ObjectAccessControl} * @return the request */ public Insert insert(java.lang.String bucket, com.google.api.services.storage.model.ObjectAccessControl content) throws java.io.IOException { Insert result = new Insert(bucket, content); initialize(result); return result; } public class Insert extends StorageRequest { private static final String REST_PATH = "b/{bucket}/defaultObjectAcl"; /** * Creates a new default object ACL entry on the specified bucket. * * Create a request for the method "defaultObjectAccessControls.insert". * * This request holds the parameters needed by the the storage server. After setting any optional * parameters, call the {@link Insert#execute()} method to invoke the remote operation.

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

* * @param bucket Name of a bucket. * @param content the {@link com.google.api.services.storage.model.ObjectAccessControl} * @since 1.13 */ protected Insert(java.lang.String bucket, com.google.api.services.storage.model.ObjectAccessControl content) { super(Storage.this, "POST", REST_PATH, content, com.google.api.services.storage.model.ObjectAccessControl.class); this.bucket = com.google.api.client.util.Preconditions.checkNotNull(bucket, "Required parameter bucket must be specified."); checkRequiredParameter(content, "content"); checkRequiredParameter(content.getEntity(), "ObjectAccessControl.getEntity()"); checkRequiredParameter(content, "content"); checkRequiredParameter(content.getRole(), "ObjectAccessControl.getRole()"); } @Override public Insert setAlt(java.lang.String alt) { return (Insert) super.setAlt(alt); } @Override public Insert setFields(java.lang.String fields) { return (Insert) super.setFields(fields); } @Override public Insert setKey(java.lang.String key) { return (Insert) super.setKey(key); } @Override public Insert setOauthToken(java.lang.String oauthToken) { return (Insert) super.setOauthToken(oauthToken); } @Override public Insert setPrettyPrint(java.lang.Boolean prettyPrint) { return (Insert) super.setPrettyPrint(prettyPrint); } @Override public Insert setQuotaUser(java.lang.String quotaUser) { return (Insert) super.setQuotaUser(quotaUser); } @Override public Insert setUploadType(java.lang.String uploadType) { return (Insert) super.setUploadType(uploadType); } @Override public Insert setUserIp(java.lang.String userIp) { return (Insert) super.setUserIp(userIp); } /** Name of a bucket. */ @com.google.api.client.util.Key private java.lang.String bucket; /** Name of a bucket. */ public java.lang.String getBucket() { return bucket; } /** Name of a bucket. */ public Insert setBucket(java.lang.String bucket) { this.bucket = bucket; return this; } /** The project to be billed for this request. Required for Requester Pays buckets. */ @com.google.api.client.util.Key private java.lang.String userProject; /** The project to be billed for this request. Required for Requester Pays buckets. */ public java.lang.String getUserProject() { return userProject; } /** The project to be billed for this request. Required for Requester Pays buckets. */ public Insert setUserProject(java.lang.String userProject) { this.userProject = userProject; return this; } @Override public Insert set(String parameterName, Object value) { return (Insert) super.set(parameterName, value); } } /** * Retrieves default object ACL entries on the specified bucket. * * Create a request for the method "defaultObjectAccessControls.list". * * This request holds the parameters needed by the storage server. After setting any optional * parameters, call the {@link List#execute()} method to invoke the remote operation. * * @param bucket Name of a bucket. * @return the request */ public List list(java.lang.String bucket) throws java.io.IOException { List result = new List(bucket); initialize(result); return result; } public class List extends StorageRequest { private static final String REST_PATH = "b/{bucket}/defaultObjectAcl"; /** * Retrieves default object ACL entries on the specified bucket. * * Create a request for the method "defaultObjectAccessControls.list". * * This request holds the parameters needed by the the storage 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 bucket Name of a bucket. * @since 1.13 */ protected List(java.lang.String bucket) { super(Storage.this, "GET", REST_PATH, null, com.google.api.services.storage.model.ObjectAccessControls.class); this.bucket = com.google.api.client.util.Preconditions.checkNotNull(bucket, "Required parameter bucket must be specified."); } @Override public com.google.api.client.http.HttpResponse executeUsingHead() throws java.io.IOException { return super.executeUsingHead(); } @Override public com.google.api.client.http.HttpRequest buildHttpRequestUsingHead() throws java.io.IOException { return super.buildHttpRequestUsingHead(); } @Override public List setAlt(java.lang.String alt) { return (List) super.setAlt(alt); } @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 setUserIp(java.lang.String userIp) { return (List) super.setUserIp(userIp); } /** Name of a bucket. */ @com.google.api.client.util.Key private java.lang.String bucket; /** Name of a bucket. */ public java.lang.String getBucket() { return bucket; } /** Name of a bucket. */ public List setBucket(java.lang.String bucket) { this.bucket = bucket; return this; } /** * If present, only return default ACL listing if the bucket's current metageneration matches * this value. */ @com.google.api.client.util.Key private java.lang.Long ifMetagenerationMatch; /** If present, only return default ACL listing if the bucket's current metageneration matches this value. */ public java.lang.Long getIfMetagenerationMatch() { return ifMetagenerationMatch; } /** * If present, only return default ACL listing if the bucket's current metageneration matches * this value. */ public List setIfMetagenerationMatch(java.lang.Long ifMetagenerationMatch) { this.ifMetagenerationMatch = ifMetagenerationMatch; return this; } /** * If present, only return default ACL listing if the bucket's current metageneration does not * match the given value. */ @com.google.api.client.util.Key private java.lang.Long ifMetagenerationNotMatch; /** If present, only return default ACL listing if the bucket's current metageneration does not match the given value. */ public java.lang.Long getIfMetagenerationNotMatch() { return ifMetagenerationNotMatch; } /** * If present, only return default ACL listing if the bucket's current metageneration does not * match the given value. */ public List setIfMetagenerationNotMatch(java.lang.Long ifMetagenerationNotMatch) { this.ifMetagenerationNotMatch = ifMetagenerationNotMatch; return this; } /** The project to be billed for this request. Required for Requester Pays buckets. */ @com.google.api.client.util.Key private java.lang.String userProject; /** The project to be billed for this request. Required for Requester Pays buckets. */ public java.lang.String getUserProject() { return userProject; } /** The project to be billed for this request. Required for Requester Pays buckets. */ public List setUserProject(java.lang.String userProject) { this.userProject = userProject; return this; } @Override public List set(String parameterName, Object value) { return (List) super.set(parameterName, value); } } /** * Patches a default object ACL entry on the specified bucket. * * Create a request for the method "defaultObjectAccessControls.patch". * * This request holds the parameters needed by the storage server. After setting any optional * parameters, call the {@link Patch#execute()} method to invoke the remote operation. * * @param bucket Name of a bucket. * @param entity The entity holding the permission. Can be user-userId, user-emailAddress, group-groupId, group- * emailAddress, allUsers, or allAuthenticatedUsers. * @param content the {@link com.google.api.services.storage.model.ObjectAccessControl} * @return the request */ public Patch patch(java.lang.String bucket, java.lang.String entity, com.google.api.services.storage.model.ObjectAccessControl content) throws java.io.IOException { Patch result = new Patch(bucket, entity, content); initialize(result); return result; } public class Patch extends StorageRequest { private static final String REST_PATH = "b/{bucket}/defaultObjectAcl/{entity}"; /** * Patches a default object ACL entry on the specified bucket. * * Create a request for the method "defaultObjectAccessControls.patch". * * This request holds the parameters needed by the the storage 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 bucket Name of a bucket. * @param entity The entity holding the permission. Can be user-userId, user-emailAddress, group-groupId, group- * emailAddress, allUsers, or allAuthenticatedUsers. * @param content the {@link com.google.api.services.storage.model.ObjectAccessControl} * @since 1.13 */ protected Patch(java.lang.String bucket, java.lang.String entity, com.google.api.services.storage.model.ObjectAccessControl content) { super(Storage.this, "PATCH", REST_PATH, content, com.google.api.services.storage.model.ObjectAccessControl.class); this.bucket = com.google.api.client.util.Preconditions.checkNotNull(bucket, "Required parameter bucket must be specified."); this.entity = com.google.api.client.util.Preconditions.checkNotNull(entity, "Required parameter entity must be specified."); } @Override public Patch setAlt(java.lang.String alt) { return (Patch) super.setAlt(alt); } @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 setUserIp(java.lang.String userIp) { return (Patch) super.setUserIp(userIp); } /** Name of a bucket. */ @com.google.api.client.util.Key private java.lang.String bucket; /** Name of a bucket. */ public java.lang.String getBucket() { return bucket; } /** Name of a bucket. */ public Patch setBucket(java.lang.String bucket) { this.bucket = bucket; return this; } /** * The entity holding the permission. Can be user-userId, user-emailAddress, group-groupId, * group-emailAddress, allUsers, or allAuthenticatedUsers. */ @com.google.api.client.util.Key private java.lang.String entity; /** The entity holding the permission. Can be user-userId, user-emailAddress, group-groupId, group- emailAddress, allUsers, or allAuthenticatedUsers. */ public java.lang.String getEntity() { return entity; } /** * The entity holding the permission. Can be user-userId, user-emailAddress, group-groupId, * group-emailAddress, allUsers, or allAuthenticatedUsers. */ public Patch setEntity(java.lang.String entity) { this.entity = entity; return this; } /** The project to be billed for this request. Required for Requester Pays buckets. */ @com.google.api.client.util.Key private java.lang.String userProject; /** The project to be billed for this request. Required for Requester Pays buckets. */ public java.lang.String getUserProject() { return userProject; } /** The project to be billed for this request. Required for Requester Pays buckets. */ public Patch setUserProject(java.lang.String userProject) { this.userProject = userProject; return this; } @Override public Patch set(String parameterName, Object value) { return (Patch) super.set(parameterName, value); } } /** * Updates a default object ACL entry on the specified bucket. * * Create a request for the method "defaultObjectAccessControls.update". * * This request holds the parameters needed by the storage server. After setting any optional * parameters, call the {@link Update#execute()} method to invoke the remote operation. * * @param bucket Name of a bucket. * @param entity The entity holding the permission. Can be user-userId, user-emailAddress, group-groupId, group- * emailAddress, allUsers, or allAuthenticatedUsers. * @param content the {@link com.google.api.services.storage.model.ObjectAccessControl} * @return the request */ public Update update(java.lang.String bucket, java.lang.String entity, com.google.api.services.storage.model.ObjectAccessControl content) throws java.io.IOException { Update result = new Update(bucket, entity, content); initialize(result); return result; } public class Update extends StorageRequest { private static final String REST_PATH = "b/{bucket}/defaultObjectAcl/{entity}"; /** * Updates a default object ACL entry on the specified bucket. * * Create a request for the method "defaultObjectAccessControls.update". * * This request holds the parameters needed by the the storage server. After setting any optional * parameters, call the {@link Update#execute()} method to invoke the remote operation.

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

* * @param bucket Name of a bucket. * @param entity The entity holding the permission. Can be user-userId, user-emailAddress, group-groupId, group- * emailAddress, allUsers, or allAuthenticatedUsers. * @param content the {@link com.google.api.services.storage.model.ObjectAccessControl} * @since 1.13 */ protected Update(java.lang.String bucket, java.lang.String entity, com.google.api.services.storage.model.ObjectAccessControl content) { super(Storage.this, "PUT", REST_PATH, content, com.google.api.services.storage.model.ObjectAccessControl.class); this.bucket = com.google.api.client.util.Preconditions.checkNotNull(bucket, "Required parameter bucket must be specified."); this.entity = com.google.api.client.util.Preconditions.checkNotNull(entity, "Required parameter entity must be specified."); } @Override public Update setAlt(java.lang.String alt) { return (Update) super.setAlt(alt); } @Override public Update setFields(java.lang.String fields) { return (Update) super.setFields(fields); } @Override public Update setKey(java.lang.String key) { return (Update) super.setKey(key); } @Override public Update setOauthToken(java.lang.String oauthToken) { return (Update) super.setOauthToken(oauthToken); } @Override public Update setPrettyPrint(java.lang.Boolean prettyPrint) { return (Update) super.setPrettyPrint(prettyPrint); } @Override public Update setQuotaUser(java.lang.String quotaUser) { return (Update) super.setQuotaUser(quotaUser); } @Override public Update setUploadType(java.lang.String uploadType) { return (Update) super.setUploadType(uploadType); } @Override public Update setUserIp(java.lang.String userIp) { return (Update) super.setUserIp(userIp); } /** Name of a bucket. */ @com.google.api.client.util.Key private java.lang.String bucket; /** Name of a bucket. */ public java.lang.String getBucket() { return bucket; } /** Name of a bucket. */ public Update setBucket(java.lang.String bucket) { this.bucket = bucket; return this; } /** * The entity holding the permission. Can be user-userId, user-emailAddress, group-groupId, * group-emailAddress, allUsers, or allAuthenticatedUsers. */ @com.google.api.client.util.Key private java.lang.String entity; /** The entity holding the permission. Can be user-userId, user-emailAddress, group-groupId, group- emailAddress, allUsers, or allAuthenticatedUsers. */ public java.lang.String getEntity() { return entity; } /** * The entity holding the permission. Can be user-userId, user-emailAddress, group-groupId, * group-emailAddress, allUsers, or allAuthenticatedUsers. */ public Update setEntity(java.lang.String entity) { this.entity = entity; return this; } /** The project to be billed for this request. Required for Requester Pays buckets. */ @com.google.api.client.util.Key private java.lang.String userProject; /** The project to be billed for this request. Required for Requester Pays buckets. */ public java.lang.String getUserProject() { return userProject; } /** The project to be billed for this request. Required for Requester Pays buckets. */ public Update setUserProject(java.lang.String userProject) { this.userProject = userProject; return this; } @Override public Update set(String parameterName, Object value) { return (Update) super.set(parameterName, value); } } } /** * An accessor for creating requests from the Folders collection. * *

The typical use is:

*
   *   {@code Storage storage = new Storage(...);}
   *   {@code Storage.Folders.List request = storage.folders().list(parameters ...)}
   * 
* * @return the resource collection */ public Folders folders() { return new Folders(); } /** * The "folders" collection of methods. */ public class Folders { /** * Permanently deletes a folder. Only applicable to buckets with hierarchical namespace enabled. * * Create a request for the method "folders.delete". * * This request holds the parameters needed by the storage server. After setting any optional * parameters, call the {@link Delete#execute()} method to invoke the remote operation. * * @param bucket Name of the bucket in which the folder resides. * @param folder Name of a folder. * @return the request */ public Delete delete(java.lang.String bucket, java.lang.String folder) throws java.io.IOException { Delete result = new Delete(bucket, folder); initialize(result); return result; } public class Delete extends StorageRequest { private static final String REST_PATH = "b/{bucket}/folders/{folder}"; /** * Permanently deletes a folder. Only applicable to buckets with hierarchical namespace enabled. * * Create a request for the method "folders.delete". * * This request holds the parameters needed by the the storage 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 bucket Name of the bucket in which the folder resides. * @param folder Name of a folder. * @since 1.13 */ protected Delete(java.lang.String bucket, java.lang.String folder) { super(Storage.this, "DELETE", REST_PATH, null, Void.class); this.bucket = com.google.api.client.util.Preconditions.checkNotNull(bucket, "Required parameter bucket must be specified."); this.folder = com.google.api.client.util.Preconditions.checkNotNull(folder, "Required parameter folder must be specified."); } @Override public Delete setAlt(java.lang.String alt) { return (Delete) super.setAlt(alt); } @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 setUserIp(java.lang.String userIp) { return (Delete) super.setUserIp(userIp); } /** Name of the bucket in which the folder resides. */ @com.google.api.client.util.Key private java.lang.String bucket; /** Name of the bucket in which the folder resides. */ public java.lang.String getBucket() { return bucket; } /** Name of the bucket in which the folder resides. */ public Delete setBucket(java.lang.String bucket) { this.bucket = bucket; return this; } /** Name of a folder. */ @com.google.api.client.util.Key private java.lang.String folder; /** Name of a folder. */ public java.lang.String getFolder() { return folder; } /** Name of a folder. */ public Delete setFolder(java.lang.String folder) { this.folder = folder; return this; } /** If set, only deletes the folder if its metageneration matches this value. */ @com.google.api.client.util.Key private java.lang.Long ifMetagenerationMatch; /** If set, only deletes the folder if its metageneration matches this value. */ public java.lang.Long getIfMetagenerationMatch() { return ifMetagenerationMatch; } /** If set, only deletes the folder if its metageneration matches this value. */ public Delete setIfMetagenerationMatch(java.lang.Long ifMetagenerationMatch) { this.ifMetagenerationMatch = ifMetagenerationMatch; return this; } /** If set, only deletes the folder if its metageneration does not match this value. */ @com.google.api.client.util.Key private java.lang.Long ifMetagenerationNotMatch; /** If set, only deletes the folder if its metageneration does not match this value. */ public java.lang.Long getIfMetagenerationNotMatch() { return ifMetagenerationNotMatch; } /** If set, only deletes the folder if its metageneration does not match this value. */ public Delete setIfMetagenerationNotMatch(java.lang.Long ifMetagenerationNotMatch) { this.ifMetagenerationNotMatch = ifMetagenerationNotMatch; return this; } @Override public Delete set(String parameterName, Object value) { return (Delete) super.set(parameterName, value); } } /** * Returns metadata for the specified folder. Only applicable to buckets with hierarchical namespace * enabled. * * Create a request for the method "folders.get". * * This request holds the parameters needed by the storage server. After setting any optional * parameters, call the {@link Get#execute()} method to invoke the remote operation. * * @param bucket Name of the bucket in which the folder resides. * @param folder Name of a folder. * @return the request */ public Get get(java.lang.String bucket, java.lang.String folder) throws java.io.IOException { Get result = new Get(bucket, folder); initialize(result); return result; } public class Get extends StorageRequest { private static final String REST_PATH = "b/{bucket}/folders/{folder}"; /** * Returns metadata for the specified folder. Only applicable to buckets with hierarchical * namespace enabled. * * Create a request for the method "folders.get". * * This request holds the parameters needed by the the storage 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 bucket Name of the bucket in which the folder resides. * @param folder Name of a folder. * @since 1.13 */ protected Get(java.lang.String bucket, java.lang.String folder) { super(Storage.this, "GET", REST_PATH, null, com.google.api.services.storage.model.Folder.class); this.bucket = com.google.api.client.util.Preconditions.checkNotNull(bucket, "Required parameter bucket must be specified."); this.folder = com.google.api.client.util.Preconditions.checkNotNull(folder, "Required parameter folder must be specified."); } @Override public com.google.api.client.http.HttpResponse executeUsingHead() throws java.io.IOException { return super.executeUsingHead(); } @Override public com.google.api.client.http.HttpRequest buildHttpRequestUsingHead() throws java.io.IOException { return super.buildHttpRequestUsingHead(); } @Override public Get setAlt(java.lang.String alt) { return (Get) super.setAlt(alt); } @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 setUserIp(java.lang.String userIp) { return (Get) super.setUserIp(userIp); } /** Name of the bucket in which the folder resides. */ @com.google.api.client.util.Key private java.lang.String bucket; /** Name of the bucket in which the folder resides. */ public java.lang.String getBucket() { return bucket; } /** Name of the bucket in which the folder resides. */ public Get setBucket(java.lang.String bucket) { this.bucket = bucket; return this; } /** Name of a folder. */ @com.google.api.client.util.Key private java.lang.String folder; /** Name of a folder. */ public java.lang.String getFolder() { return folder; } /** Name of a folder. */ public Get setFolder(java.lang.String folder) { this.folder = folder; return this; } /** * Makes the return of the folder metadata conditional on whether the folder's current * metageneration matches the given value. */ @com.google.api.client.util.Key private java.lang.Long ifMetagenerationMatch; /** Makes the return of the folder metadata conditional on whether the folder's current metageneration matches the given value. */ public java.lang.Long getIfMetagenerationMatch() { return ifMetagenerationMatch; } /** * Makes the return of the folder metadata conditional on whether the folder's current * metageneration matches the given value. */ public Get setIfMetagenerationMatch(java.lang.Long ifMetagenerationMatch) { this.ifMetagenerationMatch = ifMetagenerationMatch; return this; } /** * Makes the return of the folder metadata conditional on whether the folder's current * metageneration does not match the given value. */ @com.google.api.client.util.Key private java.lang.Long ifMetagenerationNotMatch; /** Makes the return of the folder metadata conditional on whether the folder's current metageneration does not match the given value. */ public java.lang.Long getIfMetagenerationNotMatch() { return ifMetagenerationNotMatch; } /** * Makes the return of the folder metadata conditional on whether the folder's current * metageneration does not match the given value. */ public Get setIfMetagenerationNotMatch(java.lang.Long ifMetagenerationNotMatch) { this.ifMetagenerationNotMatch = ifMetagenerationNotMatch; return this; } @Override public Get set(String parameterName, Object value) { return (Get) super.set(parameterName, value); } } /** * Creates a new folder. Only applicable to buckets with hierarchical namespace enabled. * * Create a request for the method "folders.insert". * * This request holds the parameters needed by the storage server. After setting any optional * parameters, call the {@link Insert#execute()} method to invoke the remote operation. * * @param bucket Name of the bucket in which the folder resides. * @param content the {@link com.google.api.services.storage.model.Folder} * @return the request */ public Insert insert(java.lang.String bucket, com.google.api.services.storage.model.Folder content) throws java.io.IOException { Insert result = new Insert(bucket, content); initialize(result); return result; } public class Insert extends StorageRequest { private static final String REST_PATH = "b/{bucket}/folders"; /** * Creates a new folder. Only applicable to buckets with hierarchical namespace enabled. * * Create a request for the method "folders.insert". * * This request holds the parameters needed by the the storage server. After setting any optional * parameters, call the {@link Insert#execute()} method to invoke the remote operation.

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

* * @param bucket Name of the bucket in which the folder resides. * @param content the {@link com.google.api.services.storage.model.Folder} * @since 1.13 */ protected Insert(java.lang.String bucket, com.google.api.services.storage.model.Folder content) { super(Storage.this, "POST", REST_PATH, content, com.google.api.services.storage.model.Folder.class); this.bucket = com.google.api.client.util.Preconditions.checkNotNull(bucket, "Required parameter bucket must be specified."); } @Override public Insert setAlt(java.lang.String alt) { return (Insert) super.setAlt(alt); } @Override public Insert setFields(java.lang.String fields) { return (Insert) super.setFields(fields); } @Override public Insert setKey(java.lang.String key) { return (Insert) super.setKey(key); } @Override public Insert setOauthToken(java.lang.String oauthToken) { return (Insert) super.setOauthToken(oauthToken); } @Override public Insert setPrettyPrint(java.lang.Boolean prettyPrint) { return (Insert) super.setPrettyPrint(prettyPrint); } @Override public Insert setQuotaUser(java.lang.String quotaUser) { return (Insert) super.setQuotaUser(quotaUser); } @Override public Insert setUploadType(java.lang.String uploadType) { return (Insert) super.setUploadType(uploadType); } @Override public Insert setUserIp(java.lang.String userIp) { return (Insert) super.setUserIp(userIp); } /** Name of the bucket in which the folder resides. */ @com.google.api.client.util.Key private java.lang.String bucket; /** Name of the bucket in which the folder resides. */ public java.lang.String getBucket() { return bucket; } /** Name of the bucket in which the folder resides. */ public Insert setBucket(java.lang.String bucket) { this.bucket = bucket; return this; } /** If true, any parent folder which doesn’t exist will be created automatically. */ @com.google.api.client.util.Key private java.lang.Boolean recursive; /** If true, any parent folder which doesn’t exist will be created automatically. */ public java.lang.Boolean getRecursive() { return recursive; } /** If true, any parent folder which doesn’t exist will be created automatically. */ public Insert setRecursive(java.lang.Boolean recursive) { this.recursive = recursive; return this; } @Override public Insert set(String parameterName, Object value) { return (Insert) super.set(parameterName, value); } } /** * Retrieves a list of folders matching the criteria. Only applicable to buckets with hierarchical * namespace enabled. * * Create a request for the method "folders.list". * * This request holds the parameters needed by the storage server. After setting any optional * parameters, call the {@link List#execute()} method to invoke the remote operation. * * @param bucket Name of the bucket in which to look for folders. * @return the request */ public List list(java.lang.String bucket) throws java.io.IOException { List result = new List(bucket); initialize(result); return result; } public class List extends StorageRequest { private static final String REST_PATH = "b/{bucket}/folders"; /** * Retrieves a list of folders matching the criteria. Only applicable to buckets with hierarchical * namespace enabled. * * Create a request for the method "folders.list". * * This request holds the parameters needed by the the storage 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 bucket Name of the bucket in which to look for folders. * @since 1.13 */ protected List(java.lang.String bucket) { super(Storage.this, "GET", REST_PATH, null, com.google.api.services.storage.model.Folders.class); this.bucket = com.google.api.client.util.Preconditions.checkNotNull(bucket, "Required parameter bucket must be specified."); } @Override public com.google.api.client.http.HttpResponse executeUsingHead() throws java.io.IOException { return super.executeUsingHead(); } @Override public com.google.api.client.http.HttpRequest buildHttpRequestUsingHead() throws java.io.IOException { return super.buildHttpRequestUsingHead(); } @Override public List setAlt(java.lang.String alt) { return (List) super.setAlt(alt); } @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 setUserIp(java.lang.String userIp) { return (List) super.setUserIp(userIp); } /** Name of the bucket in which to look for folders. */ @com.google.api.client.util.Key private java.lang.String bucket; /** Name of the bucket in which to look for folders. */ public java.lang.String getBucket() { return bucket; } /** Name of the bucket in which to look for folders. */ public List setBucket(java.lang.String bucket) { this.bucket = bucket; return this; } /** * Returns results in a directory-like mode. The only supported value is '/'. If set, items * will only contain folders that either exactly match the prefix, or are one level below the * prefix. */ @com.google.api.client.util.Key private java.lang.String delimiter; /** Returns results in a directory-like mode. The only supported value is '/'. If set, items will only contain folders that either exactly match the prefix, or are one level below the prefix. */ public java.lang.String getDelimiter() { return delimiter; } /** * Returns results in a directory-like mode. The only supported value is '/'. If set, items * will only contain folders that either exactly match the prefix, or are one level below the * prefix. */ public List setDelimiter(java.lang.String delimiter) { this.delimiter = delimiter; return this; } /** * Filter results to folders whose names are lexicographically before endOffset. If * startOffset is also set, the folders listed will have names between startOffset (inclusive) * and endOffset (exclusive). */ @com.google.api.client.util.Key private java.lang.String endOffset; /** Filter results to folders whose names are lexicographically before endOffset. If startOffset is also set, the folders listed will have names between startOffset (inclusive) and endOffset (exclusive). */ public java.lang.String getEndOffset() { return endOffset; } /** * Filter results to folders whose names are lexicographically before endOffset. If * startOffset is also set, the folders listed will have names between startOffset (inclusive) * and endOffset (exclusive). */ public List setEndOffset(java.lang.String endOffset) { this.endOffset = endOffset; return this; } /** Maximum number of items to return in a single page of responses. */ @com.google.api.client.util.Key private java.lang.Integer pageSize; /** Maximum number of items to return in a single page of responses. [minimum: 0] */ public java.lang.Integer getPageSize() { return pageSize; } /** Maximum number of items to return in a single page of responses. */ public List setPageSize(java.lang.Integer pageSize) { this.pageSize = pageSize; return this; } /** * A previously-returned page token representing part of the larger set of results to view. */ @com.google.api.client.util.Key private java.lang.String pageToken; /** A previously-returned page token representing part of the larger set of results to view. */ public java.lang.String getPageToken() { return pageToken; } /** * A previously-returned page token representing part of the larger set of results to view. */ public List setPageToken(java.lang.String pageToken) { this.pageToken = pageToken; return this; } /** * Filter results to folders whose paths begin with this prefix. If set, the value must either * be an empty string or end with a '/'. */ @com.google.api.client.util.Key private java.lang.String prefix; /** Filter results to folders whose paths begin with this prefix. If set, the value must either be an empty string or end with a '/'. */ public java.lang.String getPrefix() { return prefix; } /** * Filter results to folders whose paths begin with this prefix. If set, the value must either * be an empty string or end with a '/'. */ public List setPrefix(java.lang.String prefix) { this.prefix = prefix; return this; } /** * Filter results to folders whose names are lexicographically equal to or after startOffset. * If endOffset is also set, the folders listed will have names between startOffset * (inclusive) and endOffset (exclusive). */ @com.google.api.client.util.Key private java.lang.String startOffset; /** Filter results to folders whose names are lexicographically equal to or after startOffset. If endOffset is also set, the folders listed will have names between startOffset (inclusive) and endOffset (exclusive). */ public java.lang.String getStartOffset() { return startOffset; } /** * Filter results to folders whose names are lexicographically equal to or after startOffset. * If endOffset is also set, the folders listed will have names between startOffset * (inclusive) and endOffset (exclusive). */ public List setStartOffset(java.lang.String startOffset) { this.startOffset = startOffset; return this; } @Override public List set(String parameterName, Object value) { return (List) super.set(parameterName, value); } } /** * Renames a source folder to a destination folder. Only applicable to buckets with hierarchical * namespace enabled. * * Create a request for the method "folders.rename". * * This request holds the parameters needed by the storage server. After setting any optional * parameters, call the {@link Rename#execute()} method to invoke the remote operation. * * @param bucket Name of the bucket in which the folders are in. * @param sourceFolder Name of the source folder. * @param destinationFolder Name of the destination folder. * @return the request */ public Rename rename(java.lang.String bucket, java.lang.String sourceFolder, java.lang.String destinationFolder) throws java.io.IOException { Rename result = new Rename(bucket, sourceFolder, destinationFolder); initialize(result); return result; } public class Rename extends StorageRequest { private static final String REST_PATH = "b/{bucket}/folders/{sourceFolder}/renameTo/folders/{destinationFolder}"; /** * Renames a source folder to a destination folder. Only applicable to buckets with hierarchical * namespace enabled. * * Create a request for the method "folders.rename". * * This request holds the parameters needed by the the storage server. After setting any optional * parameters, call the {@link Rename#execute()} method to invoke the remote operation.

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

* * @param bucket Name of the bucket in which the folders are in. * @param sourceFolder Name of the source folder. * @param destinationFolder Name of the destination folder. * @since 1.13 */ protected Rename(java.lang.String bucket, java.lang.String sourceFolder, java.lang.String destinationFolder) { super(Storage.this, "POST", REST_PATH, null, com.google.api.services.storage.model.GoogleLongrunningOperation.class); this.bucket = com.google.api.client.util.Preconditions.checkNotNull(bucket, "Required parameter bucket must be specified."); this.sourceFolder = com.google.api.client.util.Preconditions.checkNotNull(sourceFolder, "Required parameter sourceFolder must be specified."); this.destinationFolder = com.google.api.client.util.Preconditions.checkNotNull(destinationFolder, "Required parameter destinationFolder must be specified."); } @Override public Rename setAlt(java.lang.String alt) { return (Rename) super.setAlt(alt); } @Override public Rename setFields(java.lang.String fields) { return (Rename) super.setFields(fields); } @Override public Rename setKey(java.lang.String key) { return (Rename) super.setKey(key); } @Override public Rename setOauthToken(java.lang.String oauthToken) { return (Rename) super.setOauthToken(oauthToken); } @Override public Rename setPrettyPrint(java.lang.Boolean prettyPrint) { return (Rename) super.setPrettyPrint(prettyPrint); } @Override public Rename setQuotaUser(java.lang.String quotaUser) { return (Rename) super.setQuotaUser(quotaUser); } @Override public Rename setUploadType(java.lang.String uploadType) { return (Rename) super.setUploadType(uploadType); } @Override public Rename setUserIp(java.lang.String userIp) { return (Rename) super.setUserIp(userIp); } /** Name of the bucket in which the folders are in. */ @com.google.api.client.util.Key private java.lang.String bucket; /** Name of the bucket in which the folders are in. */ public java.lang.String getBucket() { return bucket; } /** Name of the bucket in which the folders are in. */ public Rename setBucket(java.lang.String bucket) { this.bucket = bucket; return this; } /** Name of the source folder. */ @com.google.api.client.util.Key private java.lang.String sourceFolder; /** Name of the source folder. */ public java.lang.String getSourceFolder() { return sourceFolder; } /** Name of the source folder. */ public Rename setSourceFolder(java.lang.String sourceFolder) { this.sourceFolder = sourceFolder; return this; } /** Name of the destination folder. */ @com.google.api.client.util.Key private java.lang.String destinationFolder; /** Name of the destination folder. */ public java.lang.String getDestinationFolder() { return destinationFolder; } /** Name of the destination folder. */ public Rename setDestinationFolder(java.lang.String destinationFolder) { this.destinationFolder = destinationFolder; return this; } /** * Makes the operation conditional on whether the source object's current metageneration * matches the given value. */ @com.google.api.client.util.Key private java.lang.Long ifSourceMetagenerationMatch; /** Makes the operation conditional on whether the source object's current metageneration matches the given value. */ public java.lang.Long getIfSourceMetagenerationMatch() { return ifSourceMetagenerationMatch; } /** * Makes the operation conditional on whether the source object's current metageneration * matches the given value. */ public Rename setIfSourceMetagenerationMatch(java.lang.Long ifSourceMetagenerationMatch) { this.ifSourceMetagenerationMatch = ifSourceMetagenerationMatch; return this; } /** * Makes the operation conditional on whether the source object's current metageneration does * not match the given value. */ @com.google.api.client.util.Key private java.lang.Long ifSourceMetagenerationNotMatch; /** Makes the operation conditional on whether the source object's current metageneration does not match the given value. */ public java.lang.Long getIfSourceMetagenerationNotMatch() { return ifSourceMetagenerationNotMatch; } /** * Makes the operation conditional on whether the source object's current metageneration does * not match the given value. */ public Rename setIfSourceMetagenerationNotMatch(java.lang.Long ifSourceMetagenerationNotMatch) { this.ifSourceMetagenerationNotMatch = ifSourceMetagenerationNotMatch; return this; } @Override public Rename set(String parameterName, Object value) { return (Rename) super.set(parameterName, value); } } } /** * An accessor for creating requests from the ManagedFolders collection. * *

The typical use is:

*
   *   {@code Storage storage = new Storage(...);}
   *   {@code Storage.ManagedFolders.List request = storage.managedFolders().list(parameters ...)}
   * 
* * @return the resource collection */ public ManagedFolders managedFolders() { return new ManagedFolders(); } /** * The "managedFolders" collection of methods. */ public class ManagedFolders { /** * Permanently deletes a managed folder. * * Create a request for the method "managedFolders.delete". * * This request holds the parameters needed by the storage server. After setting any optional * parameters, call the {@link Delete#execute()} method to invoke the remote operation. * * @param bucket Name of the bucket containing the managed folder. * @param managedFolder The managed folder name/path. * @return the request */ public Delete delete(java.lang.String bucket, java.lang.String managedFolder) throws java.io.IOException { Delete result = new Delete(bucket, managedFolder); initialize(result); return result; } public class Delete extends StorageRequest { private static final String REST_PATH = "b/{bucket}/managedFolders/{managedFolder}"; /** * Permanently deletes a managed folder. * * Create a request for the method "managedFolders.delete". * * This request holds the parameters needed by the the storage 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 bucket Name of the bucket containing the managed folder. * @param managedFolder The managed folder name/path. * @since 1.13 */ protected Delete(java.lang.String bucket, java.lang.String managedFolder) { super(Storage.this, "DELETE", REST_PATH, null, Void.class); this.bucket = com.google.api.client.util.Preconditions.checkNotNull(bucket, "Required parameter bucket must be specified."); this.managedFolder = com.google.api.client.util.Preconditions.checkNotNull(managedFolder, "Required parameter managedFolder must be specified."); } @Override public Delete setAlt(java.lang.String alt) { return (Delete) super.setAlt(alt); } @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 setUserIp(java.lang.String userIp) { return (Delete) super.setUserIp(userIp); } /** Name of the bucket containing the managed folder. */ @com.google.api.client.util.Key private java.lang.String bucket; /** Name of the bucket containing the managed folder. */ public java.lang.String getBucket() { return bucket; } /** Name of the bucket containing the managed folder. */ public Delete setBucket(java.lang.String bucket) { this.bucket = bucket; return this; } /** The managed folder name/path. */ @com.google.api.client.util.Key private java.lang.String managedFolder; /** The managed folder name/path. */ public java.lang.String getManagedFolder() { return managedFolder; } /** The managed folder name/path. */ public Delete setManagedFolder(java.lang.String managedFolder) { this.managedFolder = managedFolder; return this; } /** * Allows the deletion of a managed folder even if it is not empty. A managed folder is empty * if there are no objects or managed folders that it applies to. Callers must have * storage.managedFolders.setIamPolicy permission. */ @com.google.api.client.util.Key private java.lang.Boolean allowNonEmpty; /** Allows the deletion of a managed folder even if it is not empty. A managed folder is empty if there are no objects or managed folders that it applies to. Callers must have storage.managedFolders.setIamPolicy permission. */ public java.lang.Boolean getAllowNonEmpty() { return allowNonEmpty; } /** * Allows the deletion of a managed folder even if it is not empty. A managed folder is empty * if there are no objects or managed folders that it applies to. Callers must have * storage.managedFolders.setIamPolicy permission. */ public Delete setAllowNonEmpty(java.lang.Boolean allowNonEmpty) { this.allowNonEmpty = allowNonEmpty; return this; } /** If set, only deletes the managed folder if its metageneration matches this value. */ @com.google.api.client.util.Key private java.lang.Long ifMetagenerationMatch; /** If set, only deletes the managed folder if its metageneration matches this value. */ public java.lang.Long getIfMetagenerationMatch() { return ifMetagenerationMatch; } /** If set, only deletes the managed folder if its metageneration matches this value. */ public Delete setIfMetagenerationMatch(java.lang.Long ifMetagenerationMatch) { this.ifMetagenerationMatch = ifMetagenerationMatch; return this; } /** * If set, only deletes the managed folder if its metageneration does not match this value. */ @com.google.api.client.util.Key private java.lang.Long ifMetagenerationNotMatch; /** If set, only deletes the managed folder if its metageneration does not match this value. */ public java.lang.Long getIfMetagenerationNotMatch() { return ifMetagenerationNotMatch; } /** * If set, only deletes the managed folder if its metageneration does not match this value. */ public Delete setIfMetagenerationNotMatch(java.lang.Long ifMetagenerationNotMatch) { this.ifMetagenerationNotMatch = ifMetagenerationNotMatch; return this; } @Override public Delete set(String parameterName, Object value) { return (Delete) super.set(parameterName, value); } } /** * Returns metadata of the specified managed folder. * * Create a request for the method "managedFolders.get". * * This request holds the parameters needed by the storage server. After setting any optional * parameters, call the {@link Get#execute()} method to invoke the remote operation. * * @param bucket Name of the bucket containing the managed folder. * @param managedFolder The managed folder name/path. * @return the request */ public Get get(java.lang.String bucket, java.lang.String managedFolder) throws java.io.IOException { Get result = new Get(bucket, managedFolder); initialize(result); return result; } public class Get extends StorageRequest { private static final String REST_PATH = "b/{bucket}/managedFolders/{managedFolder}"; /** * Returns metadata of the specified managed folder. * * Create a request for the method "managedFolders.get". * * This request holds the parameters needed by the the storage 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 bucket Name of the bucket containing the managed folder. * @param managedFolder The managed folder name/path. * @since 1.13 */ protected Get(java.lang.String bucket, java.lang.String managedFolder) { super(Storage.this, "GET", REST_PATH, null, com.google.api.services.storage.model.ManagedFolder.class); this.bucket = com.google.api.client.util.Preconditions.checkNotNull(bucket, "Required parameter bucket must be specified."); this.managedFolder = com.google.api.client.util.Preconditions.checkNotNull(managedFolder, "Required parameter managedFolder must be specified."); } @Override public com.google.api.client.http.HttpResponse executeUsingHead() throws java.io.IOException { return super.executeUsingHead(); } @Override public com.google.api.client.http.HttpRequest buildHttpRequestUsingHead() throws java.io.IOException { return super.buildHttpRequestUsingHead(); } @Override public Get setAlt(java.lang.String alt) { return (Get) super.setAlt(alt); } @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 setUserIp(java.lang.String userIp) { return (Get) super.setUserIp(userIp); } /** Name of the bucket containing the managed folder. */ @com.google.api.client.util.Key private java.lang.String bucket; /** Name of the bucket containing the managed folder. */ public java.lang.String getBucket() { return bucket; } /** Name of the bucket containing the managed folder. */ public Get setBucket(java.lang.String bucket) { this.bucket = bucket; return this; } /** The managed folder name/path. */ @com.google.api.client.util.Key private java.lang.String managedFolder; /** The managed folder name/path. */ public java.lang.String getManagedFolder() { return managedFolder; } /** The managed folder name/path. */ public Get setManagedFolder(java.lang.String managedFolder) { this.managedFolder = managedFolder; return this; } /** * Makes the return of the managed folder metadata conditional on whether the managed folder's * current metageneration matches the given value. */ @com.google.api.client.util.Key private java.lang.Long ifMetagenerationMatch; /** Makes the return of the managed folder metadata conditional on whether the managed folder's current metageneration matches the given value. */ public java.lang.Long getIfMetagenerationMatch() { return ifMetagenerationMatch; } /** * Makes the return of the managed folder metadata conditional on whether the managed folder's * current metageneration matches the given value. */ public Get setIfMetagenerationMatch(java.lang.Long ifMetagenerationMatch) { this.ifMetagenerationMatch = ifMetagenerationMatch; return this; } /** * Makes the return of the managed folder metadata conditional on whether the managed folder's * current metageneration does not match the given value. */ @com.google.api.client.util.Key private java.lang.Long ifMetagenerationNotMatch; /** Makes the return of the managed folder metadata conditional on whether the managed folder's current metageneration does not match the given value. */ public java.lang.Long getIfMetagenerationNotMatch() { return ifMetagenerationNotMatch; } /** * Makes the return of the managed folder metadata conditional on whether the managed folder's * current metageneration does not match the given value. */ public Get setIfMetagenerationNotMatch(java.lang.Long ifMetagenerationNotMatch) { this.ifMetagenerationNotMatch = ifMetagenerationNotMatch; return this; } @Override public Get set(String parameterName, Object value) { return (Get) super.set(parameterName, value); } } /** * Returns an IAM policy for the specified managed folder. * * Create a request for the method "managedFolders.getIamPolicy". * * This request holds the parameters needed by the storage server. After setting any optional * parameters, call the {@link GetIamPolicy#execute()} method to invoke the remote operation. * * @param bucket Name of the bucket containing the managed folder. * @param managedFolder The managed folder name/path. * @return the request */ public GetIamPolicy getIamPolicy(java.lang.String bucket, java.lang.String managedFolder) throws java.io.IOException { GetIamPolicy result = new GetIamPolicy(bucket, managedFolder); initialize(result); return result; } public class GetIamPolicy extends StorageRequest { private static final String REST_PATH = "b/{bucket}/managedFolders/{managedFolder}/iam"; /** * Returns an IAM policy for the specified managed folder. * * Create a request for the method "managedFolders.getIamPolicy". * * This request holds the parameters needed by the the storage server. After setting any optional * parameters, call the {@link GetIamPolicy#execute()} method to invoke the remote operation.

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

* * @param bucket Name of the bucket containing the managed folder. * @param managedFolder The managed folder name/path. * @since 1.13 */ protected GetIamPolicy(java.lang.String bucket, java.lang.String managedFolder) { super(Storage.this, "GET", REST_PATH, null, com.google.api.services.storage.model.Policy.class); this.bucket = com.google.api.client.util.Preconditions.checkNotNull(bucket, "Required parameter bucket must be specified."); this.managedFolder = com.google.api.client.util.Preconditions.checkNotNull(managedFolder, "Required parameter managedFolder must be specified."); } @Override public com.google.api.client.http.HttpResponse executeUsingHead() throws java.io.IOException { return super.executeUsingHead(); } @Override public com.google.api.client.http.HttpRequest buildHttpRequestUsingHead() throws java.io.IOException { return super.buildHttpRequestUsingHead(); } @Override public GetIamPolicy setAlt(java.lang.String alt) { return (GetIamPolicy) super.setAlt(alt); } @Override public GetIamPolicy setFields(java.lang.String fields) { return (GetIamPolicy) super.setFields(fields); } @Override public GetIamPolicy setKey(java.lang.String key) { return (GetIamPolicy) super.setKey(key); } @Override public GetIamPolicy setOauthToken(java.lang.String oauthToken) { return (GetIamPolicy) super.setOauthToken(oauthToken); } @Override public GetIamPolicy setPrettyPrint(java.lang.Boolean prettyPrint) { return (GetIamPolicy) super.setPrettyPrint(prettyPrint); } @Override public GetIamPolicy setQuotaUser(java.lang.String quotaUser) { return (GetIamPolicy) super.setQuotaUser(quotaUser); } @Override public GetIamPolicy setUploadType(java.lang.String uploadType) { return (GetIamPolicy) super.setUploadType(uploadType); } @Override public GetIamPolicy setUserIp(java.lang.String userIp) { return (GetIamPolicy) super.setUserIp(userIp); } /** Name of the bucket containing the managed folder. */ @com.google.api.client.util.Key private java.lang.String bucket; /** Name of the bucket containing the managed folder. */ public java.lang.String getBucket() { return bucket; } /** Name of the bucket containing the managed folder. */ public GetIamPolicy setBucket(java.lang.String bucket) { this.bucket = bucket; return this; } /** The managed folder name/path. */ @com.google.api.client.util.Key private java.lang.String managedFolder; /** The managed folder name/path. */ public java.lang.String getManagedFolder() { return managedFolder; } /** The managed folder name/path. */ public GetIamPolicy setManagedFolder(java.lang.String managedFolder) { this.managedFolder = managedFolder; return this; } /** * The IAM policy format version to be returned. If the optionsRequestedPolicyVersion is for * an older version that doesn't support part of the requested IAM policy, the request fails. */ @com.google.api.client.util.Key private java.lang.Integer optionsRequestedPolicyVersion; /** The IAM policy format version to be returned. If the optionsRequestedPolicyVersion is for an older version that doesn't support part of the requested IAM policy, the request fails. [minimum: 1] */ public java.lang.Integer getOptionsRequestedPolicyVersion() { return optionsRequestedPolicyVersion; } /** * The IAM policy format version to be returned. If the optionsRequestedPolicyVersion is for * an older version that doesn't support part of the requested IAM policy, the request fails. */ public GetIamPolicy setOptionsRequestedPolicyVersion(java.lang.Integer optionsRequestedPolicyVersion) { this.optionsRequestedPolicyVersion = optionsRequestedPolicyVersion; return this; } /** The project to be billed for this request. Required for Requester Pays buckets. */ @com.google.api.client.util.Key private java.lang.String userProject; /** The project to be billed for this request. Required for Requester Pays buckets. */ public java.lang.String getUserProject() { return userProject; } /** The project to be billed for this request. Required for Requester Pays buckets. */ public GetIamPolicy setUserProject(java.lang.String userProject) { this.userProject = userProject; return this; } @Override public GetIamPolicy set(String parameterName, Object value) { return (GetIamPolicy) super.set(parameterName, value); } } /** * Creates a new managed folder. * * Create a request for the method "managedFolders.insert". * * This request holds the parameters needed by the storage server. After setting any optional * parameters, call the {@link Insert#execute()} method to invoke the remote operation. * * @param bucket Name of the bucket containing the managed folder. * @param content the {@link com.google.api.services.storage.model.ManagedFolder} * @return the request */ public Insert insert(java.lang.String bucket, com.google.api.services.storage.model.ManagedFolder content) throws java.io.IOException { Insert result = new Insert(bucket, content); initialize(result); return result; } public class Insert extends StorageRequest { private static final String REST_PATH = "b/{bucket}/managedFolders"; /** * Creates a new managed folder. * * Create a request for the method "managedFolders.insert". * * This request holds the parameters needed by the the storage server. After setting any optional * parameters, call the {@link Insert#execute()} method to invoke the remote operation.

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

* * @param bucket Name of the bucket containing the managed folder. * @param content the {@link com.google.api.services.storage.model.ManagedFolder} * @since 1.13 */ protected Insert(java.lang.String bucket, com.google.api.services.storage.model.ManagedFolder content) { super(Storage.this, "POST", REST_PATH, content, com.google.api.services.storage.model.ManagedFolder.class); this.bucket = com.google.api.client.util.Preconditions.checkNotNull(bucket, "Required parameter bucket must be specified."); } @Override public Insert setAlt(java.lang.String alt) { return (Insert) super.setAlt(alt); } @Override public Insert setFields(java.lang.String fields) { return (Insert) super.setFields(fields); } @Override public Insert setKey(java.lang.String key) { return (Insert) super.setKey(key); } @Override public Insert setOauthToken(java.lang.String oauthToken) { return (Insert) super.setOauthToken(oauthToken); } @Override public Insert setPrettyPrint(java.lang.Boolean prettyPrint) { return (Insert) super.setPrettyPrint(prettyPrint); } @Override public Insert setQuotaUser(java.lang.String quotaUser) { return (Insert) super.setQuotaUser(quotaUser); } @Override public Insert setUploadType(java.lang.String uploadType) { return (Insert) super.setUploadType(uploadType); } @Override public Insert setUserIp(java.lang.String userIp) { return (Insert) super.setUserIp(userIp); } /** Name of the bucket containing the managed folder. */ @com.google.api.client.util.Key private java.lang.String bucket; /** Name of the bucket containing the managed folder. */ public java.lang.String getBucket() { return bucket; } /** Name of the bucket containing the managed folder. */ public Insert setBucket(java.lang.String bucket) { this.bucket = bucket; return this; } @Override public Insert set(String parameterName, Object value) { return (Insert) super.set(parameterName, value); } } /** * Lists managed folders in the given bucket. * * Create a request for the method "managedFolders.list". * * This request holds the parameters needed by the storage server. After setting any optional * parameters, call the {@link List#execute()} method to invoke the remote operation. * * @param bucket Name of the bucket containing the managed folder. * @return the request */ public List list(java.lang.String bucket) throws java.io.IOException { List result = new List(bucket); initialize(result); return result; } public class List extends StorageRequest { private static final String REST_PATH = "b/{bucket}/managedFolders"; /** * Lists managed folders in the given bucket. * * Create a request for the method "managedFolders.list". * * This request holds the parameters needed by the the storage 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 bucket Name of the bucket containing the managed folder. * @since 1.13 */ protected List(java.lang.String bucket) { super(Storage.this, "GET", REST_PATH, null, com.google.api.services.storage.model.ManagedFolders.class); this.bucket = com.google.api.client.util.Preconditions.checkNotNull(bucket, "Required parameter bucket must be specified."); } @Override public com.google.api.client.http.HttpResponse executeUsingHead() throws java.io.IOException { return super.executeUsingHead(); } @Override public com.google.api.client.http.HttpRequest buildHttpRequestUsingHead() throws java.io.IOException { return super.buildHttpRequestUsingHead(); } @Override public List setAlt(java.lang.String alt) { return (List) super.setAlt(alt); } @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 setUserIp(java.lang.String userIp) { return (List) super.setUserIp(userIp); } /** Name of the bucket containing the managed folder. */ @com.google.api.client.util.Key private java.lang.String bucket; /** Name of the bucket containing the managed folder. */ public java.lang.String getBucket() { return bucket; } /** Name of the bucket containing the managed folder. */ public List setBucket(java.lang.String bucket) { this.bucket = bucket; return this; } /** Maximum number of items to return in a single page of responses. */ @com.google.api.client.util.Key private java.lang.Integer pageSize; /** Maximum number of items to return in a single page of responses. [minimum: 0] */ public java.lang.Integer getPageSize() { return pageSize; } /** Maximum number of items to return in a single page of responses. */ public List setPageSize(java.lang.Integer pageSize) { this.pageSize = pageSize; return this; } /** * A previously-returned page token representing part of the larger set of results to view. */ @com.google.api.client.util.Key private java.lang.String pageToken; /** A previously-returned page token representing part of the larger set of results to view. */ public java.lang.String getPageToken() { return pageToken; } /** * A previously-returned page token representing part of the larger set of results to view. */ public List setPageToken(java.lang.String pageToken) { this.pageToken = pageToken; return this; } /** The managed folder name/path prefix to filter the output list of results. */ @com.google.api.client.util.Key private java.lang.String prefix; /** The managed folder name/path prefix to filter the output list of results. */ public java.lang.String getPrefix() { return prefix; } /** The managed folder name/path prefix to filter the output list of results. */ public List setPrefix(java.lang.String prefix) { this.prefix = prefix; return this; } @Override public List set(String parameterName, Object value) { return (List) super.set(parameterName, value); } } /** * Updates an IAM policy for the specified managed folder. * * Create a request for the method "managedFolders.setIamPolicy". * * This request holds the parameters needed by the storage server. After setting any optional * parameters, call the {@link SetIamPolicy#execute()} method to invoke the remote operation. * * @param bucket Name of the bucket containing the managed folder. * @param managedFolder The managed folder name/path. * @param content the {@link com.google.api.services.storage.model.Policy} * @return the request */ public SetIamPolicy setIamPolicy(java.lang.String bucket, java.lang.String managedFolder, com.google.api.services.storage.model.Policy content) throws java.io.IOException { SetIamPolicy result = new SetIamPolicy(bucket, managedFolder, content); initialize(result); return result; } public class SetIamPolicy extends StorageRequest { private static final String REST_PATH = "b/{bucket}/managedFolders/{managedFolder}/iam"; /** * Updates an IAM policy for the specified managed folder. * * Create a request for the method "managedFolders.setIamPolicy". * * This request holds the parameters needed by the the storage server. After setting any optional * parameters, call the {@link SetIamPolicy#execute()} method to invoke the remote operation.

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

* * @param bucket Name of the bucket containing the managed folder. * @param managedFolder The managed folder name/path. * @param content the {@link com.google.api.services.storage.model.Policy} * @since 1.13 */ protected SetIamPolicy(java.lang.String bucket, java.lang.String managedFolder, com.google.api.services.storage.model.Policy content) { super(Storage.this, "PUT", REST_PATH, content, com.google.api.services.storage.model.Policy.class); this.bucket = com.google.api.client.util.Preconditions.checkNotNull(bucket, "Required parameter bucket must be specified."); this.managedFolder = com.google.api.client.util.Preconditions.checkNotNull(managedFolder, "Required parameter managedFolder must be specified."); } @Override public SetIamPolicy setAlt(java.lang.String alt) { return (SetIamPolicy) super.setAlt(alt); } @Override public SetIamPolicy setFields(java.lang.String fields) { return (SetIamPolicy) super.setFields(fields); } @Override public SetIamPolicy setKey(java.lang.String key) { return (SetIamPolicy) super.setKey(key); } @Override public SetIamPolicy setOauthToken(java.lang.String oauthToken) { return (SetIamPolicy) super.setOauthToken(oauthToken); } @Override public SetIamPolicy setPrettyPrint(java.lang.Boolean prettyPrint) { return (SetIamPolicy) super.setPrettyPrint(prettyPrint); } @Override public SetIamPolicy setQuotaUser(java.lang.String quotaUser) { return (SetIamPolicy) super.setQuotaUser(quotaUser); } @Override public SetIamPolicy setUploadType(java.lang.String uploadType) { return (SetIamPolicy) super.setUploadType(uploadType); } @Override public SetIamPolicy setUserIp(java.lang.String userIp) { return (SetIamPolicy) super.setUserIp(userIp); } /** Name of the bucket containing the managed folder. */ @com.google.api.client.util.Key private java.lang.String bucket; /** Name of the bucket containing the managed folder. */ public java.lang.String getBucket() { return bucket; } /** Name of the bucket containing the managed folder. */ public SetIamPolicy setBucket(java.lang.String bucket) { this.bucket = bucket; return this; } /** The managed folder name/path. */ @com.google.api.client.util.Key private java.lang.String managedFolder; /** The managed folder name/path. */ public java.lang.String getManagedFolder() { return managedFolder; } /** The managed folder name/path. */ public SetIamPolicy setManagedFolder(java.lang.String managedFolder) { this.managedFolder = managedFolder; return this; } /** The project to be billed for this request. Required for Requester Pays buckets. */ @com.google.api.client.util.Key private java.lang.String userProject; /** The project to be billed for this request. Required for Requester Pays buckets. */ public java.lang.String getUserProject() { return userProject; } /** The project to be billed for this request. Required for Requester Pays buckets. */ public SetIamPolicy setUserProject(java.lang.String userProject) { this.userProject = userProject; return this; } @Override public SetIamPolicy set(String parameterName, Object value) { return (SetIamPolicy) super.set(parameterName, value); } } /** * Tests a set of permissions on the given managed folder to see which, if any, are held by the * caller. * * Create a request for the method "managedFolders.testIamPermissions". * * This request holds the parameters needed by the storage server. After setting any optional * parameters, call the {@link TestIamPermissions#execute()} method to invoke the remote operation. * * @param bucket Name of the bucket containing the managed folder. * @param managedFolder The managed folder name/path. * @param permissions Permissions to test. * @return the request */ public TestIamPermissions testIamPermissions(java.lang.String bucket, java.lang.String managedFolder, java.util.List permissions) throws java.io.IOException { TestIamPermissions result = new TestIamPermissions(bucket, managedFolder, permissions); initialize(result); return result; } public class TestIamPermissions extends StorageRequest { private static final String REST_PATH = "b/{bucket}/managedFolders/{managedFolder}/iam/testPermissions"; /** * Tests a set of permissions on the given managed folder to see which, if any, are held by the * caller. * * Create a request for the method "managedFolders.testIamPermissions". * * This request holds the parameters needed by the the storage server. After setting any optional * parameters, call the {@link TestIamPermissions#execute()} method to invoke the remote * operation.

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

* * @param bucket Name of the bucket containing the managed folder. * @param managedFolder The managed folder name/path. * @param permissions Permissions to test. * @since 1.13 */ protected TestIamPermissions(java.lang.String bucket, java.lang.String managedFolder, java.util.List permissions) { super(Storage.this, "GET", REST_PATH, null, com.google.api.services.storage.model.TestIamPermissionsResponse.class); this.bucket = com.google.api.client.util.Preconditions.checkNotNull(bucket, "Required parameter bucket must be specified."); this.managedFolder = com.google.api.client.util.Preconditions.checkNotNull(managedFolder, "Required parameter managedFolder must be specified."); this.permissions = com.google.api.client.util.Preconditions.checkNotNull(permissions, "Required parameter permissions must be specified."); } @Override public com.google.api.client.http.HttpResponse executeUsingHead() throws java.io.IOException { return super.executeUsingHead(); } @Override public com.google.api.client.http.HttpRequest buildHttpRequestUsingHead() throws java.io.IOException { return super.buildHttpRequestUsingHead(); } @Override public TestIamPermissions setAlt(java.lang.String alt) { return (TestIamPermissions) super.setAlt(alt); } @Override public TestIamPermissions setFields(java.lang.String fields) { return (TestIamPermissions) super.setFields(fields); } @Override public TestIamPermissions setKey(java.lang.String key) { return (TestIamPermissions) super.setKey(key); } @Override public TestIamPermissions setOauthToken(java.lang.String oauthToken) { return (TestIamPermissions) super.setOauthToken(oauthToken); } @Override public TestIamPermissions setPrettyPrint(java.lang.Boolean prettyPrint) { return (TestIamPermissions) super.setPrettyPrint(prettyPrint); } @Override public TestIamPermissions setQuotaUser(java.lang.String quotaUser) { return (TestIamPermissions) super.setQuotaUser(quotaUser); } @Override public TestIamPermissions setUploadType(java.lang.String uploadType) { return (TestIamPermissions) super.setUploadType(uploadType); } @Override public TestIamPermissions setUserIp(java.lang.String userIp) { return (TestIamPermissions) super.setUserIp(userIp); } /** Name of the bucket containing the managed folder. */ @com.google.api.client.util.Key private java.lang.String bucket; /** Name of the bucket containing the managed folder. */ public java.lang.String getBucket() { return bucket; } /** Name of the bucket containing the managed folder. */ public TestIamPermissions setBucket(java.lang.String bucket) { this.bucket = bucket; return this; } /** The managed folder name/path. */ @com.google.api.client.util.Key private java.lang.String managedFolder; /** The managed folder name/path. */ public java.lang.String getManagedFolder() { return managedFolder; } /** The managed folder name/path. */ public TestIamPermissions setManagedFolder(java.lang.String managedFolder) { this.managedFolder = managedFolder; return this; } /** Permissions to test. */ @com.google.api.client.util.Key private java.util.List permissions; /** Permissions to test. */ public java.util.List getPermissions() { return permissions; } /** Permissions to test. */ public TestIamPermissions setPermissions(java.util.List permissions) { this.permissions = permissions; return this; } /** The project to be billed for this request. Required for Requester Pays buckets. */ @com.google.api.client.util.Key private java.lang.String userProject; /** The project to be billed for this request. Required for Requester Pays buckets. */ public java.lang.String getUserProject() { return userProject; } /** The project to be billed for this request. Required for Requester Pays buckets. */ public TestIamPermissions setUserProject(java.lang.String userProject) { this.userProject = userProject; return this; } @Override public TestIamPermissions set(String parameterName, Object value) { return (TestIamPermissions) super.set(parameterName, value); } } } /** * An accessor for creating requests from the Notifications collection. * *

The typical use is:

*
   *   {@code Storage storage = new Storage(...);}
   *   {@code Storage.Notifications.List request = storage.notifications().list(parameters ...)}
   * 
* * @return the resource collection */ public Notifications notifications() { return new Notifications(); } /** * The "notifications" collection of methods. */ public class Notifications { /** * Permanently deletes a notification subscription. * * Create a request for the method "notifications.delete". * * This request holds the parameters needed by the storage server. After setting any optional * parameters, call the {@link Delete#execute()} method to invoke the remote operation. * * @param bucket The parent bucket of the notification. * @param notification ID of the notification to delete. * @return the request */ public Delete delete(java.lang.String bucket, java.lang.String notification) throws java.io.IOException { Delete result = new Delete(bucket, notification); initialize(result); return result; } public class Delete extends StorageRequest { private static final String REST_PATH = "b/{bucket}/notificationConfigs/{notification}"; /** * Permanently deletes a notification subscription. * * Create a request for the method "notifications.delete". * * This request holds the parameters needed by the the storage 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 bucket The parent bucket of the notification. * @param notification ID of the notification to delete. * @since 1.13 */ protected Delete(java.lang.String bucket, java.lang.String notification) { super(Storage.this, "DELETE", REST_PATH, null, Void.class); this.bucket = com.google.api.client.util.Preconditions.checkNotNull(bucket, "Required parameter bucket must be specified."); this.notification = com.google.api.client.util.Preconditions.checkNotNull(notification, "Required parameter notification must be specified."); } @Override public Delete setAlt(java.lang.String alt) { return (Delete) super.setAlt(alt); } @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 setUserIp(java.lang.String userIp) { return (Delete) super.setUserIp(userIp); } /** The parent bucket of the notification. */ @com.google.api.client.util.Key private java.lang.String bucket; /** The parent bucket of the notification. */ public java.lang.String getBucket() { return bucket; } /** The parent bucket of the notification. */ public Delete setBucket(java.lang.String bucket) { this.bucket = bucket; return this; } /** ID of the notification to delete. */ @com.google.api.client.util.Key private java.lang.String notification; /** ID of the notification to delete. */ public java.lang.String getNotification() { return notification; } /** ID of the notification to delete. */ public Delete setNotification(java.lang.String notification) { this.notification = notification; return this; } /** The project to be billed for this request. Required for Requester Pays buckets. */ @com.google.api.client.util.Key private java.lang.String userProject; /** The project to be billed for this request. Required for Requester Pays buckets. */ public java.lang.String getUserProject() { return userProject; } /** The project to be billed for this request. Required for Requester Pays buckets. */ public Delete setUserProject(java.lang.String userProject) { this.userProject = userProject; return this; } @Override public Delete set(String parameterName, Object value) { return (Delete) super.set(parameterName, value); } } /** * View a notification configuration. * * Create a request for the method "notifications.get". * * This request holds the parameters needed by the storage server. After setting any optional * parameters, call the {@link Get#execute()} method to invoke the remote operation. * * @param bucket The parent bucket of the notification. * @param notification Notification ID * @return the request */ public Get get(java.lang.String bucket, java.lang.String notification) throws java.io.IOException { Get result = new Get(bucket, notification); initialize(result); return result; } public class Get extends StorageRequest { private static final String REST_PATH = "b/{bucket}/notificationConfigs/{notification}"; /** * View a notification configuration. * * Create a request for the method "notifications.get". * * This request holds the parameters needed by the the storage 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 bucket The parent bucket of the notification. * @param notification Notification ID * @since 1.13 */ protected Get(java.lang.String bucket, java.lang.String notification) { super(Storage.this, "GET", REST_PATH, null, com.google.api.services.storage.model.Notification.class); this.bucket = com.google.api.client.util.Preconditions.checkNotNull(bucket, "Required parameter bucket must be specified."); this.notification = com.google.api.client.util.Preconditions.checkNotNull(notification, "Required parameter notification must be specified."); } @Override public com.google.api.client.http.HttpResponse executeUsingHead() throws java.io.IOException { return super.executeUsingHead(); } @Override public com.google.api.client.http.HttpRequest buildHttpRequestUsingHead() throws java.io.IOException { return super.buildHttpRequestUsingHead(); } @Override public Get setAlt(java.lang.String alt) { return (Get) super.setAlt(alt); } @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 setUserIp(java.lang.String userIp) { return (Get) super.setUserIp(userIp); } /** The parent bucket of the notification. */ @com.google.api.client.util.Key private java.lang.String bucket; /** The parent bucket of the notification. */ public java.lang.String getBucket() { return bucket; } /** The parent bucket of the notification. */ public Get setBucket(java.lang.String bucket) { this.bucket = bucket; return this; } /** Notification ID */ @com.google.api.client.util.Key private java.lang.String notification; /** Notification ID */ public java.lang.String getNotification() { return notification; } /** Notification ID */ public Get setNotification(java.lang.String notification) { this.notification = notification; return this; } /** The project to be billed for this request. Required for Requester Pays buckets. */ @com.google.api.client.util.Key private java.lang.String userProject; /** The project to be billed for this request. Required for Requester Pays buckets. */ public java.lang.String getUserProject() { return userProject; } /** The project to be billed for this request. Required for Requester Pays buckets. */ public Get setUserProject(java.lang.String userProject) { this.userProject = userProject; return this; } @Override public Get set(String parameterName, Object value) { return (Get) super.set(parameterName, value); } } /** * Creates a notification subscription for a given bucket. * * Create a request for the method "notifications.insert". * * This request holds the parameters needed by the storage server. After setting any optional * parameters, call the {@link Insert#execute()} method to invoke the remote operation. * * @param bucket The parent bucket of the notification. * @param content the {@link com.google.api.services.storage.model.Notification} * @return the request */ public Insert insert(java.lang.String bucket, com.google.api.services.storage.model.Notification content) throws java.io.IOException { Insert result = new Insert(bucket, content); initialize(result); return result; } public class Insert extends StorageRequest { private static final String REST_PATH = "b/{bucket}/notificationConfigs"; /** * Creates a notification subscription for a given bucket. * * Create a request for the method "notifications.insert". * * This request holds the parameters needed by the the storage server. After setting any optional * parameters, call the {@link Insert#execute()} method to invoke the remote operation.

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

* * @param bucket The parent bucket of the notification. * @param content the {@link com.google.api.services.storage.model.Notification} * @since 1.13 */ protected Insert(java.lang.String bucket, com.google.api.services.storage.model.Notification content) { super(Storage.this, "POST", REST_PATH, content, com.google.api.services.storage.model.Notification.class); this.bucket = com.google.api.client.util.Preconditions.checkNotNull(bucket, "Required parameter bucket must be specified."); checkRequiredParameter(content, "content"); checkRequiredParameter(content.getPayloadFormat(), "Notification.getPayloadFormat()"); checkRequiredParameter(content, "content"); checkRequiredParameter(content.getTopic(), "Notification.getTopic()"); } @Override public Insert setAlt(java.lang.String alt) { return (Insert) super.setAlt(alt); } @Override public Insert setFields(java.lang.String fields) { return (Insert) super.setFields(fields); } @Override public Insert setKey(java.lang.String key) { return (Insert) super.setKey(key); } @Override public Insert setOauthToken(java.lang.String oauthToken) { return (Insert) super.setOauthToken(oauthToken); } @Override public Insert setPrettyPrint(java.lang.Boolean prettyPrint) { return (Insert) super.setPrettyPrint(prettyPrint); } @Override public Insert setQuotaUser(java.lang.String quotaUser) { return (Insert) super.setQuotaUser(quotaUser); } @Override public Insert setUploadType(java.lang.String uploadType) { return (Insert) super.setUploadType(uploadType); } @Override public Insert setUserIp(java.lang.String userIp) { return (Insert) super.setUserIp(userIp); } /** The parent bucket of the notification. */ @com.google.api.client.util.Key private java.lang.String bucket; /** The parent bucket of the notification. */ public java.lang.String getBucket() { return bucket; } /** The parent bucket of the notification. */ public Insert setBucket(java.lang.String bucket) { this.bucket = bucket; return this; } /** The project to be billed for this request. Required for Requester Pays buckets. */ @com.google.api.client.util.Key private java.lang.String userProject; /** The project to be billed for this request. Required for Requester Pays buckets. */ public java.lang.String getUserProject() { return userProject; } /** The project to be billed for this request. Required for Requester Pays buckets. */ public Insert setUserProject(java.lang.String userProject) { this.userProject = userProject; return this; } @Override public Insert set(String parameterName, Object value) { return (Insert) super.set(parameterName, value); } } /** * Retrieves a list of notification subscriptions for a given bucket. * * Create a request for the method "notifications.list". * * This request holds the parameters needed by the storage server. After setting any optional * parameters, call the {@link List#execute()} method to invoke the remote operation. * * @param bucket Name of a Google Cloud Storage bucket. * @return the request */ public List list(java.lang.String bucket) throws java.io.IOException { List result = new List(bucket); initialize(result); return result; } public class List extends StorageRequest { private static final String REST_PATH = "b/{bucket}/notificationConfigs"; /** * Retrieves a list of notification subscriptions for a given bucket. * * Create a request for the method "notifications.list". * * This request holds the parameters needed by the the storage 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 bucket Name of a Google Cloud Storage bucket. * @since 1.13 */ protected List(java.lang.String bucket) { super(Storage.this, "GET", REST_PATH, null, com.google.api.services.storage.model.Notifications.class); this.bucket = com.google.api.client.util.Preconditions.checkNotNull(bucket, "Required parameter bucket must be specified."); } @Override public com.google.api.client.http.HttpResponse executeUsingHead() throws java.io.IOException { return super.executeUsingHead(); } @Override public com.google.api.client.http.HttpRequest buildHttpRequestUsingHead() throws java.io.IOException { return super.buildHttpRequestUsingHead(); } @Override public List setAlt(java.lang.String alt) { return (List) super.setAlt(alt); } @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 setUserIp(java.lang.String userIp) { return (List) super.setUserIp(userIp); } /** Name of a Google Cloud Storage bucket. */ @com.google.api.client.util.Key private java.lang.String bucket; /** Name of a Google Cloud Storage bucket. */ public java.lang.String getBucket() { return bucket; } /** Name of a Google Cloud Storage bucket. */ public List setBucket(java.lang.String bucket) { this.bucket = bucket; return this; } /** The project to be billed for this request. Required for Requester Pays buckets. */ @com.google.api.client.util.Key private java.lang.String userProject; /** The project to be billed for this request. Required for Requester Pays buckets. */ public java.lang.String getUserProject() { return userProject; } /** The project to be billed for this request. Required for Requester Pays buckets. */ public List setUserProject(java.lang.String userProject) { this.userProject = userProject; return this; } @Override public List set(String parameterName, Object value) { return (List) super.set(parameterName, value); } } } /** * An accessor for creating requests from the ObjectAccessControls collection. * *

The typical use is:

*
   *   {@code Storage storage = new Storage(...);}
   *   {@code Storage.ObjectAccessControls.List request = storage.objectAccessControls().list(parameters ...)}
   * 
* * @return the resource collection */ public ObjectAccessControls objectAccessControls() { return new ObjectAccessControls(); } /** * The "objectAccessControls" collection of methods. */ public class ObjectAccessControls { /** * Permanently deletes the ACL entry for the specified entity on the specified object. * * Create a request for the method "objectAccessControls.delete". * * This request holds the parameters needed by the storage server. After setting any optional * parameters, call the {@link Delete#execute()} method to invoke the remote operation. * * @param bucket Name of a bucket. * @param object__ Name of the object. For information about how to URL encode object names to be path safe, see * [Encoding URI Path Parts](https://cloud.google.com/storage/docs/request- * endpoints#encoding). * @param entity The entity holding the permission. Can be user-userId, user-emailAddress, group-groupId, group- * emailAddress, allUsers, or allAuthenticatedUsers. * @return the request */ public Delete delete(java.lang.String bucket, java.lang.String object__, java.lang.String entity) throws java.io.IOException { Delete result = new Delete(bucket, object__, entity); initialize(result); return result; } public class Delete extends StorageRequest { private static final String REST_PATH = "b/{bucket}/o/{object}/acl/{entity}"; /** * Permanently deletes the ACL entry for the specified entity on the specified object. * * Create a request for the method "objectAccessControls.delete". * * This request holds the parameters needed by the the storage 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 bucket Name of a bucket. * @param object__ Name of the object. For information about how to URL encode object names to be path safe, see * [Encoding URI Path Parts](https://cloud.google.com/storage/docs/request- * endpoints#encoding). * @param entity The entity holding the permission. Can be user-userId, user-emailAddress, group-groupId, group- * emailAddress, allUsers, or allAuthenticatedUsers. * @since 1.13 */ protected Delete(java.lang.String bucket, java.lang.String object__, java.lang.String entity) { super(Storage.this, "DELETE", REST_PATH, null, Void.class); this.bucket = com.google.api.client.util.Preconditions.checkNotNull(bucket, "Required parameter bucket must be specified."); this.object__ = com.google.api.client.util.Preconditions.checkNotNull(object__, "Required parameter object__ must be specified."); this.entity = com.google.api.client.util.Preconditions.checkNotNull(entity, "Required parameter entity must be specified."); } @Override public Delete setAlt(java.lang.String alt) { return (Delete) super.setAlt(alt); } @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 setUserIp(java.lang.String userIp) { return (Delete) super.setUserIp(userIp); } /** Name of a bucket. */ @com.google.api.client.util.Key private java.lang.String bucket; /** Name of a bucket. */ public java.lang.String getBucket() { return bucket; } /** Name of a bucket. */ public Delete setBucket(java.lang.String bucket) { this.bucket = bucket; return this; } /** * Name of the object. For information about how to URL encode object names to be path safe, * see [Encoding URI Path Parts](https://cloud.google.com/storage/docs/request- * endpoints#encoding). */ @com.google.api.client.util.Key("object") private java.lang.String object__; /** Name of the object. For information about how to URL encode object names to be path safe, see [Encoding URI Path Parts](https://cloud.google.com/storage/docs/request-endpoints#encoding). */ public java.lang.String getObject() { return object__; } /** * Name of the object. For information about how to URL encode object names to be path safe, * see [Encoding URI Path Parts](https://cloud.google.com/storage/docs/request- * endpoints#encoding). */ public Delete setObject(java.lang.String object__) { this.object__ = object__; return this; } /** * The entity holding the permission. Can be user-userId, user-emailAddress, group-groupId, * group-emailAddress, allUsers, or allAuthenticatedUsers. */ @com.google.api.client.util.Key private java.lang.String entity; /** The entity holding the permission. Can be user-userId, user-emailAddress, group-groupId, group- emailAddress, allUsers, or allAuthenticatedUsers. */ public java.lang.String getEntity() { return entity; } /** * The entity holding the permission. Can be user-userId, user-emailAddress, group-groupId, * group-emailAddress, allUsers, or allAuthenticatedUsers. */ public Delete setEntity(java.lang.String entity) { this.entity = entity; return this; } /** * If present, selects a specific revision of this object (as opposed to the latest version, * the default). */ @com.google.api.client.util.Key private java.lang.Long generation; /** If present, selects a specific revision of this object (as opposed to the latest version, the default). */ public java.lang.Long getGeneration() { return generation; } /** * If present, selects a specific revision of this object (as opposed to the latest version, * the default). */ public Delete setGeneration(java.lang.Long generation) { this.generation = generation; return this; } /** The project to be billed for this request. Required for Requester Pays buckets. */ @com.google.api.client.util.Key private java.lang.String userProject; /** The project to be billed for this request. Required for Requester Pays buckets. */ public java.lang.String getUserProject() { return userProject; } /** The project to be billed for this request. Required for Requester Pays buckets. */ public Delete setUserProject(java.lang.String userProject) { this.userProject = userProject; return this; } @Override public Delete set(String parameterName, Object value) { return (Delete) super.set(parameterName, value); } } /** * Returns the ACL entry for the specified entity on the specified object. * * Create a request for the method "objectAccessControls.get". * * This request holds the parameters needed by the storage server. After setting any optional * parameters, call the {@link Get#execute()} method to invoke the remote operation. * * @param bucket Name of a bucket. * @param object__ Name of the object. For information about how to URL encode object names to be path safe, see * [Encoding URI Path Parts](https://cloud.google.com/storage/docs/request- * endpoints#encoding). * @param entity The entity holding the permission. Can be user-userId, user-emailAddress, group-groupId, group- * emailAddress, allUsers, or allAuthenticatedUsers. * @return the request */ public Get get(java.lang.String bucket, java.lang.String object__, java.lang.String entity) throws java.io.IOException { Get result = new Get(bucket, object__, entity); initialize(result); return result; } public class Get extends StorageRequest { private static final String REST_PATH = "b/{bucket}/o/{object}/acl/{entity}"; /** * Returns the ACL entry for the specified entity on the specified object. * * Create a request for the method "objectAccessControls.get". * * This request holds the parameters needed by the the storage 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 bucket Name of a bucket. * @param object__ Name of the object. For information about how to URL encode object names to be path safe, see * [Encoding URI Path Parts](https://cloud.google.com/storage/docs/request- * endpoints#encoding). * @param entity The entity holding the permission. Can be user-userId, user-emailAddress, group-groupId, group- * emailAddress, allUsers, or allAuthenticatedUsers. * @since 1.13 */ protected Get(java.lang.String bucket, java.lang.String object__, java.lang.String entity) { super(Storage.this, "GET", REST_PATH, null, com.google.api.services.storage.model.ObjectAccessControl.class); this.bucket = com.google.api.client.util.Preconditions.checkNotNull(bucket, "Required parameter bucket must be specified."); this.object__ = com.google.api.client.util.Preconditions.checkNotNull(object__, "Required parameter object__ must be specified."); this.entity = com.google.api.client.util.Preconditions.checkNotNull(entity, "Required parameter entity must be specified."); } @Override public com.google.api.client.http.HttpResponse executeUsingHead() throws java.io.IOException { return super.executeUsingHead(); } @Override public com.google.api.client.http.HttpRequest buildHttpRequestUsingHead() throws java.io.IOException { return super.buildHttpRequestUsingHead(); } @Override public Get setAlt(java.lang.String alt) { return (Get) super.setAlt(alt); } @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 setUserIp(java.lang.String userIp) { return (Get) super.setUserIp(userIp); } /** Name of a bucket. */ @com.google.api.client.util.Key private java.lang.String bucket; /** Name of a bucket. */ public java.lang.String getBucket() { return bucket; } /** Name of a bucket. */ public Get setBucket(java.lang.String bucket) { this.bucket = bucket; return this; } /** * Name of the object. For information about how to URL encode object names to be path safe, * see [Encoding URI Path Parts](https://cloud.google.com/storage/docs/request- * endpoints#encoding). */ @com.google.api.client.util.Key("object") private java.lang.String object__; /** Name of the object. For information about how to URL encode object names to be path safe, see [Encoding URI Path Parts](https://cloud.google.com/storage/docs/request-endpoints#encoding). */ public java.lang.String getObject() { return object__; } /** * Name of the object. For information about how to URL encode object names to be path safe, * see [Encoding URI Path Parts](https://cloud.google.com/storage/docs/request- * endpoints#encoding). */ public Get setObject(java.lang.String object__) { this.object__ = object__; return this; } /** * The entity holding the permission. Can be user-userId, user-emailAddress, group-groupId, * group-emailAddress, allUsers, or allAuthenticatedUsers. */ @com.google.api.client.util.Key private java.lang.String entity; /** The entity holding the permission. Can be user-userId, user-emailAddress, group-groupId, group- emailAddress, allUsers, or allAuthenticatedUsers. */ public java.lang.String getEntity() { return entity; } /** * The entity holding the permission. Can be user-userId, user-emailAddress, group-groupId, * group-emailAddress, allUsers, or allAuthenticatedUsers. */ public Get setEntity(java.lang.String entity) { this.entity = entity; return this; } /** * If present, selects a specific revision of this object (as opposed to the latest version, * the default). */ @com.google.api.client.util.Key private java.lang.Long generation; /** If present, selects a specific revision of this object (as opposed to the latest version, the default). */ public java.lang.Long getGeneration() { return generation; } /** * If present, selects a specific revision of this object (as opposed to the latest version, * the default). */ public Get setGeneration(java.lang.Long generation) { this.generation = generation; return this; } /** The project to be billed for this request. Required for Requester Pays buckets. */ @com.google.api.client.util.Key private java.lang.String userProject; /** The project to be billed for this request. Required for Requester Pays buckets. */ public java.lang.String getUserProject() { return userProject; } /** The project to be billed for this request. Required for Requester Pays buckets. */ public Get setUserProject(java.lang.String userProject) { this.userProject = userProject; return this; } @Override public Get set(String parameterName, Object value) { return (Get) super.set(parameterName, value); } } /** * Creates a new ACL entry on the specified object. * * Create a request for the method "objectAccessControls.insert". * * This request holds the parameters needed by the storage server. After setting any optional * parameters, call the {@link Insert#execute()} method to invoke the remote operation. * * @param bucket Name of a bucket. * @param object__ Name of the object. For information about how to URL encode object names to be path safe, see * [Encoding URI Path Parts](https://cloud.google.com/storage/docs/request- * endpoints#encoding). * @param content the {@link com.google.api.services.storage.model.ObjectAccessControl} * @return the request */ public Insert insert(java.lang.String bucket, java.lang.String object__, com.google.api.services.storage.model.ObjectAccessControl content) throws java.io.IOException { Insert result = new Insert(bucket, object__, content); initialize(result); return result; } public class Insert extends StorageRequest { private static final String REST_PATH = "b/{bucket}/o/{object}/acl"; /** * Creates a new ACL entry on the specified object. * * Create a request for the method "objectAccessControls.insert". * * This request holds the parameters needed by the the storage server. After setting any optional * parameters, call the {@link Insert#execute()} method to invoke the remote operation.

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

* * @param bucket Name of a bucket. * @param object__ Name of the object. For information about how to URL encode object names to be path safe, see * [Encoding URI Path Parts](https://cloud.google.com/storage/docs/request- * endpoints#encoding). * @param content the {@link com.google.api.services.storage.model.ObjectAccessControl} * @since 1.13 */ protected Insert(java.lang.String bucket, java.lang.String object__, com.google.api.services.storage.model.ObjectAccessControl content) { super(Storage.this, "POST", REST_PATH, content, com.google.api.services.storage.model.ObjectAccessControl.class); this.bucket = com.google.api.client.util.Preconditions.checkNotNull(bucket, "Required parameter bucket must be specified."); this.object__ = com.google.api.client.util.Preconditions.checkNotNull(object__, "Required parameter object__ must be specified."); checkRequiredParameter(content, "content"); checkRequiredParameter(content.getEntity(), "ObjectAccessControl.getEntity()"); checkRequiredParameter(content, "content"); checkRequiredParameter(content.getRole(), "ObjectAccessControl.getRole()"); } @Override public Insert setAlt(java.lang.String alt) { return (Insert) super.setAlt(alt); } @Override public Insert setFields(java.lang.String fields) { return (Insert) super.setFields(fields); } @Override public Insert setKey(java.lang.String key) { return (Insert) super.setKey(key); } @Override public Insert setOauthToken(java.lang.String oauthToken) { return (Insert) super.setOauthToken(oauthToken); } @Override public Insert setPrettyPrint(java.lang.Boolean prettyPrint) { return (Insert) super.setPrettyPrint(prettyPrint); } @Override public Insert setQuotaUser(java.lang.String quotaUser) { return (Insert) super.setQuotaUser(quotaUser); } @Override public Insert setUploadType(java.lang.String uploadType) { return (Insert) super.setUploadType(uploadType); } @Override public Insert setUserIp(java.lang.String userIp) { return (Insert) super.setUserIp(userIp); } /** Name of a bucket. */ @com.google.api.client.util.Key private java.lang.String bucket; /** Name of a bucket. */ public java.lang.String getBucket() { return bucket; } /** Name of a bucket. */ public Insert setBucket(java.lang.String bucket) { this.bucket = bucket; return this; } /** * Name of the object. For information about how to URL encode object names to be path safe, * see [Encoding URI Path Parts](https://cloud.google.com/storage/docs/request- * endpoints#encoding). */ @com.google.api.client.util.Key("object") private java.lang.String object__; /** Name of the object. For information about how to URL encode object names to be path safe, see [Encoding URI Path Parts](https://cloud.google.com/storage/docs/request-endpoints#encoding). */ public java.lang.String getObject() { return object__; } /** * Name of the object. For information about how to URL encode object names to be path safe, * see [Encoding URI Path Parts](https://cloud.google.com/storage/docs/request- * endpoints#encoding). */ public Insert setObject(java.lang.String object__) { this.object__ = object__; return this; } /** * If present, selects a specific revision of this object (as opposed to the latest version, * the default). */ @com.google.api.client.util.Key private java.lang.Long generation; /** If present, selects a specific revision of this object (as opposed to the latest version, the default). */ public java.lang.Long getGeneration() { return generation; } /** * If present, selects a specific revision of this object (as opposed to the latest version, * the default). */ public Insert setGeneration(java.lang.Long generation) { this.generation = generation; return this; } /** The project to be billed for this request. Required for Requester Pays buckets. */ @com.google.api.client.util.Key private java.lang.String userProject; /** The project to be billed for this request. Required for Requester Pays buckets. */ public java.lang.String getUserProject() { return userProject; } /** The project to be billed for this request. Required for Requester Pays buckets. */ public Insert setUserProject(java.lang.String userProject) { this.userProject = userProject; return this; } @Override public Insert set(String parameterName, Object value) { return (Insert) super.set(parameterName, value); } } /** * Retrieves ACL entries on the specified object. * * Create a request for the method "objectAccessControls.list". * * This request holds the parameters needed by the storage server. After setting any optional * parameters, call the {@link List#execute()} method to invoke the remote operation. * * @param bucket Name of a bucket. * @param object__ Name of the object. For information about how to URL encode object names to be path safe, see * [Encoding URI Path Parts](https://cloud.google.com/storage/docs/request- * endpoints#encoding). * @return the request */ public List list(java.lang.String bucket, java.lang.String object__) throws java.io.IOException { List result = new List(bucket, object__); initialize(result); return result; } public class List extends StorageRequest { private static final String REST_PATH = "b/{bucket}/o/{object}/acl"; /** * Retrieves ACL entries on the specified object. * * Create a request for the method "objectAccessControls.list". * * This request holds the parameters needed by the the storage 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 bucket Name of a bucket. * @param object__ Name of the object. For information about how to URL encode object names to be path safe, see * [Encoding URI Path Parts](https://cloud.google.com/storage/docs/request- * endpoints#encoding). * @since 1.13 */ protected List(java.lang.String bucket, java.lang.String object__) { super(Storage.this, "GET", REST_PATH, null, com.google.api.services.storage.model.ObjectAccessControls.class); this.bucket = com.google.api.client.util.Preconditions.checkNotNull(bucket, "Required parameter bucket must be specified."); this.object__ = com.google.api.client.util.Preconditions.checkNotNull(object__, "Required parameter object__ must be specified."); } @Override public com.google.api.client.http.HttpResponse executeUsingHead() throws java.io.IOException { return super.executeUsingHead(); } @Override public com.google.api.client.http.HttpRequest buildHttpRequestUsingHead() throws java.io.IOException { return super.buildHttpRequestUsingHead(); } @Override public List setAlt(java.lang.String alt) { return (List) super.setAlt(alt); } @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 setUserIp(java.lang.String userIp) { return (List) super.setUserIp(userIp); } /** Name of a bucket. */ @com.google.api.client.util.Key private java.lang.String bucket; /** Name of a bucket. */ public java.lang.String getBucket() { return bucket; } /** Name of a bucket. */ public List setBucket(java.lang.String bucket) { this.bucket = bucket; return this; } /** * Name of the object. For information about how to URL encode object names to be path safe, * see [Encoding URI Path Parts](https://cloud.google.com/storage/docs/request- * endpoints#encoding). */ @com.google.api.client.util.Key("object") private java.lang.String object__; /** Name of the object. For information about how to URL encode object names to be path safe, see [Encoding URI Path Parts](https://cloud.google.com/storage/docs/request-endpoints#encoding). */ public java.lang.String getObject() { return object__; } /** * Name of the object. For information about how to URL encode object names to be path safe, * see [Encoding URI Path Parts](https://cloud.google.com/storage/docs/request- * endpoints#encoding). */ public List setObject(java.lang.String object__) { this.object__ = object__; return this; } /** * If present, selects a specific revision of this object (as opposed to the latest version, * the default). */ @com.google.api.client.util.Key private java.lang.Long generation; /** If present, selects a specific revision of this object (as opposed to the latest version, the default). */ public java.lang.Long getGeneration() { return generation; } /** * If present, selects a specific revision of this object (as opposed to the latest version, * the default). */ public List setGeneration(java.lang.Long generation) { this.generation = generation; return this; } /** The project to be billed for this request. Required for Requester Pays buckets. */ @com.google.api.client.util.Key private java.lang.String userProject; /** The project to be billed for this request. Required for Requester Pays buckets. */ public java.lang.String getUserProject() { return userProject; } /** The project to be billed for this request. Required for Requester Pays buckets. */ public List setUserProject(java.lang.String userProject) { this.userProject = userProject; return this; } @Override public List set(String parameterName, Object value) { return (List) super.set(parameterName, value); } } /** * Patches an ACL entry on the specified object. * * Create a request for the method "objectAccessControls.patch". * * This request holds the parameters needed by the storage server. After setting any optional * parameters, call the {@link Patch#execute()} method to invoke the remote operation. * * @param bucket Name of a bucket. * @param object__ Name of the object. For information about how to URL encode object names to be path safe, see * [Encoding URI Path Parts](https://cloud.google.com/storage/docs/request- * endpoints#encoding). * @param entity The entity holding the permission. Can be user-userId, user-emailAddress, group-groupId, group- * emailAddress, allUsers, or allAuthenticatedUsers. * @param content the {@link com.google.api.services.storage.model.ObjectAccessControl} * @return the request */ public Patch patch(java.lang.String bucket, java.lang.String object__, java.lang.String entity, com.google.api.services.storage.model.ObjectAccessControl content) throws java.io.IOException { Patch result = new Patch(bucket, object__, entity, content); initialize(result); return result; } public class Patch extends StorageRequest { private static final String REST_PATH = "b/{bucket}/o/{object}/acl/{entity}"; /** * Patches an ACL entry on the specified object. * * Create a request for the method "objectAccessControls.patch". * * This request holds the parameters needed by the the storage 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 bucket Name of a bucket. * @param object__ Name of the object. For information about how to URL encode object names to be path safe, see * [Encoding URI Path Parts](https://cloud.google.com/storage/docs/request- * endpoints#encoding). * @param entity The entity holding the permission. Can be user-userId, user-emailAddress, group-groupId, group- * emailAddress, allUsers, or allAuthenticatedUsers. * @param content the {@link com.google.api.services.storage.model.ObjectAccessControl} * @since 1.13 */ protected Patch(java.lang.String bucket, java.lang.String object__, java.lang.String entity, com.google.api.services.storage.model.ObjectAccessControl content) { super(Storage.this, "PATCH", REST_PATH, content, com.google.api.services.storage.model.ObjectAccessControl.class); this.bucket = com.google.api.client.util.Preconditions.checkNotNull(bucket, "Required parameter bucket must be specified."); this.object__ = com.google.api.client.util.Preconditions.checkNotNull(object__, "Required parameter object__ must be specified."); this.entity = com.google.api.client.util.Preconditions.checkNotNull(entity, "Required parameter entity must be specified."); } @Override public Patch setAlt(java.lang.String alt) { return (Patch) super.setAlt(alt); } @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 setUserIp(java.lang.String userIp) { return (Patch) super.setUserIp(userIp); } /** Name of a bucket. */ @com.google.api.client.util.Key private java.lang.String bucket; /** Name of a bucket. */ public java.lang.String getBucket() { return bucket; } /** Name of a bucket. */ public Patch setBucket(java.lang.String bucket) { this.bucket = bucket; return this; } /** * Name of the object. For information about how to URL encode object names to be path safe, * see [Encoding URI Path Parts](https://cloud.google.com/storage/docs/request- * endpoints#encoding). */ @com.google.api.client.util.Key("object") private java.lang.String object__; /** Name of the object. For information about how to URL encode object names to be path safe, see [Encoding URI Path Parts](https://cloud.google.com/storage/docs/request-endpoints#encoding). */ public java.lang.String getObject() { return object__; } /** * Name of the object. For information about how to URL encode object names to be path safe, * see [Encoding URI Path Parts](https://cloud.google.com/storage/docs/request- * endpoints#encoding). */ public Patch setObject(java.lang.String object__) { this.object__ = object__; return this; } /** * The entity holding the permission. Can be user-userId, user-emailAddress, group-groupId, * group-emailAddress, allUsers, or allAuthenticatedUsers. */ @com.google.api.client.util.Key private java.lang.String entity; /** The entity holding the permission. Can be user-userId, user-emailAddress, group-groupId, group- emailAddress, allUsers, or allAuthenticatedUsers. */ public java.lang.String getEntity() { return entity; } /** * The entity holding the permission. Can be user-userId, user-emailAddress, group-groupId, * group-emailAddress, allUsers, or allAuthenticatedUsers. */ public Patch setEntity(java.lang.String entity) { this.entity = entity; return this; } /** * If present, selects a specific revision of this object (as opposed to the latest version, * the default). */ @com.google.api.client.util.Key private java.lang.Long generation; /** If present, selects a specific revision of this object (as opposed to the latest version, the default). */ public java.lang.Long getGeneration() { return generation; } /** * If present, selects a specific revision of this object (as opposed to the latest version, * the default). */ public Patch setGeneration(java.lang.Long generation) { this.generation = generation; return this; } /** The project to be billed for this request. Required for Requester Pays buckets. */ @com.google.api.client.util.Key private java.lang.String userProject; /** The project to be billed for this request. Required for Requester Pays buckets. */ public java.lang.String getUserProject() { return userProject; } /** The project to be billed for this request. Required for Requester Pays buckets. */ public Patch setUserProject(java.lang.String userProject) { this.userProject = userProject; return this; } @Override public Patch set(String parameterName, Object value) { return (Patch) super.set(parameterName, value); } } /** * Updates an ACL entry on the specified object. * * Create a request for the method "objectAccessControls.update". * * This request holds the parameters needed by the storage server. After setting any optional * parameters, call the {@link Update#execute()} method to invoke the remote operation. * * @param bucket Name of a bucket. * @param object__ Name of the object. For information about how to URL encode object names to be path safe, see * [Encoding URI Path Parts](https://cloud.google.com/storage/docs/request- * endpoints#encoding). * @param entity The entity holding the permission. Can be user-userId, user-emailAddress, group-groupId, group- * emailAddress, allUsers, or allAuthenticatedUsers. * @param content the {@link com.google.api.services.storage.model.ObjectAccessControl} * @return the request */ public Update update(java.lang.String bucket, java.lang.String object__, java.lang.String entity, com.google.api.services.storage.model.ObjectAccessControl content) throws java.io.IOException { Update result = new Update(bucket, object__, entity, content); initialize(result); return result; } public class Update extends StorageRequest { private static final String REST_PATH = "b/{bucket}/o/{object}/acl/{entity}"; /** * Updates an ACL entry on the specified object. * * Create a request for the method "objectAccessControls.update". * * This request holds the parameters needed by the the storage server. After setting any optional * parameters, call the {@link Update#execute()} method to invoke the remote operation.

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

* * @param bucket Name of a bucket. * @param object__ Name of the object. For information about how to URL encode object names to be path safe, see * [Encoding URI Path Parts](https://cloud.google.com/storage/docs/request- * endpoints#encoding). * @param entity The entity holding the permission. Can be user-userId, user-emailAddress, group-groupId, group- * emailAddress, allUsers, or allAuthenticatedUsers. * @param content the {@link com.google.api.services.storage.model.ObjectAccessControl} * @since 1.13 */ protected Update(java.lang.String bucket, java.lang.String object__, java.lang.String entity, com.google.api.services.storage.model.ObjectAccessControl content) { super(Storage.this, "PUT", REST_PATH, content, com.google.api.services.storage.model.ObjectAccessControl.class); this.bucket = com.google.api.client.util.Preconditions.checkNotNull(bucket, "Required parameter bucket must be specified."); this.object__ = com.google.api.client.util.Preconditions.checkNotNull(object__, "Required parameter object__ must be specified."); this.entity = com.google.api.client.util.Preconditions.checkNotNull(entity, "Required parameter entity must be specified."); } @Override public Update setAlt(java.lang.String alt) { return (Update) super.setAlt(alt); } @Override public Update setFields(java.lang.String fields) { return (Update) super.setFields(fields); } @Override public Update setKey(java.lang.String key) { return (Update) super.setKey(key); } @Override public Update setOauthToken(java.lang.String oauthToken) { return (Update) super.setOauthToken(oauthToken); } @Override public Update setPrettyPrint(java.lang.Boolean prettyPrint) { return (Update) super.setPrettyPrint(prettyPrint); } @Override public Update setQuotaUser(java.lang.String quotaUser) { return (Update) super.setQuotaUser(quotaUser); } @Override public Update setUploadType(java.lang.String uploadType) { return (Update) super.setUploadType(uploadType); } @Override public Update setUserIp(java.lang.String userIp) { return (Update) super.setUserIp(userIp); } /** Name of a bucket. */ @com.google.api.client.util.Key private java.lang.String bucket; /** Name of a bucket. */ public java.lang.String getBucket() { return bucket; } /** Name of a bucket. */ public Update setBucket(java.lang.String bucket) { this.bucket = bucket; return this; } /** * Name of the object. For information about how to URL encode object names to be path safe, * see [Encoding URI Path Parts](https://cloud.google.com/storage/docs/request- * endpoints#encoding). */ @com.google.api.client.util.Key("object") private java.lang.String object__; /** Name of the object. For information about how to URL encode object names to be path safe, see [Encoding URI Path Parts](https://cloud.google.com/storage/docs/request-endpoints#encoding). */ public java.lang.String getObject() { return object__; } /** * Name of the object. For information about how to URL encode object names to be path safe, * see [Encoding URI Path Parts](https://cloud.google.com/storage/docs/request- * endpoints#encoding). */ public Update setObject(java.lang.String object__) { this.object__ = object__; return this; } /** * The entity holding the permission. Can be user-userId, user-emailAddress, group-groupId, * group-emailAddress, allUsers, or allAuthenticatedUsers. */ @com.google.api.client.util.Key private java.lang.String entity; /** The entity holding the permission. Can be user-userId, user-emailAddress, group-groupId, group- emailAddress, allUsers, or allAuthenticatedUsers. */ public java.lang.String getEntity() { return entity; } /** * The entity holding the permission. Can be user-userId, user-emailAddress, group-groupId, * group-emailAddress, allUsers, or allAuthenticatedUsers. */ public Update setEntity(java.lang.String entity) { this.entity = entity; return this; } /** * If present, selects a specific revision of this object (as opposed to the latest version, * the default). */ @com.google.api.client.util.Key private java.lang.Long generation; /** If present, selects a specific revision of this object (as opposed to the latest version, the default). */ public java.lang.Long getGeneration() { return generation; } /** * If present, selects a specific revision of this object (as opposed to the latest version, * the default). */ public Update setGeneration(java.lang.Long generation) { this.generation = generation; return this; } /** The project to be billed for this request. Required for Requester Pays buckets. */ @com.google.api.client.util.Key private java.lang.String userProject; /** The project to be billed for this request. Required for Requester Pays buckets. */ public java.lang.String getUserProject() { return userProject; } /** The project to be billed for this request. Required for Requester Pays buckets. */ public Update setUserProject(java.lang.String userProject) { this.userProject = userProject; return this; } @Override public Update set(String parameterName, Object value) { return (Update) super.set(parameterName, value); } } } /** * An accessor for creating requests from the Objects collection. * *

The typical use is:

*
   *   {@code Storage storage = new Storage(...);}
   *   {@code Storage.Objects.List request = storage.objects().list(parameters ...)}
   * 
* * @return the resource collection */ public Objects objects() { return new Objects(); } /** * The "objects" collection of methods. */ public class Objects { /** * Initiates a long-running bulk restore operation on the specified bucket. * * Create a request for the method "objects.bulkRestore". * * This request holds the parameters needed by the storage server. After setting any optional * parameters, call the {@link BulkRestore#execute()} method to invoke the remote operation. * * @param bucket Name of the bucket in which the object resides. * @param content the {@link com.google.api.services.storage.model.BulkRestoreObjectsRequest} * @return the request */ public BulkRestore bulkRestore(java.lang.String bucket, com.google.api.services.storage.model.BulkRestoreObjectsRequest content) throws java.io.IOException { BulkRestore result = new BulkRestore(bucket, content); initialize(result); return result; } public class BulkRestore extends StorageRequest { private static final String REST_PATH = "b/{bucket}/o/bulkRestore"; /** * Initiates a long-running bulk restore operation on the specified bucket. * * Create a request for the method "objects.bulkRestore". * * This request holds the parameters needed by the the storage server. After setting any optional * parameters, call the {@link BulkRestore#execute()} method to invoke the remote operation.

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

* * @param bucket Name of the bucket in which the object resides. * @param content the {@link com.google.api.services.storage.model.BulkRestoreObjectsRequest} * @since 1.13 */ protected BulkRestore(java.lang.String bucket, com.google.api.services.storage.model.BulkRestoreObjectsRequest content) { super(Storage.this, "POST", REST_PATH, content, com.google.api.services.storage.model.GoogleLongrunningOperation.class); this.bucket = com.google.api.client.util.Preconditions.checkNotNull(bucket, "Required parameter bucket must be specified."); } @Override public BulkRestore setAlt(java.lang.String alt) { return (BulkRestore) super.setAlt(alt); } @Override public BulkRestore setFields(java.lang.String fields) { return (BulkRestore) super.setFields(fields); } @Override public BulkRestore setKey(java.lang.String key) { return (BulkRestore) super.setKey(key); } @Override public BulkRestore setOauthToken(java.lang.String oauthToken) { return (BulkRestore) super.setOauthToken(oauthToken); } @Override public BulkRestore setPrettyPrint(java.lang.Boolean prettyPrint) { return (BulkRestore) super.setPrettyPrint(prettyPrint); } @Override public BulkRestore setQuotaUser(java.lang.String quotaUser) { return (BulkRestore) super.setQuotaUser(quotaUser); } @Override public BulkRestore setUploadType(java.lang.String uploadType) { return (BulkRestore) super.setUploadType(uploadType); } @Override public BulkRestore setUserIp(java.lang.String userIp) { return (BulkRestore) super.setUserIp(userIp); } /** Name of the bucket in which the object resides. */ @com.google.api.client.util.Key private java.lang.String bucket; /** Name of the bucket in which the object resides. */ public java.lang.String getBucket() { return bucket; } /** Name of the bucket in which the object resides. */ public BulkRestore setBucket(java.lang.String bucket) { this.bucket = bucket; return this; } @Override public BulkRestore set(String parameterName, Object value) { return (BulkRestore) super.set(parameterName, value); } } /** * Concatenates a list of existing objects into a new object in the same bucket. * * Create a request for the method "objects.compose". * * This request holds the parameters needed by the storage server. After setting any optional * parameters, call the {@link Compose#execute()} method to invoke the remote operation. * * @param destinationBucket Name of the bucket containing the source objects. The destination object is stored in this bucket. * @param destinationObject Name of the new object. For information about how to URL encode object names to be path safe, see * [Encoding URI Path Parts](https://cloud.google.com/storage/docs/request- * endpoints#encoding). * @param content the {@link com.google.api.services.storage.model.ComposeRequest} * @return the request */ public Compose compose(java.lang.String destinationBucket, java.lang.String destinationObject, com.google.api.services.storage.model.ComposeRequest content) throws java.io.IOException { Compose result = new Compose(destinationBucket, destinationObject, content); initialize(result); return result; } public class Compose extends StorageRequest { private static final String REST_PATH = "b/{destinationBucket}/o/{destinationObject}/compose"; /** * Concatenates a list of existing objects into a new object in the same bucket. * * Create a request for the method "objects.compose". * * This request holds the parameters needed by the the storage server. After setting any optional * parameters, call the {@link Compose#execute()} method to invoke the remote operation.

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

* * @param destinationBucket Name of the bucket containing the source objects. The destination object is stored in this bucket. * @param destinationObject Name of the new object. For information about how to URL encode object names to be path safe, see * [Encoding URI Path Parts](https://cloud.google.com/storage/docs/request- * endpoints#encoding). * @param content the {@link com.google.api.services.storage.model.ComposeRequest} * @since 1.13 */ protected Compose(java.lang.String destinationBucket, java.lang.String destinationObject, com.google.api.services.storage.model.ComposeRequest content) { super(Storage.this, "POST", REST_PATH, content, com.google.api.services.storage.model.StorageObject.class); this.destinationBucket = com.google.api.client.util.Preconditions.checkNotNull(destinationBucket, "Required parameter destinationBucket must be specified."); this.destinationObject = com.google.api.client.util.Preconditions.checkNotNull(destinationObject, "Required parameter destinationObject must be specified."); } @Override public Compose setAlt(java.lang.String alt) { return (Compose) super.setAlt(alt); } @Override public Compose setFields(java.lang.String fields) { return (Compose) super.setFields(fields); } @Override public Compose setKey(java.lang.String key) { return (Compose) super.setKey(key); } @Override public Compose setOauthToken(java.lang.String oauthToken) { return (Compose) super.setOauthToken(oauthToken); } @Override public Compose setPrettyPrint(java.lang.Boolean prettyPrint) { return (Compose) super.setPrettyPrint(prettyPrint); } @Override public Compose setQuotaUser(java.lang.String quotaUser) { return (Compose) super.setQuotaUser(quotaUser); } @Override public Compose setUploadType(java.lang.String uploadType) { return (Compose) super.setUploadType(uploadType); } @Override public Compose setUserIp(java.lang.String userIp) { return (Compose) super.setUserIp(userIp); } /** * Name of the bucket containing the source objects. The destination object is stored in this * bucket. */ @com.google.api.client.util.Key private java.lang.String destinationBucket; /** Name of the bucket containing the source objects. The destination object is stored in this bucket. */ public java.lang.String getDestinationBucket() { return destinationBucket; } /** * Name of the bucket containing the source objects. The destination object is stored in this * bucket. */ public Compose setDestinationBucket(java.lang.String destinationBucket) { this.destinationBucket = destinationBucket; return this; } /** * Name of the new object. For information about how to URL encode object names to be path * safe, see [Encoding URI Path Parts](https://cloud.google.com/storage/docs/request- * endpoints#encoding). */ @com.google.api.client.util.Key private java.lang.String destinationObject; /** Name of the new object. For information about how to URL encode object names to be path safe, see [Encoding URI Path Parts](https://cloud.google.com/storage/docs/request-endpoints#encoding). */ public java.lang.String getDestinationObject() { return destinationObject; } /** * Name of the new object. For information about how to URL encode object names to be path * safe, see [Encoding URI Path Parts](https://cloud.google.com/storage/docs/request- * endpoints#encoding). */ public Compose setDestinationObject(java.lang.String destinationObject) { this.destinationObject = destinationObject; return this; } /** Apply a predefined set of access controls to the destination object. */ @com.google.api.client.util.Key private java.lang.String destinationPredefinedAcl; /** Apply a predefined set of access controls to the destination object. */ public java.lang.String getDestinationPredefinedAcl() { return destinationPredefinedAcl; } /** Apply a predefined set of access controls to the destination object. */ public Compose setDestinationPredefinedAcl(java.lang.String destinationPredefinedAcl) { this.destinationPredefinedAcl = destinationPredefinedAcl; return this; } /** * Makes the operation conditional on whether the object's current generation matches the * given value. Setting to 0 makes the operation succeed only if there are no live versions of * the object. */ @com.google.api.client.util.Key private java.lang.Long ifGenerationMatch; /** Makes the operation conditional on whether the object's current generation matches the given value. Setting to 0 makes the operation succeed only if there are no live versions of the object. */ public java.lang.Long getIfGenerationMatch() { return ifGenerationMatch; } /** * Makes the operation conditional on whether the object's current generation matches the * given value. Setting to 0 makes the operation succeed only if there are no live versions of * the object. */ public Compose setIfGenerationMatch(java.lang.Long ifGenerationMatch) { this.ifGenerationMatch = ifGenerationMatch; return this; } /** * Makes the operation conditional on whether the object's current metageneration matches the * given value. */ @com.google.api.client.util.Key private java.lang.Long ifMetagenerationMatch; /** Makes the operation conditional on whether the object's current metageneration matches the given value. */ public java.lang.Long getIfMetagenerationMatch() { return ifMetagenerationMatch; } /** * Makes the operation conditional on whether the object's current metageneration matches the * given value. */ public Compose setIfMetagenerationMatch(java.lang.Long ifMetagenerationMatch) { this.ifMetagenerationMatch = ifMetagenerationMatch; return this; } /** * Resource name of the Cloud KMS key, of the form projects/my- * project/locations/global/keyRings/my-kr/cryptoKeys/my-key, that will be used to encrypt the * object. Overrides the object metadata's kms_key_name value, if any. */ @com.google.api.client.util.Key private java.lang.String kmsKeyName; /** Resource name of the Cloud KMS key, of the form projects/my-project/locations/global/keyRings/my- kr/cryptoKeys/my-key, that will be used to encrypt the object. Overrides the object metadata's kms_key_name value, if any. */ public java.lang.String getKmsKeyName() { return kmsKeyName; } /** * Resource name of the Cloud KMS key, of the form projects/my- * project/locations/global/keyRings/my-kr/cryptoKeys/my-key, that will be used to encrypt the * object. Overrides the object metadata's kms_key_name value, if any. */ public Compose setKmsKeyName(java.lang.String kmsKeyName) { this.kmsKeyName = kmsKeyName; return this; } /** The project to be billed for this request. Required for Requester Pays buckets. */ @com.google.api.client.util.Key private java.lang.String userProject; /** The project to be billed for this request. Required for Requester Pays buckets. */ public java.lang.String getUserProject() { return userProject; } /** The project to be billed for this request. Required for Requester Pays buckets. */ public Compose setUserProject(java.lang.String userProject) { this.userProject = userProject; return this; } @Override public Compose set(String parameterName, Object value) { return (Compose) super.set(parameterName, value); } } /** * Copies a source object to a destination object. Optionally overrides metadata. * * Create a request for the method "objects.copy". * * This request holds the parameters needed by the storage server. After setting any optional * parameters, call the {@link Copy#execute()} method to invoke the remote operation. * * @param sourceBucket Name of the bucket in which to find the source object. * @param sourceObject Name of the source object. For information about how to URL encode object names to be path safe, see * [Encoding URI Path Parts](https://cloud.google.com/storage/docs/request- * endpoints#encoding). * @param destinationBucket Name of the bucket in which to store the new object. Overrides the provided object metadata's bucket * value, if any.For information about how to URL encode object names to be path safe, see * [Encoding URI Path Parts](https://cloud.google.com/storage/docs/request- * endpoints#encoding). * @param destinationObject Name of the new object. Required when the object metadata is not otherwise provided. Overrides the * object metadata's name value, if any. * @param content the {@link com.google.api.services.storage.model.StorageObject} * @return the request */ public Copy copy(java.lang.String sourceBucket, java.lang.String sourceObject, java.lang.String destinationBucket, java.lang.String destinationObject, com.google.api.services.storage.model.StorageObject content) throws java.io.IOException { Copy result = new Copy(sourceBucket, sourceObject, destinationBucket, destinationObject, content); initialize(result); return result; } public class Copy extends StorageRequest { private static final String REST_PATH = "b/{sourceBucket}/o/{sourceObject}/copyTo/b/{destinationBucket}/o/{destinationObject}"; /** * Copies a source object to a destination object. Optionally overrides metadata. * * Create a request for the method "objects.copy". * * This request holds the parameters needed by the the storage server. After setting any optional * parameters, call the {@link Copy#execute()} method to invoke the remote operation.

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

* * @param sourceBucket Name of the bucket in which to find the source object. * @param sourceObject Name of the source object. For information about how to URL encode object names to be path safe, see * [Encoding URI Path Parts](https://cloud.google.com/storage/docs/request- * endpoints#encoding). * @param destinationBucket Name of the bucket in which to store the new object. Overrides the provided object metadata's bucket * value, if any.For information about how to URL encode object names to be path safe, see * [Encoding URI Path Parts](https://cloud.google.com/storage/docs/request- * endpoints#encoding). * @param destinationObject Name of the new object. Required when the object metadata is not otherwise provided. Overrides the * object metadata's name value, if any. * @param content the {@link com.google.api.services.storage.model.StorageObject} * @since 1.13 */ protected Copy(java.lang.String sourceBucket, java.lang.String sourceObject, java.lang.String destinationBucket, java.lang.String destinationObject, com.google.api.services.storage.model.StorageObject content) { super(Storage.this, "POST", REST_PATH, content, com.google.api.services.storage.model.StorageObject.class); this.sourceBucket = com.google.api.client.util.Preconditions.checkNotNull(sourceBucket, "Required parameter sourceBucket must be specified."); this.sourceObject = com.google.api.client.util.Preconditions.checkNotNull(sourceObject, "Required parameter sourceObject must be specified."); this.destinationBucket = com.google.api.client.util.Preconditions.checkNotNull(destinationBucket, "Required parameter destinationBucket must be specified."); this.destinationObject = com.google.api.client.util.Preconditions.checkNotNull(destinationObject, "Required parameter destinationObject must be specified."); } @Override public Copy setAlt(java.lang.String alt) { return (Copy) super.setAlt(alt); } @Override public Copy setFields(java.lang.String fields) { return (Copy) super.setFields(fields); } @Override public Copy setKey(java.lang.String key) { return (Copy) super.setKey(key); } @Override public Copy setOauthToken(java.lang.String oauthToken) { return (Copy) super.setOauthToken(oauthToken); } @Override public Copy setPrettyPrint(java.lang.Boolean prettyPrint) { return (Copy) super.setPrettyPrint(prettyPrint); } @Override public Copy setQuotaUser(java.lang.String quotaUser) { return (Copy) super.setQuotaUser(quotaUser); } @Override public Copy setUploadType(java.lang.String uploadType) { return (Copy) super.setUploadType(uploadType); } @Override public Copy setUserIp(java.lang.String userIp) { return (Copy) super.setUserIp(userIp); } /** Name of the bucket in which to find the source object. */ @com.google.api.client.util.Key private java.lang.String sourceBucket; /** Name of the bucket in which to find the source object. */ public java.lang.String getSourceBucket() { return sourceBucket; } /** Name of the bucket in which to find the source object. */ public Copy setSourceBucket(java.lang.String sourceBucket) { this.sourceBucket = sourceBucket; return this; } /** * Name of the source object. For information about how to URL encode object names to be path * safe, see [Encoding URI Path Parts](https://cloud.google.com/storage/docs/request- * endpoints#encoding). */ @com.google.api.client.util.Key private java.lang.String sourceObject; /** Name of the source object. For information about how to URL encode object names to be path safe, see [Encoding URI Path Parts](https://cloud.google.com/storage/docs/request-endpoints#encoding). */ public java.lang.String getSourceObject() { return sourceObject; } /** * Name of the source object. For information about how to URL encode object names to be path * safe, see [Encoding URI Path Parts](https://cloud.google.com/storage/docs/request- * endpoints#encoding). */ public Copy setSourceObject(java.lang.String sourceObject) { this.sourceObject = sourceObject; return this; } /** * Name of the bucket in which to store the new object. Overrides the provided object * metadata's bucket value, if any.For information about how to URL encode object names to be * path safe, see [Encoding URI Path Parts](https://cloud.google.com/storage/docs/request- * endpoints#encoding). */ @com.google.api.client.util.Key private java.lang.String destinationBucket; /** Name of the bucket in which to store the new object. Overrides the provided object metadata's bucket value, if any.For information about how to URL encode object names to be path safe, see [Encoding URI Path Parts](https://cloud.google.com/storage/docs/request-endpoints#encoding). */ public java.lang.String getDestinationBucket() { return destinationBucket; } /** * Name of the bucket in which to store the new object. Overrides the provided object * metadata's bucket value, if any.For information about how to URL encode object names to be * path safe, see [Encoding URI Path Parts](https://cloud.google.com/storage/docs/request- * endpoints#encoding). */ public Copy setDestinationBucket(java.lang.String destinationBucket) { this.destinationBucket = destinationBucket; return this; } /** * Name of the new object. Required when the object metadata is not otherwise provided. * Overrides the object metadata's name value, if any. */ @com.google.api.client.util.Key private java.lang.String destinationObject; /** Name of the new object. Required when the object metadata is not otherwise provided. Overrides the object metadata's name value, if any. */ public java.lang.String getDestinationObject() { return destinationObject; } /** * Name of the new object. Required when the object metadata is not otherwise provided. * Overrides the object metadata's name value, if any. */ public Copy setDestinationObject(java.lang.String destinationObject) { this.destinationObject = destinationObject; return this; } /** * Resource name of the Cloud KMS key, of the form projects/my- * project/locations/global/keyRings/my-kr/cryptoKeys/my-key, that will be used to encrypt the * object. Overrides the object metadata's kms_key_name value, if any. */ @com.google.api.client.util.Key private java.lang.String destinationKmsKeyName; /** Resource name of the Cloud KMS key, of the form projects/my-project/locations/global/keyRings/my- kr/cryptoKeys/my-key, that will be used to encrypt the object. Overrides the object metadata's kms_key_name value, if any. */ public java.lang.String getDestinationKmsKeyName() { return destinationKmsKeyName; } /** * Resource name of the Cloud KMS key, of the form projects/my- * project/locations/global/keyRings/my-kr/cryptoKeys/my-key, that will be used to encrypt the * object. Overrides the object metadata's kms_key_name value, if any. */ public Copy setDestinationKmsKeyName(java.lang.String destinationKmsKeyName) { this.destinationKmsKeyName = destinationKmsKeyName; return this; } /** Apply a predefined set of access controls to the destination object. */ @com.google.api.client.util.Key private java.lang.String destinationPredefinedAcl; /** Apply a predefined set of access controls to the destination object. */ public java.lang.String getDestinationPredefinedAcl() { return destinationPredefinedAcl; } /** Apply a predefined set of access controls to the destination object. */ public Copy setDestinationPredefinedAcl(java.lang.String destinationPredefinedAcl) { this.destinationPredefinedAcl = destinationPredefinedAcl; return this; } /** * Makes the operation conditional on whether the destination object's current generation * matches the given value. Setting to 0 makes the operation succeed only if there are no live * versions of the object. */ @com.google.api.client.util.Key private java.lang.Long ifGenerationMatch; /** Makes the operation conditional on whether the destination object's current generation matches the given value. Setting to 0 makes the operation succeed only if there are no live versions of the object. */ public java.lang.Long getIfGenerationMatch() { return ifGenerationMatch; } /** * Makes the operation conditional on whether the destination object's current generation * matches the given value. Setting to 0 makes the operation succeed only if there are no live * versions of the object. */ public Copy setIfGenerationMatch(java.lang.Long ifGenerationMatch) { this.ifGenerationMatch = ifGenerationMatch; return this; } /** * Makes the operation conditional on whether the destination object's current generation does * not match the given value. If no live object exists, the precondition fails. Setting to 0 * makes the operation succeed only if there is a live version of the object. */ @com.google.api.client.util.Key private java.lang.Long ifGenerationNotMatch; /** Makes the operation conditional on whether the destination object's current generation does not match the given value. If no live object exists, the precondition fails. Setting to 0 makes the operation succeed only if there is a live version of the object. */ public java.lang.Long getIfGenerationNotMatch() { return ifGenerationNotMatch; } /** * Makes the operation conditional on whether the destination object's current generation does * not match the given value. If no live object exists, the precondition fails. Setting to 0 * makes the operation succeed only if there is a live version of the object. */ public Copy setIfGenerationNotMatch(java.lang.Long ifGenerationNotMatch) { this.ifGenerationNotMatch = ifGenerationNotMatch; return this; } /** * Makes the operation conditional on whether the destination object's current metageneration * matches the given value. */ @com.google.api.client.util.Key private java.lang.Long ifMetagenerationMatch; /** Makes the operation conditional on whether the destination object's current metageneration matches the given value. */ public java.lang.Long getIfMetagenerationMatch() { return ifMetagenerationMatch; } /** * Makes the operation conditional on whether the destination object's current metageneration * matches the given value. */ public Copy setIfMetagenerationMatch(java.lang.Long ifMetagenerationMatch) { this.ifMetagenerationMatch = ifMetagenerationMatch; return this; } /** * Makes the operation conditional on whether the destination object's current metageneration * does not match the given value. */ @com.google.api.client.util.Key private java.lang.Long ifMetagenerationNotMatch; /** Makes the operation conditional on whether the destination object's current metageneration does not match the given value. */ public java.lang.Long getIfMetagenerationNotMatch() { return ifMetagenerationNotMatch; } /** * Makes the operation conditional on whether the destination object's current metageneration * does not match the given value. */ public Copy setIfMetagenerationNotMatch(java.lang.Long ifMetagenerationNotMatch) { this.ifMetagenerationNotMatch = ifMetagenerationNotMatch; return this; } /** * Makes the operation conditional on whether the source object's current generation matches * the given value. */ @com.google.api.client.util.Key private java.lang.Long ifSourceGenerationMatch; /** Makes the operation conditional on whether the source object's current generation matches the given value. */ public java.lang.Long getIfSourceGenerationMatch() { return ifSourceGenerationMatch; } /** * Makes the operation conditional on whether the source object's current generation matches * the given value. */ public Copy setIfSourceGenerationMatch(java.lang.Long ifSourceGenerationMatch) { this.ifSourceGenerationMatch = ifSourceGenerationMatch; return this; } /** * Makes the operation conditional on whether the source object's current generation does not * match the given value. */ @com.google.api.client.util.Key private java.lang.Long ifSourceGenerationNotMatch; /** Makes the operation conditional on whether the source object's current generation does not match the given value. */ public java.lang.Long getIfSourceGenerationNotMatch() { return ifSourceGenerationNotMatch; } /** * Makes the operation conditional on whether the source object's current generation does not * match the given value. */ public Copy setIfSourceGenerationNotMatch(java.lang.Long ifSourceGenerationNotMatch) { this.ifSourceGenerationNotMatch = ifSourceGenerationNotMatch; return this; } /** * Makes the operation conditional on whether the source object's current metageneration * matches the given value. */ @com.google.api.client.util.Key private java.lang.Long ifSourceMetagenerationMatch; /** Makes the operation conditional on whether the source object's current metageneration matches the given value. */ public java.lang.Long getIfSourceMetagenerationMatch() { return ifSourceMetagenerationMatch; } /** * Makes the operation conditional on whether the source object's current metageneration * matches the given value. */ public Copy setIfSourceMetagenerationMatch(java.lang.Long ifSourceMetagenerationMatch) { this.ifSourceMetagenerationMatch = ifSourceMetagenerationMatch; return this; } /** * Makes the operation conditional on whether the source object's current metageneration does * not match the given value. */ @com.google.api.client.util.Key private java.lang.Long ifSourceMetagenerationNotMatch; /** Makes the operation conditional on whether the source object's current metageneration does not match the given value. */ public java.lang.Long getIfSourceMetagenerationNotMatch() { return ifSourceMetagenerationNotMatch; } /** * Makes the operation conditional on whether the source object's current metageneration does * not match the given value. */ public Copy setIfSourceMetagenerationNotMatch(java.lang.Long ifSourceMetagenerationNotMatch) { this.ifSourceMetagenerationNotMatch = ifSourceMetagenerationNotMatch; return this; } /** * Set of properties to return. Defaults to noAcl, unless the object resource specifies the * acl property, when it defaults to full. */ @com.google.api.client.util.Key private java.lang.String projection; /** Set of properties to return. Defaults to noAcl, unless the object resource specifies the acl property, when it defaults to full. */ public java.lang.String getProjection() { return projection; } /** * Set of properties to return. Defaults to noAcl, unless the object resource specifies the * acl property, when it defaults to full. */ public Copy setProjection(java.lang.String projection) { this.projection = projection; return this; } /** * If present, selects a specific revision of the source object (as opposed to the latest * version, the default). */ @com.google.api.client.util.Key private java.lang.Long sourceGeneration; /** If present, selects a specific revision of the source object (as opposed to the latest version, the default). */ public java.lang.Long getSourceGeneration() { return sourceGeneration; } /** * If present, selects a specific revision of the source object (as opposed to the latest * version, the default). */ public Copy setSourceGeneration(java.lang.Long sourceGeneration) { this.sourceGeneration = sourceGeneration; return this; } /** The project to be billed for this request. Required for Requester Pays buckets. */ @com.google.api.client.util.Key private java.lang.String userProject; /** The project to be billed for this request. Required for Requester Pays buckets. */ public java.lang.String getUserProject() { return userProject; } /** The project to be billed for this request. Required for Requester Pays buckets. */ public Copy setUserProject(java.lang.String userProject) { this.userProject = userProject; return this; } @Override public Copy set(String parameterName, Object value) { return (Copy) super.set(parameterName, value); } } /** * Deletes an object and its metadata. Deletions are permanent if versioning is not enabled for the * bucket, or if the generation parameter is used. * * Create a request for the method "objects.delete". * * This request holds the parameters needed by the storage server. After setting any optional * parameters, call the {@link Delete#execute()} method to invoke the remote operation. * * @param bucket Name of the bucket in which the object resides. * @param object__ Name of the object. For information about how to URL encode object names to be path safe, see * [Encoding URI Path Parts](https://cloud.google.com/storage/docs/request- * endpoints#encoding). * @return the request */ public Delete delete(java.lang.String bucket, java.lang.String object__) throws java.io.IOException { Delete result = new Delete(bucket, object__); initialize(result); return result; } public class Delete extends StorageRequest { private static final String REST_PATH = "b/{bucket}/o/{object}"; /** * Deletes an object and its metadata. Deletions are permanent if versioning is not enabled for * the bucket, or if the generation parameter is used. * * Create a request for the method "objects.delete". * * This request holds the parameters needed by the the storage 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 bucket Name of the bucket in which the object resides. * @param object__ Name of the object. For information about how to URL encode object names to be path safe, see * [Encoding URI Path Parts](https://cloud.google.com/storage/docs/request- * endpoints#encoding). * @since 1.13 */ protected Delete(java.lang.String bucket, java.lang.String object__) { super(Storage.this, "DELETE", REST_PATH, null, Void.class); this.bucket = com.google.api.client.util.Preconditions.checkNotNull(bucket, "Required parameter bucket must be specified."); this.object__ = com.google.api.client.util.Preconditions.checkNotNull(object__, "Required parameter object__ must be specified."); } @Override public Delete setAlt(java.lang.String alt) { return (Delete) super.setAlt(alt); } @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 setUserIp(java.lang.String userIp) { return (Delete) super.setUserIp(userIp); } /** Name of the bucket in which the object resides. */ @com.google.api.client.util.Key private java.lang.String bucket; /** Name of the bucket in which the object resides. */ public java.lang.String getBucket() { return bucket; } /** Name of the bucket in which the object resides. */ public Delete setBucket(java.lang.String bucket) { this.bucket = bucket; return this; } /** * Name of the object. For information about how to URL encode object names to be path safe, * see [Encoding URI Path Parts](https://cloud.google.com/storage/docs/request- * endpoints#encoding). */ @com.google.api.client.util.Key("object") private java.lang.String object__; /** Name of the object. For information about how to URL encode object names to be path safe, see [Encoding URI Path Parts](https://cloud.google.com/storage/docs/request-endpoints#encoding). */ public java.lang.String getObject() { return object__; } /** * Name of the object. For information about how to URL encode object names to be path safe, * see [Encoding URI Path Parts](https://cloud.google.com/storage/docs/request- * endpoints#encoding). */ public Delete setObject(java.lang.String object__) { this.object__ = object__; return this; } /** * If present, permanently deletes a specific revision of this object (as opposed to the * latest version, the default). */ @com.google.api.client.util.Key private java.lang.Long generation; /** If present, permanently deletes a specific revision of this object (as opposed to the latest version, the default). */ public java.lang.Long getGeneration() { return generation; } /** * If present, permanently deletes a specific revision of this object (as opposed to the * latest version, the default). */ public Delete setGeneration(java.lang.Long generation) { this.generation = generation; return this; } /** * Makes the operation conditional on whether the object's current generation matches the * given value. Setting to 0 makes the operation succeed only if there are no live versions of * the object. */ @com.google.api.client.util.Key private java.lang.Long ifGenerationMatch; /** Makes the operation conditional on whether the object's current generation matches the given value. Setting to 0 makes the operation succeed only if there are no live versions of the object. */ public java.lang.Long getIfGenerationMatch() { return ifGenerationMatch; } /** * Makes the operation conditional on whether the object's current generation matches the * given value. Setting to 0 makes the operation succeed only if there are no live versions of * the object. */ public Delete setIfGenerationMatch(java.lang.Long ifGenerationMatch) { this.ifGenerationMatch = ifGenerationMatch; return this; } /** * Makes the operation conditional on whether the object's current generation does not match * the given value. If no live object exists, the precondition fails. Setting to 0 makes the * operation succeed only if there is a live version of the object. */ @com.google.api.client.util.Key private java.lang.Long ifGenerationNotMatch; /** Makes the operation conditional on whether the object's current generation does not match the given value. If no live object exists, the precondition fails. Setting to 0 makes the operation succeed only if there is a live version of the object. */ public java.lang.Long getIfGenerationNotMatch() { return ifGenerationNotMatch; } /** * Makes the operation conditional on whether the object's current generation does not match * the given value. If no live object exists, the precondition fails. Setting to 0 makes the * operation succeed only if there is a live version of the object. */ public Delete setIfGenerationNotMatch(java.lang.Long ifGenerationNotMatch) { this.ifGenerationNotMatch = ifGenerationNotMatch; return this; } /** * Makes the operation conditional on whether the object's current metageneration matches the * given value. */ @com.google.api.client.util.Key private java.lang.Long ifMetagenerationMatch; /** Makes the operation conditional on whether the object's current metageneration matches the given value. */ public java.lang.Long getIfMetagenerationMatch() { return ifMetagenerationMatch; } /** * Makes the operation conditional on whether the object's current metageneration matches the * given value. */ public Delete setIfMetagenerationMatch(java.lang.Long ifMetagenerationMatch) { this.ifMetagenerationMatch = ifMetagenerationMatch; return this; } /** * Makes the operation conditional on whether the object's current metageneration does not * match the given value. */ @com.google.api.client.util.Key private java.lang.Long ifMetagenerationNotMatch; /** Makes the operation conditional on whether the object's current metageneration does not match the given value. */ public java.lang.Long getIfMetagenerationNotMatch() { return ifMetagenerationNotMatch; } /** * Makes the operation conditional on whether the object's current metageneration does not * match the given value. */ public Delete setIfMetagenerationNotMatch(java.lang.Long ifMetagenerationNotMatch) { this.ifMetagenerationNotMatch = ifMetagenerationNotMatch; return this; } /** The project to be billed for this request. Required for Requester Pays buckets. */ @com.google.api.client.util.Key private java.lang.String userProject; /** The project to be billed for this request. Required for Requester Pays buckets. */ public java.lang.String getUserProject() { return userProject; } /** The project to be billed for this request. Required for Requester Pays buckets. */ public Delete setUserProject(java.lang.String userProject) { this.userProject = userProject; return this; } @Override public Delete set(String parameterName, Object value) { return (Delete) super.set(parameterName, value); } } /** * Retrieves an object or its metadata. * * Create a request for the method "objects.get". * * This request holds the parameters needed by the storage server. After setting any optional * parameters, call the {@link Get#execute()} method to invoke the remote operation. * * @param bucket Name of the bucket in which the object resides. * @param object__ Name of the object. For information about how to URL encode object names to be path safe, see * [Encoding URI Path Parts](https://cloud.google.com/storage/docs/request- * endpoints#encoding). * @return the request */ public Get get(java.lang.String bucket, java.lang.String object__) throws java.io.IOException { Get result = new Get(bucket, object__); initialize(result); return result; } public class Get extends StorageRequest { private static final String REST_PATH = "b/{bucket}/o/{object}"; /** * Retrieves an object or its metadata. * * Create a request for the method "objects.get". * * This request holds the parameters needed by the the storage 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 bucket Name of the bucket in which the object resides. * @param object__ Name of the object. For information about how to URL encode object names to be path safe, see * [Encoding URI Path Parts](https://cloud.google.com/storage/docs/request- * endpoints#encoding). * @since 1.13 */ protected Get(java.lang.String bucket, java.lang.String object__) { super(Storage.this, "GET", REST_PATH, null, com.google.api.services.storage.model.StorageObject.class); this.bucket = com.google.api.client.util.Preconditions.checkNotNull(bucket, "Required parameter bucket must be specified."); this.object__ = com.google.api.client.util.Preconditions.checkNotNull(object__, "Required parameter object__ must be specified."); initializeMediaDownload(); } @Override public void executeMediaAndDownloadTo(java.io.OutputStream outputStream) throws java.io.IOException { super.executeMediaAndDownloadTo(outputStream); } @Override public java.io.InputStream executeMediaAsInputStream() throws java.io.IOException { return super.executeMediaAsInputStream(); } @Override public com.google.api.client.http.HttpResponse executeMedia() throws java.io.IOException { return super.executeMedia(); } @Override public com.google.api.client.http.GenericUrl buildHttpRequestUrl() { java.lang.String baseUrl = ("media".equals(get("alt")) && getMediaHttpUploader() == null) ? getRootUrl() + "download/" + getServicePath() : getBaseUrl(); return new com.google.api.client.http.GenericUrl( com.google.api.client.http.UriTemplate.expand(baseUrl, getUriTemplate(), this, true)); } @Override public com.google.api.client.http.HttpResponse executeUsingHead() throws 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 setAlt(java.lang.String alt) { return (Get) super.setAlt(alt); } @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 setUserIp(java.lang.String userIp) { return (Get) super.setUserIp(userIp); } /** Name of the bucket in which the object resides. */ @com.google.api.client.util.Key private java.lang.String bucket; /** Name of the bucket in which the object resides. */ public java.lang.String getBucket() { return bucket; } /** Name of the bucket in which the object resides. */ public Get setBucket(java.lang.String bucket) { this.bucket = bucket; return this; } /** * Name of the object. For information about how to URL encode object names to be path safe, * see [Encoding URI Path Parts](https://cloud.google.com/storage/docs/request- * endpoints#encoding). */ @com.google.api.client.util.Key("object") private java.lang.String object__; /** Name of the object. For information about how to URL encode object names to be path safe, see [Encoding URI Path Parts](https://cloud.google.com/storage/docs/request-endpoints#encoding). */ public java.lang.String getObject() { return object__; } /** * Name of the object. For information about how to URL encode object names to be path safe, * see [Encoding URI Path Parts](https://cloud.google.com/storage/docs/request- * endpoints#encoding). */ public Get setObject(java.lang.String object__) { this.object__ = object__; return this; } /** * If present, selects a specific revision of this object (as opposed to the latest version, * the default). */ @com.google.api.client.util.Key private java.lang.Long generation; /** If present, selects a specific revision of this object (as opposed to the latest version, the default). */ public java.lang.Long getGeneration() { return generation; } /** * If present, selects a specific revision of this object (as opposed to the latest version, * the default). */ public Get setGeneration(java.lang.Long generation) { this.generation = generation; return this; } /** * Makes the operation conditional on whether the object's current generation matches the * given value. Setting to 0 makes the operation succeed only if there are no live versions of * the object. */ @com.google.api.client.util.Key private java.lang.Long ifGenerationMatch; /** Makes the operation conditional on whether the object's current generation matches the given value. Setting to 0 makes the operation succeed only if there are no live versions of the object. */ public java.lang.Long getIfGenerationMatch() { return ifGenerationMatch; } /** * Makes the operation conditional on whether the object's current generation matches the * given value. Setting to 0 makes the operation succeed only if there are no live versions of * the object. */ public Get setIfGenerationMatch(java.lang.Long ifGenerationMatch) { this.ifGenerationMatch = ifGenerationMatch; return this; } /** * Makes the operation conditional on whether the object's current generation does not match * the given value. If no live object exists, the precondition fails. Setting to 0 makes the * operation succeed only if there is a live version of the object. */ @com.google.api.client.util.Key private java.lang.Long ifGenerationNotMatch; /** Makes the operation conditional on whether the object's current generation does not match the given value. If no live object exists, the precondition fails. Setting to 0 makes the operation succeed only if there is a live version of the object. */ public java.lang.Long getIfGenerationNotMatch() { return ifGenerationNotMatch; } /** * Makes the operation conditional on whether the object's current generation does not match * the given value. If no live object exists, the precondition fails. Setting to 0 makes the * operation succeed only if there is a live version of the object. */ public Get setIfGenerationNotMatch(java.lang.Long ifGenerationNotMatch) { this.ifGenerationNotMatch = ifGenerationNotMatch; return this; } /** * Makes the operation conditional on whether the object's current metageneration matches the * given value. */ @com.google.api.client.util.Key private java.lang.Long ifMetagenerationMatch; /** Makes the operation conditional on whether the object's current metageneration matches the given value. */ public java.lang.Long getIfMetagenerationMatch() { return ifMetagenerationMatch; } /** * Makes the operation conditional on whether the object's current metageneration matches the * given value. */ public Get setIfMetagenerationMatch(java.lang.Long ifMetagenerationMatch) { this.ifMetagenerationMatch = ifMetagenerationMatch; return this; } /** * Makes the operation conditional on whether the object's current metageneration does not * match the given value. */ @com.google.api.client.util.Key private java.lang.Long ifMetagenerationNotMatch; /** Makes the operation conditional on whether the object's current metageneration does not match the given value. */ public java.lang.Long getIfMetagenerationNotMatch() { return ifMetagenerationNotMatch; } /** * Makes the operation conditional on whether the object's current metageneration does not * match the given value. */ public Get setIfMetagenerationNotMatch(java.lang.Long ifMetagenerationNotMatch) { this.ifMetagenerationNotMatch = ifMetagenerationNotMatch; return this; } /** Set of properties to return. Defaults to noAcl. */ @com.google.api.client.util.Key private java.lang.String projection; /** Set of properties to return. Defaults to noAcl. */ public java.lang.String getProjection() { return projection; } /** Set of properties to return. Defaults to noAcl. */ public Get setProjection(java.lang.String projection) { this.projection = projection; return this; } /** * If true, only soft-deleted object versions will be listed. The default is false. For more * information, see [Soft Delete](https://cloud.google.com/storage/docs/soft-delete). */ @com.google.api.client.util.Key private java.lang.Boolean softDeleted; /** If true, only soft-deleted object versions will be listed. The default is false. For more information, see [Soft Delete](https://cloud.google.com/storage/docs/soft-delete). */ public java.lang.Boolean getSoftDeleted() { return softDeleted; } /** * If true, only soft-deleted object versions will be listed. The default is false. For more * information, see [Soft Delete](https://cloud.google.com/storage/docs/soft-delete). */ public Get setSoftDeleted(java.lang.Boolean softDeleted) { this.softDeleted = softDeleted; return this; } /** The project to be billed for this request. Required for Requester Pays buckets. */ @com.google.api.client.util.Key private java.lang.String userProject; /** The project to be billed for this request. Required for Requester Pays buckets. */ public java.lang.String getUserProject() { return userProject; } /** The project to be billed for this request. Required for Requester Pays buckets. */ public Get setUserProject(java.lang.String userProject) { this.userProject = userProject; return this; } @Override public Get set(String parameterName, Object value) { return (Get) super.set(parameterName, value); } } /** * Returns an IAM policy for the specified object. * * Create a request for the method "objects.getIamPolicy". * * This request holds the parameters needed by the storage server. After setting any optional * parameters, call the {@link GetIamPolicy#execute()} method to invoke the remote operation. * * @param bucket Name of the bucket in which the object resides. * @param object__ Name of the object. For information about how to URL encode object names to be path safe, see * [Encoding URI Path Parts](https://cloud.google.com/storage/docs/request- * endpoints#encoding). * @return the request */ public GetIamPolicy getIamPolicy(java.lang.String bucket, java.lang.String object__) throws java.io.IOException { GetIamPolicy result = new GetIamPolicy(bucket, object__); initialize(result); return result; } public class GetIamPolicy extends StorageRequest { private static final String REST_PATH = "b/{bucket}/o/{object}/iam"; /** * Returns an IAM policy for the specified object. * * Create a request for the method "objects.getIamPolicy". * * This request holds the parameters needed by the the storage server. After setting any optional * parameters, call the {@link GetIamPolicy#execute()} method to invoke the remote operation.

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

* * @param bucket Name of the bucket in which the object resides. * @param object__ Name of the object. For information about how to URL encode object names to be path safe, see * [Encoding URI Path Parts](https://cloud.google.com/storage/docs/request- * endpoints#encoding). * @since 1.13 */ protected GetIamPolicy(java.lang.String bucket, java.lang.String object__) { super(Storage.this, "GET", REST_PATH, null, com.google.api.services.storage.model.Policy.class); this.bucket = com.google.api.client.util.Preconditions.checkNotNull(bucket, "Required parameter bucket must be specified."); this.object__ = com.google.api.client.util.Preconditions.checkNotNull(object__, "Required parameter object__ must be specified."); } @Override public com.google.api.client.http.HttpResponse executeUsingHead() throws java.io.IOException { return super.executeUsingHead(); } @Override public com.google.api.client.http.HttpRequest buildHttpRequestUsingHead() throws java.io.IOException { return super.buildHttpRequestUsingHead(); } @Override public GetIamPolicy setAlt(java.lang.String alt) { return (GetIamPolicy) super.setAlt(alt); } @Override public GetIamPolicy setFields(java.lang.String fields) { return (GetIamPolicy) super.setFields(fields); } @Override public GetIamPolicy setKey(java.lang.String key) { return (GetIamPolicy) super.setKey(key); } @Override public GetIamPolicy setOauthToken(java.lang.String oauthToken) { return (GetIamPolicy) super.setOauthToken(oauthToken); } @Override public GetIamPolicy setPrettyPrint(java.lang.Boolean prettyPrint) { return (GetIamPolicy) super.setPrettyPrint(prettyPrint); } @Override public GetIamPolicy setQuotaUser(java.lang.String quotaUser) { return (GetIamPolicy) super.setQuotaUser(quotaUser); } @Override public GetIamPolicy setUploadType(java.lang.String uploadType) { return (GetIamPolicy) super.setUploadType(uploadType); } @Override public GetIamPolicy setUserIp(java.lang.String userIp) { return (GetIamPolicy) super.setUserIp(userIp); } /** Name of the bucket in which the object resides. */ @com.google.api.client.util.Key private java.lang.String bucket; /** Name of the bucket in which the object resides. */ public java.lang.String getBucket() { return bucket; } /** Name of the bucket in which the object resides. */ public GetIamPolicy setBucket(java.lang.String bucket) { this.bucket = bucket; return this; } /** * Name of the object. For information about how to URL encode object names to be path safe, * see [Encoding URI Path Parts](https://cloud.google.com/storage/docs/request- * endpoints#encoding). */ @com.google.api.client.util.Key("object") private java.lang.String object__; /** Name of the object. For information about how to URL encode object names to be path safe, see [Encoding URI Path Parts](https://cloud.google.com/storage/docs/request-endpoints#encoding). */ public java.lang.String getObject() { return object__; } /** * Name of the object. For information about how to URL encode object names to be path safe, * see [Encoding URI Path Parts](https://cloud.google.com/storage/docs/request- * endpoints#encoding). */ public GetIamPolicy setObject(java.lang.String object__) { this.object__ = object__; return this; } /** * If present, selects a specific revision of this object (as opposed to the latest version, * the default). */ @com.google.api.client.util.Key private java.lang.Long generation; /** If present, selects a specific revision of this object (as opposed to the latest version, the default). */ public java.lang.Long getGeneration() { return generation; } /** * If present, selects a specific revision of this object (as opposed to the latest version, * the default). */ public GetIamPolicy setGeneration(java.lang.Long generation) { this.generation = generation; return this; } /** The project to be billed for this request. Required for Requester Pays buckets. */ @com.google.api.client.util.Key private java.lang.String userProject; /** The project to be billed for this request. Required for Requester Pays buckets. */ public java.lang.String getUserProject() { return userProject; } /** The project to be billed for this request. Required for Requester Pays buckets. */ public GetIamPolicy setUserProject(java.lang.String userProject) { this.userProject = userProject; return this; } @Override public GetIamPolicy set(String parameterName, Object value) { return (GetIamPolicy) super.set(parameterName, value); } } /** * Stores a new object and metadata. * * Create a request for the method "objects.insert". * * This request holds the parameters needed by the storage server. After setting any optional * parameters, call the {@link Insert#execute()} method to invoke the remote operation. * * @param bucket Name of the bucket in which to store the new object. Overrides the provided object metadata's bucket * value, if any. * @param content the {@link com.google.api.services.storage.model.StorageObject} * @return the request */ public Insert insert(java.lang.String bucket, com.google.api.services.storage.model.StorageObject content) throws java.io.IOException { Insert result = new Insert(bucket, content); initialize(result); return result; } /** * Stores a new object and metadata. * * Create a request for the method "objects.insert". * * This request holds the parameters needed by the the storage server. After setting any optional * parameters, call the {@link Insert#execute()} method to invoke the remote operation. * *

* This method should be used for uploading media content. *

* * @param bucket Name of the bucket in which to store the new object. Overrides the provided object metadata's bucket * value, if any. * @param content the {@link com.google.api.services.storage.model.StorageObject} media metadata or {@code null} if none * @param mediaContent The media HTTP content. * @return the request * @throws java.io.IOException if the initialization of the request fails */ public Insert insert(java.lang.String bucket, com.google.api.services.storage.model.StorageObject content, com.google.api.client.http.AbstractInputStreamContent mediaContent) throws java.io.IOException { Insert result = new Insert(bucket, content, mediaContent); initialize(result); return result; } public class Insert extends StorageRequest { private static final String REST_PATH = "b/{bucket}/o"; /** * Stores a new object and metadata. * * Create a request for the method "objects.insert". * * This request holds the parameters needed by the the storage server. After setting any optional * parameters, call the {@link Insert#execute()} method to invoke the remote operation.

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

* * @param bucket Name of the bucket in which to store the new object. Overrides the provided object metadata's bucket * value, if any. * @param content the {@link com.google.api.services.storage.model.StorageObject} * @since 1.13 */ protected Insert(java.lang.String bucket, com.google.api.services.storage.model.StorageObject content) { super(Storage.this, "POST", REST_PATH, content, com.google.api.services.storage.model.StorageObject.class); this.bucket = com.google.api.client.util.Preconditions.checkNotNull(bucket, "Required parameter bucket must be specified."); } /** * Stores a new object and metadata. * * Create a request for the method "objects.insert". * * This request holds the parameters needed by the the storage server. After setting any optional * parameters, call the {@link Insert#execute()} method to invoke the remote operation.

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

* *

* This constructor should be used for uploading media content. *

* * @param bucket Name of the bucket in which to store the new object. Overrides the provided object metadata's bucket * value, if any. * @param content the {@link com.google.api.services.storage.model.StorageObject} media metadata or {@code null} if none * @param mediaContent The media HTTP content. * @since 1.13 */ protected Insert(java.lang.String bucket, com.google.api.services.storage.model.StorageObject content, com.google.api.client.http.AbstractInputStreamContent mediaContent) { super(Storage.this, "POST", "/upload/" + getServicePath() + REST_PATH, content, com.google.api.services.storage.model.StorageObject.class); this.bucket = com.google.api.client.util.Preconditions.checkNotNull(bucket, "Required parameter bucket must be specified."); com.google.api.client.util.Preconditions.checkNotNull(mediaContent, "Required parameter mediaContent must be specified."); initializeMediaUpload(mediaContent); } @Override public Insert setAlt(java.lang.String alt) { return (Insert) super.setAlt(alt); } @Override public Insert setFields(java.lang.String fields) { return (Insert) super.setFields(fields); } @Override public Insert setKey(java.lang.String key) { return (Insert) super.setKey(key); } @Override public Insert setOauthToken(java.lang.String oauthToken) { return (Insert) super.setOauthToken(oauthToken); } @Override public Insert setPrettyPrint(java.lang.Boolean prettyPrint) { return (Insert) super.setPrettyPrint(prettyPrint); } @Override public Insert setQuotaUser(java.lang.String quotaUser) { return (Insert) super.setQuotaUser(quotaUser); } @Override public Insert setUploadType(java.lang.String uploadType) { return (Insert) super.setUploadType(uploadType); } @Override public Insert setUserIp(java.lang.String userIp) { return (Insert) super.setUserIp(userIp); } /** * Name of the bucket in which to store the new object. Overrides the provided object * metadata's bucket value, if any. */ @com.google.api.client.util.Key private java.lang.String bucket; /** Name of the bucket in which to store the new object. Overrides the provided object metadata's bucket value, if any. */ public java.lang.String getBucket() { return bucket; } /** * Name of the bucket in which to store the new object. Overrides the provided object * metadata's bucket value, if any. */ public Insert setBucket(java.lang.String bucket) { this.bucket = bucket; return this; } /** * If set, sets the contentEncoding property of the final object to this value. Setting this * parameter is equivalent to setting the contentEncoding metadata property. This can be * useful when uploading an object with uploadType=media to indicate the encoding of the * content being uploaded. */ @com.google.api.client.util.Key private java.lang.String contentEncoding; /** If set, sets the contentEncoding property of the final object to this value. Setting this parameter is equivalent to setting the contentEncoding metadata property. This can be useful when uploading an object with uploadType=media to indicate the encoding of the content being uploaded. */ public java.lang.String getContentEncoding() { return contentEncoding; } /** * If set, sets the contentEncoding property of the final object to this value. Setting this * parameter is equivalent to setting the contentEncoding metadata property. This can be * useful when uploading an object with uploadType=media to indicate the encoding of the * content being uploaded. */ public Insert setContentEncoding(java.lang.String contentEncoding) { this.contentEncoding = contentEncoding; return this; } /** * Makes the operation conditional on whether the object's current generation matches the * given value. Setting to 0 makes the operation succeed only if there are no live versions of * the object. */ @com.google.api.client.util.Key private java.lang.Long ifGenerationMatch; /** Makes the operation conditional on whether the object's current generation matches the given value. Setting to 0 makes the operation succeed only if there are no live versions of the object. */ public java.lang.Long getIfGenerationMatch() { return ifGenerationMatch; } /** * Makes the operation conditional on whether the object's current generation matches the * given value. Setting to 0 makes the operation succeed only if there are no live versions of * the object. */ public Insert setIfGenerationMatch(java.lang.Long ifGenerationMatch) { this.ifGenerationMatch = ifGenerationMatch; return this; } /** * Makes the operation conditional on whether the object's current generation does not match * the given value. If no live object exists, the precondition fails. Setting to 0 makes the * operation succeed only if there is a live version of the object. */ @com.google.api.client.util.Key private java.lang.Long ifGenerationNotMatch; /** Makes the operation conditional on whether the object's current generation does not match the given value. If no live object exists, the precondition fails. Setting to 0 makes the operation succeed only if there is a live version of the object. */ public java.lang.Long getIfGenerationNotMatch() { return ifGenerationNotMatch; } /** * Makes the operation conditional on whether the object's current generation does not match * the given value. If no live object exists, the precondition fails. Setting to 0 makes the * operation succeed only if there is a live version of the object. */ public Insert setIfGenerationNotMatch(java.lang.Long ifGenerationNotMatch) { this.ifGenerationNotMatch = ifGenerationNotMatch; return this; } /** * Makes the operation conditional on whether the object's current metageneration matches the * given value. */ @com.google.api.client.util.Key private java.lang.Long ifMetagenerationMatch; /** Makes the operation conditional on whether the object's current metageneration matches the given value. */ public java.lang.Long getIfMetagenerationMatch() { return ifMetagenerationMatch; } /** * Makes the operation conditional on whether the object's current metageneration matches the * given value. */ public Insert setIfMetagenerationMatch(java.lang.Long ifMetagenerationMatch) { this.ifMetagenerationMatch = ifMetagenerationMatch; return this; } /** * Makes the operation conditional on whether the object's current metageneration does not * match the given value. */ @com.google.api.client.util.Key private java.lang.Long ifMetagenerationNotMatch; /** Makes the operation conditional on whether the object's current metageneration does not match the given value. */ public java.lang.Long getIfMetagenerationNotMatch() { return ifMetagenerationNotMatch; } /** * Makes the operation conditional on whether the object's current metageneration does not * match the given value. */ public Insert setIfMetagenerationNotMatch(java.lang.Long ifMetagenerationNotMatch) { this.ifMetagenerationNotMatch = ifMetagenerationNotMatch; return this; } /** * Resource name of the Cloud KMS key, of the form projects/my- * project/locations/global/keyRings/my-kr/cryptoKeys/my-key, that will be used to encrypt the * object. Overrides the object metadata's kms_key_name value, if any. */ @com.google.api.client.util.Key private java.lang.String kmsKeyName; /** Resource name of the Cloud KMS key, of the form projects/my-project/locations/global/keyRings/my- kr/cryptoKeys/my-key, that will be used to encrypt the object. Overrides the object metadata's kms_key_name value, if any. */ public java.lang.String getKmsKeyName() { return kmsKeyName; } /** * Resource name of the Cloud KMS key, of the form projects/my- * project/locations/global/keyRings/my-kr/cryptoKeys/my-key, that will be used to encrypt the * object. Overrides the object metadata's kms_key_name value, if any. */ public Insert setKmsKeyName(java.lang.String kmsKeyName) { this.kmsKeyName = kmsKeyName; return this; } /** * Name of the object. Required when the object metadata is not otherwise provided. Overrides * the object metadata's name value, if any. For information about how to URL encode object * names to be path safe, see [Encoding URI Path * Parts](https://cloud.google.com/storage/docs/request-endpoints#encoding). */ @com.google.api.client.util.Key private java.lang.String name; /** Name of the object. Required when the object metadata is not otherwise provided. Overrides the object metadata's name value, if any. For information about how to URL encode object names to be path safe, see [Encoding URI Path Parts](https://cloud.google.com/storage/docs/request- endpoints#encoding). */ public java.lang.String getName() { return name; } /** * Name of the object. Required when the object metadata is not otherwise provided. Overrides * the object metadata's name value, if any. For information about how to URL encode object * names to be path safe, see [Encoding URI Path * Parts](https://cloud.google.com/storage/docs/request-endpoints#encoding). */ public Insert setName(java.lang.String name) { this.name = name; return this; } /** Apply a predefined set of access controls to this object. */ @com.google.api.client.util.Key private java.lang.String predefinedAcl; /** Apply a predefined set of access controls to this object. */ public java.lang.String getPredefinedAcl() { return predefinedAcl; } /** Apply a predefined set of access controls to this object. */ public Insert setPredefinedAcl(java.lang.String predefinedAcl) { this.predefinedAcl = predefinedAcl; return this; } /** * Set of properties to return. Defaults to noAcl, unless the object resource specifies the * acl property, when it defaults to full. */ @com.google.api.client.util.Key private java.lang.String projection; /** Set of properties to return. Defaults to noAcl, unless the object resource specifies the acl property, when it defaults to full. */ public java.lang.String getProjection() { return projection; } /** * Set of properties to return. Defaults to noAcl, unless the object resource specifies the * acl property, when it defaults to full. */ public Insert setProjection(java.lang.String projection) { this.projection = projection; return this; } /** The project to be billed for this request. Required for Requester Pays buckets. */ @com.google.api.client.util.Key private java.lang.String userProject; /** The project to be billed for this request. Required for Requester Pays buckets. */ public java.lang.String getUserProject() { return userProject; } /** The project to be billed for this request. Required for Requester Pays buckets. */ public Insert setUserProject(java.lang.String userProject) { this.userProject = userProject; return this; } @Override public Insert set(String parameterName, Object value) { return (Insert) super.set(parameterName, value); } } /** * Retrieves a list of objects matching the criteria. * * Create a request for the method "objects.list". * * This request holds the parameters needed by the storage server. After setting any optional * parameters, call the {@link List#execute()} method to invoke the remote operation. * * @param bucket Name of the bucket in which to look for objects. * @return the request */ public List list(java.lang.String bucket) throws java.io.IOException { List result = new List(bucket); initialize(result); return result; } public class List extends StorageRequest { private static final String REST_PATH = "b/{bucket}/o"; /** * Retrieves a list of objects matching the criteria. * * Create a request for the method "objects.list". * * This request holds the parameters needed by the the storage 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 bucket Name of the bucket in which to look for objects. * @since 1.13 */ protected List(java.lang.String bucket) { super(Storage.this, "GET", REST_PATH, null, com.google.api.services.storage.model.Objects.class); this.bucket = com.google.api.client.util.Preconditions.checkNotNull(bucket, "Required parameter bucket must be specified."); } @Override public com.google.api.client.http.HttpResponse executeUsingHead() throws java.io.IOException { return super.executeUsingHead(); } @Override public com.google.api.client.http.HttpRequest buildHttpRequestUsingHead() throws java.io.IOException { return super.buildHttpRequestUsingHead(); } @Override public List setAlt(java.lang.String alt) { return (List) super.setAlt(alt); } @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 setUserIp(java.lang.String userIp) { return (List) super.setUserIp(userIp); } /** Name of the bucket in which to look for objects. */ @com.google.api.client.util.Key private java.lang.String bucket; /** Name of the bucket in which to look for objects. */ public java.lang.String getBucket() { return bucket; } /** Name of the bucket in which to look for objects. */ public List setBucket(java.lang.String bucket) { this.bucket = bucket; return this; } /** * Returns results in a directory-like mode. items will contain only objects whose names, * aside from the prefix, do not contain delimiter. Objects whose names, aside from the * prefix, contain delimiter will have their name, truncated after the delimiter, returned in * prefixes. Duplicate prefixes are omitted. */ @com.google.api.client.util.Key private java.lang.String delimiter; /** Returns results in a directory-like mode. items will contain only objects whose names, aside from the prefix, do not contain delimiter. Objects whose names, aside from the prefix, contain delimiter will have their name, truncated after the delimiter, returned in prefixes. Duplicate prefixes are omitted. */ public java.lang.String getDelimiter() { return delimiter; } /** * Returns results in a directory-like mode. items will contain only objects whose names, * aside from the prefix, do not contain delimiter. Objects whose names, aside from the * prefix, contain delimiter will have their name, truncated after the delimiter, returned in * prefixes. Duplicate prefixes are omitted. */ public List setDelimiter(java.lang.String delimiter) { this.delimiter = delimiter; return this; } /** * Filter results to objects whose names are lexicographically before endOffset. If * startOffset is also set, the objects listed will have names between startOffset (inclusive) * and endOffset (exclusive). */ @com.google.api.client.util.Key private java.lang.String endOffset; /** Filter results to objects whose names are lexicographically before endOffset. If startOffset is also set, the objects listed will have names between startOffset (inclusive) and endOffset (exclusive). */ public java.lang.String getEndOffset() { return endOffset; } /** * Filter results to objects whose names are lexicographically before endOffset. If * startOffset is also set, the objects listed will have names between startOffset (inclusive) * and endOffset (exclusive). */ public List setEndOffset(java.lang.String endOffset) { this.endOffset = endOffset; return this; } /** * Only applicable if delimiter is set to '/'. If true, will also include folders and managed * folders (besides objects) in the returned prefixes. */ @com.google.api.client.util.Key private java.lang.Boolean includeFoldersAsPrefixes; /** Only applicable if delimiter is set to '/'. If true, will also include folders and managed folders (besides objects) in the returned prefixes. */ public java.lang.Boolean getIncludeFoldersAsPrefixes() { return includeFoldersAsPrefixes; } /** * Only applicable if delimiter is set to '/'. If true, will also include folders and managed * folders (besides objects) in the returned prefixes. */ public List setIncludeFoldersAsPrefixes(java.lang.Boolean includeFoldersAsPrefixes) { this.includeFoldersAsPrefixes = includeFoldersAsPrefixes; return this; } /** * If true, objects that end in exactly one instance of delimiter will have their metadata * included in items in addition to prefixes. */ @com.google.api.client.util.Key private java.lang.Boolean includeTrailingDelimiter; /** If true, objects that end in exactly one instance of delimiter will have their metadata included in items in addition to prefixes. */ public java.lang.Boolean getIncludeTrailingDelimiter() { return includeTrailingDelimiter; } /** * If true, objects that end in exactly one instance of delimiter will have their metadata * included in items in addition to prefixes. */ public List setIncludeTrailingDelimiter(java.lang.Boolean includeTrailingDelimiter) { this.includeTrailingDelimiter = includeTrailingDelimiter; return this; } /** Filter results to objects and prefixes that match this glob pattern. */ @com.google.api.client.util.Key private java.lang.String matchGlob; /** Filter results to objects and prefixes that match this glob pattern. */ public java.lang.String getMatchGlob() { return matchGlob; } /** Filter results to objects and prefixes that match this glob pattern. */ public List setMatchGlob(java.lang.String matchGlob) { this.matchGlob = matchGlob; return this; } /** * Maximum number of items plus prefixes to return in a single page of responses. As duplicate * prefixes are omitted, fewer total results may be returned than requested. The service will * use this parameter or 1,000 items, whichever is smaller. */ @com.google.api.client.util.Key private java.lang.Long maxResults; /** Maximum number of items plus prefixes to return in a single page of responses. As duplicate prefixes are omitted, fewer total results may be returned than requested. The service will use this parameter or 1,000 items, whichever is smaller. [default: 1000] [minimum: 0] */ public java.lang.Long getMaxResults() { return maxResults; } /** * Maximum number of items plus prefixes to return in a single page of responses. As duplicate * prefixes are omitted, fewer total results may be returned than requested. The service will * use this parameter or 1,000 items, whichever is smaller. */ public List setMaxResults(java.lang.Long maxResults) { this.maxResults = maxResults; return this; } /** * A previously-returned page token representing part of the larger set of results to view. */ @com.google.api.client.util.Key private java.lang.String pageToken; /** A previously-returned page token representing part of the larger set of results to view. */ public java.lang.String getPageToken() { return pageToken; } /** * A previously-returned page token representing part of the larger set of results to view. */ public List setPageToken(java.lang.String pageToken) { this.pageToken = pageToken; return this; } /** Filter results to objects whose names begin with this prefix. */ @com.google.api.client.util.Key private java.lang.String prefix; /** Filter results to objects whose names begin with this prefix. */ public java.lang.String getPrefix() { return prefix; } /** Filter results to objects whose names begin with this prefix. */ public List setPrefix(java.lang.String prefix) { this.prefix = prefix; return this; } /** Set of properties to return. Defaults to noAcl. */ @com.google.api.client.util.Key private java.lang.String projection; /** Set of properties to return. Defaults to noAcl. */ public java.lang.String getProjection() { return projection; } /** Set of properties to return. Defaults to noAcl. */ public List setProjection(java.lang.String projection) { this.projection = projection; return this; } /** * If true, only soft-deleted object versions will be listed. The default is false. For more * information, see [Soft Delete](https://cloud.google.com/storage/docs/soft-delete). */ @com.google.api.client.util.Key private java.lang.Boolean softDeleted; /** If true, only soft-deleted object versions will be listed. The default is false. For more information, see [Soft Delete](https://cloud.google.com/storage/docs/soft-delete). */ public java.lang.Boolean getSoftDeleted() { return softDeleted; } /** * If true, only soft-deleted object versions will be listed. The default is false. For more * information, see [Soft Delete](https://cloud.google.com/storage/docs/soft-delete). */ public List setSoftDeleted(java.lang.Boolean softDeleted) { this.softDeleted = softDeleted; return this; } /** * Filter results to objects whose names are lexicographically equal to or after startOffset. * If endOffset is also set, the objects listed will have names between startOffset * (inclusive) and endOffset (exclusive). */ @com.google.api.client.util.Key private java.lang.String startOffset; /** Filter results to objects whose names are lexicographically equal to or after startOffset. If endOffset is also set, the objects listed will have names between startOffset (inclusive) and endOffset (exclusive). */ public java.lang.String getStartOffset() { return startOffset; } /** * Filter results to objects whose names are lexicographically equal to or after startOffset. * If endOffset is also set, the objects listed will have names between startOffset * (inclusive) and endOffset (exclusive). */ public List setStartOffset(java.lang.String startOffset) { this.startOffset = startOffset; return this; } /** The project to be billed for this request. Required for Requester Pays buckets. */ @com.google.api.client.util.Key private java.lang.String userProject; /** The project to be billed for this request. Required for Requester Pays buckets. */ public java.lang.String getUserProject() { return userProject; } /** The project to be billed for this request. Required for Requester Pays buckets. */ public List setUserProject(java.lang.String userProject) { this.userProject = userProject; return this; } /** * If true, lists all versions of an object as distinct results. The default is false. For * more information, see Object Versioning. */ @com.google.api.client.util.Key private java.lang.Boolean versions; /** If true, lists all versions of an object as distinct results. The default is false. For more information, see Object Versioning. */ public java.lang.Boolean getVersions() { return versions; } /** * If true, lists all versions of an object as distinct results. The default is false. For * more information, see Object Versioning. */ public List setVersions(java.lang.Boolean versions) { this.versions = versions; return this; } @Override public List set(String parameterName, Object value) { return (List) super.set(parameterName, value); } } /** * Patches an object's metadata. * * Create a request for the method "objects.patch". * * This request holds the parameters needed by the storage server. After setting any optional * parameters, call the {@link Patch#execute()} method to invoke the remote operation. * * @param bucket Name of the bucket in which the object resides. * @param object__ Name of the object. For information about how to URL encode object names to be path safe, see * [Encoding URI Path Parts](https://cloud.google.com/storage/docs/request- * endpoints#encoding). * @param content the {@link com.google.api.services.storage.model.StorageObject} * @return the request */ public Patch patch(java.lang.String bucket, java.lang.String object__, com.google.api.services.storage.model.StorageObject content) throws java.io.IOException { Patch result = new Patch(bucket, object__, content); initialize(result); return result; } public class Patch extends StorageRequest { private static final String REST_PATH = "b/{bucket}/o/{object}"; /** * Patches an object's metadata. * * Create a request for the method "objects.patch". * * This request holds the parameters needed by the the storage 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 bucket Name of the bucket in which the object resides. * @param object__ Name of the object. For information about how to URL encode object names to be path safe, see * [Encoding URI Path Parts](https://cloud.google.com/storage/docs/request- * endpoints#encoding). * @param content the {@link com.google.api.services.storage.model.StorageObject} * @since 1.13 */ protected Patch(java.lang.String bucket, java.lang.String object__, com.google.api.services.storage.model.StorageObject content) { super(Storage.this, "PATCH", REST_PATH, content, com.google.api.services.storage.model.StorageObject.class); this.bucket = com.google.api.client.util.Preconditions.checkNotNull(bucket, "Required parameter bucket must be specified."); this.object__ = com.google.api.client.util.Preconditions.checkNotNull(object__, "Required parameter object__ must be specified."); } @Override public Patch setAlt(java.lang.String alt) { return (Patch) super.setAlt(alt); } @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 setUserIp(java.lang.String userIp) { return (Patch) super.setUserIp(userIp); } /** Name of the bucket in which the object resides. */ @com.google.api.client.util.Key private java.lang.String bucket; /** Name of the bucket in which the object resides. */ public java.lang.String getBucket() { return bucket; } /** Name of the bucket in which the object resides. */ public Patch setBucket(java.lang.String bucket) { this.bucket = bucket; return this; } /** * Name of the object. For information about how to URL encode object names to be path safe, * see [Encoding URI Path Parts](https://cloud.google.com/storage/docs/request- * endpoints#encoding). */ @com.google.api.client.util.Key("object") private java.lang.String object__; /** Name of the object. For information about how to URL encode object names to be path safe, see [Encoding URI Path Parts](https://cloud.google.com/storage/docs/request-endpoints#encoding). */ public java.lang.String getObject() { return object__; } /** * Name of the object. For information about how to URL encode object names to be path safe, * see [Encoding URI Path Parts](https://cloud.google.com/storage/docs/request- * endpoints#encoding). */ public Patch setObject(java.lang.String object__) { this.object__ = object__; return this; } /** * If present, selects a specific revision of this object (as opposed to the latest version, * the default). */ @com.google.api.client.util.Key private java.lang.Long generation; /** If present, selects a specific revision of this object (as opposed to the latest version, the default). */ public java.lang.Long getGeneration() { return generation; } /** * If present, selects a specific revision of this object (as opposed to the latest version, * the default). */ public Patch setGeneration(java.lang.Long generation) { this.generation = generation; return this; } /** * Makes the operation conditional on whether the object's current generation matches the * given value. Setting to 0 makes the operation succeed only if there are no live versions of * the object. */ @com.google.api.client.util.Key private java.lang.Long ifGenerationMatch; /** Makes the operation conditional on whether the object's current generation matches the given value. Setting to 0 makes the operation succeed only if there are no live versions of the object. */ public java.lang.Long getIfGenerationMatch() { return ifGenerationMatch; } /** * Makes the operation conditional on whether the object's current generation matches the * given value. Setting to 0 makes the operation succeed only if there are no live versions of * the object. */ public Patch setIfGenerationMatch(java.lang.Long ifGenerationMatch) { this.ifGenerationMatch = ifGenerationMatch; return this; } /** * Makes the operation conditional on whether the object's current generation does not match * the given value. If no live object exists, the precondition fails. Setting to 0 makes the * operation succeed only if there is a live version of the object. */ @com.google.api.client.util.Key private java.lang.Long ifGenerationNotMatch; /** Makes the operation conditional on whether the object's current generation does not match the given value. If no live object exists, the precondition fails. Setting to 0 makes the operation succeed only if there is a live version of the object. */ public java.lang.Long getIfGenerationNotMatch() { return ifGenerationNotMatch; } /** * Makes the operation conditional on whether the object's current generation does not match * the given value. If no live object exists, the precondition fails. Setting to 0 makes the * operation succeed only if there is a live version of the object. */ public Patch setIfGenerationNotMatch(java.lang.Long ifGenerationNotMatch) { this.ifGenerationNotMatch = ifGenerationNotMatch; return this; } /** * Makes the operation conditional on whether the object's current metageneration matches the * given value. */ @com.google.api.client.util.Key private java.lang.Long ifMetagenerationMatch; /** Makes the operation conditional on whether the object's current metageneration matches the given value. */ public java.lang.Long getIfMetagenerationMatch() { return ifMetagenerationMatch; } /** * Makes the operation conditional on whether the object's current metageneration matches the * given value. */ public Patch setIfMetagenerationMatch(java.lang.Long ifMetagenerationMatch) { this.ifMetagenerationMatch = ifMetagenerationMatch; return this; } /** * Makes the operation conditional on whether the object's current metageneration does not * match the given value. */ @com.google.api.client.util.Key private java.lang.Long ifMetagenerationNotMatch; /** Makes the operation conditional on whether the object's current metageneration does not match the given value. */ public java.lang.Long getIfMetagenerationNotMatch() { return ifMetagenerationNotMatch; } /** * Makes the operation conditional on whether the object's current metageneration does not * match the given value. */ public Patch setIfMetagenerationNotMatch(java.lang.Long ifMetagenerationNotMatch) { this.ifMetagenerationNotMatch = ifMetagenerationNotMatch; return this; } /** * Must be true to remove the retention configuration, reduce its unlocked retention period, * or change its mode from unlocked to locked. */ @com.google.api.client.util.Key private java.lang.Boolean overrideUnlockedRetention; /** Must be true to remove the retention configuration, reduce its unlocked retention period, or change its mode from unlocked to locked. */ public java.lang.Boolean getOverrideUnlockedRetention() { return overrideUnlockedRetention; } /** * Must be true to remove the retention configuration, reduce its unlocked retention period, * or change its mode from unlocked to locked. */ public Patch setOverrideUnlockedRetention(java.lang.Boolean overrideUnlockedRetention) { this.overrideUnlockedRetention = overrideUnlockedRetention; return this; } /** Apply a predefined set of access controls to this object. */ @com.google.api.client.util.Key private java.lang.String predefinedAcl; /** Apply a predefined set of access controls to this object. */ public java.lang.String getPredefinedAcl() { return predefinedAcl; } /** Apply a predefined set of access controls to this object. */ public Patch setPredefinedAcl(java.lang.String predefinedAcl) { this.predefinedAcl = predefinedAcl; return this; } /** Set of properties to return. Defaults to full. */ @com.google.api.client.util.Key private java.lang.String projection; /** Set of properties to return. Defaults to full. */ public java.lang.String getProjection() { return projection; } /** Set of properties to return. Defaults to full. */ public Patch setProjection(java.lang.String projection) { this.projection = projection; return this; } /** The project to be billed for this request, for Requester Pays buckets. */ @com.google.api.client.util.Key private java.lang.String userProject; /** The project to be billed for this request, for Requester Pays buckets. */ public java.lang.String getUserProject() { return userProject; } /** The project to be billed for this request, for Requester Pays buckets. */ public Patch setUserProject(java.lang.String userProject) { this.userProject = userProject; return this; } @Override public Patch set(String parameterName, Object value) { return (Patch) super.set(parameterName, value); } } /** * Restores a soft-deleted object. * * Create a request for the method "objects.restore". * * This request holds the parameters needed by the storage server. After setting any optional * parameters, call the {@link Restore#execute()} method to invoke the remote operation. * * @param bucket Name of the bucket in which the object resides. * @param object__ Name of the object. For information about how to URL encode object names to be path safe, see * Encoding URI Path Parts. * @param generation Selects a specific revision of this object. * @return the request */ public Restore restore(java.lang.String bucket, java.lang.String object__, java.lang.Long generation) throws java.io.IOException { Restore result = new Restore(bucket, object__, generation); initialize(result); return result; } public class Restore extends StorageRequest { private static final String REST_PATH = "b/{bucket}/o/{object}/restore"; /** * Restores a soft-deleted object. * * Create a request for the method "objects.restore". * * This request holds the parameters needed by the the storage 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 bucket Name of the bucket in which the object resides. * @param object__ Name of the object. For information about how to URL encode object names to be path safe, see * Encoding URI Path Parts. * @param generation Selects a specific revision of this object. * @since 1.13 */ protected Restore(java.lang.String bucket, java.lang.String object__, java.lang.Long generation) { super(Storage.this, "POST", REST_PATH, null, com.google.api.services.storage.model.StorageObject.class); this.bucket = com.google.api.client.util.Preconditions.checkNotNull(bucket, "Required parameter bucket must be specified."); this.object__ = com.google.api.client.util.Preconditions.checkNotNull(object__, "Required parameter object__ must be specified."); this.generation = com.google.api.client.util.Preconditions.checkNotNull(generation, "Required parameter generation must be specified."); } @Override public Restore setAlt(java.lang.String alt) { return (Restore) super.setAlt(alt); } @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 setUserIp(java.lang.String userIp) { return (Restore) super.setUserIp(userIp); } /** Name of the bucket in which the object resides. */ @com.google.api.client.util.Key private java.lang.String bucket; /** Name of the bucket in which the object resides. */ public java.lang.String getBucket() { return bucket; } /** Name of the bucket in which the object resides. */ public Restore setBucket(java.lang.String bucket) { this.bucket = bucket; return this; } /** * Name of the object. For information about how to URL encode object names to be path safe, * see Encoding URI Path Parts. */ @com.google.api.client.util.Key("object") private java.lang.String object__; /** Name of the object. For information about how to URL encode object names to be path safe, see Encoding URI Path Parts. */ public java.lang.String getObject() { return object__; } /** * Name of the object. For information about how to URL encode object names to be path safe, * see Encoding URI Path Parts. */ public Restore setObject(java.lang.String object__) { this.object__ = object__; return this; } /** Selects a specific revision of this object. */ @com.google.api.client.util.Key private java.lang.Long generation; /** Selects a specific revision of this object. */ public java.lang.Long getGeneration() { return generation; } /** Selects a specific revision of this object. */ public Restore setGeneration(java.lang.Long generation) { this.generation = generation; return this; } /** * If true, copies the source object's ACL; otherwise, uses the bucket's default object ACL. * The default is false. */ @com.google.api.client.util.Key private java.lang.Boolean copySourceAcl; /** If true, copies the source object's ACL; otherwise, uses the bucket's default object ACL. The default is false. */ public java.lang.Boolean getCopySourceAcl() { return copySourceAcl; } /** * If true, copies the source object's ACL; otherwise, uses the bucket's default object ACL. * The default is false. */ public Restore setCopySourceAcl(java.lang.Boolean copySourceAcl) { this.copySourceAcl = copySourceAcl; return this; } /** * Makes the operation conditional on whether the object's one live generation matches the * given value. Setting to 0 makes the operation succeed only if there are no live versions of * the object. */ @com.google.api.client.util.Key private java.lang.Long ifGenerationMatch; /** Makes the operation conditional on whether the object's one live generation matches the given value. Setting to 0 makes the operation succeed only if there are no live versions of the object. */ public java.lang.Long getIfGenerationMatch() { return ifGenerationMatch; } /** * Makes the operation conditional on whether the object's one live generation matches the * given value. Setting to 0 makes the operation succeed only if there are no live versions of * the object. */ public Restore setIfGenerationMatch(java.lang.Long ifGenerationMatch) { this.ifGenerationMatch = ifGenerationMatch; return this; } /** * Makes the operation conditional on whether none of the object's live generations match the * given value. If no live object exists, the precondition fails. Setting to 0 makes the * operation succeed only if there is a live version of the object. */ @com.google.api.client.util.Key private java.lang.Long ifGenerationNotMatch; /** Makes the operation conditional on whether none of the object's live generations match the given value. If no live object exists, the precondition fails. Setting to 0 makes the operation succeed only if there is a live version of the object. */ public java.lang.Long getIfGenerationNotMatch() { return ifGenerationNotMatch; } /** * Makes the operation conditional on whether none of the object's live generations match the * given value. If no live object exists, the precondition fails. Setting to 0 makes the * operation succeed only if there is a live version of the object. */ public Restore setIfGenerationNotMatch(java.lang.Long ifGenerationNotMatch) { this.ifGenerationNotMatch = ifGenerationNotMatch; return this; } /** * Makes the operation conditional on whether the object's one live metageneration matches the * given value. */ @com.google.api.client.util.Key private java.lang.Long ifMetagenerationMatch; /** Makes the operation conditional on whether the object's one live metageneration matches the given value. */ public java.lang.Long getIfMetagenerationMatch() { return ifMetagenerationMatch; } /** * Makes the operation conditional on whether the object's one live metageneration matches the * given value. */ public Restore setIfMetagenerationMatch(java.lang.Long ifMetagenerationMatch) { this.ifMetagenerationMatch = ifMetagenerationMatch; return this; } /** * Makes the operation conditional on whether none of the object's live metagenerations match * the given value. */ @com.google.api.client.util.Key private java.lang.Long ifMetagenerationNotMatch; /** Makes the operation conditional on whether none of the object's live metagenerations match the given value. */ public java.lang.Long getIfMetagenerationNotMatch() { return ifMetagenerationNotMatch; } /** * Makes the operation conditional on whether none of the object's live metagenerations match * the given value. */ public Restore setIfMetagenerationNotMatch(java.lang.Long ifMetagenerationNotMatch) { this.ifMetagenerationNotMatch = ifMetagenerationNotMatch; return this; } /** Set of properties to return. Defaults to full. */ @com.google.api.client.util.Key private java.lang.String projection; /** Set of properties to return. Defaults to full. */ public java.lang.String getProjection() { return projection; } /** Set of properties to return. Defaults to full. */ public Restore setProjection(java.lang.String projection) { this.projection = projection; return this; } /** The project to be billed for this request. Required for Requester Pays buckets. */ @com.google.api.client.util.Key private java.lang.String userProject; /** The project to be billed for this request. Required for Requester Pays buckets. */ public java.lang.String getUserProject() { return userProject; } /** The project to be billed for this request. Required for Requester Pays buckets. */ public Restore setUserProject(java.lang.String userProject) { this.userProject = userProject; return this; } @Override public Restore set(String parameterName, Object value) { return (Restore) super.set(parameterName, value); } } /** * Rewrites a source object to a destination object. Optionally overrides metadata. * * Create a request for the method "objects.rewrite". * * This request holds the parameters needed by the storage server. After setting any optional * parameters, call the {@link Rewrite#execute()} method to invoke the remote operation. * * @param sourceBucket Name of the bucket in which to find the source object. * @param sourceObject Name of the source object. For information about how to URL encode object names to be path safe, see * [Encoding URI Path Parts](https://cloud.google.com/storage/docs/request- * endpoints#encoding). * @param destinationBucket Name of the bucket in which to store the new object. Overrides the provided object metadata's bucket * value, if any. * @param destinationObject Name of the new object. Required when the object metadata is not otherwise provided. Overrides the * object metadata's name value, if any. For information about how to URL encode object names * to be path safe, see [Encoding URI Path * Parts](https://cloud.google.com/storage/docs/request-endpoints#encoding). * @param content the {@link com.google.api.services.storage.model.StorageObject} * @return the request */ public Rewrite rewrite(java.lang.String sourceBucket, java.lang.String sourceObject, java.lang.String destinationBucket, java.lang.String destinationObject, com.google.api.services.storage.model.StorageObject content) throws java.io.IOException { Rewrite result = new Rewrite(sourceBucket, sourceObject, destinationBucket, destinationObject, content); initialize(result); return result; } public class Rewrite extends StorageRequest { private static final String REST_PATH = "b/{sourceBucket}/o/{sourceObject}/rewriteTo/b/{destinationBucket}/o/{destinationObject}"; /** * Rewrites a source object to a destination object. Optionally overrides metadata. * * Create a request for the method "objects.rewrite". * * This request holds the parameters needed by the the storage server. After setting any optional * parameters, call the {@link Rewrite#execute()} method to invoke the remote operation.

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

* * @param sourceBucket Name of the bucket in which to find the source object. * @param sourceObject Name of the source object. For information about how to URL encode object names to be path safe, see * [Encoding URI Path Parts](https://cloud.google.com/storage/docs/request- * endpoints#encoding). * @param destinationBucket Name of the bucket in which to store the new object. Overrides the provided object metadata's bucket * value, if any. * @param destinationObject Name of the new object. Required when the object metadata is not otherwise provided. Overrides the * object metadata's name value, if any. For information about how to URL encode object names * to be path safe, see [Encoding URI Path * Parts](https://cloud.google.com/storage/docs/request-endpoints#encoding). * @param content the {@link com.google.api.services.storage.model.StorageObject} * @since 1.13 */ protected Rewrite(java.lang.String sourceBucket, java.lang.String sourceObject, java.lang.String destinationBucket, java.lang.String destinationObject, com.google.api.services.storage.model.StorageObject content) { super(Storage.this, "POST", REST_PATH, content, com.google.api.services.storage.model.RewriteResponse.class); this.sourceBucket = com.google.api.client.util.Preconditions.checkNotNull(sourceBucket, "Required parameter sourceBucket must be specified."); this.sourceObject = com.google.api.client.util.Preconditions.checkNotNull(sourceObject, "Required parameter sourceObject must be specified."); this.destinationBucket = com.google.api.client.util.Preconditions.checkNotNull(destinationBucket, "Required parameter destinationBucket must be specified."); this.destinationObject = com.google.api.client.util.Preconditions.checkNotNull(destinationObject, "Required parameter destinationObject must be specified."); } @Override public Rewrite setAlt(java.lang.String alt) { return (Rewrite) super.setAlt(alt); } @Override public Rewrite setFields(java.lang.String fields) { return (Rewrite) super.setFields(fields); } @Override public Rewrite setKey(java.lang.String key) { return (Rewrite) super.setKey(key); } @Override public Rewrite setOauthToken(java.lang.String oauthToken) { return (Rewrite) super.setOauthToken(oauthToken); } @Override public Rewrite setPrettyPrint(java.lang.Boolean prettyPrint) { return (Rewrite) super.setPrettyPrint(prettyPrint); } @Override public Rewrite setQuotaUser(java.lang.String quotaUser) { return (Rewrite) super.setQuotaUser(quotaUser); } @Override public Rewrite setUploadType(java.lang.String uploadType) { return (Rewrite) super.setUploadType(uploadType); } @Override public Rewrite setUserIp(java.lang.String userIp) { return (Rewrite) super.setUserIp(userIp); } /** Name of the bucket in which to find the source object. */ @com.google.api.client.util.Key private java.lang.String sourceBucket; /** Name of the bucket in which to find the source object. */ public java.lang.String getSourceBucket() { return sourceBucket; } /** Name of the bucket in which to find the source object. */ public Rewrite setSourceBucket(java.lang.String sourceBucket) { this.sourceBucket = sourceBucket; return this; } /** * Name of the source object. For information about how to URL encode object names to be path * safe, see [Encoding URI Path Parts](https://cloud.google.com/storage/docs/request- * endpoints#encoding). */ @com.google.api.client.util.Key private java.lang.String sourceObject; /** Name of the source object. For information about how to URL encode object names to be path safe, see [Encoding URI Path Parts](https://cloud.google.com/storage/docs/request-endpoints#encoding). */ public java.lang.String getSourceObject() { return sourceObject; } /** * Name of the source object. For information about how to URL encode object names to be path * safe, see [Encoding URI Path Parts](https://cloud.google.com/storage/docs/request- * endpoints#encoding). */ public Rewrite setSourceObject(java.lang.String sourceObject) { this.sourceObject = sourceObject; return this; } /** * Name of the bucket in which to store the new object. Overrides the provided object * metadata's bucket value, if any. */ @com.google.api.client.util.Key private java.lang.String destinationBucket; /** Name of the bucket in which to store the new object. Overrides the provided object metadata's bucket value, if any. */ public java.lang.String getDestinationBucket() { return destinationBucket; } /** * Name of the bucket in which to store the new object. Overrides the provided object * metadata's bucket value, if any. */ public Rewrite setDestinationBucket(java.lang.String destinationBucket) { this.destinationBucket = destinationBucket; return this; } /** * Name of the new object. Required when the object metadata is not otherwise provided. * Overrides the object metadata's name value, if any. For information about how to URL encode * object names to be path safe, see [Encoding URI Path * Parts](https://cloud.google.com/storage/docs/request-endpoints#encoding). */ @com.google.api.client.util.Key private java.lang.String destinationObject; /** Name of the new object. Required when the object metadata is not otherwise provided. Overrides the object metadata's name value, if any. For information about how to URL encode object names to be path safe, see [Encoding URI Path Parts](https://cloud.google.com/storage/docs/request- endpoints#encoding). */ public java.lang.String getDestinationObject() { return destinationObject; } /** * Name of the new object. Required when the object metadata is not otherwise provided. * Overrides the object metadata's name value, if any. For information about how to URL encode * object names to be path safe, see [Encoding URI Path * Parts](https://cloud.google.com/storage/docs/request-endpoints#encoding). */ public Rewrite setDestinationObject(java.lang.String destinationObject) { this.destinationObject = destinationObject; return this; } /** * Resource name of the Cloud KMS key, of the form projects/my- * project/locations/global/keyRings/my-kr/cryptoKeys/my-key, that will be used to encrypt the * object. Overrides the object metadata's kms_key_name value, if any. */ @com.google.api.client.util.Key private java.lang.String destinationKmsKeyName; /** Resource name of the Cloud KMS key, of the form projects/my-project/locations/global/keyRings/my- kr/cryptoKeys/my-key, that will be used to encrypt the object. Overrides the object metadata's kms_key_name value, if any. */ public java.lang.String getDestinationKmsKeyName() { return destinationKmsKeyName; } /** * Resource name of the Cloud KMS key, of the form projects/my- * project/locations/global/keyRings/my-kr/cryptoKeys/my-key, that will be used to encrypt the * object. Overrides the object metadata's kms_key_name value, if any. */ public Rewrite setDestinationKmsKeyName(java.lang.String destinationKmsKeyName) { this.destinationKmsKeyName = destinationKmsKeyName; return this; } /** Apply a predefined set of access controls to the destination object. */ @com.google.api.client.util.Key private java.lang.String destinationPredefinedAcl; /** Apply a predefined set of access controls to the destination object. */ public java.lang.String getDestinationPredefinedAcl() { return destinationPredefinedAcl; } /** Apply a predefined set of access controls to the destination object. */ public Rewrite setDestinationPredefinedAcl(java.lang.String destinationPredefinedAcl) { this.destinationPredefinedAcl = destinationPredefinedAcl; return this; } /** * Makes the operation conditional on whether the object's current generation matches the * given value. Setting to 0 makes the operation succeed only if there are no live versions of * the object. */ @com.google.api.client.util.Key private java.lang.Long ifGenerationMatch; /** Makes the operation conditional on whether the object's current generation matches the given value. Setting to 0 makes the operation succeed only if there are no live versions of the object. */ public java.lang.Long getIfGenerationMatch() { return ifGenerationMatch; } /** * Makes the operation conditional on whether the object's current generation matches the * given value. Setting to 0 makes the operation succeed only if there are no live versions of * the object. */ public Rewrite setIfGenerationMatch(java.lang.Long ifGenerationMatch) { this.ifGenerationMatch = ifGenerationMatch; return this; } /** * Makes the operation conditional on whether the object's current generation does not match * the given value. If no live object exists, the precondition fails. Setting to 0 makes the * operation succeed only if there is a live version of the object. */ @com.google.api.client.util.Key private java.lang.Long ifGenerationNotMatch; /** Makes the operation conditional on whether the object's current generation does not match the given value. If no live object exists, the precondition fails. Setting to 0 makes the operation succeed only if there is a live version of the object. */ public java.lang.Long getIfGenerationNotMatch() { return ifGenerationNotMatch; } /** * Makes the operation conditional on whether the object's current generation does not match * the given value. If no live object exists, the precondition fails. Setting to 0 makes the * operation succeed only if there is a live version of the object. */ public Rewrite setIfGenerationNotMatch(java.lang.Long ifGenerationNotMatch) { this.ifGenerationNotMatch = ifGenerationNotMatch; return this; } /** * Makes the operation conditional on whether the destination object's current metageneration * matches the given value. */ @com.google.api.client.util.Key private java.lang.Long ifMetagenerationMatch; /** Makes the operation conditional on whether the destination object's current metageneration matches the given value. */ public java.lang.Long getIfMetagenerationMatch() { return ifMetagenerationMatch; } /** * Makes the operation conditional on whether the destination object's current metageneration * matches the given value. */ public Rewrite setIfMetagenerationMatch(java.lang.Long ifMetagenerationMatch) { this.ifMetagenerationMatch = ifMetagenerationMatch; return this; } /** * Makes the operation conditional on whether the destination object's current metageneration * does not match the given value. */ @com.google.api.client.util.Key private java.lang.Long ifMetagenerationNotMatch; /** Makes the operation conditional on whether the destination object's current metageneration does not match the given value. */ public java.lang.Long getIfMetagenerationNotMatch() { return ifMetagenerationNotMatch; } /** * Makes the operation conditional on whether the destination object's current metageneration * does not match the given value. */ public Rewrite setIfMetagenerationNotMatch(java.lang.Long ifMetagenerationNotMatch) { this.ifMetagenerationNotMatch = ifMetagenerationNotMatch; return this; } /** * Makes the operation conditional on whether the source object's current generation matches * the given value. */ @com.google.api.client.util.Key private java.lang.Long ifSourceGenerationMatch; /** Makes the operation conditional on whether the source object's current generation matches the given value. */ public java.lang.Long getIfSourceGenerationMatch() { return ifSourceGenerationMatch; } /** * Makes the operation conditional on whether the source object's current generation matches * the given value. */ public Rewrite setIfSourceGenerationMatch(java.lang.Long ifSourceGenerationMatch) { this.ifSourceGenerationMatch = ifSourceGenerationMatch; return this; } /** * Makes the operation conditional on whether the source object's current generation does not * match the given value. */ @com.google.api.client.util.Key private java.lang.Long ifSourceGenerationNotMatch; /** Makes the operation conditional on whether the source object's current generation does not match the given value. */ public java.lang.Long getIfSourceGenerationNotMatch() { return ifSourceGenerationNotMatch; } /** * Makes the operation conditional on whether the source object's current generation does not * match the given value. */ public Rewrite setIfSourceGenerationNotMatch(java.lang.Long ifSourceGenerationNotMatch) { this.ifSourceGenerationNotMatch = ifSourceGenerationNotMatch; return this; } /** * Makes the operation conditional on whether the source object's current metageneration * matches the given value. */ @com.google.api.client.util.Key private java.lang.Long ifSourceMetagenerationMatch; /** Makes the operation conditional on whether the source object's current metageneration matches the given value. */ public java.lang.Long getIfSourceMetagenerationMatch() { return ifSourceMetagenerationMatch; } /** * Makes the operation conditional on whether the source object's current metageneration * matches the given value. */ public Rewrite setIfSourceMetagenerationMatch(java.lang.Long ifSourceMetagenerationMatch) { this.ifSourceMetagenerationMatch = ifSourceMetagenerationMatch; return this; } /** * Makes the operation conditional on whether the source object's current metageneration does * not match the given value. */ @com.google.api.client.util.Key private java.lang.Long ifSourceMetagenerationNotMatch; /** Makes the operation conditional on whether the source object's current metageneration does not match the given value. */ public java.lang.Long getIfSourceMetagenerationNotMatch() { return ifSourceMetagenerationNotMatch; } /** * Makes the operation conditional on whether the source object's current metageneration does * not match the given value. */ public Rewrite setIfSourceMetagenerationNotMatch(java.lang.Long ifSourceMetagenerationNotMatch) { this.ifSourceMetagenerationNotMatch = ifSourceMetagenerationNotMatch; return this; } /** * The maximum number of bytes that will be rewritten per rewrite request. Most callers * shouldn't need to specify this parameter - it is primarily in place to support testing. If * specified the value must be an integral multiple of 1 MiB (1048576). Also, this only * applies to requests where the source and destination span locations and/or storage classes. * Finally, this value must not change across rewrite calls else you'll get an error that the * rewriteToken is invalid. */ @com.google.api.client.util.Key private java.lang.Long maxBytesRewrittenPerCall; /** The maximum number of bytes that will be rewritten per rewrite request. Most callers shouldn't need to specify this parameter - it is primarily in place to support testing. If specified the value must be an integral multiple of 1 MiB (1048576). Also, this only applies to requests where the source and destination span locations and/or storage classes. Finally, this value must not change across rewrite calls else you'll get an error that the rewriteToken is invalid. */ public java.lang.Long getMaxBytesRewrittenPerCall() { return maxBytesRewrittenPerCall; } /** * The maximum number of bytes that will be rewritten per rewrite request. Most callers * shouldn't need to specify this parameter - it is primarily in place to support testing. If * specified the value must be an integral multiple of 1 MiB (1048576). Also, this only * applies to requests where the source and destination span locations and/or storage classes. * Finally, this value must not change across rewrite calls else you'll get an error that the * rewriteToken is invalid. */ public Rewrite setMaxBytesRewrittenPerCall(java.lang.Long maxBytesRewrittenPerCall) { this.maxBytesRewrittenPerCall = maxBytesRewrittenPerCall; return this; } /** * Set of properties to return. Defaults to noAcl, unless the object resource specifies the * acl property, when it defaults to full. */ @com.google.api.client.util.Key private java.lang.String projection; /** Set of properties to return. Defaults to noAcl, unless the object resource specifies the acl property, when it defaults to full. */ public java.lang.String getProjection() { return projection; } /** * Set of properties to return. Defaults to noAcl, unless the object resource specifies the * acl property, when it defaults to full. */ public Rewrite setProjection(java.lang.String projection) { this.projection = projection; return this; } /** * Include this field (from the previous rewrite response) on each rewrite request after the * first one, until the rewrite response 'done' flag is true. Calls that provide a * rewriteToken can omit all other request fields, but if included those fields must match the * values provided in the first rewrite request. */ @com.google.api.client.util.Key private java.lang.String rewriteToken; /** Include this field (from the previous rewrite response) on each rewrite request after the first one, until the rewrite response 'done' flag is true. Calls that provide a rewriteToken can omit all other request fields, but if included those fields must match the values provided in the first rewrite request. */ public java.lang.String getRewriteToken() { return rewriteToken; } /** * Include this field (from the previous rewrite response) on each rewrite request after the * first one, until the rewrite response 'done' flag is true. Calls that provide a * rewriteToken can omit all other request fields, but if included those fields must match the * values provided in the first rewrite request. */ public Rewrite setRewriteToken(java.lang.String rewriteToken) { this.rewriteToken = rewriteToken; return this; } /** * If present, selects a specific revision of the source object (as opposed to the latest * version, the default). */ @com.google.api.client.util.Key private java.lang.Long sourceGeneration; /** If present, selects a specific revision of the source object (as opposed to the latest version, the default). */ public java.lang.Long getSourceGeneration() { return sourceGeneration; } /** * If present, selects a specific revision of the source object (as opposed to the latest * version, the default). */ public Rewrite setSourceGeneration(java.lang.Long sourceGeneration) { this.sourceGeneration = sourceGeneration; return this; } /** The project to be billed for this request. Required for Requester Pays buckets. */ @com.google.api.client.util.Key private java.lang.String userProject; /** The project to be billed for this request. Required for Requester Pays buckets. */ public java.lang.String getUserProject() { return userProject; } /** The project to be billed for this request. Required for Requester Pays buckets. */ public Rewrite setUserProject(java.lang.String userProject) { this.userProject = userProject; return this; } @Override public Rewrite set(String parameterName, Object value) { return (Rewrite) super.set(parameterName, value); } } /** * Updates an IAM policy for the specified object. * * Create a request for the method "objects.setIamPolicy". * * This request holds the parameters needed by the storage server. After setting any optional * parameters, call the {@link SetIamPolicy#execute()} method to invoke the remote operation. * * @param bucket Name of the bucket in which the object resides. * @param object__ Name of the object. For information about how to URL encode object names to be path safe, see * [Encoding URI Path Parts](https://cloud.google.com/storage/docs/request- * endpoints#encoding). * @param content the {@link com.google.api.services.storage.model.Policy} * @return the request */ public SetIamPolicy setIamPolicy(java.lang.String bucket, java.lang.String object__, com.google.api.services.storage.model.Policy content) throws java.io.IOException { SetIamPolicy result = new SetIamPolicy(bucket, object__, content); initialize(result); return result; } public class SetIamPolicy extends StorageRequest { private static final String REST_PATH = "b/{bucket}/o/{object}/iam"; /** * Updates an IAM policy for the specified object. * * Create a request for the method "objects.setIamPolicy". * * This request holds the parameters needed by the the storage server. After setting any optional * parameters, call the {@link SetIamPolicy#execute()} method to invoke the remote operation.

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

* * @param bucket Name of the bucket in which the object resides. * @param object__ Name of the object. For information about how to URL encode object names to be path safe, see * [Encoding URI Path Parts](https://cloud.google.com/storage/docs/request- * endpoints#encoding). * @param content the {@link com.google.api.services.storage.model.Policy} * @since 1.13 */ protected SetIamPolicy(java.lang.String bucket, java.lang.String object__, com.google.api.services.storage.model.Policy content) { super(Storage.this, "PUT", REST_PATH, content, com.google.api.services.storage.model.Policy.class); this.bucket = com.google.api.client.util.Preconditions.checkNotNull(bucket, "Required parameter bucket must be specified."); this.object__ = com.google.api.client.util.Preconditions.checkNotNull(object__, "Required parameter object__ must be specified."); } @Override public SetIamPolicy setAlt(java.lang.String alt) { return (SetIamPolicy) super.setAlt(alt); } @Override public SetIamPolicy setFields(java.lang.String fields) { return (SetIamPolicy) super.setFields(fields); } @Override public SetIamPolicy setKey(java.lang.String key) { return (SetIamPolicy) super.setKey(key); } @Override public SetIamPolicy setOauthToken(java.lang.String oauthToken) { return (SetIamPolicy) super.setOauthToken(oauthToken); } @Override public SetIamPolicy setPrettyPrint(java.lang.Boolean prettyPrint) { return (SetIamPolicy) super.setPrettyPrint(prettyPrint); } @Override public SetIamPolicy setQuotaUser(java.lang.String quotaUser) { return (SetIamPolicy) super.setQuotaUser(quotaUser); } @Override public SetIamPolicy setUploadType(java.lang.String uploadType) { return (SetIamPolicy) super.setUploadType(uploadType); } @Override public SetIamPolicy setUserIp(java.lang.String userIp) { return (SetIamPolicy) super.setUserIp(userIp); } /** Name of the bucket in which the object resides. */ @com.google.api.client.util.Key private java.lang.String bucket; /** Name of the bucket in which the object resides. */ public java.lang.String getBucket() { return bucket; } /** Name of the bucket in which the object resides. */ public SetIamPolicy setBucket(java.lang.String bucket) { this.bucket = bucket; return this; } /** * Name of the object. For information about how to URL encode object names to be path safe, * see [Encoding URI Path Parts](https://cloud.google.com/storage/docs/request- * endpoints#encoding). */ @com.google.api.client.util.Key("object") private java.lang.String object__; /** Name of the object. For information about how to URL encode object names to be path safe, see [Encoding URI Path Parts](https://cloud.google.com/storage/docs/request-endpoints#encoding). */ public java.lang.String getObject() { return object__; } /** * Name of the object. For information about how to URL encode object names to be path safe, * see [Encoding URI Path Parts](https://cloud.google.com/storage/docs/request- * endpoints#encoding). */ public SetIamPolicy setObject(java.lang.String object__) { this.object__ = object__; return this; } /** * If present, selects a specific revision of this object (as opposed to the latest version, * the default). */ @com.google.api.client.util.Key private java.lang.Long generation; /** If present, selects a specific revision of this object (as opposed to the latest version, the default). */ public java.lang.Long getGeneration() { return generation; } /** * If present, selects a specific revision of this object (as opposed to the latest version, * the default). */ public SetIamPolicy setGeneration(java.lang.Long generation) { this.generation = generation; return this; } /** The project to be billed for this request. Required for Requester Pays buckets. */ @com.google.api.client.util.Key private java.lang.String userProject; /** The project to be billed for this request. Required for Requester Pays buckets. */ public java.lang.String getUserProject() { return userProject; } /** The project to be billed for this request. Required for Requester Pays buckets. */ public SetIamPolicy setUserProject(java.lang.String userProject) { this.userProject = userProject; return this; } @Override public SetIamPolicy set(String parameterName, Object value) { return (SetIamPolicy) super.set(parameterName, value); } } /** * Tests a set of permissions on the given object to see which, if any, are held by the caller. * * Create a request for the method "objects.testIamPermissions". * * This request holds the parameters needed by the storage server. After setting any optional * parameters, call the {@link TestIamPermissions#execute()} method to invoke the remote operation. * * @param bucket Name of the bucket in which the object resides. * @param object__ Name of the object. For information about how to URL encode object names to be path safe, see * [Encoding URI Path Parts](https://cloud.google.com/storage/docs/request- * endpoints#encoding). * @param permissions Permissions to test. * @return the request */ public TestIamPermissions testIamPermissions(java.lang.String bucket, java.lang.String object__, java.util.List permissions) throws java.io.IOException { TestIamPermissions result = new TestIamPermissions(bucket, object__, permissions); initialize(result); return result; } public class TestIamPermissions extends StorageRequest { private static final String REST_PATH = "b/{bucket}/o/{object}/iam/testPermissions"; /** * Tests a set of permissions on the given object to see which, if any, are held by the caller. * * Create a request for the method "objects.testIamPermissions". * * This request holds the parameters needed by the the storage server. After setting any optional * parameters, call the {@link TestIamPermissions#execute()} method to invoke the remote * operation.

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

* * @param bucket Name of the bucket in which the object resides. * @param object__ Name of the object. For information about how to URL encode object names to be path safe, see * [Encoding URI Path Parts](https://cloud.google.com/storage/docs/request- * endpoints#encoding). * @param permissions Permissions to test. * @since 1.13 */ protected TestIamPermissions(java.lang.String bucket, java.lang.String object__, java.util.List permissions) { super(Storage.this, "GET", REST_PATH, null, com.google.api.services.storage.model.TestIamPermissionsResponse.class); this.bucket = com.google.api.client.util.Preconditions.checkNotNull(bucket, "Required parameter bucket must be specified."); this.object__ = com.google.api.client.util.Preconditions.checkNotNull(object__, "Required parameter object__ must be specified."); this.permissions = com.google.api.client.util.Preconditions.checkNotNull(permissions, "Required parameter permissions must be specified."); } @Override public com.google.api.client.http.HttpResponse executeUsingHead() throws java.io.IOException { return super.executeUsingHead(); } @Override public com.google.api.client.http.HttpRequest buildHttpRequestUsingHead() throws java.io.IOException { return super.buildHttpRequestUsingHead(); } @Override public TestIamPermissions setAlt(java.lang.String alt) { return (TestIamPermissions) super.setAlt(alt); } @Override public TestIamPermissions setFields(java.lang.String fields) { return (TestIamPermissions) super.setFields(fields); } @Override public TestIamPermissions setKey(java.lang.String key) { return (TestIamPermissions) super.setKey(key); } @Override public TestIamPermissions setOauthToken(java.lang.String oauthToken) { return (TestIamPermissions) super.setOauthToken(oauthToken); } @Override public TestIamPermissions setPrettyPrint(java.lang.Boolean prettyPrint) { return (TestIamPermissions) super.setPrettyPrint(prettyPrint); } @Override public TestIamPermissions setQuotaUser(java.lang.String quotaUser) { return (TestIamPermissions) super.setQuotaUser(quotaUser); } @Override public TestIamPermissions setUploadType(java.lang.String uploadType) { return (TestIamPermissions) super.setUploadType(uploadType); } @Override public TestIamPermissions setUserIp(java.lang.String userIp) { return (TestIamPermissions) super.setUserIp(userIp); } /** Name of the bucket in which the object resides. */ @com.google.api.client.util.Key private java.lang.String bucket; /** Name of the bucket in which the object resides. */ public java.lang.String getBucket() { return bucket; } /** Name of the bucket in which the object resides. */ public TestIamPermissions setBucket(java.lang.String bucket) { this.bucket = bucket; return this; } /** * Name of the object. For information about how to URL encode object names to be path safe, * see [Encoding URI Path Parts](https://cloud.google.com/storage/docs/request- * endpoints#encoding). */ @com.google.api.client.util.Key("object") private java.lang.String object__; /** Name of the object. For information about how to URL encode object names to be path safe, see [Encoding URI Path Parts](https://cloud.google.com/storage/docs/request-endpoints#encoding). */ public java.lang.String getObject() { return object__; } /** * Name of the object. For information about how to URL encode object names to be path safe, * see [Encoding URI Path Parts](https://cloud.google.com/storage/docs/request- * endpoints#encoding). */ public TestIamPermissions setObject(java.lang.String object__) { this.object__ = object__; return this; } /** Permissions to test. */ @com.google.api.client.util.Key private java.util.List permissions; /** Permissions to test. */ public java.util.List getPermissions() { return permissions; } /** Permissions to test. */ public TestIamPermissions setPermissions(java.util.List permissions) { this.permissions = permissions; return this; } /** * If present, selects a specific revision of this object (as opposed to the latest version, * the default). */ @com.google.api.client.util.Key private java.lang.Long generation; /** If present, selects a specific revision of this object (as opposed to the latest version, the default). */ public java.lang.Long getGeneration() { return generation; } /** * If present, selects a specific revision of this object (as opposed to the latest version, * the default). */ public TestIamPermissions setGeneration(java.lang.Long generation) { this.generation = generation; return this; } /** The project to be billed for this request. Required for Requester Pays buckets. */ @com.google.api.client.util.Key private java.lang.String userProject; /** The project to be billed for this request. Required for Requester Pays buckets. */ public java.lang.String getUserProject() { return userProject; } /** The project to be billed for this request. Required for Requester Pays buckets. */ public TestIamPermissions setUserProject(java.lang.String userProject) { this.userProject = userProject; return this; } @Override public TestIamPermissions set(String parameterName, Object value) { return (TestIamPermissions) super.set(parameterName, value); } } /** * Updates an object's metadata. * * Create a request for the method "objects.update". * * This request holds the parameters needed by the storage server. After setting any optional * parameters, call the {@link Update#execute()} method to invoke the remote operation. * * @param bucket Name of the bucket in which the object resides. * @param object__ Name of the object. For information about how to URL encode object names to be path safe, see * [Encoding URI Path Parts](https://cloud.google.com/storage/docs/request- * endpoints#encoding). * @param content the {@link com.google.api.services.storage.model.StorageObject} * @return the request */ public Update update(java.lang.String bucket, java.lang.String object__, com.google.api.services.storage.model.StorageObject content) throws java.io.IOException { Update result = new Update(bucket, object__, content); initialize(result); return result; } public class Update extends StorageRequest { private static final String REST_PATH = "b/{bucket}/o/{object}"; /** * Updates an object's metadata. * * Create a request for the method "objects.update". * * This request holds the parameters needed by the the storage server. After setting any optional * parameters, call the {@link Update#execute()} method to invoke the remote operation.

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

* * @param bucket Name of the bucket in which the object resides. * @param object__ Name of the object. For information about how to URL encode object names to be path safe, see * [Encoding URI Path Parts](https://cloud.google.com/storage/docs/request- * endpoints#encoding). * @param content the {@link com.google.api.services.storage.model.StorageObject} * @since 1.13 */ protected Update(java.lang.String bucket, java.lang.String object__, com.google.api.services.storage.model.StorageObject content) { super(Storage.this, "PUT", REST_PATH, content, com.google.api.services.storage.model.StorageObject.class); this.bucket = com.google.api.client.util.Preconditions.checkNotNull(bucket, "Required parameter bucket must be specified."); this.object__ = com.google.api.client.util.Preconditions.checkNotNull(object__, "Required parameter object__ must be specified."); } @Override public Update setAlt(java.lang.String alt) { return (Update) super.setAlt(alt); } @Override public Update setFields(java.lang.String fields) { return (Update) super.setFields(fields); } @Override public Update setKey(java.lang.String key) { return (Update) super.setKey(key); } @Override public Update setOauthToken(java.lang.String oauthToken) { return (Update) super.setOauthToken(oauthToken); } @Override public Update setPrettyPrint(java.lang.Boolean prettyPrint) { return (Update) super.setPrettyPrint(prettyPrint); } @Override public Update setQuotaUser(java.lang.String quotaUser) { return (Update) super.setQuotaUser(quotaUser); } @Override public Update setUploadType(java.lang.String uploadType) { return (Update) super.setUploadType(uploadType); } @Override public Update setUserIp(java.lang.String userIp) { return (Update) super.setUserIp(userIp); } /** Name of the bucket in which the object resides. */ @com.google.api.client.util.Key private java.lang.String bucket; /** Name of the bucket in which the object resides. */ public java.lang.String getBucket() { return bucket; } /** Name of the bucket in which the object resides. */ public Update setBucket(java.lang.String bucket) { this.bucket = bucket; return this; } /** * Name of the object. For information about how to URL encode object names to be path safe, * see [Encoding URI Path Parts](https://cloud.google.com/storage/docs/request- * endpoints#encoding). */ @com.google.api.client.util.Key("object") private java.lang.String object__; /** Name of the object. For information about how to URL encode object names to be path safe, see [Encoding URI Path Parts](https://cloud.google.com/storage/docs/request-endpoints#encoding). */ public java.lang.String getObject() { return object__; } /** * Name of the object. For information about how to URL encode object names to be path safe, * see [Encoding URI Path Parts](https://cloud.google.com/storage/docs/request- * endpoints#encoding). */ public Update setObject(java.lang.String object__) { this.object__ = object__; return this; } /** * If present, selects a specific revision of this object (as opposed to the latest version, * the default). */ @com.google.api.client.util.Key private java.lang.Long generation; /** If present, selects a specific revision of this object (as opposed to the latest version, the default). */ public java.lang.Long getGeneration() { return generation; } /** * If present, selects a specific revision of this object (as opposed to the latest version, * the default). */ public Update setGeneration(java.lang.Long generation) { this.generation = generation; return this; } /** * Makes the operation conditional on whether the object's current generation matches the * given value. Setting to 0 makes the operation succeed only if there are no live versions of * the object. */ @com.google.api.client.util.Key private java.lang.Long ifGenerationMatch; /** Makes the operation conditional on whether the object's current generation matches the given value. Setting to 0 makes the operation succeed only if there are no live versions of the object. */ public java.lang.Long getIfGenerationMatch() { return ifGenerationMatch; } /** * Makes the operation conditional on whether the object's current generation matches the * given value. Setting to 0 makes the operation succeed only if there are no live versions of * the object. */ public Update setIfGenerationMatch(java.lang.Long ifGenerationMatch) { this.ifGenerationMatch = ifGenerationMatch; return this; } /** * Makes the operation conditional on whether the object's current generation does not match * the given value. If no live object exists, the precondition fails. Setting to 0 makes the * operation succeed only if there is a live version of the object. */ @com.google.api.client.util.Key private java.lang.Long ifGenerationNotMatch; /** Makes the operation conditional on whether the object's current generation does not match the given value. If no live object exists, the precondition fails. Setting to 0 makes the operation succeed only if there is a live version of the object. */ public java.lang.Long getIfGenerationNotMatch() { return ifGenerationNotMatch; } /** * Makes the operation conditional on whether the object's current generation does not match * the given value. If no live object exists, the precondition fails. Setting to 0 makes the * operation succeed only if there is a live version of the object. */ public Update setIfGenerationNotMatch(java.lang.Long ifGenerationNotMatch) { this.ifGenerationNotMatch = ifGenerationNotMatch; return this; } /** * Makes the operation conditional on whether the object's current metageneration matches the * given value. */ @com.google.api.client.util.Key private java.lang.Long ifMetagenerationMatch; /** Makes the operation conditional on whether the object's current metageneration matches the given value. */ public java.lang.Long getIfMetagenerationMatch() { return ifMetagenerationMatch; } /** * Makes the operation conditional on whether the object's current metageneration matches the * given value. */ public Update setIfMetagenerationMatch(java.lang.Long ifMetagenerationMatch) { this.ifMetagenerationMatch = ifMetagenerationMatch; return this; } /** * Makes the operation conditional on whether the object's current metageneration does not * match the given value. */ @com.google.api.client.util.Key private java.lang.Long ifMetagenerationNotMatch; /** Makes the operation conditional on whether the object's current metageneration does not match the given value. */ public java.lang.Long getIfMetagenerationNotMatch() { return ifMetagenerationNotMatch; } /** * Makes the operation conditional on whether the object's current metageneration does not * match the given value. */ public Update setIfMetagenerationNotMatch(java.lang.Long ifMetagenerationNotMatch) { this.ifMetagenerationNotMatch = ifMetagenerationNotMatch; return this; } /** * Must be true to remove the retention configuration, reduce its unlocked retention period, * or change its mode from unlocked to locked. */ @com.google.api.client.util.Key private java.lang.Boolean overrideUnlockedRetention; /** Must be true to remove the retention configuration, reduce its unlocked retention period, or change its mode from unlocked to locked. */ public java.lang.Boolean getOverrideUnlockedRetention() { return overrideUnlockedRetention; } /** * Must be true to remove the retention configuration, reduce its unlocked retention period, * or change its mode from unlocked to locked. */ public Update setOverrideUnlockedRetention(java.lang.Boolean overrideUnlockedRetention) { this.overrideUnlockedRetention = overrideUnlockedRetention; return this; } /** Apply a predefined set of access controls to this object. */ @com.google.api.client.util.Key private java.lang.String predefinedAcl; /** Apply a predefined set of access controls to this object. */ public java.lang.String getPredefinedAcl() { return predefinedAcl; } /** Apply a predefined set of access controls to this object. */ public Update setPredefinedAcl(java.lang.String predefinedAcl) { this.predefinedAcl = predefinedAcl; return this; } /** Set of properties to return. Defaults to full. */ @com.google.api.client.util.Key private java.lang.String projection; /** Set of properties to return. Defaults to full. */ public java.lang.String getProjection() { return projection; } /** Set of properties to return. Defaults to full. */ public Update setProjection(java.lang.String projection) { this.projection = projection; return this; } /** The project to be billed for this request. Required for Requester Pays buckets. */ @com.google.api.client.util.Key private java.lang.String userProject; /** The project to be billed for this request. Required for Requester Pays buckets. */ public java.lang.String getUserProject() { return userProject; } /** The project to be billed for this request. Required for Requester Pays buckets. */ public Update setUserProject(java.lang.String userProject) { this.userProject = userProject; return this; } @Override public Update set(String parameterName, Object value) { return (Update) super.set(parameterName, value); } } /** * Watch for changes on all objects in a bucket. * * Create a request for the method "objects.watchAll". * * This request holds the parameters needed by the storage server. After setting any optional * parameters, call the {@link WatchAll#execute()} method to invoke the remote operation. * * @param bucket Name of the bucket in which to look for objects. * @param content the {@link com.google.api.services.storage.model.Channel} * @return the request */ public WatchAll watchAll(java.lang.String bucket, com.google.api.services.storage.model.Channel content) throws java.io.IOException { WatchAll result = new WatchAll(bucket, content); initialize(result); return result; } public class WatchAll extends StorageRequest { private static final String REST_PATH = "b/{bucket}/o/watch"; /** * Watch for changes on all objects in a bucket. * * Create a request for the method "objects.watchAll". * * This request holds the parameters needed by the the storage server. After setting any optional * parameters, call the {@link WatchAll#execute()} method to invoke the remote operation.

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

* * @param bucket Name of the bucket in which to look for objects. * @param content the {@link com.google.api.services.storage.model.Channel} * @since 1.13 */ protected WatchAll(java.lang.String bucket, com.google.api.services.storage.model.Channel content) { super(Storage.this, "POST", REST_PATH, content, com.google.api.services.storage.model.Channel.class); this.bucket = com.google.api.client.util.Preconditions.checkNotNull(bucket, "Required parameter bucket must be specified."); } @Override public WatchAll setAlt(java.lang.String alt) { return (WatchAll) super.setAlt(alt); } @Override public WatchAll setFields(java.lang.String fields) { return (WatchAll) super.setFields(fields); } @Override public WatchAll setKey(java.lang.String key) { return (WatchAll) super.setKey(key); } @Override public WatchAll setOauthToken(java.lang.String oauthToken) { return (WatchAll) super.setOauthToken(oauthToken); } @Override public WatchAll setPrettyPrint(java.lang.Boolean prettyPrint) { return (WatchAll) super.setPrettyPrint(prettyPrint); } @Override public WatchAll setQuotaUser(java.lang.String quotaUser) { return (WatchAll) super.setQuotaUser(quotaUser); } @Override public WatchAll setUploadType(java.lang.String uploadType) { return (WatchAll) super.setUploadType(uploadType); } @Override public WatchAll setUserIp(java.lang.String userIp) { return (WatchAll) super.setUserIp(userIp); } /** Name of the bucket in which to look for objects. */ @com.google.api.client.util.Key private java.lang.String bucket; /** Name of the bucket in which to look for objects. */ public java.lang.String getBucket() { return bucket; } /** Name of the bucket in which to look for objects. */ public WatchAll setBucket(java.lang.String bucket) { this.bucket = bucket; return this; } /** * Returns results in a directory-like mode. items will contain only objects whose names, * aside from the prefix, do not contain delimiter. Objects whose names, aside from the * prefix, contain delimiter will have their name, truncated after the delimiter, returned in * prefixes. Duplicate prefixes are omitted. */ @com.google.api.client.util.Key private java.lang.String delimiter; /** Returns results in a directory-like mode. items will contain only objects whose names, aside from the prefix, do not contain delimiter. Objects whose names, aside from the prefix, contain delimiter will have their name, truncated after the delimiter, returned in prefixes. Duplicate prefixes are omitted. */ public java.lang.String getDelimiter() { return delimiter; } /** * Returns results in a directory-like mode. items will contain only objects whose names, * aside from the prefix, do not contain delimiter. Objects whose names, aside from the * prefix, contain delimiter will have their name, truncated after the delimiter, returned in * prefixes. Duplicate prefixes are omitted. */ public WatchAll setDelimiter(java.lang.String delimiter) { this.delimiter = delimiter; return this; } /** * Filter results to objects whose names are lexicographically before endOffset. If * startOffset is also set, the objects listed will have names between startOffset (inclusive) * and endOffset (exclusive). */ @com.google.api.client.util.Key private java.lang.String endOffset; /** Filter results to objects whose names are lexicographically before endOffset. If startOffset is also set, the objects listed will have names between startOffset (inclusive) and endOffset (exclusive). */ public java.lang.String getEndOffset() { return endOffset; } /** * Filter results to objects whose names are lexicographically before endOffset. If * startOffset is also set, the objects listed will have names between startOffset (inclusive) * and endOffset (exclusive). */ public WatchAll setEndOffset(java.lang.String endOffset) { this.endOffset = endOffset; return this; } /** * If true, objects that end in exactly one instance of delimiter will have their metadata * included in items in addition to prefixes. */ @com.google.api.client.util.Key private java.lang.Boolean includeTrailingDelimiter; /** If true, objects that end in exactly one instance of delimiter will have their metadata included in items in addition to prefixes. */ public java.lang.Boolean getIncludeTrailingDelimiter() { return includeTrailingDelimiter; } /** * If true, objects that end in exactly one instance of delimiter will have their metadata * included in items in addition to prefixes. */ public WatchAll setIncludeTrailingDelimiter(java.lang.Boolean includeTrailingDelimiter) { this.includeTrailingDelimiter = includeTrailingDelimiter; return this; } /** * Maximum number of items plus prefixes to return in a single page of responses. As duplicate * prefixes are omitted, fewer total results may be returned than requested. The service will * use this parameter or 1,000 items, whichever is smaller. */ @com.google.api.client.util.Key private java.lang.Long maxResults; /** Maximum number of items plus prefixes to return in a single page of responses. As duplicate prefixes are omitted, fewer total results may be returned than requested. The service will use this parameter or 1,000 items, whichever is smaller. [default: 1000] [minimum: 0] */ public java.lang.Long getMaxResults() { return maxResults; } /** * Maximum number of items plus prefixes to return in a single page of responses. As duplicate * prefixes are omitted, fewer total results may be returned than requested. The service will * use this parameter or 1,000 items, whichever is smaller. */ public WatchAll setMaxResults(java.lang.Long maxResults) { this.maxResults = maxResults; return this; } /** * A previously-returned page token representing part of the larger set of results to view. */ @com.google.api.client.util.Key private java.lang.String pageToken; /** A previously-returned page token representing part of the larger set of results to view. */ public java.lang.String getPageToken() { return pageToken; } /** * A previously-returned page token representing part of the larger set of results to view. */ public WatchAll setPageToken(java.lang.String pageToken) { this.pageToken = pageToken; return this; } /** Filter results to objects whose names begin with this prefix. */ @com.google.api.client.util.Key private java.lang.String prefix; /** Filter results to objects whose names begin with this prefix. */ public java.lang.String getPrefix() { return prefix; } /** Filter results to objects whose names begin with this prefix. */ public WatchAll setPrefix(java.lang.String prefix) { this.prefix = prefix; return this; } /** Set of properties to return. Defaults to noAcl. */ @com.google.api.client.util.Key private java.lang.String projection; /** Set of properties to return. Defaults to noAcl. */ public java.lang.String getProjection() { return projection; } /** Set of properties to return. Defaults to noAcl. */ public WatchAll setProjection(java.lang.String projection) { this.projection = projection; return this; } /** * Filter results to objects whose names are lexicographically equal to or after startOffset. * If endOffset is also set, the objects listed will have names between startOffset * (inclusive) and endOffset (exclusive). */ @com.google.api.client.util.Key private java.lang.String startOffset; /** Filter results to objects whose names are lexicographically equal to or after startOffset. If endOffset is also set, the objects listed will have names between startOffset (inclusive) and endOffset (exclusive). */ public java.lang.String getStartOffset() { return startOffset; } /** * Filter results to objects whose names are lexicographically equal to or after startOffset. * If endOffset is also set, the objects listed will have names between startOffset * (inclusive) and endOffset (exclusive). */ public WatchAll setStartOffset(java.lang.String startOffset) { this.startOffset = startOffset; return this; } /** The project to be billed for this request. Required for Requester Pays buckets. */ @com.google.api.client.util.Key private java.lang.String userProject; /** The project to be billed for this request. Required for Requester Pays buckets. */ public java.lang.String getUserProject() { return userProject; } /** The project to be billed for this request. Required for Requester Pays buckets. */ public WatchAll setUserProject(java.lang.String userProject) { this.userProject = userProject; return this; } /** * If true, lists all versions of an object as distinct results. The default is false. For * more information, see Object Versioning. */ @com.google.api.client.util.Key private java.lang.Boolean versions; /** If true, lists all versions of an object as distinct results. The default is false. For more information, see Object Versioning. */ public java.lang.Boolean getVersions() { return versions; } /** * If true, lists all versions of an object as distinct results. The default is false. For * more information, see Object Versioning. */ public WatchAll setVersions(java.lang.Boolean versions) { this.versions = versions; return this; } @Override public WatchAll set(String parameterName, Object value) { return (WatchAll) super.set(parameterName, value); } } } /** * An accessor for creating requests from the Operations collection. * *

The typical use is:

*
   *   {@code Storage storage = new Storage(...);}
   *   {@code Storage.Operations.List request = storage.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. * * Create a request for the method "operations.cancel". * * This request holds the parameters needed by the storage server. After setting any optional * parameters, call the {@link Cancel#execute()} method to invoke the remote operation. * * @param bucket The parent bucket of the operation resource. * @param operationId The ID of the operation resource. * @return the request */ public Cancel cancel(java.lang.String bucket, java.lang.String operationId) throws java.io.IOException { Cancel result = new Cancel(bucket, operationId); initialize(result); return result; } public class Cancel extends StorageRequest { private static final String REST_PATH = "b/{bucket}/operations/{operationId}/cancel"; /** * Starts asynchronous cancellation on a long-running operation. The server makes a best effort to * cancel the operation, but success is not guaranteed. * * Create a request for the method "operations.cancel". * * This request holds the parameters needed by the the storage 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 bucket The parent bucket of the operation resource. * @param operationId The ID of the operation resource. * @since 1.13 */ protected Cancel(java.lang.String bucket, java.lang.String operationId) { super(Storage.this, "POST", REST_PATH, null, Void.class); this.bucket = com.google.api.client.util.Preconditions.checkNotNull(bucket, "Required parameter bucket must be specified."); this.operationId = com.google.api.client.util.Preconditions.checkNotNull(operationId, "Required parameter operationId must be specified."); } @Override public Cancel setAlt(java.lang.String alt) { return (Cancel) super.setAlt(alt); } @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 setUserIp(java.lang.String userIp) { return (Cancel) super.setUserIp(userIp); } /** The parent bucket of the operation resource. */ @com.google.api.client.util.Key private java.lang.String bucket; /** The parent bucket of the operation resource. */ public java.lang.String getBucket() { return bucket; } /** The parent bucket of the operation resource. */ public Cancel setBucket(java.lang.String bucket) { this.bucket = bucket; return this; } /** The ID of the operation resource. */ @com.google.api.client.util.Key private java.lang.String operationId; /** The ID of the operation resource. */ public java.lang.String getOperationId() { return operationId; } /** The ID of the operation resource. */ public Cancel setOperationId(java.lang.String operationId) { this.operationId = operationId; return this; } @Override public Cancel set(String parameterName, Object value) { return (Cancel) super.set(parameterName, value); } } /** * Gets the latest state of a long-running operation. * * Create a request for the method "operations.get". * * This request holds the parameters needed by the storage server. After setting any optional * parameters, call the {@link Get#execute()} method to invoke the remote operation. * * @param bucket The parent bucket of the operation resource. * @param operationId The ID of the operation resource. * @return the request */ public Get get(java.lang.String bucket, java.lang.String operationId) throws java.io.IOException { Get result = new Get(bucket, operationId); initialize(result); return result; } public class Get extends StorageRequest { private static final String REST_PATH = "b/{bucket}/operations/{operationId}"; /** * Gets the latest state of a long-running operation. * * Create a request for the method "operations.get". * * This request holds the parameters needed by the the storage 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 bucket The parent bucket of the operation resource. * @param operationId The ID of the operation resource. * @since 1.13 */ protected Get(java.lang.String bucket, java.lang.String operationId) { super(Storage.this, "GET", REST_PATH, null, com.google.api.services.storage.model.GoogleLongrunningOperation.class); this.bucket = com.google.api.client.util.Preconditions.checkNotNull(bucket, "Required parameter bucket must be specified."); this.operationId = com.google.api.client.util.Preconditions.checkNotNull(operationId, "Required parameter operationId must be specified."); } @Override public com.google.api.client.http.HttpResponse executeUsingHead() throws java.io.IOException { return super.executeUsingHead(); } @Override public com.google.api.client.http.HttpRequest buildHttpRequestUsingHead() throws java.io.IOException { return super.buildHttpRequestUsingHead(); } @Override public Get setAlt(java.lang.String alt) { return (Get) super.setAlt(alt); } @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 setUserIp(java.lang.String userIp) { return (Get) super.setUserIp(userIp); } /** The parent bucket of the operation resource. */ @com.google.api.client.util.Key private java.lang.String bucket; /** The parent bucket of the operation resource. */ public java.lang.String getBucket() { return bucket; } /** The parent bucket of the operation resource. */ public Get setBucket(java.lang.String bucket) { this.bucket = bucket; return this; } /** The ID of the operation resource. */ @com.google.api.client.util.Key private java.lang.String operationId; /** The ID of the operation resource. */ public java.lang.String getOperationId() { return operationId; } /** The ID of the operation resource. */ public Get setOperationId(java.lang.String operationId) { this.operationId = operationId; 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. * * Create a request for the method "operations.list". * * This request holds the parameters needed by the storage server. After setting any optional * parameters, call the {@link List#execute()} method to invoke the remote operation. * * @param bucket Name of the bucket in which to look for operations. * @return the request */ public List list(java.lang.String bucket) throws java.io.IOException { List result = new List(bucket); initialize(result); return result; } public class List extends StorageRequest { private static final String REST_PATH = "b/{bucket}/operations"; /** * Lists operations that match the specified filter in the request. * * Create a request for the method "operations.list". * * This request holds the parameters needed by the the storage 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 bucket Name of the bucket in which to look for operations. * @since 1.13 */ protected List(java.lang.String bucket) { super(Storage.this, "GET", REST_PATH, null, com.google.api.services.storage.model.GoogleLongrunningListOperationsResponse.class); this.bucket = com.google.api.client.util.Preconditions.checkNotNull(bucket, "Required parameter bucket must be specified."); } @Override public com.google.api.client.http.HttpResponse executeUsingHead() throws java.io.IOException { return super.executeUsingHead(); } @Override public com.google.api.client.http.HttpRequest buildHttpRequestUsingHead() throws java.io.IOException { return super.buildHttpRequestUsingHead(); } @Override public List setAlt(java.lang.String alt) { return (List) super.setAlt(alt); } @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 setUserIp(java.lang.String userIp) { return (List) super.setUserIp(userIp); } /** Name of the bucket in which to look for operations. */ @com.google.api.client.util.Key private java.lang.String bucket; /** Name of the bucket in which to look for operations. */ public java.lang.String getBucket() { return bucket; } /** Name of the bucket in which to look for operations. */ public List setBucket(java.lang.String bucket) { this.bucket = bucket; return this; } /** * A filter to narrow down results to a preferred subset. The filtering language 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 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 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; } /** * Maximum number of items to return in a single page of responses. Fewer total results may be * returned than requested. The service uses this parameter or 100 items, whichever is * smaller. */ @com.google.api.client.util.Key private java.lang.Integer pageSize; /** Maximum number of items to return in a single page of responses. Fewer total results may be returned than requested. The service uses this parameter or 100 items, whichever is smaller. [minimum: 0] */ public java.lang.Integer getPageSize() { return pageSize; } /** * Maximum number of items to return in a single page of responses. Fewer total results may be * returned than requested. The service uses this parameter or 100 items, whichever is * smaller. */ public List setPageSize(java.lang.Integer pageSize) { this.pageSize = pageSize; return this; } /** * A previously-returned page token representing part of the larger set of results to view. */ @com.google.api.client.util.Key private java.lang.String pageToken; /** A previously-returned page token representing part of the larger set of results to view. */ public java.lang.String getPageToken() { return pageToken; } /** * A previously-returned page token representing part of the larger set of results to view. */ 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 Projects collection. * *

The typical use is:

*
   *   {@code Storage storage = new Storage(...);}
   *   {@code Storage.Projects.List request = storage.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 HmacKeys collection. * *

The typical use is:

*
     *   {@code Storage storage = new Storage(...);}
     *   {@code Storage.HmacKeys.List request = storage.hmacKeys().list(parameters ...)}
     * 
* * @return the resource collection */ public HmacKeys hmacKeys() { return new HmacKeys(); } /** * The "hmacKeys" collection of methods. */ public class HmacKeys { /** * Creates a new HMAC key for the specified service account. * * Create a request for the method "hmacKeys.create". * * This request holds the parameters needed by the storage server. After setting any optional * parameters, call the {@link Create#execute()} method to invoke the remote operation. * * @param projectId Project ID owning the service account. * @param serviceAccountEmail Email address of the service account. * @return the request */ public Create create(java.lang.String projectId, java.lang.String serviceAccountEmail) throws java.io.IOException { Create result = new Create(projectId, serviceAccountEmail); initialize(result); return result; } public class Create extends StorageRequest { private static final String REST_PATH = "projects/{projectId}/hmacKeys"; /** * Creates a new HMAC key for the specified service account. * * Create a request for the method "hmacKeys.create". * * This request holds the parameters needed by the the storage 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 projectId Project ID owning the service account. * @param serviceAccountEmail Email address of the service account. * @since 1.13 */ protected Create(java.lang.String projectId, java.lang.String serviceAccountEmail) { super(Storage.this, "POST", REST_PATH, null, com.google.api.services.storage.model.HmacKey.class); this.projectId = com.google.api.client.util.Preconditions.checkNotNull(projectId, "Required parameter projectId must be specified."); this.serviceAccountEmail = com.google.api.client.util.Preconditions.checkNotNull(serviceAccountEmail, "Required parameter serviceAccountEmail must be specified."); } @Override public Create setAlt(java.lang.String alt) { return (Create) super.setAlt(alt); } @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 setUserIp(java.lang.String userIp) { return (Create) super.setUserIp(userIp); } /** Project ID owning the service account. */ @com.google.api.client.util.Key private java.lang.String projectId; /** Project ID owning the service account. */ public java.lang.String getProjectId() { return projectId; } /** Project ID owning the service account. */ public Create setProjectId(java.lang.String projectId) { this.projectId = projectId; return this; } /** Email address of the service account. */ @com.google.api.client.util.Key private java.lang.String serviceAccountEmail; /** Email address of the service account. */ public java.lang.String getServiceAccountEmail() { return serviceAccountEmail; } /** Email address of the service account. */ public Create setServiceAccountEmail(java.lang.String serviceAccountEmail) { this.serviceAccountEmail = serviceAccountEmail; return this; } /** The project to be billed for this request. */ @com.google.api.client.util.Key private java.lang.String userProject; /** The project to be billed for this request. */ public java.lang.String getUserProject() { return userProject; } /** The project to be billed for this request. */ public Create setUserProject(java.lang.String userProject) { this.userProject = userProject; return this; } @Override public Create set(String parameterName, Object value) { return (Create) super.set(parameterName, value); } } /** * Deletes an HMAC key. * * Create a request for the method "hmacKeys.delete". * * This request holds the parameters needed by the storage server. After setting any optional * parameters, call the {@link Delete#execute()} method to invoke the remote operation. * * @param projectId Project ID owning the requested key * @param accessId Name of the HMAC key to be deleted. * @return the request */ public Delete delete(java.lang.String projectId, java.lang.String accessId) throws java.io.IOException { Delete result = new Delete(projectId, accessId); initialize(result); return result; } public class Delete extends StorageRequest { private static final String REST_PATH = "projects/{projectId}/hmacKeys/{accessId}"; /** * Deletes an HMAC key. * * Create a request for the method "hmacKeys.delete". * * This request holds the parameters needed by the the storage 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 projectId Project ID owning the requested key * @param accessId Name of the HMAC key to be deleted. * @since 1.13 */ protected Delete(java.lang.String projectId, java.lang.String accessId) { super(Storage.this, "DELETE", REST_PATH, null, Void.class); this.projectId = com.google.api.client.util.Preconditions.checkNotNull(projectId, "Required parameter projectId must be specified."); this.accessId = com.google.api.client.util.Preconditions.checkNotNull(accessId, "Required parameter accessId must be specified."); } @Override public Delete setAlt(java.lang.String alt) { return (Delete) super.setAlt(alt); } @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 setUserIp(java.lang.String userIp) { return (Delete) super.setUserIp(userIp); } /** Project ID owning the requested key */ @com.google.api.client.util.Key private java.lang.String projectId; /** Project ID owning the requested key */ public java.lang.String getProjectId() { return projectId; } /** Project ID owning the requested key */ public Delete setProjectId(java.lang.String projectId) { this.projectId = projectId; return this; } /** Name of the HMAC key to be deleted. */ @com.google.api.client.util.Key private java.lang.String accessId; /** Name of the HMAC key to be deleted. */ public java.lang.String getAccessId() { return accessId; } /** Name of the HMAC key to be deleted. */ public Delete setAccessId(java.lang.String accessId) { this.accessId = accessId; return this; } /** The project to be billed for this request. */ @com.google.api.client.util.Key private java.lang.String userProject; /** The project to be billed for this request. */ public java.lang.String getUserProject() { return userProject; } /** The project to be billed for this request. */ public Delete setUserProject(java.lang.String userProject) { this.userProject = userProject; return this; } @Override public Delete set(String parameterName, Object value) { return (Delete) super.set(parameterName, value); } } /** * Retrieves an HMAC key's metadata * * Create a request for the method "hmacKeys.get". * * This request holds the parameters needed by the storage server. After setting any optional * parameters, call the {@link Get#execute()} method to invoke the remote operation. * * @param projectId Project ID owning the service account of the requested key. * @param accessId Name of the HMAC key. * @return the request */ public Get get(java.lang.String projectId, java.lang.String accessId) throws java.io.IOException { Get result = new Get(projectId, accessId); initialize(result); return result; } public class Get extends StorageRequest { private static final String REST_PATH = "projects/{projectId}/hmacKeys/{accessId}"; /** * Retrieves an HMAC key's metadata * * Create a request for the method "hmacKeys.get". * * This request holds the parameters needed by the the storage 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 projectId Project ID owning the service account of the requested key. * @param accessId Name of the HMAC key. * @since 1.13 */ protected Get(java.lang.String projectId, java.lang.String accessId) { super(Storage.this, "GET", REST_PATH, null, com.google.api.services.storage.model.HmacKeyMetadata.class); this.projectId = com.google.api.client.util.Preconditions.checkNotNull(projectId, "Required parameter projectId must be specified."); this.accessId = com.google.api.client.util.Preconditions.checkNotNull(accessId, "Required parameter accessId must be specified."); } @Override public com.google.api.client.http.HttpResponse executeUsingHead() throws java.io.IOException { return super.executeUsingHead(); } @Override public com.google.api.client.http.HttpRequest buildHttpRequestUsingHead() throws java.io.IOException { return super.buildHttpRequestUsingHead(); } @Override public Get setAlt(java.lang.String alt) { return (Get) super.setAlt(alt); } @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 setUserIp(java.lang.String userIp) { return (Get) super.setUserIp(userIp); } /** Project ID owning the service account of the requested key. */ @com.google.api.client.util.Key private java.lang.String projectId; /** Project ID owning the service account of the requested key. */ public java.lang.String getProjectId() { return projectId; } /** Project ID owning the service account of the requested key. */ public Get setProjectId(java.lang.String projectId) { this.projectId = projectId; return this; } /** Name of the HMAC key. */ @com.google.api.client.util.Key private java.lang.String accessId; /** Name of the HMAC key. */ public java.lang.String getAccessId() { return accessId; } /** Name of the HMAC key. */ public Get setAccessId(java.lang.String accessId) { this.accessId = accessId; return this; } /** The project to be billed for this request. */ @com.google.api.client.util.Key private java.lang.String userProject; /** The project to be billed for this request. */ public java.lang.String getUserProject() { return userProject; } /** The project to be billed for this request. */ public Get setUserProject(java.lang.String userProject) { this.userProject = userProject; return this; } @Override public Get set(String parameterName, Object value) { return (Get) super.set(parameterName, value); } } /** * Retrieves a list of HMAC keys matching the criteria. * * Create a request for the method "hmacKeys.list". * * This request holds the parameters needed by the storage server. After setting any optional * parameters, call the {@link List#execute()} method to invoke the remote operation. * * @param projectId Name of the project in which to look for HMAC keys. * @return the request */ public List list(java.lang.String projectId) throws java.io.IOException { List result = new List(projectId); initialize(result); return result; } public class List extends StorageRequest { private static final String REST_PATH = "projects/{projectId}/hmacKeys"; /** * Retrieves a list of HMAC keys matching the criteria. * * Create a request for the method "hmacKeys.list". * * This request holds the parameters needed by the the storage 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 projectId Name of the project in which to look for HMAC keys. * @since 1.13 */ protected List(java.lang.String projectId) { super(Storage.this, "GET", REST_PATH, null, com.google.api.services.storage.model.HmacKeysMetadata.class); this.projectId = com.google.api.client.util.Preconditions.checkNotNull(projectId, "Required parameter projectId must be specified."); } @Override public com.google.api.client.http.HttpResponse executeUsingHead() throws java.io.IOException { return super.executeUsingHead(); } @Override public com.google.api.client.http.HttpRequest buildHttpRequestUsingHead() throws java.io.IOException { return super.buildHttpRequestUsingHead(); } @Override public List setAlt(java.lang.String alt) { return (List) super.setAlt(alt); } @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 setUserIp(java.lang.String userIp) { return (List) super.setUserIp(userIp); } /** Name of the project in which to look for HMAC keys. */ @com.google.api.client.util.Key private java.lang.String projectId; /** Name of the project in which to look for HMAC keys. */ public java.lang.String getProjectId() { return projectId; } /** Name of the project in which to look for HMAC keys. */ public List setProjectId(java.lang.String projectId) { this.projectId = projectId; return this; } /** * Maximum number of items to return in a single page of responses. The service uses this * parameter or 250 items, whichever is smaller. The max number of items per page will also * be limited by the number of distinct service accounts in the response. If the number of * service accounts in a single response is too high, the page will truncated and a next * page token will be returned. */ @com.google.api.client.util.Key private java.lang.Long maxResults; /** Maximum number of items to return in a single page of responses. The service uses this parameter or 250 items, whichever is smaller. The max number of items per page will also be limited by the number of distinct service accounts in the response. If the number of service accounts in a single response is too high, the page will truncated and a next page token will be returned. [default: 250] [minimum: 0] */ public java.lang.Long getMaxResults() { return maxResults; } /** * Maximum number of items to return in a single page of responses. The service uses this * parameter or 250 items, whichever is smaller. The max number of items per page will also * be limited by the number of distinct service accounts in the response. If the number of * service accounts in a single response is too high, the page will truncated and a next * page token will be returned. */ public List setMaxResults(java.lang.Long maxResults) { this.maxResults = maxResults; return this; } /** * A previously-returned page token representing part of the larger set of results to view. */ @com.google.api.client.util.Key private java.lang.String pageToken; /** A previously-returned page token representing part of the larger set of results to view. */ public java.lang.String getPageToken() { return pageToken; } /** * A previously-returned page token representing part of the larger set of results to view. */ public List setPageToken(java.lang.String pageToken) { this.pageToken = pageToken; return this; } /** If present, only keys for the given service account are returned. */ @com.google.api.client.util.Key private java.lang.String serviceAccountEmail; /** If present, only keys for the given service account are returned. */ public java.lang.String getServiceAccountEmail() { return serviceAccountEmail; } /** If present, only keys for the given service account are returned. */ public List setServiceAccountEmail(java.lang.String serviceAccountEmail) { this.serviceAccountEmail = serviceAccountEmail; return this; } /** Whether or not to show keys in the DELETED state. */ @com.google.api.client.util.Key private java.lang.Boolean showDeletedKeys; /** Whether or not to show keys in the DELETED state. */ public java.lang.Boolean getShowDeletedKeys() { return showDeletedKeys; } /** Whether or not to show keys in the DELETED state. */ public List setShowDeletedKeys(java.lang.Boolean showDeletedKeys) { this.showDeletedKeys = showDeletedKeys; return this; } /** The project to be billed for this request. */ @com.google.api.client.util.Key private java.lang.String userProject; /** The project to be billed for this request. */ public java.lang.String getUserProject() { return userProject; } /** The project to be billed for this request. */ public List setUserProject(java.lang.String userProject) { this.userProject = userProject; return this; } @Override public List set(String parameterName, Object value) { return (List) super.set(parameterName, value); } } /** * Updates the state of an HMAC key. See the HMAC Key resource descriptor for valid states. * * Create a request for the method "hmacKeys.update". * * This request holds the parameters needed by the storage server. After setting any optional * parameters, call the {@link Update#execute()} method to invoke the remote operation. * * @param projectId Project ID owning the service account of the updated key. * @param accessId Name of the HMAC key being updated. * @param content the {@link com.google.api.services.storage.model.HmacKeyMetadata} * @return the request */ public Update update(java.lang.String projectId, java.lang.String accessId, com.google.api.services.storage.model.HmacKeyMetadata content) throws java.io.IOException { Update result = new Update(projectId, accessId, content); initialize(result); return result; } public class Update extends StorageRequest { private static final String REST_PATH = "projects/{projectId}/hmacKeys/{accessId}"; /** * Updates the state of an HMAC key. See the HMAC Key resource descriptor for valid states. * * Create a request for the method "hmacKeys.update". * * This request holds the parameters needed by the the storage server. After setting any optional * parameters, call the {@link Update#execute()} method to invoke the remote operation.

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

* * @param projectId Project ID owning the service account of the updated key. * @param accessId Name of the HMAC key being updated. * @param content the {@link com.google.api.services.storage.model.HmacKeyMetadata} * @since 1.13 */ protected Update(java.lang.String projectId, java.lang.String accessId, com.google.api.services.storage.model.HmacKeyMetadata content) { super(Storage.this, "PUT", REST_PATH, content, com.google.api.services.storage.model.HmacKeyMetadata.class); this.projectId = com.google.api.client.util.Preconditions.checkNotNull(projectId, "Required parameter projectId must be specified."); this.accessId = com.google.api.client.util.Preconditions.checkNotNull(accessId, "Required parameter accessId must be specified."); } @Override public Update setAlt(java.lang.String alt) { return (Update) super.setAlt(alt); } @Override public Update setFields(java.lang.String fields) { return (Update) super.setFields(fields); } @Override public Update setKey(java.lang.String key) { return (Update) super.setKey(key); } @Override public Update setOauthToken(java.lang.String oauthToken) { return (Update) super.setOauthToken(oauthToken); } @Override public Update setPrettyPrint(java.lang.Boolean prettyPrint) { return (Update) super.setPrettyPrint(prettyPrint); } @Override public Update setQuotaUser(java.lang.String quotaUser) { return (Update) super.setQuotaUser(quotaUser); } @Override public Update setUploadType(java.lang.String uploadType) { return (Update) super.setUploadType(uploadType); } @Override public Update setUserIp(java.lang.String userIp) { return (Update) super.setUserIp(userIp); } /** Project ID owning the service account of the updated key. */ @com.google.api.client.util.Key private java.lang.String projectId; /** Project ID owning the service account of the updated key. */ public java.lang.String getProjectId() { return projectId; } /** Project ID owning the service account of the updated key. */ public Update setProjectId(java.lang.String projectId) { this.projectId = projectId; return this; } /** Name of the HMAC key being updated. */ @com.google.api.client.util.Key private java.lang.String accessId; /** Name of the HMAC key being updated. */ public java.lang.String getAccessId() { return accessId; } /** Name of the HMAC key being updated. */ public Update setAccessId(java.lang.String accessId) { this.accessId = accessId; return this; } /** The project to be billed for this request. */ @com.google.api.client.util.Key private java.lang.String userProject; /** The project to be billed for this request. */ public java.lang.String getUserProject() { return userProject; } /** The project to be billed for this request. */ public Update setUserProject(java.lang.String userProject) { this.userProject = userProject; return this; } @Override public Update set(String parameterName, Object value) { return (Update) super.set(parameterName, value); } } } /** * An accessor for creating requests from the ServiceAccount collection. * *

The typical use is:

*
     *   {@code Storage storage = new Storage(...);}
     *   {@code Storage.ServiceAccount.List request = storage.serviceAccount().list(parameters ...)}
     * 
* * @return the resource collection */ public ServiceAccount serviceAccount() { return new ServiceAccount(); } /** * The "serviceAccount" collection of methods. */ public class ServiceAccount { /** * Get the email address of this project's Google Cloud Storage service account. * * Create a request for the method "serviceAccount.get". * * This request holds the parameters needed by the storage server. After setting any optional * parameters, call the {@link Get#execute()} method to invoke the remote operation. * * @param projectId Project ID * @return the request */ public Get get(java.lang.String projectId) throws java.io.IOException { Get result = new Get(projectId); initialize(result); return result; } public class Get extends StorageRequest { private static final String REST_PATH = "projects/{projectId}/serviceAccount"; /** * Get the email address of this project's Google Cloud Storage service account. * * Create a request for the method "serviceAccount.get". * * This request holds the parameters needed by the the storage 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 projectId Project ID * @since 1.13 */ protected Get(java.lang.String projectId) { super(Storage.this, "GET", REST_PATH, null, com.google.api.services.storage.model.ServiceAccount.class); this.projectId = com.google.api.client.util.Preconditions.checkNotNull(projectId, "Required parameter projectId must be specified."); } @Override public com.google.api.client.http.HttpResponse executeUsingHead() throws java.io.IOException { return super.executeUsingHead(); } @Override public com.google.api.client.http.HttpRequest buildHttpRequestUsingHead() throws java.io.IOException { return super.buildHttpRequestUsingHead(); } @Override public Get setAlt(java.lang.String alt) { return (Get) super.setAlt(alt); } @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 setUserIp(java.lang.String userIp) { return (Get) super.setUserIp(userIp); } /** Project ID */ @com.google.api.client.util.Key private java.lang.String projectId; /** Project ID */ public java.lang.String getProjectId() { return projectId; } /** Project ID */ public Get setProjectId(java.lang.String projectId) { this.projectId = projectId; return this; } /** The project to be billed for this request. */ @com.google.api.client.util.Key private java.lang.String userProject; /** The project to be billed for this request. */ public java.lang.String getUserProject() { return userProject; } /** The project to be billed for this request. */ public Get setUserProject(java.lang.String userProject) { this.userProject = userProject; return this; } @Override public Get set(String parameterName, Object value) { return (Get) super.set(parameterName, value); } } } } /** * Builder for {@link Storage}. * *

* 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 Storage}. */ @Override public Storage build() { return new Storage(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 StorageRequestInitializer}. * * @since 1.12 */ public Builder setStorageRequestInitializer( StorageRequestInitializer storageRequestInitializer) { return (Builder) super.setGoogleClientRequestInitializer(storageRequestInitializer); } @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