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

com.google.api.services.cloudbuild.v2.CloudBuild Maven / Gradle / Ivy

There is a newer version: v2-rev20250114-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.cloudbuild.v2;

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

* Creates and manages builds on Google Cloud Platform. *

* *

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

* *

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

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

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

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

The typical use is:

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

The typical use is:

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

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

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

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

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

The typical use is:

*
       *   {@code CloudBuild cloudbuild = new CloudBuild(...);}
       *   {@code CloudBuild.Connections.List request = cloudbuild.connections().list(parameters ...)}
       * 
* * @return the resource collection */ public Connections connections() { return new Connections(); } /** * The "connections" collection of methods. */ public class Connections { /** * Creates a Connection. * * Create a request for the method "connections.create". * * This request holds the parameters needed by the cloudbuild server. After setting any optional * parameters, call the {@link Create#execute()} method to invoke the remote operation. * * @param parent Required. Project and location where the connection will be created. Format: `projects/locations`. * @param content the {@link com.google.api.services.cloudbuild.v2.model.Connection} * @return the request */ public Create create(java.lang.String parent, com.google.api.services.cloudbuild.v2.model.Connection content) throws java.io.IOException { Create result = new Create(parent, content); initialize(result); return result; } public class Create extends CloudBuildRequest { private static final String REST_PATH = "v2/{+parent}/connections"; private final java.util.regex.Pattern PARENT_PATTERN = java.util.regex.Pattern.compile("^projects/[^/]+/locations/[^/]+$"); /** * Creates a Connection. * * Create a request for the method "connections.create". * * This request holds the parameters needed by the the cloudbuild server. After setting any * optional parameters, call the {@link Create#execute()} method to invoke the remote operation. *

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

* * @param parent Required. Project and location where the connection will be created. Format: `projects/locations`. * @param content the {@link com.google.api.services.cloudbuild.v2.model.Connection} * @since 1.13 */ protected Create(java.lang.String parent, com.google.api.services.cloudbuild.v2.model.Connection content) { super(CloudBuild.this, "POST", REST_PATH, content, com.google.api.services.cloudbuild.v2.model.Operation.class); this.parent = com.google.api.client.util.Preconditions.checkNotNull(parent, "Required parameter parent must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PARENT_PATTERN.matcher(parent).matches(), "Parameter parent must conform to the pattern " + "^projects/[^/]+/locations/[^/]+$"); } } @Override public Create set$Xgafv(java.lang.String $Xgafv) { return (Create) super.set$Xgafv($Xgafv); } @Override public Create setAccessToken(java.lang.String accessToken) { return (Create) super.setAccessToken(accessToken); } @Override public Create setAlt(java.lang.String alt) { return (Create) super.setAlt(alt); } @Override public Create setCallback(java.lang.String callback) { return (Create) super.setCallback(callback); } @Override public Create setFields(java.lang.String fields) { return (Create) super.setFields(fields); } @Override public Create setKey(java.lang.String key) { return (Create) super.setKey(key); } @Override public Create setOauthToken(java.lang.String oauthToken) { return (Create) super.setOauthToken(oauthToken); } @Override public Create setPrettyPrint(java.lang.Boolean prettyPrint) { return (Create) super.setPrettyPrint(prettyPrint); } @Override public Create setQuotaUser(java.lang.String quotaUser) { return (Create) super.setQuotaUser(quotaUser); } @Override public Create setUploadType(java.lang.String uploadType) { return (Create) super.setUploadType(uploadType); } @Override public Create setUploadProtocol(java.lang.String uploadProtocol) { return (Create) super.setUploadProtocol(uploadProtocol); } /** * Required. Project and location where the connection will be created. Format: * `projects/locations`. */ @com.google.api.client.util.Key private java.lang.String parent; /** Required. Project and location where the connection will be created. Format: `projects/locations`. */ public java.lang.String getParent() { return parent; } /** * Required. Project and location where the connection will be created. Format: * `projects/locations`. */ public Create setParent(java.lang.String parent) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PARENT_PATTERN.matcher(parent).matches(), "Parameter parent must conform to the pattern " + "^projects/[^/]+/locations/[^/]+$"); } this.parent = parent; return this; } /** * Required. The ID to use for the Connection, which will become the final component of * the Connection's resource name. Names must be unique per-project per-location. Allows * alphanumeric characters and any of -._~%!$&'()*+,;=@. */ @com.google.api.client.util.Key private java.lang.String connectionId; /** Required. The ID to use for the Connection, which will become the final component of the Connection's resource name. Names must be unique per-project per-location. Allows alphanumeric characters and any of -._~%!$&'()*+,;=@. */ public java.lang.String getConnectionId() { return connectionId; } /** * Required. The ID to use for the Connection, which will become the final component of * the Connection's resource name. Names must be unique per-project per-location. Allows * alphanumeric characters and any of -._~%!$&'()*+,;=@. */ public Create setConnectionId(java.lang.String connectionId) { this.connectionId = connectionId; return this; } @Override public Create set(String parameterName, Object value) { return (Create) super.set(parameterName, value); } } /** * Deletes a single connection. * * Create a request for the method "connections.delete". * * This request holds the parameters needed by the cloudbuild server. After setting any optional * parameters, call the {@link Delete#execute()} method to invoke the remote operation. * * @param name Required. The name of the Connection to delete. Format: `projects/locations/connections`. * @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 CloudBuildRequest { private static final String REST_PATH = "v2/{+name}"; private final java.util.regex.Pattern NAME_PATTERN = java.util.regex.Pattern.compile("^projects/[^/]+/locations/[^/]+/connections/[^/]+$"); /** * Deletes a single connection. * * Create a request for the method "connections.delete". * * This request holds the parameters needed by the the cloudbuild server. After setting any * optional parameters, call the {@link Delete#execute()} method to invoke the remote operation. *

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

* * @param name Required. The name of the Connection to delete. Format: `projects/locations/connections`. * @since 1.13 */ protected Delete(java.lang.String name) { super(CloudBuild.this, "DELETE", REST_PATH, null, com.google.api.services.cloudbuild.v2.model.Operation.class); this.name = com.google.api.client.util.Preconditions.checkNotNull(name, "Required parameter name must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(NAME_PATTERN.matcher(name).matches(), "Parameter name must conform to the pattern " + "^projects/[^/]+/locations/[^/]+/connections/[^/]+$"); } } @Override public Delete set$Xgafv(java.lang.String $Xgafv) { return (Delete) super.set$Xgafv($Xgafv); } @Override public Delete setAccessToken(java.lang.String accessToken) { return (Delete) super.setAccessToken(accessToken); } @Override public Delete setAlt(java.lang.String alt) { return (Delete) super.setAlt(alt); } @Override public Delete setCallback(java.lang.String callback) { return (Delete) super.setCallback(callback); } @Override public Delete setFields(java.lang.String fields) { return (Delete) super.setFields(fields); } @Override public Delete setKey(java.lang.String key) { return (Delete) super.setKey(key); } @Override public Delete setOauthToken(java.lang.String oauthToken) { return (Delete) super.setOauthToken(oauthToken); } @Override public Delete setPrettyPrint(java.lang.Boolean prettyPrint) { return (Delete) super.setPrettyPrint(prettyPrint); } @Override public Delete setQuotaUser(java.lang.String quotaUser) { return (Delete) super.setQuotaUser(quotaUser); } @Override public Delete setUploadType(java.lang.String uploadType) { return (Delete) super.setUploadType(uploadType); } @Override public Delete setUploadProtocol(java.lang.String uploadProtocol) { return (Delete) super.setUploadProtocol(uploadProtocol); } /** * Required. The name of the Connection to delete. Format: * `projects/locations/connections`. */ @com.google.api.client.util.Key private java.lang.String name; /** Required. The name of the Connection to delete. Format: `projects/locations/connections`. */ public java.lang.String getName() { return name; } /** * Required. The name of the Connection to delete. Format: * `projects/locations/connections`. */ public Delete setName(java.lang.String name) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(NAME_PATTERN.matcher(name).matches(), "Parameter name must conform to the pattern " + "^projects/[^/]+/locations/[^/]+/connections/[^/]+$"); } this.name = name; return this; } /** * The current etag of the connection. If an etag is provided and does not match the * current etag of the connection, deletion will be blocked and an ABORTED error will be * returned. */ @com.google.api.client.util.Key private java.lang.String etag; /** The current etag of the connection. If an etag is provided and does not match the current etag of the connection, deletion will be blocked and an ABORTED error will be returned. */ public java.lang.String getEtag() { return etag; } /** * The current etag of the connection. If an etag is provided and does not match the * current etag of the connection, deletion will be blocked and an ABORTED error will be * returned. */ public Delete setEtag(java.lang.String etag) { this.etag = etag; return this; } /** If set, validate the request, but do not actually post it. */ @com.google.api.client.util.Key private java.lang.Boolean validateOnly; /** If set, validate the request, but do not actually post it. */ public java.lang.Boolean getValidateOnly() { return validateOnly; } /** If set, validate the request, but do not actually post it. */ public Delete setValidateOnly(java.lang.Boolean validateOnly) { this.validateOnly = validateOnly; return this; } @Override public Delete set(String parameterName, Object value) { return (Delete) super.set(parameterName, value); } } /** * FetchLinkableRepositories get repositories from SCM that are accessible and could be added to the * connection. * * Create a request for the method "connections.fetchLinkableRepositories". * * This request holds the parameters needed by the cloudbuild server. After setting any optional * parameters, call the {@link FetchLinkableRepositories#execute()} method to invoke the remote * operation. * * @param connection Required. The name of the Connection. Format: `projects/locations/connections`. * @return the request */ public FetchLinkableRepositories fetchLinkableRepositories(java.lang.String connection) throws java.io.IOException { FetchLinkableRepositories result = new FetchLinkableRepositories(connection); initialize(result); return result; } public class FetchLinkableRepositories extends CloudBuildRequest { private static final String REST_PATH = "v2/{+connection}:fetchLinkableRepositories"; private final java.util.regex.Pattern CONNECTION_PATTERN = java.util.regex.Pattern.compile("^projects/[^/]+/locations/[^/]+/connections/[^/]+$"); /** * FetchLinkableRepositories get repositories from SCM that are accessible and could be added to * the connection. * * Create a request for the method "connections.fetchLinkableRepositories". * * This request holds the parameters needed by the the cloudbuild server. After setting any * optional parameters, call the {@link FetchLinkableRepositories#execute()} method to invoke the * remote operation.

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

* * @param connection Required. The name of the Connection. Format: `projects/locations/connections`. * @since 1.13 */ protected FetchLinkableRepositories(java.lang.String connection) { super(CloudBuild.this, "GET", REST_PATH, null, com.google.api.services.cloudbuild.v2.model.FetchLinkableRepositoriesResponse.class); this.connection = com.google.api.client.util.Preconditions.checkNotNull(connection, "Required parameter connection must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(CONNECTION_PATTERN.matcher(connection).matches(), "Parameter connection must conform to the pattern " + "^projects/[^/]+/locations/[^/]+/connections/[^/]+$"); } } @Override public com.google.api.client.http.HttpResponse executeUsingHead() throws java.io.IOException { return super.executeUsingHead(); } @Override public com.google.api.client.http.HttpRequest buildHttpRequestUsingHead() throws java.io.IOException { return super.buildHttpRequestUsingHead(); } @Override public FetchLinkableRepositories set$Xgafv(java.lang.String $Xgafv) { return (FetchLinkableRepositories) super.set$Xgafv($Xgafv); } @Override public FetchLinkableRepositories setAccessToken(java.lang.String accessToken) { return (FetchLinkableRepositories) super.setAccessToken(accessToken); } @Override public FetchLinkableRepositories setAlt(java.lang.String alt) { return (FetchLinkableRepositories) super.setAlt(alt); } @Override public FetchLinkableRepositories setCallback(java.lang.String callback) { return (FetchLinkableRepositories) super.setCallback(callback); } @Override public FetchLinkableRepositories setFields(java.lang.String fields) { return (FetchLinkableRepositories) super.setFields(fields); } @Override public FetchLinkableRepositories setKey(java.lang.String key) { return (FetchLinkableRepositories) super.setKey(key); } @Override public FetchLinkableRepositories setOauthToken(java.lang.String oauthToken) { return (FetchLinkableRepositories) super.setOauthToken(oauthToken); } @Override public FetchLinkableRepositories setPrettyPrint(java.lang.Boolean prettyPrint) { return (FetchLinkableRepositories) super.setPrettyPrint(prettyPrint); } @Override public FetchLinkableRepositories setQuotaUser(java.lang.String quotaUser) { return (FetchLinkableRepositories) super.setQuotaUser(quotaUser); } @Override public FetchLinkableRepositories setUploadType(java.lang.String uploadType) { return (FetchLinkableRepositories) super.setUploadType(uploadType); } @Override public FetchLinkableRepositories setUploadProtocol(java.lang.String uploadProtocol) { return (FetchLinkableRepositories) super.setUploadProtocol(uploadProtocol); } /** Required. The name of the Connection. Format: `projects/locations/connections`. */ @com.google.api.client.util.Key private java.lang.String connection; /** Required. The name of the Connection. Format: `projects/locations/connections`. */ public java.lang.String getConnection() { return connection; } /** Required. The name of the Connection. Format: `projects/locations/connections`. */ public FetchLinkableRepositories setConnection(java.lang.String connection) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(CONNECTION_PATTERN.matcher(connection).matches(), "Parameter connection must conform to the pattern " + "^projects/[^/]+/locations/[^/]+/connections/[^/]+$"); } this.connection = connection; return this; } /** Number of results to return in the list. Default to 20. */ @com.google.api.client.util.Key private java.lang.Integer pageSize; /** Number of results to return in the list. Default to 20. */ public java.lang.Integer getPageSize() { return pageSize; } /** Number of results to return in the list. Default to 20. */ public FetchLinkableRepositories setPageSize(java.lang.Integer pageSize) { this.pageSize = pageSize; return this; } /** Page start. */ @com.google.api.client.util.Key private java.lang.String pageToken; /** Page start. */ public java.lang.String getPageToken() { return pageToken; } /** Page start. */ public FetchLinkableRepositories setPageToken(java.lang.String pageToken) { this.pageToken = pageToken; return this; } @Override public FetchLinkableRepositories set(String parameterName, Object value) { return (FetchLinkableRepositories) super.set(parameterName, value); } } /** * Gets details of a single connection. * * Create a request for the method "connections.get". * * This request holds the parameters needed by the cloudbuild server. After setting any optional * parameters, call the {@link Get#execute()} method to invoke the remote operation. * * @param name Required. The name of the Connection to retrieve. Format: `projects/locations/connections`. * @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 CloudBuildRequest { private static final String REST_PATH = "v2/{+name}"; private final java.util.regex.Pattern NAME_PATTERN = java.util.regex.Pattern.compile("^projects/[^/]+/locations/[^/]+/connections/[^/]+$"); /** * Gets details of a single connection. * * Create a request for the method "connections.get". * * This request holds the parameters needed by the the cloudbuild server. After setting any * optional parameters, call the {@link Get#execute()} method to invoke the remote operation.

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

* * @param name Required. The name of the Connection to retrieve. Format: `projects/locations/connections`. * @since 1.13 */ protected Get(java.lang.String name) { super(CloudBuild.this, "GET", REST_PATH, null, com.google.api.services.cloudbuild.v2.model.Connection.class); this.name = com.google.api.client.util.Preconditions.checkNotNull(name, "Required parameter name must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(NAME_PATTERN.matcher(name).matches(), "Parameter name must conform to the pattern " + "^projects/[^/]+/locations/[^/]+/connections/[^/]+$"); } } @Override public com.google.api.client.http.HttpResponse executeUsingHead() throws java.io.IOException { return super.executeUsingHead(); } @Override public com.google.api.client.http.HttpRequest buildHttpRequestUsingHead() throws java.io.IOException { return super.buildHttpRequestUsingHead(); } @Override public Get set$Xgafv(java.lang.String $Xgafv) { return (Get) super.set$Xgafv($Xgafv); } @Override public Get setAccessToken(java.lang.String accessToken) { return (Get) super.setAccessToken(accessToken); } @Override public Get setAlt(java.lang.String alt) { return (Get) super.setAlt(alt); } @Override public Get setCallback(java.lang.String callback) { return (Get) super.setCallback(callback); } @Override public Get setFields(java.lang.String fields) { return (Get) super.setFields(fields); } @Override public Get setKey(java.lang.String key) { return (Get) super.setKey(key); } @Override public Get setOauthToken(java.lang.String oauthToken) { return (Get) super.setOauthToken(oauthToken); } @Override public Get setPrettyPrint(java.lang.Boolean prettyPrint) { return (Get) super.setPrettyPrint(prettyPrint); } @Override public Get setQuotaUser(java.lang.String quotaUser) { return (Get) super.setQuotaUser(quotaUser); } @Override public Get setUploadType(java.lang.String uploadType) { return (Get) super.setUploadType(uploadType); } @Override public Get setUploadProtocol(java.lang.String uploadProtocol) { return (Get) super.setUploadProtocol(uploadProtocol); } /** * Required. The name of the Connection to retrieve. Format: * `projects/locations/connections`. */ @com.google.api.client.util.Key private java.lang.String name; /** Required. The name of the Connection to retrieve. Format: `projects/locations/connections`. */ public java.lang.String getName() { return name; } /** * Required. The name of the Connection to retrieve. Format: * `projects/locations/connections`. */ public Get setName(java.lang.String name) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(NAME_PATTERN.matcher(name).matches(), "Parameter name must conform to the pattern " + "^projects/[^/]+/locations/[^/]+/connections/[^/]+$"); } this.name = name; return this; } @Override public Get set(String parameterName, Object value) { return (Get) super.set(parameterName, value); } } /** * Gets the access control policy for a resource. Returns an empty policy if the resource exists and * does not have a policy set. * * Create a request for the method "connections.getIamPolicy". * * This request holds the parameters needed by the cloudbuild server. After setting any optional * parameters, call the {@link GetIamPolicy#execute()} method to invoke the remote operation. * * @param resource REQUIRED: The resource for which the policy is being requested. See [Resource * names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for * this field. * @return the request */ public GetIamPolicy getIamPolicy(java.lang.String resource) throws java.io.IOException { GetIamPolicy result = new GetIamPolicy(resource); initialize(result); return result; } public class GetIamPolicy extends CloudBuildRequest { private static final String REST_PATH = "v2/{+resource}:getIamPolicy"; private final java.util.regex.Pattern RESOURCE_PATTERN = java.util.regex.Pattern.compile("^projects/[^/]+/locations/[^/]+/connections/[^/]+$"); /** * Gets the access control policy for a resource. Returns an empty policy if the resource exists * and does not have a policy set. * * Create a request for the method "connections.getIamPolicy". * * This request holds the parameters needed by the the cloudbuild server. After setting any * optional parameters, call the {@link GetIamPolicy#execute()} method to invoke the remote * operation.

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

* * @param resource REQUIRED: The resource for which the policy is being requested. See [Resource * names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for * this field. * @since 1.13 */ protected GetIamPolicy(java.lang.String resource) { super(CloudBuild.this, "GET", REST_PATH, null, com.google.api.services.cloudbuild.v2.model.Policy.class); this.resource = com.google.api.client.util.Preconditions.checkNotNull(resource, "Required parameter resource must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(RESOURCE_PATTERN.matcher(resource).matches(), "Parameter resource must conform to the pattern " + "^projects/[^/]+/locations/[^/]+/connections/[^/]+$"); } } @Override public com.google.api.client.http.HttpResponse executeUsingHead() throws java.io.IOException { return super.executeUsingHead(); } @Override public com.google.api.client.http.HttpRequest buildHttpRequestUsingHead() throws java.io.IOException { return super.buildHttpRequestUsingHead(); } @Override public GetIamPolicy set$Xgafv(java.lang.String $Xgafv) { return (GetIamPolicy) super.set$Xgafv($Xgafv); } @Override public GetIamPolicy setAccessToken(java.lang.String accessToken) { return (GetIamPolicy) super.setAccessToken(accessToken); } @Override public GetIamPolicy setAlt(java.lang.String alt) { return (GetIamPolicy) super.setAlt(alt); } @Override public GetIamPolicy setCallback(java.lang.String callback) { return (GetIamPolicy) super.setCallback(callback); } @Override public GetIamPolicy setFields(java.lang.String fields) { return (GetIamPolicy) super.setFields(fields); } @Override public GetIamPolicy setKey(java.lang.String key) { return (GetIamPolicy) super.setKey(key); } @Override public GetIamPolicy setOauthToken(java.lang.String oauthToken) { return (GetIamPolicy) super.setOauthToken(oauthToken); } @Override public GetIamPolicy setPrettyPrint(java.lang.Boolean prettyPrint) { return (GetIamPolicy) super.setPrettyPrint(prettyPrint); } @Override public GetIamPolicy setQuotaUser(java.lang.String quotaUser) { return (GetIamPolicy) super.setQuotaUser(quotaUser); } @Override public GetIamPolicy setUploadType(java.lang.String uploadType) { return (GetIamPolicy) super.setUploadType(uploadType); } @Override public GetIamPolicy setUploadProtocol(java.lang.String uploadProtocol) { return (GetIamPolicy) super.setUploadProtocol(uploadProtocol); } /** * REQUIRED: The resource for which the policy is being requested. See [Resource * names](https://cloud.google.com/apis/design/resource_names) for the appropriate value * for this field. */ @com.google.api.client.util.Key private java.lang.String resource; /** REQUIRED: The resource for which the policy is being requested. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field. */ public java.lang.String getResource() { return resource; } /** * REQUIRED: The resource for which the policy is being requested. See [Resource * names](https://cloud.google.com/apis/design/resource_names) for the appropriate value * for this field. */ public GetIamPolicy setResource(java.lang.String resource) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(RESOURCE_PATTERN.matcher(resource).matches(), "Parameter resource must conform to the pattern " + "^projects/[^/]+/locations/[^/]+/connections/[^/]+$"); } this.resource = resource; return this; } /** * Optional. The maximum policy version that will be used to format the policy. Valid * values are 0, 1, and 3. Requests specifying an invalid value will be rejected. Requests * for policies with any conditional role bindings must specify version 3. Policies with * no conditional role bindings may specify any valid value or leave the field unset. The * policy in the response might use the policy version that you specified, or it might use * a lower policy version. For example, if you specify version 3, but the policy has no * conditional role bindings, the response uses version 1. To learn which resources * support conditions in their IAM policies, see the [IAM * documentation](https://cloud.google.com/iam/help/conditions/resource-policies). */ @com.google.api.client.util.Key("options.requestedPolicyVersion") private java.lang.Integer optionsRequestedPolicyVersion; /** Optional. The maximum policy version that will be used to format the policy. Valid values are 0, 1, and 3. Requests specifying an invalid value will be rejected. Requests for policies with any conditional role bindings must specify version 3. Policies with no conditional role bindings may specify any valid value or leave the field unset. The policy in the response might use the policy version that you specified, or it might use a lower policy version. For example, if you specify version 3, but the policy has no conditional role bindings, the response uses version 1. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies). */ public java.lang.Integer getOptionsRequestedPolicyVersion() { return optionsRequestedPolicyVersion; } /** * Optional. The maximum policy version that will be used to format the policy. Valid * values are 0, 1, and 3. Requests specifying an invalid value will be rejected. Requests * for policies with any conditional role bindings must specify version 3. Policies with * no conditional role bindings may specify any valid value or leave the field unset. The * policy in the response might use the policy version that you specified, or it might use * a lower policy version. For example, if you specify version 3, but the policy has no * conditional role bindings, the response uses version 1. To learn which resources * support conditions in their IAM policies, see the [IAM * documentation](https://cloud.google.com/iam/help/conditions/resource-policies). */ public GetIamPolicy setOptionsRequestedPolicyVersion(java.lang.Integer optionsRequestedPolicyVersion) { this.optionsRequestedPolicyVersion = optionsRequestedPolicyVersion; return this; } @Override public GetIamPolicy set(String parameterName, Object value) { return (GetIamPolicy) super.set(parameterName, value); } } /** * Lists Connections in a given project and location. * * Create a request for the method "connections.list". * * This request holds the parameters needed by the cloudbuild server. After setting any optional * parameters, call the {@link List#execute()} method to invoke the remote operation. * * @param parent Required. The parent, which owns this collection of Connections. Format: `projects/locations`. * @return the request */ public List list(java.lang.String parent) throws java.io.IOException { List result = new List(parent); initialize(result); return result; } public class List extends CloudBuildRequest { private static final String REST_PATH = "v2/{+parent}/connections"; private final java.util.regex.Pattern PARENT_PATTERN = java.util.regex.Pattern.compile("^projects/[^/]+/locations/[^/]+$"); /** * Lists Connections in a given project and location. * * Create a request for the method "connections.list". * * This request holds the parameters needed by the the cloudbuild server. After setting any * optional parameters, call the {@link List#execute()} method to invoke the remote operation.

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

* * @param parent Required. The parent, which owns this collection of Connections. Format: `projects/locations`. * @since 1.13 */ protected List(java.lang.String parent) { super(CloudBuild.this, "GET", REST_PATH, null, com.google.api.services.cloudbuild.v2.model.ListConnectionsResponse.class); this.parent = com.google.api.client.util.Preconditions.checkNotNull(parent, "Required parameter parent must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PARENT_PATTERN.matcher(parent).matches(), "Parameter parent must conform to the pattern " + "^projects/[^/]+/locations/[^/]+$"); } } @Override public com.google.api.client.http.HttpResponse executeUsingHead() throws java.io.IOException { return super.executeUsingHead(); } @Override public com.google.api.client.http.HttpRequest buildHttpRequestUsingHead() throws java.io.IOException { return super.buildHttpRequestUsingHead(); } @Override public List set$Xgafv(java.lang.String $Xgafv) { return (List) super.set$Xgafv($Xgafv); } @Override public List setAccessToken(java.lang.String accessToken) { return (List) super.setAccessToken(accessToken); } @Override public List setAlt(java.lang.String alt) { return (List) super.setAlt(alt); } @Override public List setCallback(java.lang.String callback) { return (List) super.setCallback(callback); } @Override public List setFields(java.lang.String fields) { return (List) super.setFields(fields); } @Override public List setKey(java.lang.String key) { return (List) super.setKey(key); } @Override public List setOauthToken(java.lang.String oauthToken) { return (List) super.setOauthToken(oauthToken); } @Override public List setPrettyPrint(java.lang.Boolean prettyPrint) { return (List) super.setPrettyPrint(prettyPrint); } @Override public List setQuotaUser(java.lang.String quotaUser) { return (List) super.setQuotaUser(quotaUser); } @Override public List setUploadType(java.lang.String uploadType) { return (List) super.setUploadType(uploadType); } @Override public List setUploadProtocol(java.lang.String uploadProtocol) { return (List) super.setUploadProtocol(uploadProtocol); } /** * Required. The parent, which owns this collection of Connections. Format: * `projects/locations`. */ @com.google.api.client.util.Key private java.lang.String parent; /** Required. The parent, which owns this collection of Connections. Format: `projects/locations`. */ public java.lang.String getParent() { return parent; } /** * Required. The parent, which owns this collection of Connections. Format: * `projects/locations`. */ public List setParent(java.lang.String parent) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PARENT_PATTERN.matcher(parent).matches(), "Parameter parent must conform to the pattern " + "^projects/[^/]+/locations/[^/]+$"); } this.parent = parent; return this; } /** Number of results to return in the list. */ @com.google.api.client.util.Key private java.lang.Integer pageSize; /** Number of results to return in the list. */ public java.lang.Integer getPageSize() { return pageSize; } /** Number of results to return in the list. */ public List setPageSize(java.lang.Integer pageSize) { this.pageSize = pageSize; return this; } /** Page start. */ @com.google.api.client.util.Key private java.lang.String pageToken; /** Page start. */ public java.lang.String getPageToken() { return pageToken; } /** Page start. */ public List setPageToken(java.lang.String pageToken) { this.pageToken = pageToken; return this; } @Override public List set(String parameterName, Object value) { return (List) super.set(parameterName, value); } } /** * Updates a single connection. * * Create a request for the method "connections.patch". * * This request holds the parameters needed by the cloudbuild server. After setting any optional * parameters, call the {@link Patch#execute()} method to invoke the remote operation. * * @param name Immutable. The resource name of the connection, in the format * `projects/{project}/locations/{location}/connections/{connection_id}`. * @param content the {@link com.google.api.services.cloudbuild.v2.model.Connection} * @return the request */ public Patch patch(java.lang.String name, com.google.api.services.cloudbuild.v2.model.Connection content) throws java.io.IOException { Patch result = new Patch(name, content); initialize(result); return result; } public class Patch extends CloudBuildRequest { private static final String REST_PATH = "v2/{+name}"; private final java.util.regex.Pattern NAME_PATTERN = java.util.regex.Pattern.compile("^projects/[^/]+/locations/[^/]+/connections/[^/]+$"); /** * Updates a single connection. * * Create a request for the method "connections.patch". * * This request holds the parameters needed by the the cloudbuild server. After setting any * optional parameters, call the {@link Patch#execute()} method to invoke the remote operation. *

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

* * @param name Immutable. The resource name of the connection, in the format * `projects/{project}/locations/{location}/connections/{connection_id}`. * @param content the {@link com.google.api.services.cloudbuild.v2.model.Connection} * @since 1.13 */ protected Patch(java.lang.String name, com.google.api.services.cloudbuild.v2.model.Connection content) { super(CloudBuild.this, "PATCH", REST_PATH, content, com.google.api.services.cloudbuild.v2.model.Operation.class); this.name = com.google.api.client.util.Preconditions.checkNotNull(name, "Required parameter name must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(NAME_PATTERN.matcher(name).matches(), "Parameter name must conform to the pattern " + "^projects/[^/]+/locations/[^/]+/connections/[^/]+$"); } } @Override public Patch set$Xgafv(java.lang.String $Xgafv) { return (Patch) super.set$Xgafv($Xgafv); } @Override public Patch setAccessToken(java.lang.String accessToken) { return (Patch) super.setAccessToken(accessToken); } @Override public Patch setAlt(java.lang.String alt) { return (Patch) super.setAlt(alt); } @Override public Patch setCallback(java.lang.String callback) { return (Patch) super.setCallback(callback); } @Override public Patch setFields(java.lang.String fields) { return (Patch) super.setFields(fields); } @Override public Patch setKey(java.lang.String key) { return (Patch) super.setKey(key); } @Override public Patch setOauthToken(java.lang.String oauthToken) { return (Patch) super.setOauthToken(oauthToken); } @Override public Patch setPrettyPrint(java.lang.Boolean prettyPrint) { return (Patch) super.setPrettyPrint(prettyPrint); } @Override public Patch setQuotaUser(java.lang.String quotaUser) { return (Patch) super.setQuotaUser(quotaUser); } @Override public Patch setUploadType(java.lang.String uploadType) { return (Patch) super.setUploadType(uploadType); } @Override public Patch setUploadProtocol(java.lang.String uploadProtocol) { return (Patch) super.setUploadProtocol(uploadProtocol); } /** * Immutable. The resource name of the connection, in the format * `projects/{project}/locations/{location}/connections/{connection_id}`. */ @com.google.api.client.util.Key private java.lang.String name; /** Immutable. The resource name of the connection, in the format `projects/{project}/locations/{location}/connections/{connection_id}`. */ public java.lang.String getName() { return name; } /** * Immutable. The resource name of the connection, in the format * `projects/{project}/locations/{location}/connections/{connection_id}`. */ public Patch setName(java.lang.String name) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(NAME_PATTERN.matcher(name).matches(), "Parameter name must conform to the pattern " + "^projects/[^/]+/locations/[^/]+/connections/[^/]+$"); } this.name = name; return this; } /** * If set to true, and the connection is not found a new connection will be created. In * this situation `update_mask` is ignored. The creation will succeed only if the input * connection has all the necessary information (e.g a github_config with both * user_oauth_token and installation_id properties). */ @com.google.api.client.util.Key private java.lang.Boolean allowMissing; /** If set to true, and the connection is not found a new connection will be created. In this situation `update_mask` is ignored. The creation will succeed only if the input connection has all the necessary information (e.g a github_config with both user_oauth_token and installation_id properties). */ public java.lang.Boolean getAllowMissing() { return allowMissing; } /** * If set to true, and the connection is not found a new connection will be created. In * this situation `update_mask` is ignored. The creation will succeed only if the input * connection has all the necessary information (e.g a github_config with both * user_oauth_token and installation_id properties). */ public Patch setAllowMissing(java.lang.Boolean allowMissing) { this.allowMissing = allowMissing; return this; } /** * The current etag of the connection. If an etag is provided and does not match the * current etag of the connection, update will be blocked and an ABORTED error will be * returned. */ @com.google.api.client.util.Key private java.lang.String etag; /** The current etag of the connection. If an etag is provided and does not match the current etag of the connection, update will be blocked and an ABORTED error will be returned. */ public java.lang.String getEtag() { return etag; } /** * The current etag of the connection. If an etag is provided and does not match the * current etag of the connection, update will be blocked and an ABORTED error will be * returned. */ public Patch setEtag(java.lang.String etag) { this.etag = etag; return this; } /** The list of fields to be updated. */ @com.google.api.client.util.Key private String updateMask; /** The list of fields to be updated. */ public String getUpdateMask() { return updateMask; } /** The list of fields to be updated. */ public Patch setUpdateMask(String updateMask) { this.updateMask = updateMask; return this; } @Override public Patch set(String parameterName, Object value) { return (Patch) super.set(parameterName, value); } } /** * ProcessWebhook is called by the external SCM for notifying of events. * * Create a request for the method "connections.processWebhook". * * This request holds the parameters needed by the cloudbuild server. After setting any optional * parameters, call the {@link ProcessWebhook#execute()} method to invoke the remote operation. * * @param parent Required. Project and location where the webhook will be received. Format: `projects/locations`. * @param content the {@link com.google.api.services.cloudbuild.v2.model.HttpBody} * @return the request */ public ProcessWebhook processWebhook(java.lang.String parent, com.google.api.services.cloudbuild.v2.model.HttpBody content) throws java.io.IOException { ProcessWebhook result = new ProcessWebhook(parent, content); initialize(result); return result; } public class ProcessWebhook extends CloudBuildRequest { private static final String REST_PATH = "v2/{+parent}/connections:processWebhook"; private final java.util.regex.Pattern PARENT_PATTERN = java.util.regex.Pattern.compile("^projects/[^/]+/locations/[^/]+$"); /** * ProcessWebhook is called by the external SCM for notifying of events. * * Create a request for the method "connections.processWebhook". * * This request holds the parameters needed by the the cloudbuild server. After setting any * optional parameters, call the {@link ProcessWebhook#execute()} method to invoke the remote * operation.

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

* * @param parent Required. Project and location where the webhook will be received. Format: `projects/locations`. * @param content the {@link com.google.api.services.cloudbuild.v2.model.HttpBody} * @since 1.13 */ protected ProcessWebhook(java.lang.String parent, com.google.api.services.cloudbuild.v2.model.HttpBody content) { super(CloudBuild.this, "POST", REST_PATH, content, com.google.api.services.cloudbuild.v2.model.Empty.class); this.parent = com.google.api.client.util.Preconditions.checkNotNull(parent, "Required parameter parent must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PARENT_PATTERN.matcher(parent).matches(), "Parameter parent must conform to the pattern " + "^projects/[^/]+/locations/[^/]+$"); } } @Override public ProcessWebhook set$Xgafv(java.lang.String $Xgafv) { return (ProcessWebhook) super.set$Xgafv($Xgafv); } @Override public ProcessWebhook setAccessToken(java.lang.String accessToken) { return (ProcessWebhook) super.setAccessToken(accessToken); } @Override public ProcessWebhook setAlt(java.lang.String alt) { return (ProcessWebhook) super.setAlt(alt); } @Override public ProcessWebhook setCallback(java.lang.String callback) { return (ProcessWebhook) super.setCallback(callback); } @Override public ProcessWebhook setFields(java.lang.String fields) { return (ProcessWebhook) super.setFields(fields); } @Override public ProcessWebhook setKey(java.lang.String key) { return (ProcessWebhook) super.setKey(key); } @Override public ProcessWebhook setOauthToken(java.lang.String oauthToken) { return (ProcessWebhook) super.setOauthToken(oauthToken); } @Override public ProcessWebhook setPrettyPrint(java.lang.Boolean prettyPrint) { return (ProcessWebhook) super.setPrettyPrint(prettyPrint); } @Override public ProcessWebhook setQuotaUser(java.lang.String quotaUser) { return (ProcessWebhook) super.setQuotaUser(quotaUser); } @Override public ProcessWebhook setUploadType(java.lang.String uploadType) { return (ProcessWebhook) super.setUploadType(uploadType); } @Override public ProcessWebhook setUploadProtocol(java.lang.String uploadProtocol) { return (ProcessWebhook) super.setUploadProtocol(uploadProtocol); } /** * Required. Project and location where the webhook will be received. Format: * `projects/locations`. */ @com.google.api.client.util.Key private java.lang.String parent; /** Required. Project and location where the webhook will be received. Format: `projects/locations`. */ public java.lang.String getParent() { return parent; } /** * Required. Project and location where the webhook will be received. Format: * `projects/locations`. */ public ProcessWebhook setParent(java.lang.String parent) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PARENT_PATTERN.matcher(parent).matches(), "Parameter parent must conform to the pattern " + "^projects/[^/]+/locations/[^/]+$"); } this.parent = parent; return this; } /** * Arbitrary additional key to find the maching repository for a webhook event if needed. */ @com.google.api.client.util.Key private java.lang.String webhookKey; /** Arbitrary additional key to find the maching repository for a webhook event if needed. */ public java.lang.String getWebhookKey() { return webhookKey; } /** * Arbitrary additional key to find the maching repository for a webhook event if needed. */ public ProcessWebhook setWebhookKey(java.lang.String webhookKey) { this.webhookKey = webhookKey; return this; } @Override public ProcessWebhook set(String parameterName, Object value) { return (ProcessWebhook) super.set(parameterName, value); } } /** * Sets the access control policy on the specified resource. Replaces any existing policy. Can * return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED` errors. * * Create a request for the method "connections.setIamPolicy". * * This request holds the parameters needed by the cloudbuild server. After setting any optional * parameters, call the {@link SetIamPolicy#execute()} method to invoke the remote operation. * * @param resource REQUIRED: The resource for which the policy is being specified. See [Resource * names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for * this field. * @param content the {@link com.google.api.services.cloudbuild.v2.model.SetIamPolicyRequest} * @return the request */ public SetIamPolicy setIamPolicy(java.lang.String resource, com.google.api.services.cloudbuild.v2.model.SetIamPolicyRequest content) throws java.io.IOException { SetIamPolicy result = new SetIamPolicy(resource, content); initialize(result); return result; } public class SetIamPolicy extends CloudBuildRequest { private static final String REST_PATH = "v2/{+resource}:setIamPolicy"; private final java.util.regex.Pattern RESOURCE_PATTERN = java.util.regex.Pattern.compile("^projects/[^/]+/locations/[^/]+/connections/[^/]+$"); /** * Sets the access control policy on the specified resource. Replaces any existing policy. Can * return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED` errors. * * Create a request for the method "connections.setIamPolicy". * * This request holds the parameters needed by the the cloudbuild server. After setting any * optional parameters, call the {@link SetIamPolicy#execute()} method to invoke the remote * operation.

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

* * @param resource REQUIRED: The resource for which the policy is being specified. See [Resource * names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for * this field. * @param content the {@link com.google.api.services.cloudbuild.v2.model.SetIamPolicyRequest} * @since 1.13 */ protected SetIamPolicy(java.lang.String resource, com.google.api.services.cloudbuild.v2.model.SetIamPolicyRequest content) { super(CloudBuild.this, "POST", REST_PATH, content, com.google.api.services.cloudbuild.v2.model.Policy.class); this.resource = com.google.api.client.util.Preconditions.checkNotNull(resource, "Required parameter resource must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(RESOURCE_PATTERN.matcher(resource).matches(), "Parameter resource must conform to the pattern " + "^projects/[^/]+/locations/[^/]+/connections/[^/]+$"); } } @Override public SetIamPolicy set$Xgafv(java.lang.String $Xgafv) { return (SetIamPolicy) super.set$Xgafv($Xgafv); } @Override public SetIamPolicy setAccessToken(java.lang.String accessToken) { return (SetIamPolicy) super.setAccessToken(accessToken); } @Override public SetIamPolicy setAlt(java.lang.String alt) { return (SetIamPolicy) super.setAlt(alt); } @Override public SetIamPolicy setCallback(java.lang.String callback) { return (SetIamPolicy) super.setCallback(callback); } @Override public SetIamPolicy setFields(java.lang.String fields) { return (SetIamPolicy) super.setFields(fields); } @Override public SetIamPolicy setKey(java.lang.String key) { return (SetIamPolicy) super.setKey(key); } @Override public SetIamPolicy setOauthToken(java.lang.String oauthToken) { return (SetIamPolicy) super.setOauthToken(oauthToken); } @Override public SetIamPolicy setPrettyPrint(java.lang.Boolean prettyPrint) { return (SetIamPolicy) super.setPrettyPrint(prettyPrint); } @Override public SetIamPolicy setQuotaUser(java.lang.String quotaUser) { return (SetIamPolicy) super.setQuotaUser(quotaUser); } @Override public SetIamPolicy setUploadType(java.lang.String uploadType) { return (SetIamPolicy) super.setUploadType(uploadType); } @Override public SetIamPolicy setUploadProtocol(java.lang.String uploadProtocol) { return (SetIamPolicy) super.setUploadProtocol(uploadProtocol); } /** * REQUIRED: The resource for which the policy is being specified. See [Resource * names](https://cloud.google.com/apis/design/resource_names) for the appropriate value * for this field. */ @com.google.api.client.util.Key private java.lang.String resource; /** REQUIRED: The resource for which the policy is being specified. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field. */ public java.lang.String getResource() { return resource; } /** * REQUIRED: The resource for which the policy is being specified. See [Resource * names](https://cloud.google.com/apis/design/resource_names) for the appropriate value * for this field. */ public SetIamPolicy setResource(java.lang.String resource) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(RESOURCE_PATTERN.matcher(resource).matches(), "Parameter resource must conform to the pattern " + "^projects/[^/]+/locations/[^/]+/connections/[^/]+$"); } this.resource = resource; return this; } @Override public SetIamPolicy set(String parameterName, Object value) { return (SetIamPolicy) super.set(parameterName, value); } } /** * Returns permissions that a caller has on the specified resource. If the resource does not exist, * this will return an empty set of permissions, not a `NOT_FOUND` error. Note: This operation is * designed to be used for building permission-aware UIs and command-line tools, not for * authorization checking. This operation may "fail open" without warning. * * Create a request for the method "connections.testIamPermissions". * * This request holds the parameters needed by the cloudbuild server. After setting any optional * parameters, call the {@link TestIamPermissions#execute()} method to invoke the remote operation. * * @param resource REQUIRED: The resource for which the policy detail is being requested. See [Resource * names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for * this field. * @param content the {@link com.google.api.services.cloudbuild.v2.model.TestIamPermissionsRequest} * @return the request */ public TestIamPermissions testIamPermissions(java.lang.String resource, com.google.api.services.cloudbuild.v2.model.TestIamPermissionsRequest content) throws java.io.IOException { TestIamPermissions result = new TestIamPermissions(resource, content); initialize(result); return result; } public class TestIamPermissions extends CloudBuildRequest { private static final String REST_PATH = "v2/{+resource}:testIamPermissions"; private final java.util.regex.Pattern RESOURCE_PATTERN = java.util.regex.Pattern.compile("^projects/[^/]+/locations/[^/]+/connections/[^/]+$"); /** * Returns permissions that a caller has on the specified resource. If the resource does not * exist, this will return an empty set of permissions, not a `NOT_FOUND` error. Note: This * operation is designed to be used for building permission-aware UIs and command-line tools, not * for authorization checking. This operation may "fail open" without warning. * * Create a request for the method "connections.testIamPermissions". * * This request holds the parameters needed by the the cloudbuild server. After setting any * optional parameters, call the {@link TestIamPermissions#execute()} method to invoke the remote * operation.

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

* * @param resource REQUIRED: The resource for which the policy detail is being requested. See [Resource * names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for * this field. * @param content the {@link com.google.api.services.cloudbuild.v2.model.TestIamPermissionsRequest} * @since 1.13 */ protected TestIamPermissions(java.lang.String resource, com.google.api.services.cloudbuild.v2.model.TestIamPermissionsRequest content) { super(CloudBuild.this, "POST", REST_PATH, content, com.google.api.services.cloudbuild.v2.model.TestIamPermissionsResponse.class); this.resource = com.google.api.client.util.Preconditions.checkNotNull(resource, "Required parameter resource must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(RESOURCE_PATTERN.matcher(resource).matches(), "Parameter resource must conform to the pattern " + "^projects/[^/]+/locations/[^/]+/connections/[^/]+$"); } } @Override public TestIamPermissions set$Xgafv(java.lang.String $Xgafv) { return (TestIamPermissions) super.set$Xgafv($Xgafv); } @Override public TestIamPermissions setAccessToken(java.lang.String accessToken) { return (TestIamPermissions) super.setAccessToken(accessToken); } @Override public TestIamPermissions setAlt(java.lang.String alt) { return (TestIamPermissions) super.setAlt(alt); } @Override public TestIamPermissions setCallback(java.lang.String callback) { return (TestIamPermissions) super.setCallback(callback); } @Override public TestIamPermissions setFields(java.lang.String fields) { return (TestIamPermissions) super.setFields(fields); } @Override public TestIamPermissions setKey(java.lang.String key) { return (TestIamPermissions) super.setKey(key); } @Override public TestIamPermissions setOauthToken(java.lang.String oauthToken) { return (TestIamPermissions) super.setOauthToken(oauthToken); } @Override public TestIamPermissions setPrettyPrint(java.lang.Boolean prettyPrint) { return (TestIamPermissions) super.setPrettyPrint(prettyPrint); } @Override public TestIamPermissions setQuotaUser(java.lang.String quotaUser) { return (TestIamPermissions) super.setQuotaUser(quotaUser); } @Override public TestIamPermissions setUploadType(java.lang.String uploadType) { return (TestIamPermissions) super.setUploadType(uploadType); } @Override public TestIamPermissions setUploadProtocol(java.lang.String uploadProtocol) { return (TestIamPermissions) super.setUploadProtocol(uploadProtocol); } /** * REQUIRED: The resource for which the policy detail is being requested. See [Resource * names](https://cloud.google.com/apis/design/resource_names) for the appropriate value * for this field. */ @com.google.api.client.util.Key private java.lang.String resource; /** REQUIRED: The resource for which the policy detail is being requested. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field. */ public java.lang.String getResource() { return resource; } /** * REQUIRED: The resource for which the policy detail is being requested. See [Resource * names](https://cloud.google.com/apis/design/resource_names) for the appropriate value * for this field. */ public TestIamPermissions setResource(java.lang.String resource) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(RESOURCE_PATTERN.matcher(resource).matches(), "Parameter resource must conform to the pattern " + "^projects/[^/]+/locations/[^/]+/connections/[^/]+$"); } this.resource = resource; return this; } @Override public TestIamPermissions set(String parameterName, Object value) { return (TestIamPermissions) super.set(parameterName, value); } } /** * An accessor for creating requests from the Repositories collection. * *

The typical use is:

*
         *   {@code CloudBuild cloudbuild = new CloudBuild(...);}
         *   {@code CloudBuild.Repositories.List request = cloudbuild.repositories().list(parameters ...)}
         * 
* * @return the resource collection */ public Repositories repositories() { return new Repositories(); } /** * The "repositories" collection of methods. */ public class Repositories { /** * Fetches read token of a given repository. * * Create a request for the method "repositories.accessReadToken". * * This request holds the parameters needed by the cloudbuild server. After setting any optional * parameters, call the {@link AccessReadToken#execute()} method to invoke the remote operation. * * @param repository Required. The resource name of the repository in the format * `projects/locations/connections/repositories`. * @param content the {@link com.google.api.services.cloudbuild.v2.model.FetchReadTokenRequest} * @return the request */ public AccessReadToken accessReadToken(java.lang.String repository, com.google.api.services.cloudbuild.v2.model.FetchReadTokenRequest content) throws java.io.IOException { AccessReadToken result = new AccessReadToken(repository, content); initialize(result); return result; } public class AccessReadToken extends CloudBuildRequest { private static final String REST_PATH = "v2/{+repository}:accessReadToken"; private final java.util.regex.Pattern REPOSITORY_PATTERN = java.util.regex.Pattern.compile("^projects/[^/]+/locations/[^/]+/connections/[^/]+/repositories/[^/]+$"); /** * Fetches read token of a given repository. * * Create a request for the method "repositories.accessReadToken". * * This request holds the parameters needed by the the cloudbuild server. After setting any * optional parameters, call the {@link AccessReadToken#execute()} method to invoke the remote * operation.

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

* * @param repository Required. The resource name of the repository in the format * `projects/locations/connections/repositories`. * @param content the {@link com.google.api.services.cloudbuild.v2.model.FetchReadTokenRequest} * @since 1.13 */ protected AccessReadToken(java.lang.String repository, com.google.api.services.cloudbuild.v2.model.FetchReadTokenRequest content) { super(CloudBuild.this, "POST", REST_PATH, content, com.google.api.services.cloudbuild.v2.model.FetchReadTokenResponse.class); this.repository = com.google.api.client.util.Preconditions.checkNotNull(repository, "Required parameter repository must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(REPOSITORY_PATTERN.matcher(repository).matches(), "Parameter repository must conform to the pattern " + "^projects/[^/]+/locations/[^/]+/connections/[^/]+/repositories/[^/]+$"); } } @Override public AccessReadToken set$Xgafv(java.lang.String $Xgafv) { return (AccessReadToken) super.set$Xgafv($Xgafv); } @Override public AccessReadToken setAccessToken(java.lang.String accessToken) { return (AccessReadToken) super.setAccessToken(accessToken); } @Override public AccessReadToken setAlt(java.lang.String alt) { return (AccessReadToken) super.setAlt(alt); } @Override public AccessReadToken setCallback(java.lang.String callback) { return (AccessReadToken) super.setCallback(callback); } @Override public AccessReadToken setFields(java.lang.String fields) { return (AccessReadToken) super.setFields(fields); } @Override public AccessReadToken setKey(java.lang.String key) { return (AccessReadToken) super.setKey(key); } @Override public AccessReadToken setOauthToken(java.lang.String oauthToken) { return (AccessReadToken) super.setOauthToken(oauthToken); } @Override public AccessReadToken setPrettyPrint(java.lang.Boolean prettyPrint) { return (AccessReadToken) super.setPrettyPrint(prettyPrint); } @Override public AccessReadToken setQuotaUser(java.lang.String quotaUser) { return (AccessReadToken) super.setQuotaUser(quotaUser); } @Override public AccessReadToken setUploadType(java.lang.String uploadType) { return (AccessReadToken) super.setUploadType(uploadType); } @Override public AccessReadToken setUploadProtocol(java.lang.String uploadProtocol) { return (AccessReadToken) super.setUploadProtocol(uploadProtocol); } /** * Required. The resource name of the repository in the format * `projects/locations/connections/repositories`. */ @com.google.api.client.util.Key private java.lang.String repository; /** Required. The resource name of the repository in the format `projects/locations/connections/repositories`. */ public java.lang.String getRepository() { return repository; } /** * Required. The resource name of the repository in the format * `projects/locations/connections/repositories`. */ public AccessReadToken setRepository(java.lang.String repository) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(REPOSITORY_PATTERN.matcher(repository).matches(), "Parameter repository must conform to the pattern " + "^projects/[^/]+/locations/[^/]+/connections/[^/]+/repositories/[^/]+$"); } this.repository = repository; return this; } @Override public AccessReadToken set(String parameterName, Object value) { return (AccessReadToken) super.set(parameterName, value); } } /** * Fetches read/write token of a given repository. * * Create a request for the method "repositories.accessReadWriteToken". * * This request holds the parameters needed by the cloudbuild server. After setting any optional * parameters, call the {@link AccessReadWriteToken#execute()} method to invoke the remote * operation. * * @param repository Required. The resource name of the repository in the format * `projects/locations/connections/repositories`. * @param content the {@link com.google.api.services.cloudbuild.v2.model.FetchReadWriteTokenRequest} * @return the request */ public AccessReadWriteToken accessReadWriteToken(java.lang.String repository, com.google.api.services.cloudbuild.v2.model.FetchReadWriteTokenRequest content) throws java.io.IOException { AccessReadWriteToken result = new AccessReadWriteToken(repository, content); initialize(result); return result; } public class AccessReadWriteToken extends CloudBuildRequest { private static final String REST_PATH = "v2/{+repository}:accessReadWriteToken"; private final java.util.regex.Pattern REPOSITORY_PATTERN = java.util.regex.Pattern.compile("^projects/[^/]+/locations/[^/]+/connections/[^/]+/repositories/[^/]+$"); /** * Fetches read/write token of a given repository. * * Create a request for the method "repositories.accessReadWriteToken". * * This request holds the parameters needed by the the cloudbuild server. After setting any * optional parameters, call the {@link AccessReadWriteToken#execute()} method to invoke the * remote operation.

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

* * @param repository Required. The resource name of the repository in the format * `projects/locations/connections/repositories`. * @param content the {@link com.google.api.services.cloudbuild.v2.model.FetchReadWriteTokenRequest} * @since 1.13 */ protected AccessReadWriteToken(java.lang.String repository, com.google.api.services.cloudbuild.v2.model.FetchReadWriteTokenRequest content) { super(CloudBuild.this, "POST", REST_PATH, content, com.google.api.services.cloudbuild.v2.model.FetchReadWriteTokenResponse.class); this.repository = com.google.api.client.util.Preconditions.checkNotNull(repository, "Required parameter repository must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(REPOSITORY_PATTERN.matcher(repository).matches(), "Parameter repository must conform to the pattern " + "^projects/[^/]+/locations/[^/]+/connections/[^/]+/repositories/[^/]+$"); } } @Override public AccessReadWriteToken set$Xgafv(java.lang.String $Xgafv) { return (AccessReadWriteToken) super.set$Xgafv($Xgafv); } @Override public AccessReadWriteToken setAccessToken(java.lang.String accessToken) { return (AccessReadWriteToken) super.setAccessToken(accessToken); } @Override public AccessReadWriteToken setAlt(java.lang.String alt) { return (AccessReadWriteToken) super.setAlt(alt); } @Override public AccessReadWriteToken setCallback(java.lang.String callback) { return (AccessReadWriteToken) super.setCallback(callback); } @Override public AccessReadWriteToken setFields(java.lang.String fields) { return (AccessReadWriteToken) super.setFields(fields); } @Override public AccessReadWriteToken setKey(java.lang.String key) { return (AccessReadWriteToken) super.setKey(key); } @Override public AccessReadWriteToken setOauthToken(java.lang.String oauthToken) { return (AccessReadWriteToken) super.setOauthToken(oauthToken); } @Override public AccessReadWriteToken setPrettyPrint(java.lang.Boolean prettyPrint) { return (AccessReadWriteToken) super.setPrettyPrint(prettyPrint); } @Override public AccessReadWriteToken setQuotaUser(java.lang.String quotaUser) { return (AccessReadWriteToken) super.setQuotaUser(quotaUser); } @Override public AccessReadWriteToken setUploadType(java.lang.String uploadType) { return (AccessReadWriteToken) super.setUploadType(uploadType); } @Override public AccessReadWriteToken setUploadProtocol(java.lang.String uploadProtocol) { return (AccessReadWriteToken) super.setUploadProtocol(uploadProtocol); } /** * Required. The resource name of the repository in the format * `projects/locations/connections/repositories`. */ @com.google.api.client.util.Key private java.lang.String repository; /** Required. The resource name of the repository in the format `projects/locations/connections/repositories`. */ public java.lang.String getRepository() { return repository; } /** * Required. The resource name of the repository in the format * `projects/locations/connections/repositories`. */ public AccessReadWriteToken setRepository(java.lang.String repository) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(REPOSITORY_PATTERN.matcher(repository).matches(), "Parameter repository must conform to the pattern " + "^projects/[^/]+/locations/[^/]+/connections/[^/]+/repositories/[^/]+$"); } this.repository = repository; return this; } @Override public AccessReadWriteToken set(String parameterName, Object value) { return (AccessReadWriteToken) super.set(parameterName, value); } } /** * Creates multiple repositories inside a connection. * * Create a request for the method "repositories.batchCreate". * * This request holds the parameters needed by the cloudbuild server. After setting any optional * parameters, call the {@link BatchCreate#execute()} method to invoke the remote operation. * * @param parent Required. The connection to contain all the repositories being created. Format: * projects/locations/connections The parent field in the CreateRepositoryRequest messages * must either be empty or match this field. * @param content the {@link com.google.api.services.cloudbuild.v2.model.BatchCreateRepositoriesRequest} * @return the request */ public BatchCreate batchCreate(java.lang.String parent, com.google.api.services.cloudbuild.v2.model.BatchCreateRepositoriesRequest content) throws java.io.IOException { BatchCreate result = new BatchCreate(parent, content); initialize(result); return result; } public class BatchCreate extends CloudBuildRequest { private static final String REST_PATH = "v2/{+parent}/repositories:batchCreate"; private final java.util.regex.Pattern PARENT_PATTERN = java.util.regex.Pattern.compile("^projects/[^/]+/locations/[^/]+/connections/[^/]+$"); /** * Creates multiple repositories inside a connection. * * Create a request for the method "repositories.batchCreate". * * This request holds the parameters needed by the the cloudbuild server. After setting any * optional parameters, call the {@link BatchCreate#execute()} method to invoke the remote * operation.

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

* * @param parent Required. The connection to contain all the repositories being created. Format: * projects/locations/connections The parent field in the CreateRepositoryRequest messages * must either be empty or match this field. * @param content the {@link com.google.api.services.cloudbuild.v2.model.BatchCreateRepositoriesRequest} * @since 1.13 */ protected BatchCreate(java.lang.String parent, com.google.api.services.cloudbuild.v2.model.BatchCreateRepositoriesRequest content) { super(CloudBuild.this, "POST", REST_PATH, content, com.google.api.services.cloudbuild.v2.model.Operation.class); this.parent = com.google.api.client.util.Preconditions.checkNotNull(parent, "Required parameter parent must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PARENT_PATTERN.matcher(parent).matches(), "Parameter parent must conform to the pattern " + "^projects/[^/]+/locations/[^/]+/connections/[^/]+$"); } } @Override public BatchCreate set$Xgafv(java.lang.String $Xgafv) { return (BatchCreate) super.set$Xgafv($Xgafv); } @Override public BatchCreate setAccessToken(java.lang.String accessToken) { return (BatchCreate) super.setAccessToken(accessToken); } @Override public BatchCreate setAlt(java.lang.String alt) { return (BatchCreate) super.setAlt(alt); } @Override public BatchCreate setCallback(java.lang.String callback) { return (BatchCreate) super.setCallback(callback); } @Override public BatchCreate setFields(java.lang.String fields) { return (BatchCreate) super.setFields(fields); } @Override public BatchCreate setKey(java.lang.String key) { return (BatchCreate) super.setKey(key); } @Override public BatchCreate setOauthToken(java.lang.String oauthToken) { return (BatchCreate) super.setOauthToken(oauthToken); } @Override public BatchCreate setPrettyPrint(java.lang.Boolean prettyPrint) { return (BatchCreate) super.setPrettyPrint(prettyPrint); } @Override public BatchCreate setQuotaUser(java.lang.String quotaUser) { return (BatchCreate) super.setQuotaUser(quotaUser); } @Override public BatchCreate setUploadType(java.lang.String uploadType) { return (BatchCreate) super.setUploadType(uploadType); } @Override public BatchCreate setUploadProtocol(java.lang.String uploadProtocol) { return (BatchCreate) super.setUploadProtocol(uploadProtocol); } /** * Required. The connection to contain all the repositories being created. Format: * projects/locations/connections The parent field in the CreateRepositoryRequest * messages must either be empty or match this field. */ @com.google.api.client.util.Key private java.lang.String parent; /** Required. The connection to contain all the repositories being created. Format: projects/locations/connections The parent field in the CreateRepositoryRequest messages must either be empty or match this field. */ public java.lang.String getParent() { return parent; } /** * Required. The connection to contain all the repositories being created. Format: * projects/locations/connections The parent field in the CreateRepositoryRequest * messages must either be empty or match this field. */ public BatchCreate setParent(java.lang.String parent) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PARENT_PATTERN.matcher(parent).matches(), "Parameter parent must conform to the pattern " + "^projects/[^/]+/locations/[^/]+/connections/[^/]+$"); } this.parent = parent; return this; } @Override public BatchCreate set(String parameterName, Object value) { return (BatchCreate) super.set(parameterName, value); } } /** * Creates a Repository. * * Create a request for the method "repositories.create". * * This request holds the parameters needed by the cloudbuild server. After setting any optional * parameters, call the {@link Create#execute()} method to invoke the remote operation. * * @param parent Required. The connection to contain the repository. If the request is part of a * BatchCreateRepositoriesRequest, this field should be empty or match the parent specified * there. * @param content the {@link com.google.api.services.cloudbuild.v2.model.Repository} * @return the request */ public Create create(java.lang.String parent, com.google.api.services.cloudbuild.v2.model.Repository content) throws java.io.IOException { Create result = new Create(parent, content); initialize(result); return result; } public class Create extends CloudBuildRequest { private static final String REST_PATH = "v2/{+parent}/repositories"; private final java.util.regex.Pattern PARENT_PATTERN = java.util.regex.Pattern.compile("^projects/[^/]+/locations/[^/]+/connections/[^/]+$"); /** * Creates a Repository. * * Create a request for the method "repositories.create". * * This request holds the parameters needed by the the cloudbuild server. After setting any * optional parameters, call the {@link Create#execute()} method to invoke the remote operation. *

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

* * @param parent Required. The connection to contain the repository. If the request is part of a * BatchCreateRepositoriesRequest, this field should be empty or match the parent specified * there. * @param content the {@link com.google.api.services.cloudbuild.v2.model.Repository} * @since 1.13 */ protected Create(java.lang.String parent, com.google.api.services.cloudbuild.v2.model.Repository content) { super(CloudBuild.this, "POST", REST_PATH, content, com.google.api.services.cloudbuild.v2.model.Operation.class); this.parent = com.google.api.client.util.Preconditions.checkNotNull(parent, "Required parameter parent must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PARENT_PATTERN.matcher(parent).matches(), "Parameter parent must conform to the pattern " + "^projects/[^/]+/locations/[^/]+/connections/[^/]+$"); } } @Override public Create set$Xgafv(java.lang.String $Xgafv) { return (Create) super.set$Xgafv($Xgafv); } @Override public Create setAccessToken(java.lang.String accessToken) { return (Create) super.setAccessToken(accessToken); } @Override public Create setAlt(java.lang.String alt) { return (Create) super.setAlt(alt); } @Override public Create setCallback(java.lang.String callback) { return (Create) super.setCallback(callback); } @Override public Create setFields(java.lang.String fields) { return (Create) super.setFields(fields); } @Override public Create setKey(java.lang.String key) { return (Create) super.setKey(key); } @Override public Create setOauthToken(java.lang.String oauthToken) { return (Create) super.setOauthToken(oauthToken); } @Override public Create setPrettyPrint(java.lang.Boolean prettyPrint) { return (Create) super.setPrettyPrint(prettyPrint); } @Override public Create setQuotaUser(java.lang.String quotaUser) { return (Create) super.setQuotaUser(quotaUser); } @Override public Create setUploadType(java.lang.String uploadType) { return (Create) super.setUploadType(uploadType); } @Override public Create setUploadProtocol(java.lang.String uploadProtocol) { return (Create) super.setUploadProtocol(uploadProtocol); } /** * Required. The connection to contain the repository. If the request is part of a * BatchCreateRepositoriesRequest, this field should be empty or match the parent * specified there. */ @com.google.api.client.util.Key private java.lang.String parent; /** Required. The connection to contain the repository. If the request is part of a BatchCreateRepositoriesRequest, this field should be empty or match the parent specified there. */ public java.lang.String getParent() { return parent; } /** * Required. The connection to contain the repository. If the request is part of a * BatchCreateRepositoriesRequest, this field should be empty or match the parent * specified there. */ public Create setParent(java.lang.String parent) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PARENT_PATTERN.matcher(parent).matches(), "Parameter parent must conform to the pattern " + "^projects/[^/]+/locations/[^/]+/connections/[^/]+$"); } this.parent = parent; return this; } /** * Required. The ID to use for the repository, which will become the final component of * the repository's resource name. This ID should be unique in the connection. Allows * alphanumeric characters and any of -._~%!$&'()*+,;=@. */ @com.google.api.client.util.Key private java.lang.String repositoryId; /** Required. The ID to use for the repository, which will become the final component of the repository's resource name. This ID should be unique in the connection. Allows alphanumeric characters and any of -._~%!$&'()*+,;=@. */ public java.lang.String getRepositoryId() { return repositoryId; } /** * Required. The ID to use for the repository, which will become the final component of * the repository's resource name. This ID should be unique in the connection. Allows * alphanumeric characters and any of -._~%!$&'()*+,;=@. */ public Create setRepositoryId(java.lang.String repositoryId) { this.repositoryId = repositoryId; return this; } @Override public Create set(String parameterName, Object value) { return (Create) super.set(parameterName, value); } } /** * Deletes a single repository. * * Create a request for the method "repositories.delete". * * This request holds the parameters needed by the cloudbuild server. After setting any optional * parameters, call the {@link Delete#execute()} method to invoke the remote operation. * * @param name Required. The name of the Repository to delete. Format: * `projects/locations/connections/repositories`. * @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 CloudBuildRequest { private static final String REST_PATH = "v2/{+name}"; private final java.util.regex.Pattern NAME_PATTERN = java.util.regex.Pattern.compile("^projects/[^/]+/locations/[^/]+/connections/[^/]+/repositories/[^/]+$"); /** * Deletes a single repository. * * Create a request for the method "repositories.delete". * * This request holds the parameters needed by the the cloudbuild server. After setting any * optional parameters, call the {@link Delete#execute()} method to invoke the remote operation. *

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

* * @param name Required. The name of the Repository to delete. Format: * `projects/locations/connections/repositories`. * @since 1.13 */ protected Delete(java.lang.String name) { super(CloudBuild.this, "DELETE", REST_PATH, null, com.google.api.services.cloudbuild.v2.model.Operation.class); this.name = com.google.api.client.util.Preconditions.checkNotNull(name, "Required parameter name must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(NAME_PATTERN.matcher(name).matches(), "Parameter name must conform to the pattern " + "^projects/[^/]+/locations/[^/]+/connections/[^/]+/repositories/[^/]+$"); } } @Override public Delete set$Xgafv(java.lang.String $Xgafv) { return (Delete) super.set$Xgafv($Xgafv); } @Override public Delete setAccessToken(java.lang.String accessToken) { return (Delete) super.setAccessToken(accessToken); } @Override public Delete setAlt(java.lang.String alt) { return (Delete) super.setAlt(alt); } @Override public Delete setCallback(java.lang.String callback) { return (Delete) super.setCallback(callback); } @Override public Delete setFields(java.lang.String fields) { return (Delete) super.setFields(fields); } @Override public Delete setKey(java.lang.String key) { return (Delete) super.setKey(key); } @Override public Delete setOauthToken(java.lang.String oauthToken) { return (Delete) super.setOauthToken(oauthToken); } @Override public Delete setPrettyPrint(java.lang.Boolean prettyPrint) { return (Delete) super.setPrettyPrint(prettyPrint); } @Override public Delete setQuotaUser(java.lang.String quotaUser) { return (Delete) super.setQuotaUser(quotaUser); } @Override public Delete setUploadType(java.lang.String uploadType) { return (Delete) super.setUploadType(uploadType); } @Override public Delete setUploadProtocol(java.lang.String uploadProtocol) { return (Delete) super.setUploadProtocol(uploadProtocol); } /** * Required. The name of the Repository to delete. Format: * `projects/locations/connections/repositories`. */ @com.google.api.client.util.Key private java.lang.String name; /** Required. The name of the Repository to delete. Format: `projects/locations/connections/repositories`. */ public java.lang.String getName() { return name; } /** * Required. The name of the Repository to delete. Format: * `projects/locations/connections/repositories`. */ public Delete setName(java.lang.String name) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(NAME_PATTERN.matcher(name).matches(), "Parameter name must conform to the pattern " + "^projects/[^/]+/locations/[^/]+/connections/[^/]+/repositories/[^/]+$"); } this.name = name; return this; } /** * The current etag of the repository. If an etag is provided and does not match the * current etag of the repository, deletion will be blocked and an ABORTED error will be * returned. */ @com.google.api.client.util.Key private java.lang.String etag; /** The current etag of the repository. If an etag is provided and does not match the current etag of the repository, deletion will be blocked and an ABORTED error will be returned. */ public java.lang.String getEtag() { return etag; } /** * The current etag of the repository. If an etag is provided and does not match the * current etag of the repository, deletion will be blocked and an ABORTED error will be * returned. */ public Delete setEtag(java.lang.String etag) { this.etag = etag; return this; } /** If set, validate the request, but do not actually post it. */ @com.google.api.client.util.Key private java.lang.Boolean validateOnly; /** If set, validate the request, but do not actually post it. */ public java.lang.Boolean getValidateOnly() { return validateOnly; } /** If set, validate the request, but do not actually post it. */ public Delete setValidateOnly(java.lang.Boolean validateOnly) { this.validateOnly = validateOnly; return this; } @Override public Delete set(String parameterName, Object value) { return (Delete) super.set(parameterName, value); } } /** * Fetch the list of branches or tags for a given repository. * * Create a request for the method "repositories.fetchGitRefs". * * This request holds the parameters needed by the cloudbuild server. After setting any optional * parameters, call the {@link FetchGitRefs#execute()} method to invoke the remote operation. * * @param repository Required. The resource name of the repository in the format * `projects/locations/connections/repositories`. * @return the request */ public FetchGitRefs fetchGitRefs(java.lang.String repository) throws java.io.IOException { FetchGitRefs result = new FetchGitRefs(repository); initialize(result); return result; } public class FetchGitRefs extends CloudBuildRequest { private static final String REST_PATH = "v2/{+repository}:fetchGitRefs"; private final java.util.regex.Pattern REPOSITORY_PATTERN = java.util.regex.Pattern.compile("^projects/[^/]+/locations/[^/]+/connections/[^/]+/repositories/[^/]+$"); /** * Fetch the list of branches or tags for a given repository. * * Create a request for the method "repositories.fetchGitRefs". * * This request holds the parameters needed by the the cloudbuild server. After setting any * optional parameters, call the {@link FetchGitRefs#execute()} method to invoke the remote * operation.

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

* * @param repository Required. The resource name of the repository in the format * `projects/locations/connections/repositories`. * @since 1.13 */ protected FetchGitRefs(java.lang.String repository) { super(CloudBuild.this, "GET", REST_PATH, null, com.google.api.services.cloudbuild.v2.model.FetchGitRefsResponse.class); this.repository = com.google.api.client.util.Preconditions.checkNotNull(repository, "Required parameter repository must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(REPOSITORY_PATTERN.matcher(repository).matches(), "Parameter repository must conform to the pattern " + "^projects/[^/]+/locations/[^/]+/connections/[^/]+/repositories/[^/]+$"); } } @Override public com.google.api.client.http.HttpResponse executeUsingHead() throws java.io.IOException { return super.executeUsingHead(); } @Override public com.google.api.client.http.HttpRequest buildHttpRequestUsingHead() throws java.io.IOException { return super.buildHttpRequestUsingHead(); } @Override public FetchGitRefs set$Xgafv(java.lang.String $Xgafv) { return (FetchGitRefs) super.set$Xgafv($Xgafv); } @Override public FetchGitRefs setAccessToken(java.lang.String accessToken) { return (FetchGitRefs) super.setAccessToken(accessToken); } @Override public FetchGitRefs setAlt(java.lang.String alt) { return (FetchGitRefs) super.setAlt(alt); } @Override public FetchGitRefs setCallback(java.lang.String callback) { return (FetchGitRefs) super.setCallback(callback); } @Override public FetchGitRefs setFields(java.lang.String fields) { return (FetchGitRefs) super.setFields(fields); } @Override public FetchGitRefs setKey(java.lang.String key) { return (FetchGitRefs) super.setKey(key); } @Override public FetchGitRefs setOauthToken(java.lang.String oauthToken) { return (FetchGitRefs) super.setOauthToken(oauthToken); } @Override public FetchGitRefs setPrettyPrint(java.lang.Boolean prettyPrint) { return (FetchGitRefs) super.setPrettyPrint(prettyPrint); } @Override public FetchGitRefs setQuotaUser(java.lang.String quotaUser) { return (FetchGitRefs) super.setQuotaUser(quotaUser); } @Override public FetchGitRefs setUploadType(java.lang.String uploadType) { return (FetchGitRefs) super.setUploadType(uploadType); } @Override public FetchGitRefs setUploadProtocol(java.lang.String uploadProtocol) { return (FetchGitRefs) super.setUploadProtocol(uploadProtocol); } /** * Required. The resource name of the repository in the format * `projects/locations/connections/repositories`. */ @com.google.api.client.util.Key private java.lang.String repository; /** Required. The resource name of the repository in the format `projects/locations/connections/repositories`. */ public java.lang.String getRepository() { return repository; } /** * Required. The resource name of the repository in the format * `projects/locations/connections/repositories`. */ public FetchGitRefs setRepository(java.lang.String repository) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(REPOSITORY_PATTERN.matcher(repository).matches(), "Parameter repository must conform to the pattern " + "^projects/[^/]+/locations/[^/]+/connections/[^/]+/repositories/[^/]+$"); } this.repository = repository; return this; } /** Optional. Number of results to return in the list. Default to 20. */ @com.google.api.client.util.Key private java.lang.Integer pageSize; /** Optional. Number of results to return in the list. Default to 20. */ public java.lang.Integer getPageSize() { return pageSize; } /** Optional. Number of results to return in the list. Default to 20. */ public FetchGitRefs setPageSize(java.lang.Integer pageSize) { this.pageSize = pageSize; return this; } /** Optional. Page start. */ @com.google.api.client.util.Key private java.lang.String pageToken; /** Optional. Page start. */ public java.lang.String getPageToken() { return pageToken; } /** Optional. Page start. */ public FetchGitRefs setPageToken(java.lang.String pageToken) { this.pageToken = pageToken; return this; } /** Type of refs to fetch */ @com.google.api.client.util.Key private java.lang.String refType; /** Type of refs to fetch */ public java.lang.String getRefType() { return refType; } /** Type of refs to fetch */ public FetchGitRefs setRefType(java.lang.String refType) { this.refType = refType; return this; } @Override public FetchGitRefs set(String parameterName, Object value) { return (FetchGitRefs) super.set(parameterName, value); } } /** * Gets details of a single repository. * * Create a request for the method "repositories.get". * * This request holds the parameters needed by the cloudbuild server. After setting any optional * parameters, call the {@link Get#execute()} method to invoke the remote operation. * * @param name Required. The name of the Repository to retrieve. Format: * `projects/locations/connections/repositories`. * @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 CloudBuildRequest { private static final String REST_PATH = "v2/{+name}"; private final java.util.regex.Pattern NAME_PATTERN = java.util.regex.Pattern.compile("^projects/[^/]+/locations/[^/]+/connections/[^/]+/repositories/[^/]+$"); /** * Gets details of a single repository. * * Create a request for the method "repositories.get". * * This request holds the parameters needed by the the cloudbuild server. After setting any * optional parameters, call the {@link Get#execute()} method to invoke the remote operation.

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

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

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

* * @param parent Required. The parent, which owns this collection of Repositories. Format: * `projects/locations/connections`. * @since 1.13 */ protected List(java.lang.String parent) { super(CloudBuild.this, "GET", REST_PATH, null, com.google.api.services.cloudbuild.v2.model.ListRepositoriesResponse.class); this.parent = com.google.api.client.util.Preconditions.checkNotNull(parent, "Required parameter parent must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PARENT_PATTERN.matcher(parent).matches(), "Parameter parent must conform to the pattern " + "^projects/[^/]+/locations/[^/]+/connections/[^/]+$"); } } @Override public com.google.api.client.http.HttpResponse executeUsingHead() throws java.io.IOException { return super.executeUsingHead(); } @Override public com.google.api.client.http.HttpRequest buildHttpRequestUsingHead() throws java.io.IOException { return super.buildHttpRequestUsingHead(); } @Override public List set$Xgafv(java.lang.String $Xgafv) { return (List) super.set$Xgafv($Xgafv); } @Override public List setAccessToken(java.lang.String accessToken) { return (List) super.setAccessToken(accessToken); } @Override public List setAlt(java.lang.String alt) { return (List) super.setAlt(alt); } @Override public List setCallback(java.lang.String callback) { return (List) super.setCallback(callback); } @Override public List setFields(java.lang.String fields) { return (List) super.setFields(fields); } @Override public List setKey(java.lang.String key) { return (List) super.setKey(key); } @Override public List setOauthToken(java.lang.String oauthToken) { return (List) super.setOauthToken(oauthToken); } @Override public List setPrettyPrint(java.lang.Boolean prettyPrint) { return (List) super.setPrettyPrint(prettyPrint); } @Override public List setQuotaUser(java.lang.String quotaUser) { return (List) super.setQuotaUser(quotaUser); } @Override public List setUploadType(java.lang.String uploadType) { return (List) super.setUploadType(uploadType); } @Override public List setUploadProtocol(java.lang.String uploadProtocol) { return (List) super.setUploadProtocol(uploadProtocol); } /** * Required. The parent, which owns this collection of Repositories. Format: * `projects/locations/connections`. */ @com.google.api.client.util.Key private java.lang.String parent; /** Required. The parent, which owns this collection of Repositories. Format: `projects/locations/connections`. */ public java.lang.String getParent() { return parent; } /** * Required. The parent, which owns this collection of Repositories. Format: * `projects/locations/connections`. */ public List setParent(java.lang.String parent) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PARENT_PATTERN.matcher(parent).matches(), "Parameter parent must conform to the pattern " + "^projects/[^/]+/locations/[^/]+/connections/[^/]+$"); } this.parent = parent; return this; } /** * A filter expression that filters resources listed in the response. Expressions must * follow API improvement proposal [AIP-160](https://google.aip.dev/160). e.g. * `remote_uri:"https://github.com*"`. */ @com.google.api.client.util.Key private java.lang.String filter; /** A filter expression that filters resources listed in the response. Expressions must follow API improvement proposal [AIP-160](https://google.aip.dev/160). e.g. `remote_uri:"https://github.com*"`. */ public java.lang.String getFilter() { return filter; } /** * A filter expression that filters resources listed in the response. Expressions must * follow API improvement proposal [AIP-160](https://google.aip.dev/160). e.g. * `remote_uri:"https://github.com*"`. */ public List setFilter(java.lang.String filter) { this.filter = filter; return this; } /** Number of results to return in the list. */ @com.google.api.client.util.Key private java.lang.Integer pageSize; /** Number of results to return in the list. */ public java.lang.Integer getPageSize() { return pageSize; } /** Number of results to return in the list. */ public List setPageSize(java.lang.Integer pageSize) { this.pageSize = pageSize; return this; } /** Page start. */ @com.google.api.client.util.Key private java.lang.String pageToken; /** Page start. */ public java.lang.String getPageToken() { return pageToken; } /** Page start. */ 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 Operations collection. * *

The typical use is:

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

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

* * @param name The name of the operation resource to be cancelled. * @param content the {@link com.google.api.services.cloudbuild.v2.model.CancelOperationRequest} * @since 1.13 */ protected Cancel(java.lang.String name, com.google.api.services.cloudbuild.v2.model.CancelOperationRequest content) { super(CloudBuild.this, "POST", REST_PATH, content, com.google.api.services.cloudbuild.v2.model.Empty.class); this.name = com.google.api.client.util.Preconditions.checkNotNull(name, "Required parameter name must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(NAME_PATTERN.matcher(name).matches(), "Parameter name must conform to the pattern " + "^projects/[^/]+/locations/[^/]+/operations/[^/]+$"); } } @Override public Cancel set$Xgafv(java.lang.String $Xgafv) { return (Cancel) super.set$Xgafv($Xgafv); } @Override public Cancel setAccessToken(java.lang.String accessToken) { return (Cancel) super.setAccessToken(accessToken); } @Override public Cancel setAlt(java.lang.String alt) { return (Cancel) super.setAlt(alt); } @Override public Cancel setCallback(java.lang.String callback) { return (Cancel) super.setCallback(callback); } @Override public Cancel setFields(java.lang.String fields) { return (Cancel) super.setFields(fields); } @Override public Cancel setKey(java.lang.String key) { return (Cancel) super.setKey(key); } @Override public Cancel setOauthToken(java.lang.String oauthToken) { return (Cancel) super.setOauthToken(oauthToken); } @Override public Cancel setPrettyPrint(java.lang.Boolean prettyPrint) { return (Cancel) super.setPrettyPrint(prettyPrint); } @Override public Cancel setQuotaUser(java.lang.String quotaUser) { return (Cancel) super.setQuotaUser(quotaUser); } @Override public Cancel setUploadType(java.lang.String uploadType) { return (Cancel) super.setUploadType(uploadType); } @Override public Cancel setUploadProtocol(java.lang.String uploadProtocol) { return (Cancel) super.setUploadProtocol(uploadProtocol); } /** The name of the operation resource to be cancelled. */ @com.google.api.client.util.Key private java.lang.String name; /** The name of the operation resource to be cancelled. */ public java.lang.String getName() { return name; } /** The name of the operation resource to be cancelled. */ public Cancel setName(java.lang.String name) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(NAME_PATTERN.matcher(name).matches(), "Parameter name must conform to the pattern " + "^projects/[^/]+/locations/[^/]+/operations/[^/]+$"); } this.name = name; return this; } @Override public Cancel set(String parameterName, Object value) { return (Cancel) super.set(parameterName, value); } } /** * Gets the latest state of a long-running operation. Clients can use this method to poll the * operation result at intervals as recommended by the API service. * * Create a request for the method "operations.get". * * This request holds the parameters needed by the cloudbuild 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 CloudBuildRequest { private static final String REST_PATH = "v2/{+name}"; private final java.util.regex.Pattern NAME_PATTERN = java.util.regex.Pattern.compile("^projects/[^/]+/locations/[^/]+/operations/[^/]+$"); /** * Gets the latest state of a long-running operation. Clients can use this method to poll the * operation result at intervals as recommended by the API service. * * Create a request for the method "operations.get". * * This request holds the parameters needed by the the cloudbuild 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(CloudBuild.this, "GET", REST_PATH, null, com.google.api.services.cloudbuild.v2.model.Operation.class); this.name = com.google.api.client.util.Preconditions.checkNotNull(name, "Required parameter name must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(NAME_PATTERN.matcher(name).matches(), "Parameter name must conform to the pattern " + "^projects/[^/]+/locations/[^/]+/operations/[^/]+$"); } } @Override public com.google.api.client.http.HttpResponse executeUsingHead() throws java.io.IOException { return super.executeUsingHead(); } @Override public com.google.api.client.http.HttpRequest buildHttpRequestUsingHead() throws java.io.IOException { return super.buildHttpRequestUsingHead(); } @Override public Get set$Xgafv(java.lang.String $Xgafv) { return (Get) super.set$Xgafv($Xgafv); } @Override public Get setAccessToken(java.lang.String accessToken) { return (Get) super.setAccessToken(accessToken); } @Override public Get setAlt(java.lang.String alt) { return (Get) super.setAlt(alt); } @Override public Get setCallback(java.lang.String callback) { return (Get) super.setCallback(callback); } @Override public Get setFields(java.lang.String fields) { return (Get) super.setFields(fields); } @Override public Get setKey(java.lang.String key) { return (Get) super.setKey(key); } @Override public Get setOauthToken(java.lang.String oauthToken) { return (Get) super.setOauthToken(oauthToken); } @Override public Get setPrettyPrint(java.lang.Boolean prettyPrint) { return (Get) super.setPrettyPrint(prettyPrint); } @Override public Get setQuotaUser(java.lang.String quotaUser) { return (Get) super.setQuotaUser(quotaUser); } @Override public Get setUploadType(java.lang.String uploadType) { return (Get) super.setUploadType(uploadType); } @Override public Get setUploadProtocol(java.lang.String uploadProtocol) { return (Get) super.setUploadProtocol(uploadProtocol); } /** The name of the operation resource. */ @com.google.api.client.util.Key private java.lang.String name; /** The name of the operation resource. */ public java.lang.String getName() { return name; } /** The name of the operation resource. */ public Get setName(java.lang.String name) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(NAME_PATTERN.matcher(name).matches(), "Parameter name must conform to the pattern " + "^projects/[^/]+/locations/[^/]+/operations/[^/]+$"); } this.name = name; return this; } @Override public Get set(String parameterName, Object value) { return (Get) super.set(parameterName, value); } } } } } /** * Builder for {@link CloudBuild}. * *

* 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 CloudBuild}. */ @Override public CloudBuild build() { return new CloudBuild(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 CloudBuildRequestInitializer}. * * @since 1.12 */ public Builder setCloudBuildRequestInitializer( CloudBuildRequestInitializer cloudbuildRequestInitializer) { return (Builder) super.setGoogleClientRequestInitializer(cloudbuildRequestInitializer); } @Override public Builder setGoogleClientRequestInitializer( com.google.api.client.googleapis.services.GoogleClientRequestInitializer googleClientRequestInitializer) { return (Builder) super.setGoogleClientRequestInitializer(googleClientRequestInitializer); } @Override public Builder setUniverseDomain(String universeDomain) { return (Builder) super.setUniverseDomain(universeDomain); } } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy