com.google.api.services.storagetransfer.Storagetransfer Maven / Gradle / Ivy
/*
* Copyright 2010 Google Inc.
*
* 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://code.google.com/p/google-apis-client-generator/
* (build: 2015-07-16 18:28:29 UTC)
* on 2015-07-22 at 02:28:25 UTC
* Modify at your own risk.
*/
package com.google.api.services.storagetransfer;
/**
* Service definition for Storagetransfer (v1).
*
*
* Transfers data from external data sources to a Google Cloud Storage bucket or between Google Cloud Storage buckets.
*
*
*
* For more information about this service, see the
* API Documentation
*
*
*
* This service uses {@link StoragetransferRequestInitializer} to initialize global parameters via its
* {@link Builder}.
*
*
* @since 1.3
* @author Google, Inc.
*/
@SuppressWarnings("javadoc")
public class Storagetransfer 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 >= 15,
"You are currently running with version %s of google-api-client. " +
"You need at least version 1.15 of google-api-client to run version " +
"1.19.1 of the Google Storage Transfer 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://storagetransfer.googleapis.com/";
/**
* The default encoded service path of the service. This is determined when the library is
* generated and normally should not be changed.
*
* @since 1.7
*/
public static final String DEFAULT_SERVICE_PATH = "";
/**
* The default encoded 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 Storagetransfer(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
*/
Storagetransfer(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 GoogleServiceAccounts collection.
*
* The typical use is:
*
* {@code Storagetransfer storagetransfer = new Storagetransfer(...);}
* {@code Storagetransfer.GoogleServiceAccounts.List request = storagetransfer.googleServiceAccounts().list(parameters ...)}
*
*
* @return the resource collection
*/
public GoogleServiceAccounts googleServiceAccounts() {
return new GoogleServiceAccounts();
}
/**
* The "googleServiceAccounts" collection of methods.
*/
public class GoogleServiceAccounts {
/**
* Returns the Google service account that is used by the Storage Transfer service to access Google
* Cloud Storage buckets in transfers associated with the Google Developers Console project. One
* Google service account is associated with one Google Developers Console project. Users should add
* this service account to the Google Cloud Storage bucket ACLs to grant access permissions to the
* Storage Transfer service. This service account is created and owned by the Storage Transfer
* service and can only be used by the Storage Transfer service.
*
* Create a request for the method "googleServiceAccounts.get".
*
* This request holds the parameters needed by the storagetransfer server. After setting any
* optional parameters, call the {@link Get#execute()} method to invoke the remote operation.
*
* @param projectId The ID of the Google Developers Console project that the Google service account is associated with.
* Required.
* @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 StoragetransferRequest {
private static final String REST_PATH = "v1/googleServiceAccounts/{projectId}";
/**
* Returns the Google service account that is used by the Storage Transfer service to access
* Google Cloud Storage buckets in transfers associated with the Google Developers Console
* project. One Google service account is associated with one Google Developers Console project.
* Users should add this service account to the Google Cloud Storage bucket ACLs to grant access
* permissions to the Storage Transfer service. This service account is created and owned by the
* Storage Transfer service and can only be used by the Storage Transfer service.
*
* Create a request for the method "googleServiceAccounts.get".
*
* This request holds the parameters needed by the the storagetransfer 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 The ID of the Google Developers Console project that the Google service account is associated with.
* Required.
* @since 1.13
*/
protected Get(java.lang.String projectId) {
super(Storagetransfer.this, "GET", REST_PATH, null, com.google.api.services.storagetransfer.model.GoogleServiceAccount.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 set$Xgafv(java.lang.String $Xgafv) {
return (Get) super.set$Xgafv($Xgafv);
}
@Override
public Get setAccessToken(java.lang.String accessToken) {
return (Get) super.setAccessToken(accessToken);
}
@Override
public Get setAlt(java.lang.String alt) {
return (Get) super.setAlt(alt);
}
@Override
public Get setBearerToken(java.lang.String bearerToken) {
return (Get) super.setBearerToken(bearerToken);
}
@Override
public Get setCallback(java.lang.String callback) {
return (Get) super.setCallback(callback);
}
@Override
public Get setFields(java.lang.String fields) {
return (Get) super.setFields(fields);
}
@Override
public Get setKey(java.lang.String key) {
return (Get) super.setKey(key);
}
@Override
public Get setOauthToken(java.lang.String oauthToken) {
return (Get) super.setOauthToken(oauthToken);
}
@Override
public Get setPp(java.lang.Boolean pp) {
return (Get) super.setPp(pp);
}
@Override
public Get setPrettyPrint(java.lang.Boolean prettyPrint) {
return (Get) super.setPrettyPrint(prettyPrint);
}
@Override
public Get setQuotaUser(java.lang.String quotaUser) {
return (Get) super.setQuotaUser(quotaUser);
}
@Override
public Get setUploadType(java.lang.String uploadType) {
return (Get) super.setUploadType(uploadType);
}
@Override
public Get setUploadProtocol(java.lang.String uploadProtocol) {
return (Get) super.setUploadProtocol(uploadProtocol);
}
/**
* The ID of the Google Developers Console project that the Google service account is
* associated with. Required.
*/
@com.google.api.client.util.Key
private java.lang.String projectId;
/** The ID of the Google Developers Console project that the Google service account is associated with.
Required.
*/
public java.lang.String getProjectId() {
return projectId;
}
/**
* The ID of the Google Developers Console project that the Google service account is
* associated with. Required.
*/
public Get setProjectId(java.lang.String projectId) {
this.projectId = projectId;
return this;
}
@Override
public Get set(String parameterName, Object value) {
return (Get) super.set(parameterName, value);
}
}
}
/**
* An accessor for creating requests from the TransferJobs collection.
*
* The typical use is:
*
* {@code Storagetransfer storagetransfer = new Storagetransfer(...);}
* {@code Storagetransfer.TransferJobs.List request = storagetransfer.transferJobs().list(parameters ...)}
*
*
* @return the resource collection
*/
public TransferJobs transferJobs() {
return new TransferJobs();
}
/**
* The "transferJobs" collection of methods.
*/
public class TransferJobs {
/**
* Creates a transfer job that runs periodically.
*
* Create a request for the method "transferJobs.create".
*
* This request holds the parameters needed by the storagetransfer server. After setting any
* optional parameters, call the {@link Create#execute()} method to invoke the remote operation.
*
* @param content the {@link com.google.api.services.storagetransfer.model.TransferJob}
* @return the request
*/
public Create create(com.google.api.services.storagetransfer.model.TransferJob content) throws java.io.IOException {
Create result = new Create(content);
initialize(result);
return result;
}
public class Create extends StoragetransferRequest {
private static final String REST_PATH = "v1/transferJobs";
/**
* Creates a transfer job that runs periodically.
*
* Create a request for the method "transferJobs.create".
*
* This request holds the parameters needed by the the storagetransfer 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 content the {@link com.google.api.services.storagetransfer.model.TransferJob}
* @since 1.13
*/
protected Create(com.google.api.services.storagetransfer.model.TransferJob content) {
super(Storagetransfer.this, "POST", REST_PATH, content, com.google.api.services.storagetransfer.model.TransferJob.class);
}
@Override
public Create set$Xgafv(java.lang.String $Xgafv) {
return (Create) super.set$Xgafv($Xgafv);
}
@Override
public Create setAccessToken(java.lang.String accessToken) {
return (Create) super.setAccessToken(accessToken);
}
@Override
public Create setAlt(java.lang.String alt) {
return (Create) super.setAlt(alt);
}
@Override
public Create setBearerToken(java.lang.String bearerToken) {
return (Create) super.setBearerToken(bearerToken);
}
@Override
public Create setCallback(java.lang.String callback) {
return (Create) super.setCallback(callback);
}
@Override
public Create setFields(java.lang.String fields) {
return (Create) super.setFields(fields);
}
@Override
public Create setKey(java.lang.String key) {
return (Create) super.setKey(key);
}
@Override
public Create setOauthToken(java.lang.String oauthToken) {
return (Create) super.setOauthToken(oauthToken);
}
@Override
public Create setPp(java.lang.Boolean pp) {
return (Create) super.setPp(pp);
}
@Override
public Create setPrettyPrint(java.lang.Boolean prettyPrint) {
return (Create) super.setPrettyPrint(prettyPrint);
}
@Override
public Create setQuotaUser(java.lang.String quotaUser) {
return (Create) super.setQuotaUser(quotaUser);
}
@Override
public Create setUploadType(java.lang.String uploadType) {
return (Create) super.setUploadType(uploadType);
}
@Override
public Create setUploadProtocol(java.lang.String uploadProtocol) {
return (Create) super.setUploadProtocol(uploadProtocol);
}
@Override
public Create set(String parameterName, Object value) {
return (Create) super.set(parameterName, value);
}
}
/**
* Gets a transfer job.
*
* Create a request for the method "transferJobs.get".
*
* This request holds the parameters needed by the storagetransfer server. After setting any
* optional parameters, call the {@link Get#execute()} method to invoke the remote operation.
*
* @param jobName The job to get. Required.
* @return the request
*/
public Get get(java.lang.String jobName) throws java.io.IOException {
Get result = new Get(jobName);
initialize(result);
return result;
}
public class Get extends StoragetransferRequest {
private static final String REST_PATH = "v1/{+jobName}";
private final java.util.regex.Pattern JOB_NAME_PATTERN =
java.util.regex.Pattern.compile("^transferJobs/.*$");
/**
* Gets a transfer job.
*
* Create a request for the method "transferJobs.get".
*
* This request holds the parameters needed by the the storagetransfer 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 jobName The job to get. Required.
* @since 1.13
*/
protected Get(java.lang.String jobName) {
super(Storagetransfer.this, "GET", REST_PATH, null, com.google.api.services.storagetransfer.model.TransferJob.class);
this.jobName = com.google.api.client.util.Preconditions.checkNotNull(jobName, "Required parameter jobName must be specified.");
if (!getSuppressPatternChecks()) {
com.google.api.client.util.Preconditions.checkArgument(JOB_NAME_PATTERN.matcher(jobName).matches(),
"Parameter jobName must conform to the pattern " +
"^transferJobs/.*$");
}
}
@Override
public com.google.api.client.http.HttpResponse executeUsingHead() throws java.io.IOException {
return super.executeUsingHead();
}
@Override
public com.google.api.client.http.HttpRequest buildHttpRequestUsingHead() throws java.io.IOException {
return super.buildHttpRequestUsingHead();
}
@Override
public Get set$Xgafv(java.lang.String $Xgafv) {
return (Get) super.set$Xgafv($Xgafv);
}
@Override
public Get setAccessToken(java.lang.String accessToken) {
return (Get) super.setAccessToken(accessToken);
}
@Override
public Get setAlt(java.lang.String alt) {
return (Get) super.setAlt(alt);
}
@Override
public Get setBearerToken(java.lang.String bearerToken) {
return (Get) super.setBearerToken(bearerToken);
}
@Override
public Get setCallback(java.lang.String callback) {
return (Get) super.setCallback(callback);
}
@Override
public Get setFields(java.lang.String fields) {
return (Get) super.setFields(fields);
}
@Override
public Get setKey(java.lang.String key) {
return (Get) super.setKey(key);
}
@Override
public Get setOauthToken(java.lang.String oauthToken) {
return (Get) super.setOauthToken(oauthToken);
}
@Override
public Get setPp(java.lang.Boolean pp) {
return (Get) super.setPp(pp);
}
@Override
public Get setPrettyPrint(java.lang.Boolean prettyPrint) {
return (Get) super.setPrettyPrint(prettyPrint);
}
@Override
public Get setQuotaUser(java.lang.String quotaUser) {
return (Get) super.setQuotaUser(quotaUser);
}
@Override
public Get setUploadType(java.lang.String uploadType) {
return (Get) super.setUploadType(uploadType);
}
@Override
public Get setUploadProtocol(java.lang.String uploadProtocol) {
return (Get) super.setUploadProtocol(uploadProtocol);
}
/** The job to get. Required. */
@com.google.api.client.util.Key
private java.lang.String jobName;
/** The job to get. Required.
*/
public java.lang.String getJobName() {
return jobName;
}
/** The job to get. Required. */
public Get setJobName(java.lang.String jobName) {
if (!getSuppressPatternChecks()) {
com.google.api.client.util.Preconditions.checkArgument(JOB_NAME_PATTERN.matcher(jobName).matches(),
"Parameter jobName must conform to the pattern " +
"^transferJobs/.*$");
}
this.jobName = jobName;
return this;
}
/** The ID of the Google Developers Console project that owns the job. Required. */
@com.google.api.client.util.Key
private java.lang.String projectId;
/** The ID of the Google Developers Console project that owns the job. Required.
*/
public java.lang.String getProjectId() {
return projectId;
}
/** The ID of the Google Developers Console project that owns the job. Required. */
public Get setProjectId(java.lang.String projectId) {
this.projectId = projectId;
return this;
}
@Override
public Get set(String parameterName, Object value) {
return (Get) super.set(parameterName, value);
}
}
/**
* Lists transfer jobs.
*
* Create a request for the method "transferJobs.list".
*
* This request holds the parameters needed by the storagetransfer server. After setting any
* optional parameters, call the {@link List#execute()} method to invoke the remote operation.
*
* @return the request
*/
public List list() throws java.io.IOException {
List result = new List();
initialize(result);
return result;
}
public class List extends StoragetransferRequest {
private static final String REST_PATH = "v1/transferJobs";
/**
* Lists transfer jobs.
*
* Create a request for the method "transferJobs.list".
*
* This request holds the parameters needed by the the storagetransfer server. After setting any
* optional parameters, call the {@link List#execute()} method to invoke the remote operation.
* {@link List#initialize(com.google.api.client.googleapis.services.AbstractGoogleClientRequest)}
* must be called to initialize this instance immediately after invoking the constructor.
*
* @since 1.13
*/
protected List() {
super(Storagetransfer.this, "GET", REST_PATH, null, com.google.api.services.storagetransfer.model.ListTransferJobsResponse.class);
}
@Override
public com.google.api.client.http.HttpResponse executeUsingHead() throws java.io.IOException {
return super.executeUsingHead();
}
@Override
public com.google.api.client.http.HttpRequest buildHttpRequestUsingHead() throws java.io.IOException {
return super.buildHttpRequestUsingHead();
}
@Override
public List set$Xgafv(java.lang.String $Xgafv) {
return (List) super.set$Xgafv($Xgafv);
}
@Override
public List setAccessToken(java.lang.String accessToken) {
return (List) super.setAccessToken(accessToken);
}
@Override
public List setAlt(java.lang.String alt) {
return (List) super.setAlt(alt);
}
@Override
public List setBearerToken(java.lang.String bearerToken) {
return (List) super.setBearerToken(bearerToken);
}
@Override
public List setCallback(java.lang.String callback) {
return (List) super.setCallback(callback);
}
@Override
public List setFields(java.lang.String fields) {
return (List) super.setFields(fields);
}
@Override
public List setKey(java.lang.String key) {
return (List) super.setKey(key);
}
@Override
public List setOauthToken(java.lang.String oauthToken) {
return (List) super.setOauthToken(oauthToken);
}
@Override
public List setPp(java.lang.Boolean pp) {
return (List) super.setPp(pp);
}
@Override
public List setPrettyPrint(java.lang.Boolean prettyPrint) {
return (List) super.setPrettyPrint(prettyPrint);
}
@Override
public List setQuotaUser(java.lang.String quotaUser) {
return (List) super.setQuotaUser(quotaUser);
}
@Override
public List setUploadType(java.lang.String uploadType) {
return (List) super.setUploadType(uploadType);
}
@Override
public List setUploadProtocol(java.lang.String uploadProtocol) {
return (List) super.setUploadProtocol(uploadProtocol);
}
/**
* A list of query parameters specified as a JSON text in the form of
* {"project_id":"my_project_id", "job_names":["jobid1","jobid2",...],
* "job_statuses":["status1","status2",...]}. Since job_names and job_statuses support
* multiple values, their values must be specified with array notation. project_id is
* required. job_names and transfer_statuses are optional. The valid values for job_statuses
* are case-insensitive: "ENABLED", "DISABLED", and "DELETED".
*/
@com.google.api.client.util.Key
private java.lang.String filter;
/** A list of query parameters specified as a JSON text in the form of {"project_id":"my_project_id",
"job_names":["jobid1","jobid2",...], "job_statuses":["status1","status2",...]}. Since job_names and
job_statuses support multiple values, their values must be specified with array notation.
project_id is required. job_names and transfer_statuses are optional. The valid values for
job_statuses are case-insensitive: "ENABLED", "DISABLED", and "DELETED".
*/
public java.lang.String getFilter() {
return filter;
}
/**
* A list of query parameters specified as a JSON text in the form of
* {"project_id":"my_project_id", "job_names":["jobid1","jobid2",...],
* "job_statuses":["status1","status2",...]}. Since job_names and job_statuses support
* multiple values, their values must be specified with array notation. project_id is
* required. job_names and transfer_statuses are optional. The valid values for job_statuses
* are case-insensitive: "ENABLED", "DISABLED", and "DELETED".
*/
public List setFilter(java.lang.String filter) {
this.filter = filter;
return this;
}
/** The list page token. */
@com.google.api.client.util.Key
private java.lang.String pageToken;
/** The list page token.
*/
public java.lang.String getPageToken() {
return pageToken;
}
/** The list page token. */
public List setPageToken(java.lang.String pageToken) {
this.pageToken = pageToken;
return this;
}
/** The list page size. The max allowed value is 256. */
@com.google.api.client.util.Key
private java.lang.Integer pageSize;
/** The list page size. The max allowed value is 256.
*/
public java.lang.Integer getPageSize() {
return pageSize;
}
/** The list page size. The max allowed value is 256. */
public List setPageSize(java.lang.Integer pageSize) {
this.pageSize = pageSize;
return this;
}
@Override
public List set(String parameterName, Object value) {
return (List) super.set(parameterName, value);
}
}
/**
* Updates a transfer job. Updating a job's transfer spec does not affect transfer operations that
* are running already. Updating the scheduling of a job is not allowed.
*
* Create a request for the method "transferJobs.patch".
*
* This request holds the parameters needed by the storagetransfer server. After setting any
* optional parameters, call the {@link Patch#execute()} method to invoke the remote operation.
*
* @param jobName The name of job to update. Required.
* @param content the {@link com.google.api.services.storagetransfer.model.UpdateTransferJobRequest}
* @return the request
*/
public Patch patch(java.lang.String jobName, com.google.api.services.storagetransfer.model.UpdateTransferJobRequest content) throws java.io.IOException {
Patch result = new Patch(jobName, content);
initialize(result);
return result;
}
public class Patch extends StoragetransferRequest {
private static final String REST_PATH = "v1/{+jobName}";
private final java.util.regex.Pattern JOB_NAME_PATTERN =
java.util.regex.Pattern.compile("^transferJobs/.*$");
/**
* Updates a transfer job. Updating a job's transfer spec does not affect transfer operations that
* are running already. Updating the scheduling of a job is not allowed.
*
* Create a request for the method "transferJobs.patch".
*
* This request holds the parameters needed by the the storagetransfer 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 jobName The name of job to update. Required.
* @param content the {@link com.google.api.services.storagetransfer.model.UpdateTransferJobRequest}
* @since 1.13
*/
protected Patch(java.lang.String jobName, com.google.api.services.storagetransfer.model.UpdateTransferJobRequest content) {
super(Storagetransfer.this, "PATCH", REST_PATH, content, com.google.api.services.storagetransfer.model.TransferJob.class);
this.jobName = com.google.api.client.util.Preconditions.checkNotNull(jobName, "Required parameter jobName must be specified.");
if (!getSuppressPatternChecks()) {
com.google.api.client.util.Preconditions.checkArgument(JOB_NAME_PATTERN.matcher(jobName).matches(),
"Parameter jobName must conform to the pattern " +
"^transferJobs/.*$");
}
}
@Override
public Patch set$Xgafv(java.lang.String $Xgafv) {
return (Patch) super.set$Xgafv($Xgafv);
}
@Override
public Patch setAccessToken(java.lang.String accessToken) {
return (Patch) super.setAccessToken(accessToken);
}
@Override
public Patch setAlt(java.lang.String alt) {
return (Patch) super.setAlt(alt);
}
@Override
public Patch setBearerToken(java.lang.String bearerToken) {
return (Patch) super.setBearerToken(bearerToken);
}
@Override
public Patch setCallback(java.lang.String callback) {
return (Patch) super.setCallback(callback);
}
@Override
public Patch setFields(java.lang.String fields) {
return (Patch) super.setFields(fields);
}
@Override
public Patch setKey(java.lang.String key) {
return (Patch) super.setKey(key);
}
@Override
public Patch setOauthToken(java.lang.String oauthToken) {
return (Patch) super.setOauthToken(oauthToken);
}
@Override
public Patch setPp(java.lang.Boolean pp) {
return (Patch) super.setPp(pp);
}
@Override
public Patch setPrettyPrint(java.lang.Boolean prettyPrint) {
return (Patch) super.setPrettyPrint(prettyPrint);
}
@Override
public Patch setQuotaUser(java.lang.String quotaUser) {
return (Patch) super.setQuotaUser(quotaUser);
}
@Override
public Patch setUploadType(java.lang.String uploadType) {
return (Patch) super.setUploadType(uploadType);
}
@Override
public Patch setUploadProtocol(java.lang.String uploadProtocol) {
return (Patch) super.setUploadProtocol(uploadProtocol);
}
/** The name of job to update. Required. */
@com.google.api.client.util.Key
private java.lang.String jobName;
/** The name of job to update. Required.
*/
public java.lang.String getJobName() {
return jobName;
}
/** The name of job to update. Required. */
public Patch setJobName(java.lang.String jobName) {
if (!getSuppressPatternChecks()) {
com.google.api.client.util.Preconditions.checkArgument(JOB_NAME_PATTERN.matcher(jobName).matches(),
"Parameter jobName must conform to the pattern " +
"^transferJobs/.*$");
}
this.jobName = jobName;
return this;
}
@Override
public Patch set(String parameterName, Object value) {
return (Patch) super.set(parameterName, value);
}
}
}
/**
* An accessor for creating requests from the TransferOperations collection.
*
* The typical use is:
*
* {@code Storagetransfer storagetransfer = new Storagetransfer(...);}
* {@code Storagetransfer.TransferOperations.List request = storagetransfer.transferOperations().list(parameters ...)}
*
*
* @return the resource collection
*/
public TransferOperations transferOperations() {
return new TransferOperations();
}
/**
* The "transferOperations" collection of methods.
*/
public class TransferOperations {
/**
* Starts asynchronous cancellation on a long-running operation. The server makes a best effort to
* cancel the operation, but success is not guaranteed. If the server doesn't support this method,
* it returns `google.rpc.Code.UNIMPLEMENTED`. Clients can use
* [Operations.GetOperation][google.longrunning.Operations.GetOperation] or other methods to check
* if the cancellation succeeded or the operation completed despite cancellation.
*
* Create a request for the method "transferOperations.cancel".
*
* This request holds the parameters needed by the storagetransfer server. After setting any
* optional parameters, call the {@link Cancel#execute()} method to invoke the remote operation.
*
* @param name The name of the operation resource to be cancelled.
* @return the request
*/
public Cancel cancel(java.lang.String name) throws java.io.IOException {
Cancel result = new Cancel(name);
initialize(result);
return result;
}
public class Cancel extends StoragetransferRequest {
private static final String REST_PATH = "v1/{+name}:cancel";
private final java.util.regex.Pattern NAME_PATTERN =
java.util.regex.Pattern.compile("^transferOperations/.*$");
/**
* Starts asynchronous cancellation on a long-running operation. The server makes a best effort to
* cancel the operation, but success is not guaranteed. If the server doesn't support this method,
* it returns `google.rpc.Code.UNIMPLEMENTED`. Clients can use
* [Operations.GetOperation][google.longrunning.Operations.GetOperation] or other methods to check
* if the cancellation succeeded or the operation completed despite cancellation.
*
* Create a request for the method "transferOperations.cancel".
*
* This request holds the parameters needed by the the storagetransfer server. After setting any
* optional parameters, call the {@link Cancel#execute()} method to invoke the remote operation.
* {@link
* Cancel#initialize(com.google.api.client.googleapis.services.AbstractGoogleClientRequest)} must
* be called to initialize this instance immediately after invoking the constructor.
*
* @param name The name of the operation resource to be cancelled.
* @since 1.13
*/
protected Cancel(java.lang.String name) {
super(Storagetransfer.this, "POST", REST_PATH, null, com.google.api.services.storagetransfer.model.Empty.class);
this.name = com.google.api.client.util.Preconditions.checkNotNull(name, "Required parameter name must be specified.");
if (!getSuppressPatternChecks()) {
com.google.api.client.util.Preconditions.checkArgument(NAME_PATTERN.matcher(name).matches(),
"Parameter name must conform to the pattern " +
"^transferOperations/.*$");
}
}
@Override
public Cancel set$Xgafv(java.lang.String $Xgafv) {
return (Cancel) super.set$Xgafv($Xgafv);
}
@Override
public Cancel setAccessToken(java.lang.String accessToken) {
return (Cancel) super.setAccessToken(accessToken);
}
@Override
public Cancel setAlt(java.lang.String alt) {
return (Cancel) super.setAlt(alt);
}
@Override
public Cancel setBearerToken(java.lang.String bearerToken) {
return (Cancel) super.setBearerToken(bearerToken);
}
@Override
public Cancel setCallback(java.lang.String callback) {
return (Cancel) super.setCallback(callback);
}
@Override
public Cancel setFields(java.lang.String fields) {
return (Cancel) super.setFields(fields);
}
@Override
public Cancel setKey(java.lang.String key) {
return (Cancel) super.setKey(key);
}
@Override
public Cancel setOauthToken(java.lang.String oauthToken) {
return (Cancel) super.setOauthToken(oauthToken);
}
@Override
public Cancel setPp(java.lang.Boolean pp) {
return (Cancel) super.setPp(pp);
}
@Override
public Cancel setPrettyPrint(java.lang.Boolean prettyPrint) {
return (Cancel) super.setPrettyPrint(prettyPrint);
}
@Override
public Cancel setQuotaUser(java.lang.String quotaUser) {
return (Cancel) super.setQuotaUser(quotaUser);
}
@Override
public Cancel setUploadType(java.lang.String uploadType) {
return (Cancel) super.setUploadType(uploadType);
}
@Override
public Cancel setUploadProtocol(java.lang.String uploadProtocol) {
return (Cancel) super.setUploadProtocol(uploadProtocol);
}
/** The name of the operation resource to be cancelled. */
@com.google.api.client.util.Key
private java.lang.String name;
/** The name of the operation resource to be cancelled.
*/
public java.lang.String getName() {
return name;
}
/** The name of the operation resource to be cancelled. */
public Cancel setName(java.lang.String name) {
if (!getSuppressPatternChecks()) {
com.google.api.client.util.Preconditions.checkArgument(NAME_PATTERN.matcher(name).matches(),
"Parameter name must conform to the pattern " +
"^transferOperations/.*$");
}
this.name = name;
return this;
}
@Override
public Cancel set(String parameterName, Object value) {
return (Cancel) super.set(parameterName, value);
}
}
/**
* Deletes a long-running operation. It indicates the client is no longer interested in the
* operation result. It does not cancel the operation. If the server doesn't support this method, it
* returns `google.rpc.Code.UNIMPLEMENTED`.
*
* Create a request for the method "transferOperations.delete".
*
* This request holds the parameters needed by the storagetransfer server. After setting any
* optional parameters, call the {@link Delete#execute()} method to invoke the remote operation.
*
* @param name The name of the operation resource to be deleted.
* @return the request
*/
public Delete delete(java.lang.String name) throws java.io.IOException {
Delete result = new Delete(name);
initialize(result);
return result;
}
public class Delete extends StoragetransferRequest {
private static final String REST_PATH = "v1/{+name}";
private final java.util.regex.Pattern NAME_PATTERN =
java.util.regex.Pattern.compile("^transferOperations/.*$");
/**
* Deletes a long-running operation. It indicates the client is no longer interested in the
* operation result. It does not cancel the operation. If the server doesn't support this method,
* it returns `google.rpc.Code.UNIMPLEMENTED`.
*
* Create a request for the method "transferOperations.delete".
*
* This request holds the parameters needed by the the storagetransfer server. After setting any
* optional parameters, call the {@link Delete#execute()} method to invoke the remote operation.
* {@link
* Delete#initialize(com.google.api.client.googleapis.services.AbstractGoogleClientRequest)} must
* be called to initialize this instance immediately after invoking the constructor.
*
* @param name The name of the operation resource to be deleted.
* @since 1.13
*/
protected Delete(java.lang.String name) {
super(Storagetransfer.this, "DELETE", REST_PATH, null, com.google.api.services.storagetransfer.model.Empty.class);
this.name = com.google.api.client.util.Preconditions.checkNotNull(name, "Required parameter name must be specified.");
if (!getSuppressPatternChecks()) {
com.google.api.client.util.Preconditions.checkArgument(NAME_PATTERN.matcher(name).matches(),
"Parameter name must conform to the pattern " +
"^transferOperations/.*$");
}
}
@Override
public Delete set$Xgafv(java.lang.String $Xgafv) {
return (Delete) super.set$Xgafv($Xgafv);
}
@Override
public Delete setAccessToken(java.lang.String accessToken) {
return (Delete) super.setAccessToken(accessToken);
}
@Override
public Delete setAlt(java.lang.String alt) {
return (Delete) super.setAlt(alt);
}
@Override
public Delete setBearerToken(java.lang.String bearerToken) {
return (Delete) super.setBearerToken(bearerToken);
}
@Override
public Delete setCallback(java.lang.String callback) {
return (Delete) super.setCallback(callback);
}
@Override
public Delete setFields(java.lang.String fields) {
return (Delete) super.setFields(fields);
}
@Override
public Delete setKey(java.lang.String key) {
return (Delete) super.setKey(key);
}
@Override
public Delete setOauthToken(java.lang.String oauthToken) {
return (Delete) super.setOauthToken(oauthToken);
}
@Override
public Delete setPp(java.lang.Boolean pp) {
return (Delete) super.setPp(pp);
}
@Override
public Delete setPrettyPrint(java.lang.Boolean prettyPrint) {
return (Delete) super.setPrettyPrint(prettyPrint);
}
@Override
public Delete setQuotaUser(java.lang.String quotaUser) {
return (Delete) super.setQuotaUser(quotaUser);
}
@Override
public Delete setUploadType(java.lang.String uploadType) {
return (Delete) super.setUploadType(uploadType);
}
@Override
public Delete setUploadProtocol(java.lang.String uploadProtocol) {
return (Delete) super.setUploadProtocol(uploadProtocol);
}
/** The name of the operation resource to be deleted. */
@com.google.api.client.util.Key
private java.lang.String name;
/** The name of the operation resource to be deleted.
*/
public java.lang.String getName() {
return name;
}
/** The name of the operation resource to be deleted. */
public Delete setName(java.lang.String name) {
if (!getSuppressPatternChecks()) {
com.google.api.client.util.Preconditions.checkArgument(NAME_PATTERN.matcher(name).matches(),
"Parameter name must conform to the pattern " +
"^transferOperations/.*$");
}
this.name = name;
return this;
}
@Override
public Delete set(String parameterName, Object value) {
return (Delete) super.set(parameterName, value);
}
}
/**
* Gets the latest state of a long-running operation. Clients can use this method to poll the
* operation result at intervals as recommended by the API service.
*
* Create a request for the method "transferOperations.get".
*
* This request holds the parameters needed by the storagetransfer server. After setting any
* optional parameters, call the {@link Get#execute()} method to invoke the remote operation.
*
* @param name The name of the operation resource.
* @return the request
*/
public Get get(java.lang.String name) throws java.io.IOException {
Get result = new Get(name);
initialize(result);
return result;
}
public class Get extends StoragetransferRequest {
private static final String REST_PATH = "v1/{+name}";
private final java.util.regex.Pattern NAME_PATTERN =
java.util.regex.Pattern.compile("^transferOperations/.*$");
/**
* Gets the latest state of a long-running operation. Clients can use this method to poll the
* operation result at intervals as recommended by the API service.
*
* Create a request for the method "transferOperations.get".
*
* This request holds the parameters needed by the the storagetransfer server. After setting any
* optional parameters, call the {@link Get#execute()} method to invoke the remote operation.
* {@link Get#initialize(com.google.api.client.googleapis.services.AbstractGoogleClientRequest)}
* must be called to initialize this instance immediately after invoking the constructor.
*
* @param name The name of the operation resource.
* @since 1.13
*/
protected Get(java.lang.String name) {
super(Storagetransfer.this, "GET", REST_PATH, null, com.google.api.services.storagetransfer.model.Operation.class);
this.name = com.google.api.client.util.Preconditions.checkNotNull(name, "Required parameter name must be specified.");
if (!getSuppressPatternChecks()) {
com.google.api.client.util.Preconditions.checkArgument(NAME_PATTERN.matcher(name).matches(),
"Parameter name must conform to the pattern " +
"^transferOperations/.*$");
}
}
@Override
public com.google.api.client.http.HttpResponse executeUsingHead() throws java.io.IOException {
return super.executeUsingHead();
}
@Override
public com.google.api.client.http.HttpRequest buildHttpRequestUsingHead() throws java.io.IOException {
return super.buildHttpRequestUsingHead();
}
@Override
public Get set$Xgafv(java.lang.String $Xgafv) {
return (Get) super.set$Xgafv($Xgafv);
}
@Override
public Get setAccessToken(java.lang.String accessToken) {
return (Get) super.setAccessToken(accessToken);
}
@Override
public Get setAlt(java.lang.String alt) {
return (Get) super.setAlt(alt);
}
@Override
public Get setBearerToken(java.lang.String bearerToken) {
return (Get) super.setBearerToken(bearerToken);
}
@Override
public Get setCallback(java.lang.String callback) {
return (Get) super.setCallback(callback);
}
@Override
public Get setFields(java.lang.String fields) {
return (Get) super.setFields(fields);
}
@Override
public Get setKey(java.lang.String key) {
return (Get) super.setKey(key);
}
@Override
public Get setOauthToken(java.lang.String oauthToken) {
return (Get) super.setOauthToken(oauthToken);
}
@Override
public Get setPp(java.lang.Boolean pp) {
return (Get) super.setPp(pp);
}
@Override
public Get setPrettyPrint(java.lang.Boolean prettyPrint) {
return (Get) super.setPrettyPrint(prettyPrint);
}
@Override
public Get setQuotaUser(java.lang.String quotaUser) {
return (Get) super.setQuotaUser(quotaUser);
}
@Override
public Get setUploadType(java.lang.String uploadType) {
return (Get) super.setUploadType(uploadType);
}
@Override
public Get setUploadProtocol(java.lang.String uploadProtocol) {
return (Get) super.setUploadProtocol(uploadProtocol);
}
/** The name of the operation resource. */
@com.google.api.client.util.Key
private java.lang.String name;
/** The name of the operation resource.
*/
public java.lang.String getName() {
return name;
}
/** The name of the operation resource. */
public Get setName(java.lang.String name) {
if (!getSuppressPatternChecks()) {
com.google.api.client.util.Preconditions.checkArgument(NAME_PATTERN.matcher(name).matches(),
"Parameter name must conform to the pattern " +
"^transferOperations/.*$");
}
this.name = name;
return this;
}
@Override
public Get set(String parameterName, Object value) {
return (Get) super.set(parameterName, value);
}
}
/**
* Lists operations that match the specified filter in the request. If the server doesn't support
* this method, it returns `UNIMPLEMENTED`. NOTE: the `name` binding below allows API services to
* override the binding to use different resource name schemes, such as `users/operations`.
*
* Create a request for the method "transferOperations.list".
*
* This request holds the parameters needed by the storagetransfer server. After setting any
* optional parameters, call the {@link List#execute()} method to invoke the remote operation.
*
* @param name The name of the operation collection.
* @return the request
*/
public List list(java.lang.String name) throws java.io.IOException {
List result = new List(name);
initialize(result);
return result;
}
public class List extends StoragetransferRequest {
private static final String REST_PATH = "v1/{+name}";
private final java.util.regex.Pattern NAME_PATTERN =
java.util.regex.Pattern.compile("^transferOperations$");
/**
* Lists operations that match the specified filter in the request. If the server doesn't support
* this method, it returns `UNIMPLEMENTED`. NOTE: the `name` binding below allows API services to
* override the binding to use different resource name schemes, such as `users/operations`.
*
* Create a request for the method "transferOperations.list".
*
* This request holds the parameters needed by the the storagetransfer server. After setting any
* optional parameters, call the {@link List#execute()} method to invoke the remote operation.
* {@link List#initialize(com.google.api.client.googleapis.services.AbstractGoogleClientRequest)}
* must be called to initialize this instance immediately after invoking the constructor.
*
* @param name The name of the operation collection.
* @since 1.13
*/
protected List(java.lang.String name) {
super(Storagetransfer.this, "GET", REST_PATH, null, com.google.api.services.storagetransfer.model.ListOperationsResponse.class);
this.name = com.google.api.client.util.Preconditions.checkNotNull(name, "Required parameter name must be specified.");
if (!getSuppressPatternChecks()) {
com.google.api.client.util.Preconditions.checkArgument(NAME_PATTERN.matcher(name).matches(),
"Parameter name must conform to the pattern " +
"^transferOperations$");
}
}
@Override
public com.google.api.client.http.HttpResponse executeUsingHead() throws java.io.IOException {
return super.executeUsingHead();
}
@Override
public com.google.api.client.http.HttpRequest buildHttpRequestUsingHead() throws java.io.IOException {
return super.buildHttpRequestUsingHead();
}
@Override
public List set$Xgafv(java.lang.String $Xgafv) {
return (List) super.set$Xgafv($Xgafv);
}
@Override
public List setAccessToken(java.lang.String accessToken) {
return (List) super.setAccessToken(accessToken);
}
@Override
public List setAlt(java.lang.String alt) {
return (List) super.setAlt(alt);
}
@Override
public List setBearerToken(java.lang.String bearerToken) {
return (List) super.setBearerToken(bearerToken);
}
@Override
public List setCallback(java.lang.String callback) {
return (List) super.setCallback(callback);
}
@Override
public List setFields(java.lang.String fields) {
return (List) super.setFields(fields);
}
@Override
public List setKey(java.lang.String key) {
return (List) super.setKey(key);
}
@Override
public List setOauthToken(java.lang.String oauthToken) {
return (List) super.setOauthToken(oauthToken);
}
@Override
public List setPp(java.lang.Boolean pp) {
return (List) super.setPp(pp);
}
@Override
public List setPrettyPrint(java.lang.Boolean prettyPrint) {
return (List) super.setPrettyPrint(prettyPrint);
}
@Override
public List setQuotaUser(java.lang.String quotaUser) {
return (List) super.setQuotaUser(quotaUser);
}
@Override
public List setUploadType(java.lang.String uploadType) {
return (List) super.setUploadType(uploadType);
}
@Override
public List setUploadProtocol(java.lang.String uploadProtocol) {
return (List) super.setUploadProtocol(uploadProtocol);
}
/** The name of the operation collection. */
@com.google.api.client.util.Key
private java.lang.String name;
/** The name of the operation collection.
*/
public java.lang.String getName() {
return name;
}
/** The name of the operation collection. */
public List setName(java.lang.String name) {
if (!getSuppressPatternChecks()) {
com.google.api.client.util.Preconditions.checkArgument(NAME_PATTERN.matcher(name).matches(),
"Parameter name must conform to the pattern " +
"^transferOperations$");
}
this.name = name;
return this;
}
/** The standard List filter. */
@com.google.api.client.util.Key
private java.lang.String filter;
/** The standard List filter.
*/
public java.lang.String getFilter() {
return filter;
}
/** The standard List filter. */
public List setFilter(java.lang.String filter) {
this.filter = filter;
return this;
}
/** The standard List page token. */
@com.google.api.client.util.Key
private java.lang.String pageToken;
/** The standard List page token.
*/
public java.lang.String getPageToken() {
return pageToken;
}
/** The standard List page token. */
public List setPageToken(java.lang.String pageToken) {
this.pageToken = pageToken;
return this;
}
/** The standard List page size. */
@com.google.api.client.util.Key
private java.lang.Integer pageSize;
/** The standard List page size.
*/
public java.lang.Integer getPageSize() {
return pageSize;
}
/** The standard List page size. */
public List setPageSize(java.lang.Integer pageSize) {
this.pageSize = pageSize;
return this;
}
@Override
public List set(String parameterName, Object value) {
return (List) super.set(parameterName, value);
}
}
/**
* Pauses a transfer operation.
*
* Create a request for the method "transferOperations.pause".
*
* This request holds the parameters needed by the storagetransfer server. After setting any
* optional parameters, call the {@link Pause#execute()} method to invoke the remote operation.
*
* @param name Name of the transfer operation. Required.
* @param content the {@link com.google.api.services.storagetransfer.model.PauseTransferOperationRequest}
* @return the request
*/
public Pause pause(java.lang.String name, com.google.api.services.storagetransfer.model.PauseTransferOperationRequest content) throws java.io.IOException {
Pause result = new Pause(name, content);
initialize(result);
return result;
}
public class Pause extends StoragetransferRequest {
private static final String REST_PATH = "v1/{+name}:pause";
private final java.util.regex.Pattern NAME_PATTERN =
java.util.regex.Pattern.compile("^transferOperations/.*$");
/**
* Pauses a transfer operation.
*
* Create a request for the method "transferOperations.pause".
*
* This request holds the parameters needed by the the storagetransfer 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 name Name of the transfer operation. Required.
* @param content the {@link com.google.api.services.storagetransfer.model.PauseTransferOperationRequest}
* @since 1.13
*/
protected Pause(java.lang.String name, com.google.api.services.storagetransfer.model.PauseTransferOperationRequest content) {
super(Storagetransfer.this, "POST", REST_PATH, content, com.google.api.services.storagetransfer.model.Empty.class);
this.name = com.google.api.client.util.Preconditions.checkNotNull(name, "Required parameter name must be specified.");
if (!getSuppressPatternChecks()) {
com.google.api.client.util.Preconditions.checkArgument(NAME_PATTERN.matcher(name).matches(),
"Parameter name must conform to the pattern " +
"^transferOperations/.*$");
}
}
@Override
public Pause set$Xgafv(java.lang.String $Xgafv) {
return (Pause) super.set$Xgafv($Xgafv);
}
@Override
public Pause setAccessToken(java.lang.String accessToken) {
return (Pause) super.setAccessToken(accessToken);
}
@Override
public Pause setAlt(java.lang.String alt) {
return (Pause) super.setAlt(alt);
}
@Override
public Pause setBearerToken(java.lang.String bearerToken) {
return (Pause) super.setBearerToken(bearerToken);
}
@Override
public Pause setCallback(java.lang.String callback) {
return (Pause) super.setCallback(callback);
}
@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 setPp(java.lang.Boolean pp) {
return (Pause) super.setPp(pp);
}
@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 setUploadProtocol(java.lang.String uploadProtocol) {
return (Pause) super.setUploadProtocol(uploadProtocol);
}
/** Name of the transfer operation. Required. */
@com.google.api.client.util.Key
private java.lang.String name;
/** Name of the transfer operation. Required.
*/
public java.lang.String getName() {
return name;
}
/** Name of the transfer operation. Required. */
public Pause setName(java.lang.String name) {
if (!getSuppressPatternChecks()) {
com.google.api.client.util.Preconditions.checkArgument(NAME_PATTERN.matcher(name).matches(),
"Parameter name must conform to the pattern " +
"^transferOperations/.*$");
}
this.name = name;
return this;
}
@Override
public Pause set(String parameterName, Object value) {
return (Pause) super.set(parameterName, value);
}
}
/**
* Resumes a transfer operation that is paused.
*
* Create a request for the method "transferOperations.resume".
*
* This request holds the parameters needed by the storagetransfer server. After setting any
* optional parameters, call the {@link Resume#execute()} method to invoke the remote operation.
*
* @param name Name of the transfer operation. Required.
* @param content the {@link com.google.api.services.storagetransfer.model.ResumeTransferOperationRequest}
* @return the request
*/
public Resume resume(java.lang.String name, com.google.api.services.storagetransfer.model.ResumeTransferOperationRequest content) throws java.io.IOException {
Resume result = new Resume(name, content);
initialize(result);
return result;
}
public class Resume extends StoragetransferRequest {
private static final String REST_PATH = "v1/{+name}:resume";
private final java.util.regex.Pattern NAME_PATTERN =
java.util.regex.Pattern.compile("^transferOperations/.*$");
/**
* Resumes a transfer operation that is paused.
*
* Create a request for the method "transferOperations.resume".
*
* This request holds the parameters needed by the the storagetransfer 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 name Name of the transfer operation. Required.
* @param content the {@link com.google.api.services.storagetransfer.model.ResumeTransferOperationRequest}
* @since 1.13
*/
protected Resume(java.lang.String name, com.google.api.services.storagetransfer.model.ResumeTransferOperationRequest content) {
super(Storagetransfer.this, "POST", REST_PATH, content, com.google.api.services.storagetransfer.model.Empty.class);
this.name = com.google.api.client.util.Preconditions.checkNotNull(name, "Required parameter name must be specified.");
if (!getSuppressPatternChecks()) {
com.google.api.client.util.Preconditions.checkArgument(NAME_PATTERN.matcher(name).matches(),
"Parameter name must conform to the pattern " +
"^transferOperations/.*$");
}
}
@Override
public Resume set$Xgafv(java.lang.String $Xgafv) {
return (Resume) super.set$Xgafv($Xgafv);
}
@Override
public Resume setAccessToken(java.lang.String accessToken) {
return (Resume) super.setAccessToken(accessToken);
}
@Override
public Resume setAlt(java.lang.String alt) {
return (Resume) super.setAlt(alt);
}
@Override
public Resume setBearerToken(java.lang.String bearerToken) {
return (Resume) super.setBearerToken(bearerToken);
}
@Override
public Resume setCallback(java.lang.String callback) {
return (Resume) super.setCallback(callback);
}
@Override
public Resume setFields(java.lang.String fields) {
return (Resume) super.setFields(fields);
}
@Override
public Resume setKey(java.lang.String key) {
return (Resume) super.setKey(key);
}
@Override
public Resume setOauthToken(java.lang.String oauthToken) {
return (Resume) super.setOauthToken(oauthToken);
}
@Override
public Resume setPp(java.lang.Boolean pp) {
return (Resume) super.setPp(pp);
}
@Override
public Resume setPrettyPrint(java.lang.Boolean prettyPrint) {
return (Resume) super.setPrettyPrint(prettyPrint);
}
@Override
public Resume setQuotaUser(java.lang.String quotaUser) {
return (Resume) super.setQuotaUser(quotaUser);
}
@Override
public Resume setUploadType(java.lang.String uploadType) {
return (Resume) super.setUploadType(uploadType);
}
@Override
public Resume setUploadProtocol(java.lang.String uploadProtocol) {
return (Resume) super.setUploadProtocol(uploadProtocol);
}
/** Name of the transfer operation. Required. */
@com.google.api.client.util.Key
private java.lang.String name;
/** Name of the transfer operation. Required.
*/
public java.lang.String getName() {
return name;
}
/** Name of the transfer operation. Required. */
public Resume setName(java.lang.String name) {
if (!getSuppressPatternChecks()) {
com.google.api.client.util.Preconditions.checkArgument(NAME_PATTERN.matcher(name).matches(),
"Parameter name must conform to the pattern " +
"^transferOperations/.*$");
}
this.name = name;
return this;
}
@Override
public Resume set(String parameterName, Object value) {
return (Resume) super.set(parameterName, value);
}
}
}
/**
* An accessor for creating requests from the V1 collection.
*
* The typical use is:
*
* {@code Storagetransfer storagetransfer = new Storagetransfer(...);}
* {@code Storagetransfer.V1.List request = storagetransfer.v1().list(parameters ...)}
*
*
* @return the resource collection
*/
public V1 v1() {
return new V1();
}
/**
* The "v1" collection of methods.
*/
public class V1 {
/**
* Returns the Google service account that is used by the Storage Transfer service to access Google
* Cloud Storage buckets in transfers associated with the Google Developers Console project. One
* Google service account is associated with one Google Developers Console project. Users should add
* this service account to the Google Cloud Storage bucket ACLs to grant access permissions to the
* Storage Transfer service. This service account is created and owned by the Storage Transfer
* service and can only be used by the Storage Transfer service.
*
* Create a request for the method "v1.getGoogleServiceAccount".
*
* This request holds the parameters needed by the storagetransfer server. After setting any
* optional parameters, call the {@link GetGoogleServiceAccount#execute()} method to invoke the
* remote operation.
*
* @return the request
*/
public GetGoogleServiceAccount getGoogleServiceAccount() throws java.io.IOException {
GetGoogleServiceAccount result = new GetGoogleServiceAccount();
initialize(result);
return result;
}
public class GetGoogleServiceAccount extends StoragetransferRequest {
private static final String REST_PATH = "v1:getGoogleServiceAccount";
/**
* Returns the Google service account that is used by the Storage Transfer service to access
* Google Cloud Storage buckets in transfers associated with the Google Developers Console
* project. One Google service account is associated with one Google Developers Console project.
* Users should add this service account to the Google Cloud Storage bucket ACLs to grant access
* permissions to the Storage Transfer service. This service account is created and owned by the
* Storage Transfer service and can only be used by the Storage Transfer service.
*
* Create a request for the method "v1.getGoogleServiceAccount".
*
* This request holds the parameters needed by the the storagetransfer server. After setting any
* optional parameters, call the {@link GetGoogleServiceAccount#execute()} method to invoke the
* remote operation. {@link GetGoogleServiceAccount#initialize(com.google.api.client.googleapi
* s.services.AbstractGoogleClientRequest)} must be called to initialize this instance immediately
* after invoking the constructor.
*
* @since 1.13
*/
protected GetGoogleServiceAccount() {
super(Storagetransfer.this, "GET", REST_PATH, null, com.google.api.services.storagetransfer.model.GoogleServiceAccount.class);
}
@Override
public com.google.api.client.http.HttpResponse executeUsingHead() throws java.io.IOException {
return super.executeUsingHead();
}
@Override
public com.google.api.client.http.HttpRequest buildHttpRequestUsingHead() throws java.io.IOException {
return super.buildHttpRequestUsingHead();
}
@Override
public GetGoogleServiceAccount set$Xgafv(java.lang.String $Xgafv) {
return (GetGoogleServiceAccount) super.set$Xgafv($Xgafv);
}
@Override
public GetGoogleServiceAccount setAccessToken(java.lang.String accessToken) {
return (GetGoogleServiceAccount) super.setAccessToken(accessToken);
}
@Override
public GetGoogleServiceAccount setAlt(java.lang.String alt) {
return (GetGoogleServiceAccount) super.setAlt(alt);
}
@Override
public GetGoogleServiceAccount setBearerToken(java.lang.String bearerToken) {
return (GetGoogleServiceAccount) super.setBearerToken(bearerToken);
}
@Override
public GetGoogleServiceAccount setCallback(java.lang.String callback) {
return (GetGoogleServiceAccount) super.setCallback(callback);
}
@Override
public GetGoogleServiceAccount setFields(java.lang.String fields) {
return (GetGoogleServiceAccount) super.setFields(fields);
}
@Override
public GetGoogleServiceAccount setKey(java.lang.String key) {
return (GetGoogleServiceAccount) super.setKey(key);
}
@Override
public GetGoogleServiceAccount setOauthToken(java.lang.String oauthToken) {
return (GetGoogleServiceAccount) super.setOauthToken(oauthToken);
}
@Override
public GetGoogleServiceAccount setPp(java.lang.Boolean pp) {
return (GetGoogleServiceAccount) super.setPp(pp);
}
@Override
public GetGoogleServiceAccount setPrettyPrint(java.lang.Boolean prettyPrint) {
return (GetGoogleServiceAccount) super.setPrettyPrint(prettyPrint);
}
@Override
public GetGoogleServiceAccount setQuotaUser(java.lang.String quotaUser) {
return (GetGoogleServiceAccount) super.setQuotaUser(quotaUser);
}
@Override
public GetGoogleServiceAccount setUploadType(java.lang.String uploadType) {
return (GetGoogleServiceAccount) super.setUploadType(uploadType);
}
@Override
public GetGoogleServiceAccount setUploadProtocol(java.lang.String uploadProtocol) {
return (GetGoogleServiceAccount) super.setUploadProtocol(uploadProtocol);
}
/**
* The ID of the Google Developers Console project that the Google service account is
* associated with. Required.
*/
@com.google.api.client.util.Key
private java.lang.String projectId;
/** The ID of the Google Developers Console project that the Google service account is associated with.
Required.
*/
public java.lang.String getProjectId() {
return projectId;
}
/**
* The ID of the Google Developers Console project that the Google service account is
* associated with. Required.
*/
public GetGoogleServiceAccount setProjectId(java.lang.String projectId) {
this.projectId = projectId;
return this;
}
@Override
public GetGoogleServiceAccount set(String parameterName, Object value) {
return (GetGoogleServiceAccount) super.set(parameterName, value);
}
}
}
/**
* Builder for {@link Storagetransfer}.
*
*
* Implementation is not thread-safe.
*
*
* @since 1.3.0
*/
public static final class Builder extends com.google.api.client.googleapis.services.json.AbstractGoogleJsonClient.Builder {
/**
* 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,
DEFAULT_ROOT_URL,
DEFAULT_SERVICE_PATH,
httpRequestInitializer,
false);
}
/** Builds a new instance of {@link Storagetransfer}. */
@Override
public Storagetransfer build() {
return new Storagetransfer(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 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 StoragetransferRequestInitializer}.
*
* @since 1.12
*/
public Builder setStoragetransferRequestInitializer(
StoragetransferRequestInitializer storagetransferRequestInitializer) {
return (Builder) super.setGoogleClientRequestInitializer(storagetransferRequestInitializer);
}
@Override
public Builder setGoogleClientRequestInitializer(
com.google.api.client.googleapis.services.GoogleClientRequestInitializer googleClientRequestInitializer) {
return (Builder) super.setGoogleClientRequestInitializer(googleClientRequestInitializer);
}
}
}