
com.google.api.services.privateca.v1.CertificateAuthorityService Maven / Gradle / Ivy
/*
* 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.privateca.v1;
/**
* Service definition for CertificateAuthorityService (v1).
*
*
* The Certificate Authority Service API is a highly-available, scalable service that enables you to simplify and automate the management of private certificate authorities (CAs) while staying in control of your private keys.
*
*
*
* For more information about this service, see the
* API Documentation
*
*
*
* This service uses {@link CertificateAuthorityServiceRequestInitializer} to initialize global parameters via its
* {@link Builder}.
*
*
* @since 1.3
* @author Google, Inc.
*/
@SuppressWarnings("javadoc")
public class CertificateAuthorityService 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 Certificate Authority 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://privateca.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://privateca.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 CertificateAuthorityService(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
*/
CertificateAuthorityService(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 CertificateAuthorityService privateca = new CertificateAuthorityService(...);}
* {@code CertificateAuthorityService.Projects.List request = privateca.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 CertificateAuthorityService privateca = new CertificateAuthorityService(...);}
* {@code CertificateAuthorityService.Locations.List request = privateca.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 privateca 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 CertificateAuthorityServiceRequest {
private static final String REST_PATH = "v1/{+name}";
private final java.util.regex.Pattern NAME_PATTERN =
java.util.regex.Pattern.compile("^projects/[^/]+/locations/[^/]+$");
/**
* Gets information about a location.
*
* Create a request for the method "locations.get".
*
* This request holds the parameters needed by the the privateca 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(CertificateAuthorityService.this, "GET", REST_PATH, null, com.google.api.services.privateca.v1.model.Location.class);
this.name = com.google.api.client.util.Preconditions.checkNotNull(name, "Required parameter name must be specified.");
if (!getSuppressPatternChecks()) {
com.google.api.client.util.Preconditions.checkArgument(NAME_PATTERN.matcher(name).matches(),
"Parameter name must conform to the pattern " +
"^projects/[^/]+/locations/[^/]+$");
}
}
@Override
public com.google.api.client.http.HttpResponse executeUsingHead() throws java.io.IOException {
return super.executeUsingHead();
}
@Override
public com.google.api.client.http.HttpRequest buildHttpRequestUsingHead() throws java.io.IOException {
return super.buildHttpRequestUsingHead();
}
@Override
public Get set$Xgafv(java.lang.String $Xgafv) {
return (Get) super.set$Xgafv($Xgafv);
}
@Override
public Get setAccessToken(java.lang.String accessToken) {
return (Get) super.setAccessToken(accessToken);
}
@Override
public Get setAlt(java.lang.String alt) {
return (Get) super.setAlt(alt);
}
@Override
public Get setCallback(java.lang.String callback) {
return (Get) super.setCallback(callback);
}
@Override
public Get setFields(java.lang.String fields) {
return (Get) super.setFields(fields);
}
@Override
public Get setKey(java.lang.String key) {
return (Get) super.setKey(key);
}
@Override
public Get setOauthToken(java.lang.String oauthToken) {
return (Get) super.setOauthToken(oauthToken);
}
@Override
public Get setPrettyPrint(java.lang.Boolean prettyPrint) {
return (Get) super.setPrettyPrint(prettyPrint);
}
@Override
public Get setQuotaUser(java.lang.String quotaUser) {
return (Get) super.setQuotaUser(quotaUser);
}
@Override
public Get setUploadType(java.lang.String uploadType) {
return (Get) super.setUploadType(uploadType);
}
@Override
public Get setUploadProtocol(java.lang.String uploadProtocol) {
return (Get) super.setUploadProtocol(uploadProtocol);
}
/** Resource name for the location. */
@com.google.api.client.util.Key
private java.lang.String name;
/** Resource name for the location.
*/
public java.lang.String getName() {
return name;
}
/** Resource name for the location. */
public Get setName(java.lang.String name) {
if (!getSuppressPatternChecks()) {
com.google.api.client.util.Preconditions.checkArgument(NAME_PATTERN.matcher(name).matches(),
"Parameter name must conform to the pattern " +
"^projects/[^/]+/locations/[^/]+$");
}
this.name = name;
return this;
}
@Override
public Get set(String parameterName, Object value) {
return (Get) super.set(parameterName, value);
}
}
/**
* Lists information about the supported locations for this service.
*
* Create a request for the method "locations.list".
*
* This request holds the parameters needed by the privateca 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 CertificateAuthorityServiceRequest {
private static final String REST_PATH = "v1/{+name}/locations";
private final java.util.regex.Pattern NAME_PATTERN =
java.util.regex.Pattern.compile("^projects/[^/]+$");
/**
* Lists information about the supported locations for this service.
*
* Create a request for the method "locations.list".
*
* This request holds the parameters needed by the the privateca 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(CertificateAuthorityService.this, "GET", REST_PATH, null, com.google.api.services.privateca.v1.model.ListLocationsResponse.class);
this.name = com.google.api.client.util.Preconditions.checkNotNull(name, "Required parameter name must be specified.");
if (!getSuppressPatternChecks()) {
com.google.api.client.util.Preconditions.checkArgument(NAME_PATTERN.matcher(name).matches(),
"Parameter name must conform to the pattern " +
"^projects/[^/]+$");
}
}
@Override
public com.google.api.client.http.HttpResponse executeUsingHead() throws java.io.IOException {
return super.executeUsingHead();
}
@Override
public com.google.api.client.http.HttpRequest buildHttpRequestUsingHead() throws java.io.IOException {
return super.buildHttpRequestUsingHead();
}
@Override
public List set$Xgafv(java.lang.String $Xgafv) {
return (List) super.set$Xgafv($Xgafv);
}
@Override
public List setAccessToken(java.lang.String accessToken) {
return (List) super.setAccessToken(accessToken);
}
@Override
public List setAlt(java.lang.String alt) {
return (List) super.setAlt(alt);
}
@Override
public List setCallback(java.lang.String callback) {
return (List) super.setCallback(callback);
}
@Override
public List setFields(java.lang.String fields) {
return (List) super.setFields(fields);
}
@Override
public List setKey(java.lang.String key) {
return (List) super.setKey(key);
}
@Override
public List setOauthToken(java.lang.String oauthToken) {
return (List) super.setOauthToken(oauthToken);
}
@Override
public List setPrettyPrint(java.lang.Boolean prettyPrint) {
return (List) super.setPrettyPrint(prettyPrint);
}
@Override
public List setQuotaUser(java.lang.String quotaUser) {
return (List) super.setQuotaUser(quotaUser);
}
@Override
public List setUploadType(java.lang.String uploadType) {
return (List) super.setUploadType(uploadType);
}
@Override
public List setUploadProtocol(java.lang.String uploadProtocol) {
return (List) super.setUploadProtocol(uploadProtocol);
}
/** The resource that owns the locations collection, if applicable. */
@com.google.api.client.util.Key
private java.lang.String name;
/** The resource that owns the locations collection, if applicable.
*/
public java.lang.String getName() {
return name;
}
/** The resource that owns the locations collection, if applicable. */
public List setName(java.lang.String name) {
if (!getSuppressPatternChecks()) {
com.google.api.client.util.Preconditions.checkArgument(NAME_PATTERN.matcher(name).matches(),
"Parameter name must conform to the pattern " +
"^projects/[^/]+$");
}
this.name = name;
return this;
}
/**
* A filter to narrow down results to a preferred subset. The filtering language accepts
* strings like `"displayName=tokyo"`, and is documented in more detail in
* [AIP-160](https://google.aip.dev/160).
*/
@com.google.api.client.util.Key
private java.lang.String filter;
/** A filter to narrow down results to a preferred subset. The filtering language accepts strings like
`"displayName=tokyo"`, and is documented in more detail in [AIP-160](https://google.aip.dev/160).
*/
public java.lang.String getFilter() {
return filter;
}
/**
* A filter to narrow down results to a preferred subset. The filtering language accepts
* strings like `"displayName=tokyo"`, and is documented in more detail in
* [AIP-160](https://google.aip.dev/160).
*/
public List setFilter(java.lang.String filter) {
this.filter = filter;
return this;
}
/** 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 CaPools collection.
*
* The typical use is:
*
* {@code CertificateAuthorityService privateca = new CertificateAuthorityService(...);}
* {@code CertificateAuthorityService.CaPools.List request = privateca.caPools().list(parameters ...)}
*
*
* @return the resource collection
*/
public CaPools caPools() {
return new CaPools();
}
/**
* The "caPools" collection of methods.
*/
public class CaPools {
/**
* Create a CaPool.
*
* Create a request for the method "caPools.create".
*
* This request holds the parameters needed by the privateca server. After setting any optional
* parameters, call the {@link Create#execute()} method to invoke the remote operation.
*
* @param parent Required. The resource name of the location associated with the CaPool, in the format
* `projects/locations`.
* @param content the {@link com.google.api.services.privateca.v1.model.CaPool}
* @return the request
*/
public Create create(java.lang.String parent, com.google.api.services.privateca.v1.model.CaPool content) throws java.io.IOException {
Create result = new Create(parent, content);
initialize(result);
return result;
}
public class Create extends CertificateAuthorityServiceRequest {
private static final String REST_PATH = "v1/{+parent}/caPools";
private final java.util.regex.Pattern PARENT_PATTERN =
java.util.regex.Pattern.compile("^projects/[^/]+/locations/[^/]+$");
/**
* Create a CaPool.
*
* Create a request for the method "caPools.create".
*
* This request holds the parameters needed by the the privateca 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 resource name of the location associated with the CaPool, in the format
* `projects/locations`.
* @param content the {@link com.google.api.services.privateca.v1.model.CaPool}
* @since 1.13
*/
protected Create(java.lang.String parent, com.google.api.services.privateca.v1.model.CaPool content) {
super(CertificateAuthorityService.this, "POST", REST_PATH, content, com.google.api.services.privateca.v1.model.Operation.class);
this.parent = com.google.api.client.util.Preconditions.checkNotNull(parent, "Required parameter parent must be specified.");
if (!getSuppressPatternChecks()) {
com.google.api.client.util.Preconditions.checkArgument(PARENT_PATTERN.matcher(parent).matches(),
"Parameter parent must conform to the pattern " +
"^projects/[^/]+/locations/[^/]+$");
}
}
@Override
public Create set$Xgafv(java.lang.String $Xgafv) {
return (Create) super.set$Xgafv($Xgafv);
}
@Override
public Create setAccessToken(java.lang.String accessToken) {
return (Create) super.setAccessToken(accessToken);
}
@Override
public Create setAlt(java.lang.String alt) {
return (Create) super.setAlt(alt);
}
@Override
public Create setCallback(java.lang.String callback) {
return (Create) super.setCallback(callback);
}
@Override
public Create setFields(java.lang.String fields) {
return (Create) super.setFields(fields);
}
@Override
public Create setKey(java.lang.String key) {
return (Create) super.setKey(key);
}
@Override
public Create setOauthToken(java.lang.String oauthToken) {
return (Create) super.setOauthToken(oauthToken);
}
@Override
public Create setPrettyPrint(java.lang.Boolean prettyPrint) {
return (Create) super.setPrettyPrint(prettyPrint);
}
@Override
public Create setQuotaUser(java.lang.String quotaUser) {
return (Create) super.setQuotaUser(quotaUser);
}
@Override
public Create setUploadType(java.lang.String uploadType) {
return (Create) super.setUploadType(uploadType);
}
@Override
public Create setUploadProtocol(java.lang.String uploadProtocol) {
return (Create) super.setUploadProtocol(uploadProtocol);
}
/**
* Required. The resource name of the location associated with the CaPool, in the format
* `projects/locations`.
*/
@com.google.api.client.util.Key
private java.lang.String parent;
/** Required. The resource name of the location associated with the CaPool, in the format
`projects/locations`.
*/
public java.lang.String getParent() {
return parent;
}
/**
* Required. The resource name of the location associated with the CaPool, in the 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. It must be unique within a location and match the regular expression
* `[a-zA-Z0-9_-]{1,63}`
*/
@com.google.api.client.util.Key
private java.lang.String caPoolId;
/** Required. It must be unique within a location and match the regular expression
`[a-zA-Z0-9_-]{1,63}`
*/
public java.lang.String getCaPoolId() {
return caPoolId;
}
/**
* Required. It must be unique within a location and match the regular expression
* `[a-zA-Z0-9_-]{1,63}`
*/
public Create setCaPoolId(java.lang.String caPoolId) {
this.caPoolId = caPoolId;
return this;
}
/**
* Optional. An ID to identify requests. Specify a unique request ID so that if you must
* retry your request, the server will know to ignore the request if it has already been
* completed. The server will guarantee that for at least 60 minutes since the first
* request. For example, consider a situation where you make an initial request and the
* request times out. If you make the request again with the same request ID, the server
* can check if original operation with the same request ID was received, and if so, will
* ignore the second request. This prevents clients from accidentally creating duplicate
* commitments. The request ID must be a valid UUID with the exception that zero UUID is
* not supported (00000000-0000-0000-0000-000000000000).
*/
@com.google.api.client.util.Key
private java.lang.String requestId;
/** Optional. An ID to identify requests. Specify a unique request ID so that if you must retry your
request, the server will know to ignore the request if it has already been completed. The server
will guarantee that for at least 60 minutes since the first request. For example, consider a
situation where you make an initial request and the request times out. If you make the request
again with the same request ID, the server can check if original operation with the same request ID
was received, and if so, will ignore the second request. This prevents clients from accidentally
creating duplicate commitments. The request ID must be a valid UUID with the exception that zero
UUID is not supported (00000000-0000-0000-0000-000000000000).
*/
public java.lang.String getRequestId() {
return requestId;
}
/**
* Optional. An ID to identify requests. Specify a unique request ID so that if you must
* retry your request, the server will know to ignore the request if it has already been
* completed. The server will guarantee that for at least 60 minutes since the first
* request. For example, consider a situation where you make an initial request and the
* request times out. If you make the request again with the same request ID, the server
* can check if original operation with the same request ID was received, and if so, will
* ignore the second request. This prevents clients from accidentally creating duplicate
* commitments. The request ID must be a valid UUID with the exception that zero UUID is
* not supported (00000000-0000-0000-0000-000000000000).
*/
public Create setRequestId(java.lang.String requestId) {
this.requestId = requestId;
return this;
}
@Override
public Create set(String parameterName, Object value) {
return (Create) super.set(parameterName, value);
}
}
/**
* Delete a CaPool.
*
* Create a request for the method "caPools.delete".
*
* This request holds the parameters needed by the privateca server. After setting any optional
* parameters, call the {@link Delete#execute()} method to invoke the remote operation.
*
* @param name Required. The resource name for this CaPool in the format `projects/locations/caPools`.
* @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 CertificateAuthorityServiceRequest {
private static final String REST_PATH = "v1/{+name}";
private final java.util.regex.Pattern NAME_PATTERN =
java.util.regex.Pattern.compile("^projects/[^/]+/locations/[^/]+/caPools/[^/]+$");
/**
* Delete a CaPool.
*
* Create a request for the method "caPools.delete".
*
* This request holds the parameters needed by the the privateca 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 resource name for this CaPool in the format `projects/locations/caPools`.
* @since 1.13
*/
protected Delete(java.lang.String name) {
super(CertificateAuthorityService.this, "DELETE", REST_PATH, null, com.google.api.services.privateca.v1.model.Operation.class);
this.name = com.google.api.client.util.Preconditions.checkNotNull(name, "Required parameter name must be specified.");
if (!getSuppressPatternChecks()) {
com.google.api.client.util.Preconditions.checkArgument(NAME_PATTERN.matcher(name).matches(),
"Parameter name must conform to the pattern " +
"^projects/[^/]+/locations/[^/]+/caPools/[^/]+$");
}
}
@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 resource name for this CaPool in the format `projects/locations/caPools`.
*/
@com.google.api.client.util.Key
private java.lang.String name;
/** Required. The resource name for this CaPool in the format `projects/locations/caPools`.
*/
public java.lang.String getName() {
return name;
}
/**
* Required. The resource name for this CaPool in the format `projects/locations/caPools`.
*/
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/[^/]+/caPools/[^/]+$");
}
this.name = name;
return this;
}
/**
* Optional. This field allows this pool to be deleted even if it's being depended on by
* another resource. However, doing so may result in unintended and unrecoverable effects
* on any dependent resource(s) since the pool will no longer be able to issue
* certificates.
*/
@com.google.api.client.util.Key
private java.lang.Boolean ignoreDependentResources;
/** Optional. This field allows this pool to be deleted even if it's being depended on by another
resource. However, doing so may result in unintended and unrecoverable effects on any dependent
resource(s) since the pool will no longer be able to issue certificates.
*/
public java.lang.Boolean getIgnoreDependentResources() {
return ignoreDependentResources;
}
/**
* Optional. This field allows this pool to be deleted even if it's being depended on by
* another resource. However, doing so may result in unintended and unrecoverable effects
* on any dependent resource(s) since the pool will no longer be able to issue
* certificates.
*/
public Delete setIgnoreDependentResources(java.lang.Boolean ignoreDependentResources) {
this.ignoreDependentResources = ignoreDependentResources;
return this;
}
/**
* Optional. An ID to identify requests. Specify a unique request ID so that if you must
* retry your request, the server will know to ignore the request if it has already been
* completed. The server will guarantee that for at least 60 minutes since the first
* request. For example, consider a situation where you make an initial request and the
* request times out. If you make the request again with the same request ID, the server
* can check if original operation with the same request ID was received, and if so, will
* ignore the second request. This prevents clients from accidentally creating duplicate
* commitments. The request ID must be a valid UUID with the exception that zero UUID is
* not supported (00000000-0000-0000-0000-000000000000).
*/
@com.google.api.client.util.Key
private java.lang.String requestId;
/** Optional. An ID to identify requests. Specify a unique request ID so that if you must retry your
request, the server will know to ignore the request if it has already been completed. The server
will guarantee that for at least 60 minutes since the first request. For example, consider a
situation where you make an initial request and the request times out. If you make the request
again with the same request ID, the server can check if original operation with the same request ID
was received, and if so, will ignore the second request. This prevents clients from accidentally
creating duplicate commitments. The request ID must be a valid UUID with the exception that zero
UUID is not supported (00000000-0000-0000-0000-000000000000).
*/
public java.lang.String getRequestId() {
return requestId;
}
/**
* Optional. An ID to identify requests. Specify a unique request ID so that if you must
* retry your request, the server will know to ignore the request if it has already been
* completed. The server will guarantee that for at least 60 minutes since the first
* request. For example, consider a situation where you make an initial request and the
* request times out. If you make the request again with the same request ID, the server
* can check if original operation with the same request ID was received, and if so, will
* ignore the second request. This prevents clients from accidentally creating duplicate
* commitments. The request ID must be a valid UUID with the exception that zero UUID is
* not supported (00000000-0000-0000-0000-000000000000).
*/
public Delete setRequestId(java.lang.String requestId) {
this.requestId = requestId;
return this;
}
@Override
public Delete set(String parameterName, Object value) {
return (Delete) super.set(parameterName, value);
}
}
/**
* FetchCaCerts returns the current trust anchor for the CaPool. This will include CA certificate
* chains for all ACTIVE CertificateAuthority resources in the CaPool.
*
* Create a request for the method "caPools.fetchCaCerts".
*
* This request holds the parameters needed by the privateca server. After setting any optional
* parameters, call the {@link FetchCaCerts#execute()} method to invoke the remote operation.
*
* @param caPool Required. The resource name for the CaPool in the format `projects/locations/caPools`.
* @param content the {@link com.google.api.services.privateca.v1.model.FetchCaCertsRequest}
* @return the request
*/
public FetchCaCerts fetchCaCerts(java.lang.String caPool, com.google.api.services.privateca.v1.model.FetchCaCertsRequest content) throws java.io.IOException {
FetchCaCerts result = new FetchCaCerts(caPool, content);
initialize(result);
return result;
}
public class FetchCaCerts extends CertificateAuthorityServiceRequest {
private static final String REST_PATH = "v1/{+caPool}:fetchCaCerts";
private final java.util.regex.Pattern CA_POOL_PATTERN =
java.util.regex.Pattern.compile("^projects/[^/]+/locations/[^/]+/caPools/[^/]+$");
/**
* FetchCaCerts returns the current trust anchor for the CaPool. This will include CA certificate
* chains for all ACTIVE CertificateAuthority resources in the CaPool.
*
* Create a request for the method "caPools.fetchCaCerts".
*
* This request holds the parameters needed by the the privateca server. After setting any
* optional parameters, call the {@link FetchCaCerts#execute()} method to invoke the remote
* operation. {@link
* FetchCaCerts#initialize(com.google.api.client.googleapis.services.AbstractGoogleClientRequest)}
* must be called to initialize this instance immediately after invoking the constructor.
*
* @param caPool Required. The resource name for the CaPool in the format `projects/locations/caPools`.
* @param content the {@link com.google.api.services.privateca.v1.model.FetchCaCertsRequest}
* @since 1.13
*/
protected FetchCaCerts(java.lang.String caPool, com.google.api.services.privateca.v1.model.FetchCaCertsRequest content) {
super(CertificateAuthorityService.this, "POST", REST_PATH, content, com.google.api.services.privateca.v1.model.FetchCaCertsResponse.class);
this.caPool = com.google.api.client.util.Preconditions.checkNotNull(caPool, "Required parameter caPool must be specified.");
if (!getSuppressPatternChecks()) {
com.google.api.client.util.Preconditions.checkArgument(CA_POOL_PATTERN.matcher(caPool).matches(),
"Parameter caPool must conform to the pattern " +
"^projects/[^/]+/locations/[^/]+/caPools/[^/]+$");
}
}
@Override
public FetchCaCerts set$Xgafv(java.lang.String $Xgafv) {
return (FetchCaCerts) super.set$Xgafv($Xgafv);
}
@Override
public FetchCaCerts setAccessToken(java.lang.String accessToken) {
return (FetchCaCerts) super.setAccessToken(accessToken);
}
@Override
public FetchCaCerts setAlt(java.lang.String alt) {
return (FetchCaCerts) super.setAlt(alt);
}
@Override
public FetchCaCerts setCallback(java.lang.String callback) {
return (FetchCaCerts) super.setCallback(callback);
}
@Override
public FetchCaCerts setFields(java.lang.String fields) {
return (FetchCaCerts) super.setFields(fields);
}
@Override
public FetchCaCerts setKey(java.lang.String key) {
return (FetchCaCerts) super.setKey(key);
}
@Override
public FetchCaCerts setOauthToken(java.lang.String oauthToken) {
return (FetchCaCerts) super.setOauthToken(oauthToken);
}
@Override
public FetchCaCerts setPrettyPrint(java.lang.Boolean prettyPrint) {
return (FetchCaCerts) super.setPrettyPrint(prettyPrint);
}
@Override
public FetchCaCerts setQuotaUser(java.lang.String quotaUser) {
return (FetchCaCerts) super.setQuotaUser(quotaUser);
}
@Override
public FetchCaCerts setUploadType(java.lang.String uploadType) {
return (FetchCaCerts) super.setUploadType(uploadType);
}
@Override
public FetchCaCerts setUploadProtocol(java.lang.String uploadProtocol) {
return (FetchCaCerts) super.setUploadProtocol(uploadProtocol);
}
/**
* Required. The resource name for the CaPool in the format `projects/locations/caPools`.
*/
@com.google.api.client.util.Key
private java.lang.String caPool;
/** Required. The resource name for the CaPool in the format `projects/locations/caPools`.
*/
public java.lang.String getCaPool() {
return caPool;
}
/**
* Required. The resource name for the CaPool in the format `projects/locations/caPools`.
*/
public FetchCaCerts setCaPool(java.lang.String caPool) {
if (!getSuppressPatternChecks()) {
com.google.api.client.util.Preconditions.checkArgument(CA_POOL_PATTERN.matcher(caPool).matches(),
"Parameter caPool must conform to the pattern " +
"^projects/[^/]+/locations/[^/]+/caPools/[^/]+$");
}
this.caPool = caPool;
return this;
}
@Override
public FetchCaCerts set(String parameterName, Object value) {
return (FetchCaCerts) super.set(parameterName, value);
}
}
/**
* Returns a CaPool.
*
* Create a request for the method "caPools.get".
*
* This request holds the parameters needed by the privateca server. After setting any optional
* parameters, call the {@link Get#execute()} method to invoke the remote operation.
*
* @param name Required. The name of the CaPool to get.
* @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 CertificateAuthorityServiceRequest {
private static final String REST_PATH = "v1/{+name}";
private final java.util.regex.Pattern NAME_PATTERN =
java.util.regex.Pattern.compile("^projects/[^/]+/locations/[^/]+/caPools/[^/]+$");
/**
* Returns a CaPool.
*
* Create a request for the method "caPools.get".
*
* This request holds the parameters needed by the the privateca 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 CaPool to get.
* @since 1.13
*/
protected Get(java.lang.String name) {
super(CertificateAuthorityService.this, "GET", REST_PATH, null, com.google.api.services.privateca.v1.model.CaPool.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/[^/]+/caPools/[^/]+$");
}
}
@Override
public com.google.api.client.http.HttpResponse executeUsingHead() throws 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 CaPool to get. */
@com.google.api.client.util.Key
private java.lang.String name;
/** Required. The name of the CaPool to get.
*/
public java.lang.String getName() {
return name;
}
/** Required. The name of the CaPool to get. */
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/[^/]+/caPools/[^/]+$");
}
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 "caPools.getIamPolicy".
*
* This request holds the parameters needed by the privateca 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 CertificateAuthorityServiceRequest {
private static final String REST_PATH = "v1/{+resource}:getIamPolicy";
private final java.util.regex.Pattern RESOURCE_PATTERN =
java.util.regex.Pattern.compile("^projects/[^/]+/locations/[^/]+/caPools/[^/]+$");
/**
* 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 "caPools.getIamPolicy".
*
* This request holds the parameters needed by the the privateca 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(CertificateAuthorityService.this, "GET", REST_PATH, null, com.google.api.services.privateca.v1.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/[^/]+/caPools/[^/]+$");
}
}
@Override
public com.google.api.client.http.HttpResponse executeUsingHead() throws 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/[^/]+/caPools/[^/]+$");
}
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 CaPools.
*
* Create a request for the method "caPools.list".
*
* This request holds the parameters needed by the privateca server. After setting any optional
* parameters, call the {@link List#execute()} method to invoke the remote operation.
*
* @param parent Required. The resource name of the location associated with the CaPools, in the 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 CertificateAuthorityServiceRequest {
private static final String REST_PATH = "v1/{+parent}/caPools";
private final java.util.regex.Pattern PARENT_PATTERN =
java.util.regex.Pattern.compile("^projects/[^/]+/locations/[^/]+$");
/**
* Lists CaPools.
*
* Create a request for the method "caPools.list".
*
* This request holds the parameters needed by the the privateca 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 resource name of the location associated with the CaPools, in the format
* `projects/locations`.
* @since 1.13
*/
protected List(java.lang.String parent) {
super(CertificateAuthorityService.this, "GET", REST_PATH, null, com.google.api.services.privateca.v1.model.ListCaPoolsResponse.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 resource name of the location associated with the CaPools, in the format
* `projects/locations`.
*/
@com.google.api.client.util.Key
private java.lang.String parent;
/** Required. The resource name of the location associated with the CaPools, in the format
`projects/locations`.
*/
public java.lang.String getParent() {
return parent;
}
/**
* Required. The resource name of the location associated with the CaPools, in the 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;
}
/** Optional. Only include resources that match the filter in the response. */
@com.google.api.client.util.Key
private java.lang.String filter;
/** Optional. Only include resources that match the filter in the response.
*/
public java.lang.String getFilter() {
return filter;
}
/** Optional. Only include resources that match the filter in the response. */
public List setFilter(java.lang.String filter) {
this.filter = filter;
return this;
}
/** Optional. Specify how the results should be sorted. */
@com.google.api.client.util.Key
private java.lang.String orderBy;
/** Optional. Specify how the results should be sorted.
*/
public java.lang.String getOrderBy() {
return orderBy;
}
/** Optional. Specify how the results should be sorted. */
public List setOrderBy(java.lang.String orderBy) {
this.orderBy = orderBy;
return this;
}
/**
* Optional. Limit on the number of CaPools to include in the response. Further CaPools
* can subsequently be obtained by including the ListCaPoolsResponse.next_page_token in a
* subsequent request. If unspecified, the server will pick an appropriate default.
*/
@com.google.api.client.util.Key
private java.lang.Integer pageSize;
/** Optional. Limit on the number of CaPools to include in the response. Further CaPools can
subsequently be obtained by including the ListCaPoolsResponse.next_page_token in a subsequent
request. If unspecified, the server will pick an appropriate default.
*/
public java.lang.Integer getPageSize() {
return pageSize;
}
/**
* Optional. Limit on the number of CaPools to include in the response. Further CaPools
* can subsequently be obtained by including the ListCaPoolsResponse.next_page_token in a
* subsequent request. If unspecified, the server will pick an appropriate default.
*/
public List setPageSize(java.lang.Integer pageSize) {
this.pageSize = pageSize;
return this;
}
/**
* Optional. Pagination token, returned earlier via ListCaPoolsResponse.next_page_token.
*/
@com.google.api.client.util.Key
private java.lang.String pageToken;
/** Optional. Pagination token, returned earlier via ListCaPoolsResponse.next_page_token.
*/
public java.lang.String getPageToken() {
return pageToken;
}
/**
* Optional. Pagination token, returned earlier via ListCaPoolsResponse.next_page_token.
*/
public List setPageToken(java.lang.String pageToken) {
this.pageToken = pageToken;
return this;
}
@Override
public List set(String parameterName, Object value) {
return (List) super.set(parameterName, value);
}
}
/**
* Update a CaPool.
*
* Create a request for the method "caPools.patch".
*
* This request holds the parameters needed by the privateca server. After setting any optional
* parameters, call the {@link Patch#execute()} method to invoke the remote operation.
*
* @param name Output only. The resource name for this CaPool in the format `projects/locations/caPools`.
* @param content the {@link com.google.api.services.privateca.v1.model.CaPool}
* @return the request
*/
public Patch patch(java.lang.String name, com.google.api.services.privateca.v1.model.CaPool content) throws java.io.IOException {
Patch result = new Patch(name, content);
initialize(result);
return result;
}
public class Patch extends CertificateAuthorityServiceRequest {
private static final String REST_PATH = "v1/{+name}";
private final java.util.regex.Pattern NAME_PATTERN =
java.util.regex.Pattern.compile("^projects/[^/]+/locations/[^/]+/caPools/[^/]+$");
/**
* Update a CaPool.
*
* Create a request for the method "caPools.patch".
*
* This request holds the parameters needed by the the privateca server. After setting any
* optional parameters, call the {@link Patch#execute()} method to invoke the remote operation.
* {@link
* Patch#initialize(com.google.api.client.googleapis.services.AbstractGoogleClientRequest)} must
* be called to initialize this instance immediately after invoking the constructor.
*
* @param name Output only. The resource name for this CaPool in the format `projects/locations/caPools`.
* @param content the {@link com.google.api.services.privateca.v1.model.CaPool}
* @since 1.13
*/
protected Patch(java.lang.String name, com.google.api.services.privateca.v1.model.CaPool content) {
super(CertificateAuthorityService.this, "PATCH", REST_PATH, content, com.google.api.services.privateca.v1.model.Operation.class);
this.name = com.google.api.client.util.Preconditions.checkNotNull(name, "Required parameter name must be specified.");
if (!getSuppressPatternChecks()) {
com.google.api.client.util.Preconditions.checkArgument(NAME_PATTERN.matcher(name).matches(),
"Parameter name must conform to the pattern " +
"^projects/[^/]+/locations/[^/]+/caPools/[^/]+$");
}
}
@Override
public Patch set$Xgafv(java.lang.String $Xgafv) {
return (Patch) super.set$Xgafv($Xgafv);
}
@Override
public Patch setAccessToken(java.lang.String accessToken) {
return (Patch) super.setAccessToken(accessToken);
}
@Override
public Patch setAlt(java.lang.String alt) {
return (Patch) super.setAlt(alt);
}
@Override
public Patch setCallback(java.lang.String callback) {
return (Patch) super.setCallback(callback);
}
@Override
public Patch setFields(java.lang.String fields) {
return (Patch) super.setFields(fields);
}
@Override
public Patch setKey(java.lang.String key) {
return (Patch) super.setKey(key);
}
@Override
public Patch setOauthToken(java.lang.String oauthToken) {
return (Patch) super.setOauthToken(oauthToken);
}
@Override
public Patch setPrettyPrint(java.lang.Boolean prettyPrint) {
return (Patch) super.setPrettyPrint(prettyPrint);
}
@Override
public Patch setQuotaUser(java.lang.String quotaUser) {
return (Patch) super.setQuotaUser(quotaUser);
}
@Override
public Patch setUploadType(java.lang.String uploadType) {
return (Patch) super.setUploadType(uploadType);
}
@Override
public Patch setUploadProtocol(java.lang.String uploadProtocol) {
return (Patch) super.setUploadProtocol(uploadProtocol);
}
/**
* Output only. The resource name for this CaPool in the format
* `projects/locations/caPools`.
*/
@com.google.api.client.util.Key
private java.lang.String name;
/** Output only. The resource name for this CaPool in the format `projects/locations/caPools`.
*/
public java.lang.String getName() {
return name;
}
/**
* Output only. The resource name for this CaPool in the format
* `projects/locations/caPools`.
*/
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/[^/]+/caPools/[^/]+$");
}
this.name = name;
return this;
}
/**
* Optional. An ID to identify requests. Specify a unique request ID so that if you must
* retry your request, the server will know to ignore the request if it has already been
* completed. The server will guarantee that for at least 60 minutes since the first
* request. For example, consider a situation where you make an initial request and the
* request times out. If you make the request again with the same request ID, the server
* can check if original operation with the same request ID was received, and if so, will
* ignore the second request. This prevents clients from accidentally creating duplicate
* commitments. The request ID must be a valid UUID with the exception that zero UUID is
* not supported (00000000-0000-0000-0000-000000000000).
*/
@com.google.api.client.util.Key
private java.lang.String requestId;
/** Optional. An ID to identify requests. Specify a unique request ID so that if you must retry your
request, the server will know to ignore the request if it has already been completed. The server
will guarantee that for at least 60 minutes since the first request. For example, consider a
situation where you make an initial request and the request times out. If you make the request
again with the same request ID, the server can check if original operation with the same request ID
was received, and if so, will ignore the second request. This prevents clients from accidentally
creating duplicate commitments. The request ID must be a valid UUID with the exception that zero
UUID is not supported (00000000-0000-0000-0000-000000000000).
*/
public java.lang.String getRequestId() {
return requestId;
}
/**
* Optional. An ID to identify requests. Specify a unique request ID so that if you must
* retry your request, the server will know to ignore the request if it has already been
* completed. The server will guarantee that for at least 60 minutes since the first
* request. For example, consider a situation where you make an initial request and the
* request times out. If you make the request again with the same request ID, the server
* can check if original operation with the same request ID was received, and if so, will
* ignore the second request. This prevents clients from accidentally creating duplicate
* commitments. The request ID must be a valid UUID with the exception that zero UUID is
* not supported (00000000-0000-0000-0000-000000000000).
*/
public Patch setRequestId(java.lang.String requestId) {
this.requestId = requestId;
return this;
}
/** Required. A list of fields to be updated in this request. */
@com.google.api.client.util.Key
private String updateMask;
/** Required. A list of fields to be updated in this request.
*/
public String getUpdateMask() {
return updateMask;
}
/** Required. A list of fields to be updated in this request. */
public Patch setUpdateMask(String updateMask) {
this.updateMask = updateMask;
return this;
}
@Override
public Patch set(String parameterName, Object value) {
return (Patch) super.set(parameterName, value);
}
}
/**
* Sets the access control policy on the specified resource. Replaces any existing policy. Can
* return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED` errors.
*
* Create a request for the method "caPools.setIamPolicy".
*
* This request holds the parameters needed by the privateca 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.privateca.v1.model.SetIamPolicyRequest}
* @return the request
*/
public SetIamPolicy setIamPolicy(java.lang.String resource, com.google.api.services.privateca.v1.model.SetIamPolicyRequest content) throws java.io.IOException {
SetIamPolicy result = new SetIamPolicy(resource, content);
initialize(result);
return result;
}
public class SetIamPolicy extends CertificateAuthorityServiceRequest {
private static final String REST_PATH = "v1/{+resource}:setIamPolicy";
private final java.util.regex.Pattern RESOURCE_PATTERN =
java.util.regex.Pattern.compile("^projects/[^/]+/locations/[^/]+/caPools/[^/]+$");
/**
* 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 "caPools.setIamPolicy".
*
* This request holds the parameters needed by the the privateca 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.privateca.v1.model.SetIamPolicyRequest}
* @since 1.13
*/
protected SetIamPolicy(java.lang.String resource, com.google.api.services.privateca.v1.model.SetIamPolicyRequest content) {
super(CertificateAuthorityService.this, "POST", REST_PATH, content, com.google.api.services.privateca.v1.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/[^/]+/caPools/[^/]+$");
}
}
@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/[^/]+/caPools/[^/]+$");
}
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 "caPools.testIamPermissions".
*
* This request holds the parameters needed by the privateca 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.privateca.v1.model.TestIamPermissionsRequest}
* @return the request
*/
public TestIamPermissions testIamPermissions(java.lang.String resource, com.google.api.services.privateca.v1.model.TestIamPermissionsRequest content) throws java.io.IOException {
TestIamPermissions result = new TestIamPermissions(resource, content);
initialize(result);
return result;
}
public class TestIamPermissions extends CertificateAuthorityServiceRequest {
private static final String REST_PATH = "v1/{+resource}:testIamPermissions";
private final java.util.regex.Pattern RESOURCE_PATTERN =
java.util.regex.Pattern.compile("^projects/[^/]+/locations/[^/]+/caPools/[^/]+$");
/**
* 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 "caPools.testIamPermissions".
*
* This request holds the parameters needed by the the privateca 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.privateca.v1.model.TestIamPermissionsRequest}
* @since 1.13
*/
protected TestIamPermissions(java.lang.String resource, com.google.api.services.privateca.v1.model.TestIamPermissionsRequest content) {
super(CertificateAuthorityService.this, "POST", REST_PATH, content, com.google.api.services.privateca.v1.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/[^/]+/caPools/[^/]+$");
}
}
@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/[^/]+/caPools/[^/]+$");
}
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 CertificateAuthorities collection.
*
* The typical use is:
*
* {@code CertificateAuthorityService privateca = new CertificateAuthorityService(...);}
* {@code CertificateAuthorityService.CertificateAuthorities.List request = privateca.certificateAuthorities().list(parameters ...)}
*
*
* @return the resource collection
*/
public CertificateAuthorities certificateAuthorities() {
return new CertificateAuthorities();
}
/**
* The "certificateAuthorities" collection of methods.
*/
public class CertificateAuthorities {
/**
* Activate a CertificateAuthority that is in state AWAITING_USER_ACTIVATION and is of type
* SUBORDINATE. After the parent Certificate Authority signs a certificate signing request from
* FetchCertificateAuthorityCsr, this method can complete the activation process.
*
* Create a request for the method "certificateAuthorities.activate".
*
* This request holds the parameters needed by the privateca server. After setting any optional
* parameters, call the {@link Activate#execute()} method to invoke the remote operation.
*
* @param name Required. The resource name for this CertificateAuthority in the format
* `projects/locations/caPools/certificateAuthorities`.
* @param content the {@link com.google.api.services.privateca.v1.model.ActivateCertificateAuthorityRequest}
* @return the request
*/
public Activate activate(java.lang.String name, com.google.api.services.privateca.v1.model.ActivateCertificateAuthorityRequest content) throws java.io.IOException {
Activate result = new Activate(name, content);
initialize(result);
return result;
}
public class Activate extends CertificateAuthorityServiceRequest {
private static final String REST_PATH = "v1/{+name}:activate";
private final java.util.regex.Pattern NAME_PATTERN =
java.util.regex.Pattern.compile("^projects/[^/]+/locations/[^/]+/caPools/[^/]+/certificateAuthorities/[^/]+$");
/**
* Activate a CertificateAuthority that is in state AWAITING_USER_ACTIVATION and is of type
* SUBORDINATE. After the parent Certificate Authority signs a certificate signing request from
* FetchCertificateAuthorityCsr, this method can complete the activation process.
*
* Create a request for the method "certificateAuthorities.activate".
*
* This request holds the parameters needed by the the privateca server. After setting any
* optional parameters, call the {@link Activate#execute()} method to invoke the remote operation.
* {@link
* Activate#initialize(com.google.api.client.googleapis.services.AbstractGoogleClientRequest)}
* must be called to initialize this instance immediately after invoking the constructor.
*
* @param name Required. The resource name for this CertificateAuthority in the format
* `projects/locations/caPools/certificateAuthorities`.
* @param content the {@link com.google.api.services.privateca.v1.model.ActivateCertificateAuthorityRequest}
* @since 1.13
*/
protected Activate(java.lang.String name, com.google.api.services.privateca.v1.model.ActivateCertificateAuthorityRequest content) {
super(CertificateAuthorityService.this, "POST", REST_PATH, content, com.google.api.services.privateca.v1.model.Operation.class);
this.name = com.google.api.client.util.Preconditions.checkNotNull(name, "Required parameter name must be specified.");
if (!getSuppressPatternChecks()) {
com.google.api.client.util.Preconditions.checkArgument(NAME_PATTERN.matcher(name).matches(),
"Parameter name must conform to the pattern " +
"^projects/[^/]+/locations/[^/]+/caPools/[^/]+/certificateAuthorities/[^/]+$");
}
}
@Override
public Activate set$Xgafv(java.lang.String $Xgafv) {
return (Activate) super.set$Xgafv($Xgafv);
}
@Override
public Activate setAccessToken(java.lang.String accessToken) {
return (Activate) super.setAccessToken(accessToken);
}
@Override
public Activate setAlt(java.lang.String alt) {
return (Activate) super.setAlt(alt);
}
@Override
public Activate setCallback(java.lang.String callback) {
return (Activate) super.setCallback(callback);
}
@Override
public Activate setFields(java.lang.String fields) {
return (Activate) super.setFields(fields);
}
@Override
public Activate setKey(java.lang.String key) {
return (Activate) super.setKey(key);
}
@Override
public Activate setOauthToken(java.lang.String oauthToken) {
return (Activate) super.setOauthToken(oauthToken);
}
@Override
public Activate setPrettyPrint(java.lang.Boolean prettyPrint) {
return (Activate) super.setPrettyPrint(prettyPrint);
}
@Override
public Activate setQuotaUser(java.lang.String quotaUser) {
return (Activate) super.setQuotaUser(quotaUser);
}
@Override
public Activate setUploadType(java.lang.String uploadType) {
return (Activate) super.setUploadType(uploadType);
}
@Override
public Activate setUploadProtocol(java.lang.String uploadProtocol) {
return (Activate) super.setUploadProtocol(uploadProtocol);
}
/**
* Required. The resource name for this CertificateAuthority in the format
* `projects/locations/caPools/certificateAuthorities`.
*/
@com.google.api.client.util.Key
private java.lang.String name;
/** Required. The resource name for this CertificateAuthority in the format
`projects/locations/caPools/certificateAuthorities`.
*/
public java.lang.String getName() {
return name;
}
/**
* Required. The resource name for this CertificateAuthority in the format
* `projects/locations/caPools/certificateAuthorities`.
*/
public Activate 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/[^/]+/caPools/[^/]+/certificateAuthorities/[^/]+$");
}
this.name = name;
return this;
}
@Override
public Activate set(String parameterName, Object value) {
return (Activate) super.set(parameterName, value);
}
}
/**
* Create a new CertificateAuthority in a given Project and Location.
*
* Create a request for the method "certificateAuthorities.create".
*
* This request holds the parameters needed by the privateca server. After setting any optional
* parameters, call the {@link Create#execute()} method to invoke the remote operation.
*
* @param parent Required. The resource name of the CaPool associated with the CertificateAuthorities, in the format
* `projects/locations/caPools`.
* @param content the {@link com.google.api.services.privateca.v1.model.CertificateAuthority}
* @return the request
*/
public Create create(java.lang.String parent, com.google.api.services.privateca.v1.model.CertificateAuthority content) throws java.io.IOException {
Create result = new Create(parent, content);
initialize(result);
return result;
}
public class Create extends CertificateAuthorityServiceRequest {
private static final String REST_PATH = "v1/{+parent}/certificateAuthorities";
private final java.util.regex.Pattern PARENT_PATTERN =
java.util.regex.Pattern.compile("^projects/[^/]+/locations/[^/]+/caPools/[^/]+$");
/**
* Create a new CertificateAuthority in a given Project and Location.
*
* Create a request for the method "certificateAuthorities.create".
*
* This request holds the parameters needed by the the privateca 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 resource name of the CaPool associated with the CertificateAuthorities, in the format
* `projects/locations/caPools`.
* @param content the {@link com.google.api.services.privateca.v1.model.CertificateAuthority}
* @since 1.13
*/
protected Create(java.lang.String parent, com.google.api.services.privateca.v1.model.CertificateAuthority content) {
super(CertificateAuthorityService.this, "POST", REST_PATH, content, com.google.api.services.privateca.v1.model.Operation.class);
this.parent = com.google.api.client.util.Preconditions.checkNotNull(parent, "Required parameter parent must be specified.");
if (!getSuppressPatternChecks()) {
com.google.api.client.util.Preconditions.checkArgument(PARENT_PATTERN.matcher(parent).matches(),
"Parameter parent must conform to the pattern " +
"^projects/[^/]+/locations/[^/]+/caPools/[^/]+$");
}
}
@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 resource name of the CaPool associated with the CertificateAuthorities,
* in the format `projects/locations/caPools`.
*/
@com.google.api.client.util.Key
private java.lang.String parent;
/** Required. The resource name of the CaPool associated with the CertificateAuthorities, in the format
`projects/locations/caPools`.
*/
public java.lang.String getParent() {
return parent;
}
/**
* Required. The resource name of the CaPool associated with the CertificateAuthorities,
* in the format `projects/locations/caPools`.
*/
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/[^/]+/caPools/[^/]+$");
}
this.parent = parent;
return this;
}
/**
* Required. It must be unique within a location and match the regular expression
* `[a-zA-Z0-9_-]{1,63}`
*/
@com.google.api.client.util.Key
private java.lang.String certificateAuthorityId;
/** Required. It must be unique within a location and match the regular expression
`[a-zA-Z0-9_-]{1,63}`
*/
public java.lang.String getCertificateAuthorityId() {
return certificateAuthorityId;
}
/**
* Required. It must be unique within a location and match the regular expression
* `[a-zA-Z0-9_-]{1,63}`
*/
public Create setCertificateAuthorityId(java.lang.String certificateAuthorityId) {
this.certificateAuthorityId = certificateAuthorityId;
return this;
}
/**
* Optional. An ID to identify requests. Specify a unique request ID so that if you must
* retry your request, the server will know to ignore the request if it has already been
* completed. The server will guarantee that for at least 60 minutes since the first
* request. For example, consider a situation where you make an initial request and the
* request times out. If you make the request again with the same request ID, the server
* can check if original operation with the same request ID was received, and if so,
* will ignore the second request. This prevents clients from accidentally creating
* duplicate commitments. The request ID must be a valid UUID with the exception that
* zero UUID is not supported (00000000-0000-0000-0000-000000000000).
*/
@com.google.api.client.util.Key
private java.lang.String requestId;
/** Optional. An ID to identify requests. Specify a unique request ID so that if you must retry your
request, the server will know to ignore the request if it has already been completed. The server
will guarantee that for at least 60 minutes since the first request. For example, consider a
situation where you make an initial request and the request times out. If you make the request
again with the same request ID, the server can check if original operation with the same request ID
was received, and if so, will ignore the second request. This prevents clients from accidentally
creating duplicate commitments. The request ID must be a valid UUID with the exception that zero
UUID is not supported (00000000-0000-0000-0000-000000000000).
*/
public java.lang.String getRequestId() {
return requestId;
}
/**
* Optional. An ID to identify requests. Specify a unique request ID so that if you must
* retry your request, the server will know to ignore the request if it has already been
* completed. The server will guarantee that for at least 60 minutes since the first
* request. For example, consider a situation where you make an initial request and the
* request times out. If you make the request again with the same request ID, the server
* can check if original operation with the same request ID was received, and if so,
* will ignore the second request. This prevents clients from accidentally creating
* duplicate commitments. The request ID must be a valid UUID with the exception that
* zero UUID is not supported (00000000-0000-0000-0000-000000000000).
*/
public Create setRequestId(java.lang.String requestId) {
this.requestId = requestId;
return this;
}
@Override
public Create set(String parameterName, Object value) {
return (Create) super.set(parameterName, value);
}
}
/**
* Delete a CertificateAuthority.
*
* Create a request for the method "certificateAuthorities.delete".
*
* This request holds the parameters needed by the privateca server. After setting any optional
* parameters, call the {@link Delete#execute()} method to invoke the remote operation.
*
* @param name Required. The resource name for this CertificateAuthority in the format
* `projects/locations/caPools/certificateAuthorities`.
* @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 CertificateAuthorityServiceRequest {
private static final String REST_PATH = "v1/{+name}";
private final java.util.regex.Pattern NAME_PATTERN =
java.util.regex.Pattern.compile("^projects/[^/]+/locations/[^/]+/caPools/[^/]+/certificateAuthorities/[^/]+$");
/**
* Delete a CertificateAuthority.
*
* Create a request for the method "certificateAuthorities.delete".
*
* This request holds the parameters needed by the the privateca 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 resource name for this CertificateAuthority in the format
* `projects/locations/caPools/certificateAuthorities`.
* @since 1.13
*/
protected Delete(java.lang.String name) {
super(CertificateAuthorityService.this, "DELETE", REST_PATH, null, com.google.api.services.privateca.v1.model.Operation.class);
this.name = com.google.api.client.util.Preconditions.checkNotNull(name, "Required parameter name must be specified.");
if (!getSuppressPatternChecks()) {
com.google.api.client.util.Preconditions.checkArgument(NAME_PATTERN.matcher(name).matches(),
"Parameter name must conform to the pattern " +
"^projects/[^/]+/locations/[^/]+/caPools/[^/]+/certificateAuthorities/[^/]+$");
}
}
@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 resource name for this CertificateAuthority in the format
* `projects/locations/caPools/certificateAuthorities`.
*/
@com.google.api.client.util.Key
private java.lang.String name;
/** Required. The resource name for this CertificateAuthority in the format
`projects/locations/caPools/certificateAuthorities`.
*/
public java.lang.String getName() {
return name;
}
/**
* Required. The resource name for this CertificateAuthority in the format
* `projects/locations/caPools/certificateAuthorities`.
*/
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/[^/]+/caPools/[^/]+/certificateAuthorities/[^/]+$");
}
this.name = name;
return this;
}
/**
* Optional. This field allows the CA to be deleted even if the CA has active certs.
* Active certs include both unrevoked and unexpired certs.
*/
@com.google.api.client.util.Key
private java.lang.Boolean ignoreActiveCertificates;
/** Optional. This field allows the CA to be deleted even if the CA has active certs. Active certs
include both unrevoked and unexpired certs.
*/
public java.lang.Boolean getIgnoreActiveCertificates() {
return ignoreActiveCertificates;
}
/**
* Optional. This field allows the CA to be deleted even if the CA has active certs.
* Active certs include both unrevoked and unexpired certs.
*/
public Delete setIgnoreActiveCertificates(java.lang.Boolean ignoreActiveCertificates) {
this.ignoreActiveCertificates = ignoreActiveCertificates;
return this;
}
/**
* Optional. This field allows this ca to be deleted even if it's being depended on by
* another resource. However, doing so may result in unintended and unrecoverable
* effects on any dependent resource(s) since the CA will no longer be able to issue
* certificates.
*/
@com.google.api.client.util.Key
private java.lang.Boolean ignoreDependentResources;
/** Optional. This field allows this ca to be deleted even if it's being depended on by another
resource. However, doing so may result in unintended and unrecoverable effects on any dependent
resource(s) since the CA will no longer be able to issue certificates.
*/
public java.lang.Boolean getIgnoreDependentResources() {
return ignoreDependentResources;
}
/**
* Optional. This field allows this ca to be deleted even if it's being depended on by
* another resource. However, doing so may result in unintended and unrecoverable
* effects on any dependent resource(s) since the CA will no longer be able to issue
* certificates.
*/
public Delete setIgnoreDependentResources(java.lang.Boolean ignoreDependentResources) {
this.ignoreDependentResources = ignoreDependentResources;
return this;
}
/**
* Optional. An ID to identify requests. Specify a unique request ID so that if you must
* retry your request, the server will know to ignore the request if it has already been
* completed. The server will guarantee that for at least 60 minutes since the first
* request. For example, consider a situation where you make an initial request and the
* request times out. If you make the request again with the same request ID, the server
* can check if original operation with the same request ID was received, and if so,
* will ignore the second request. This prevents clients from accidentally creating
* duplicate commitments. The request ID must be a valid UUID with the exception that
* zero UUID is not supported (00000000-0000-0000-0000-000000000000).
*/
@com.google.api.client.util.Key
private java.lang.String requestId;
/** Optional. An ID to identify requests. Specify a unique request ID so that if you must retry your
request, the server will know to ignore the request if it has already been completed. The server
will guarantee that for at least 60 minutes since the first request. For example, consider a
situation where you make an initial request and the request times out. If you make the request
again with the same request ID, the server can check if original operation with the same request ID
was received, and if so, will ignore the second request. This prevents clients from accidentally
creating duplicate commitments. The request ID must be a valid UUID with the exception that zero
UUID is not supported (00000000-0000-0000-0000-000000000000).
*/
public java.lang.String getRequestId() {
return requestId;
}
/**
* Optional. An ID to identify requests. Specify a unique request ID so that if you must
* retry your request, the server will know to ignore the request if it has already been
* completed. The server will guarantee that for at least 60 minutes since the first
* request. For example, consider a situation where you make an initial request and the
* request times out. If you make the request again with the same request ID, the server
* can check if original operation with the same request ID was received, and if so,
* will ignore the second request. This prevents clients from accidentally creating
* duplicate commitments. The request ID must be a valid UUID with the exception that
* zero UUID is not supported (00000000-0000-0000-0000-000000000000).
*/
public Delete setRequestId(java.lang.String requestId) {
this.requestId = requestId;
return this;
}
/**
* Optional. If this flag is set, the Certificate Authority will be deleted as soon as
* possible without a 30-day grace period where undeletion would have been allowed. If
* you proceed, there will be no way to recover this CA.
*/
@com.google.api.client.util.Key
private java.lang.Boolean skipGracePeriod;
/** Optional. If this flag is set, the Certificate Authority will be deleted as soon as possible
without a 30-day grace period where undeletion would have been allowed. If you proceed, there will
be no way to recover this CA.
*/
public java.lang.Boolean getSkipGracePeriod() {
return skipGracePeriod;
}
/**
* Optional. If this flag is set, the Certificate Authority will be deleted as soon as
* possible without a 30-day grace period where undeletion would have been allowed. If
* you proceed, there will be no way to recover this CA.
*/
public Delete setSkipGracePeriod(java.lang.Boolean skipGracePeriod) {
this.skipGracePeriod = skipGracePeriod;
return this;
}
@Override
public Delete set(String parameterName, Object value) {
return (Delete) super.set(parameterName, value);
}
}
/**
* Disable a CertificateAuthority.
*
* Create a request for the method "certificateAuthorities.disable".
*
* This request holds the parameters needed by the privateca server. After setting any optional
* parameters, call the {@link Disable#execute()} method to invoke the remote operation.
*
* @param name Required. The resource name for this CertificateAuthority in the format
* `projects/locations/caPools/certificateAuthorities`.
* @param content the {@link com.google.api.services.privateca.v1.model.DisableCertificateAuthorityRequest}
* @return the request
*/
public Disable disable(java.lang.String name, com.google.api.services.privateca.v1.model.DisableCertificateAuthorityRequest content) throws java.io.IOException {
Disable result = new Disable(name, content);
initialize(result);
return result;
}
public class Disable extends CertificateAuthorityServiceRequest {
private static final String REST_PATH = "v1/{+name}:disable";
private final java.util.regex.Pattern NAME_PATTERN =
java.util.regex.Pattern.compile("^projects/[^/]+/locations/[^/]+/caPools/[^/]+/certificateAuthorities/[^/]+$");
/**
* Disable a CertificateAuthority.
*
* Create a request for the method "certificateAuthorities.disable".
*
* This request holds the parameters needed by the the privateca server. After setting any
* optional parameters, call the {@link Disable#execute()} method to invoke the remote operation.
* {@link
* Disable#initialize(com.google.api.client.googleapis.services.AbstractGoogleClientRequest)} must
* be called to initialize this instance immediately after invoking the constructor.
*
* @param name Required. The resource name for this CertificateAuthority in the format
* `projects/locations/caPools/certificateAuthorities`.
* @param content the {@link com.google.api.services.privateca.v1.model.DisableCertificateAuthorityRequest}
* @since 1.13
*/
protected Disable(java.lang.String name, com.google.api.services.privateca.v1.model.DisableCertificateAuthorityRequest content) {
super(CertificateAuthorityService.this, "POST", REST_PATH, content, com.google.api.services.privateca.v1.model.Operation.class);
this.name = com.google.api.client.util.Preconditions.checkNotNull(name, "Required parameter name must be specified.");
if (!getSuppressPatternChecks()) {
com.google.api.client.util.Preconditions.checkArgument(NAME_PATTERN.matcher(name).matches(),
"Parameter name must conform to the pattern " +
"^projects/[^/]+/locations/[^/]+/caPools/[^/]+/certificateAuthorities/[^/]+$");
}
}
@Override
public Disable set$Xgafv(java.lang.String $Xgafv) {
return (Disable) super.set$Xgafv($Xgafv);
}
@Override
public Disable setAccessToken(java.lang.String accessToken) {
return (Disable) super.setAccessToken(accessToken);
}
@Override
public Disable setAlt(java.lang.String alt) {
return (Disable) super.setAlt(alt);
}
@Override
public Disable setCallback(java.lang.String callback) {
return (Disable) super.setCallback(callback);
}
@Override
public Disable setFields(java.lang.String fields) {
return (Disable) super.setFields(fields);
}
@Override
public Disable setKey(java.lang.String key) {
return (Disable) super.setKey(key);
}
@Override
public Disable setOauthToken(java.lang.String oauthToken) {
return (Disable) super.setOauthToken(oauthToken);
}
@Override
public Disable setPrettyPrint(java.lang.Boolean prettyPrint) {
return (Disable) super.setPrettyPrint(prettyPrint);
}
@Override
public Disable setQuotaUser(java.lang.String quotaUser) {
return (Disable) super.setQuotaUser(quotaUser);
}
@Override
public Disable setUploadType(java.lang.String uploadType) {
return (Disable) super.setUploadType(uploadType);
}
@Override
public Disable setUploadProtocol(java.lang.String uploadProtocol) {
return (Disable) super.setUploadProtocol(uploadProtocol);
}
/**
* Required. The resource name for this CertificateAuthority in the format
* `projects/locations/caPools/certificateAuthorities`.
*/
@com.google.api.client.util.Key
private java.lang.String name;
/** Required. The resource name for this CertificateAuthority in the format
`projects/locations/caPools/certificateAuthorities`.
*/
public java.lang.String getName() {
return name;
}
/**
* Required. The resource name for this CertificateAuthority in the format
* `projects/locations/caPools/certificateAuthorities`.
*/
public Disable 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/[^/]+/caPools/[^/]+/certificateAuthorities/[^/]+$");
}
this.name = name;
return this;
}
@Override
public Disable set(String parameterName, Object value) {
return (Disable) super.set(parameterName, value);
}
}
/**
* Enable a CertificateAuthority.
*
* Create a request for the method "certificateAuthorities.enable".
*
* This request holds the parameters needed by the privateca server. After setting any optional
* parameters, call the {@link Enable#execute()} method to invoke the remote operation.
*
* @param name Required. The resource name for this CertificateAuthority in the format
* `projects/locations/caPools/certificateAuthorities`.
* @param content the {@link com.google.api.services.privateca.v1.model.EnableCertificateAuthorityRequest}
* @return the request
*/
public Enable enable(java.lang.String name, com.google.api.services.privateca.v1.model.EnableCertificateAuthorityRequest content) throws java.io.IOException {
Enable result = new Enable(name, content);
initialize(result);
return result;
}
public class Enable extends CertificateAuthorityServiceRequest {
private static final String REST_PATH = "v1/{+name}:enable";
private final java.util.regex.Pattern NAME_PATTERN =
java.util.regex.Pattern.compile("^projects/[^/]+/locations/[^/]+/caPools/[^/]+/certificateAuthorities/[^/]+$");
/**
* Enable a CertificateAuthority.
*
* Create a request for the method "certificateAuthorities.enable".
*
* This request holds the parameters needed by the the privateca server. After setting any
* optional parameters, call the {@link Enable#execute()} method to invoke the remote operation.
* {@link
* Enable#initialize(com.google.api.client.googleapis.services.AbstractGoogleClientRequest)} must
* be called to initialize this instance immediately after invoking the constructor.
*
* @param name Required. The resource name for this CertificateAuthority in the format
* `projects/locations/caPools/certificateAuthorities`.
* @param content the {@link com.google.api.services.privateca.v1.model.EnableCertificateAuthorityRequest}
* @since 1.13
*/
protected Enable(java.lang.String name, com.google.api.services.privateca.v1.model.EnableCertificateAuthorityRequest content) {
super(CertificateAuthorityService.this, "POST", REST_PATH, content, com.google.api.services.privateca.v1.model.Operation.class);
this.name = com.google.api.client.util.Preconditions.checkNotNull(name, "Required parameter name must be specified.");
if (!getSuppressPatternChecks()) {
com.google.api.client.util.Preconditions.checkArgument(NAME_PATTERN.matcher(name).matches(),
"Parameter name must conform to the pattern " +
"^projects/[^/]+/locations/[^/]+/caPools/[^/]+/certificateAuthorities/[^/]+$");
}
}
@Override
public Enable set$Xgafv(java.lang.String $Xgafv) {
return (Enable) super.set$Xgafv($Xgafv);
}
@Override
public Enable setAccessToken(java.lang.String accessToken) {
return (Enable) super.setAccessToken(accessToken);
}
@Override
public Enable setAlt(java.lang.String alt) {
return (Enable) super.setAlt(alt);
}
@Override
public Enable setCallback(java.lang.String callback) {
return (Enable) super.setCallback(callback);
}
@Override
public Enable setFields(java.lang.String fields) {
return (Enable) super.setFields(fields);
}
@Override
public Enable setKey(java.lang.String key) {
return (Enable) super.setKey(key);
}
@Override
public Enable setOauthToken(java.lang.String oauthToken) {
return (Enable) super.setOauthToken(oauthToken);
}
@Override
public Enable setPrettyPrint(java.lang.Boolean prettyPrint) {
return (Enable) super.setPrettyPrint(prettyPrint);
}
@Override
public Enable setQuotaUser(java.lang.String quotaUser) {
return (Enable) super.setQuotaUser(quotaUser);
}
@Override
public Enable setUploadType(java.lang.String uploadType) {
return (Enable) super.setUploadType(uploadType);
}
@Override
public Enable setUploadProtocol(java.lang.String uploadProtocol) {
return (Enable) super.setUploadProtocol(uploadProtocol);
}
/**
* Required. The resource name for this CertificateAuthority in the format
* `projects/locations/caPools/certificateAuthorities`.
*/
@com.google.api.client.util.Key
private java.lang.String name;
/** Required. The resource name for this CertificateAuthority in the format
`projects/locations/caPools/certificateAuthorities`.
*/
public java.lang.String getName() {
return name;
}
/**
* Required. The resource name for this CertificateAuthority in the format
* `projects/locations/caPools/certificateAuthorities`.
*/
public Enable 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/[^/]+/caPools/[^/]+/certificateAuthorities/[^/]+$");
}
this.name = name;
return this;
}
@Override
public Enable set(String parameterName, Object value) {
return (Enable) super.set(parameterName, value);
}
}
/**
* Fetch a certificate signing request (CSR) from a CertificateAuthority that is in state
* AWAITING_USER_ACTIVATION and is of type SUBORDINATE. The CSR must then be signed by the desired
* parent Certificate Authority, which could be another CertificateAuthority resource, or could be
* an on-prem certificate authority. See also ActivateCertificateAuthority.
*
* Create a request for the method "certificateAuthorities.fetch".
*
* This request holds the parameters needed by the privateca server. After setting any optional
* parameters, call the {@link Fetch#execute()} method to invoke the remote operation.
*
* @param name Required. The resource name for this CertificateAuthority in the format
* `projects/locations/caPools/certificateAuthorities`.
* @return the request
*/
public Fetch fetch(java.lang.String name) throws java.io.IOException {
Fetch result = new Fetch(name);
initialize(result);
return result;
}
public class Fetch extends CertificateAuthorityServiceRequest {
private static final String REST_PATH = "v1/{+name}:fetch";
private final java.util.regex.Pattern NAME_PATTERN =
java.util.regex.Pattern.compile("^projects/[^/]+/locations/[^/]+/caPools/[^/]+/certificateAuthorities/[^/]+$");
/**
* Fetch a certificate signing request (CSR) from a CertificateAuthority that is in state
* AWAITING_USER_ACTIVATION and is of type SUBORDINATE. The CSR must then be signed by the desired
* parent Certificate Authority, which could be another CertificateAuthority resource, or could be
* an on-prem certificate authority. See also ActivateCertificateAuthority.
*
* Create a request for the method "certificateAuthorities.fetch".
*
* This request holds the parameters needed by the the privateca server. After setting any
* optional parameters, call the {@link Fetch#execute()} method to invoke the remote operation.
* {@link
* Fetch#initialize(com.google.api.client.googleapis.services.AbstractGoogleClientRequest)} must
* be called to initialize this instance immediately after invoking the constructor.
*
* @param name Required. The resource name for this CertificateAuthority in the format
* `projects/locations/caPools/certificateAuthorities`.
* @since 1.13
*/
protected Fetch(java.lang.String name) {
super(CertificateAuthorityService.this, "GET", REST_PATH, null, com.google.api.services.privateca.v1.model.FetchCertificateAuthorityCsrResponse.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/[^/]+/caPools/[^/]+/certificateAuthorities/[^/]+$");
}
}
@Override
public com.google.api.client.http.HttpResponse executeUsingHead() throws java.io.IOException {
return super.executeUsingHead();
}
@Override
public com.google.api.client.http.HttpRequest buildHttpRequestUsingHead() throws java.io.IOException {
return super.buildHttpRequestUsingHead();
}
@Override
public Fetch set$Xgafv(java.lang.String $Xgafv) {
return (Fetch) super.set$Xgafv($Xgafv);
}
@Override
public Fetch setAccessToken(java.lang.String accessToken) {
return (Fetch) super.setAccessToken(accessToken);
}
@Override
public Fetch setAlt(java.lang.String alt) {
return (Fetch) super.setAlt(alt);
}
@Override
public Fetch setCallback(java.lang.String callback) {
return (Fetch) super.setCallback(callback);
}
@Override
public Fetch setFields(java.lang.String fields) {
return (Fetch) super.setFields(fields);
}
@Override
public Fetch setKey(java.lang.String key) {
return (Fetch) super.setKey(key);
}
@Override
public Fetch setOauthToken(java.lang.String oauthToken) {
return (Fetch) super.setOauthToken(oauthToken);
}
@Override
public Fetch setPrettyPrint(java.lang.Boolean prettyPrint) {
return (Fetch) super.setPrettyPrint(prettyPrint);
}
@Override
public Fetch setQuotaUser(java.lang.String quotaUser) {
return (Fetch) super.setQuotaUser(quotaUser);
}
@Override
public Fetch setUploadType(java.lang.String uploadType) {
return (Fetch) super.setUploadType(uploadType);
}
@Override
public Fetch setUploadProtocol(java.lang.String uploadProtocol) {
return (Fetch) super.setUploadProtocol(uploadProtocol);
}
/**
* Required. The resource name for this CertificateAuthority in the format
* `projects/locations/caPools/certificateAuthorities`.
*/
@com.google.api.client.util.Key
private java.lang.String name;
/** Required. The resource name for this CertificateAuthority in the format
`projects/locations/caPools/certificateAuthorities`.
*/
public java.lang.String getName() {
return name;
}
/**
* Required. The resource name for this CertificateAuthority in the format
* `projects/locations/caPools/certificateAuthorities`.
*/
public Fetch 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/[^/]+/caPools/[^/]+/certificateAuthorities/[^/]+$");
}
this.name = name;
return this;
}
@Override
public Fetch set(String parameterName, Object value) {
return (Fetch) super.set(parameterName, value);
}
}
/**
* Returns a CertificateAuthority.
*
* Create a request for the method "certificateAuthorities.get".
*
* This request holds the parameters needed by the privateca server. After setting any optional
* parameters, call the {@link Get#execute()} method to invoke the remote operation.
*
* @param name Required. The name of the CertificateAuthority to get.
* @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 CertificateAuthorityServiceRequest {
private static final String REST_PATH = "v1/{+name}";
private final java.util.regex.Pattern NAME_PATTERN =
java.util.regex.Pattern.compile("^projects/[^/]+/locations/[^/]+/caPools/[^/]+/certificateAuthorities/[^/]+$");
/**
* Returns a CertificateAuthority.
*
* Create a request for the method "certificateAuthorities.get".
*
* This request holds the parameters needed by the the privateca 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 CertificateAuthority to get.
* @since 1.13
*/
protected Get(java.lang.String name) {
super(CertificateAuthorityService.this, "GET", REST_PATH, null, com.google.api.services.privateca.v1.model.CertificateAuthority.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/[^/]+/caPools/[^/]+/certificateAuthorities/[^/]+$");
}
}
@Override
public com.google.api.client.http.HttpResponse executeUsingHead() throws 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 CertificateAuthority to get. */
@com.google.api.client.util.Key
private java.lang.String name;
/** Required. The name of the CertificateAuthority to get.
*/
public java.lang.String getName() {
return name;
}
/** Required. The name of the CertificateAuthority to get. */
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/[^/]+/caPools/[^/]+/certificateAuthorities/[^/]+$");
}
this.name = name;
return this;
}
@Override
public Get set(String parameterName, Object value) {
return (Get) super.set(parameterName, value);
}
}
/**
* Lists CertificateAuthorities.
*
* Create a request for the method "certificateAuthorities.list".
*
* This request holds the parameters needed by the privateca server. After setting any optional
* parameters, call the {@link List#execute()} method to invoke the remote operation.
*
* @param parent Required. The resource name of the CaPool associated with the CertificateAuthorities, in the format
* `projects/locations/caPools`.
* @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 CertificateAuthorityServiceRequest {
private static final String REST_PATH = "v1/{+parent}/certificateAuthorities";
private final java.util.regex.Pattern PARENT_PATTERN =
java.util.regex.Pattern.compile("^projects/[^/]+/locations/[^/]+/caPools/[^/]+$");
/**
* Lists CertificateAuthorities.
*
* Create a request for the method "certificateAuthorities.list".
*
* This request holds the parameters needed by the the privateca 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 resource name of the CaPool associated with the CertificateAuthorities, in the format
* `projects/locations/caPools`.
* @since 1.13
*/
protected List(java.lang.String parent) {
super(CertificateAuthorityService.this, "GET", REST_PATH, null, com.google.api.services.privateca.v1.model.ListCertificateAuthoritiesResponse.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/[^/]+/caPools/[^/]+$");
}
}
@Override
public com.google.api.client.http.HttpResponse executeUsingHead() throws 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 resource name of the CaPool associated with the CertificateAuthorities,
* in the format `projects/locations/caPools`.
*/
@com.google.api.client.util.Key
private java.lang.String parent;
/** Required. The resource name of the CaPool associated with the CertificateAuthorities, in the format
`projects/locations/caPools`.
*/
public java.lang.String getParent() {
return parent;
}
/**
* Required. The resource name of the CaPool associated with the CertificateAuthorities,
* in the format `projects/locations/caPools`.
*/
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/[^/]+/caPools/[^/]+$");
}
this.parent = parent;
return this;
}
/** Optional. Only include resources that match the filter in the response. */
@com.google.api.client.util.Key
private java.lang.String filter;
/** Optional. Only include resources that match the filter in the response.
*/
public java.lang.String getFilter() {
return filter;
}
/** Optional. Only include resources that match the filter in the response. */
public List setFilter(java.lang.String filter) {
this.filter = filter;
return this;
}
/** Optional. Specify how the results should be sorted. */
@com.google.api.client.util.Key
private java.lang.String orderBy;
/** Optional. Specify how the results should be sorted.
*/
public java.lang.String getOrderBy() {
return orderBy;
}
/** Optional. Specify how the results should be sorted. */
public List setOrderBy(java.lang.String orderBy) {
this.orderBy = orderBy;
return this;
}
/**
* Optional. Limit on the number of CertificateAuthorities to include in the response.
* Further CertificateAuthorities can subsequently be obtained by including the
* ListCertificateAuthoritiesResponse.next_page_token in a subsequent request. If
* unspecified, the server will pick an appropriate default.
*/
@com.google.api.client.util.Key
private java.lang.Integer pageSize;
/** Optional. Limit on the number of CertificateAuthorities to include in the response. Further
CertificateAuthorities can subsequently be obtained by including the
ListCertificateAuthoritiesResponse.next_page_token in a subsequent request. If unspecified, the
server will pick an appropriate default.
*/
public java.lang.Integer getPageSize() {
return pageSize;
}
/**
* Optional. Limit on the number of CertificateAuthorities to include in the response.
* Further CertificateAuthorities can subsequently be obtained by including the
* ListCertificateAuthoritiesResponse.next_page_token in a subsequent request. If
* unspecified, the server will pick an appropriate default.
*/
public List setPageSize(java.lang.Integer pageSize) {
this.pageSize = pageSize;
return this;
}
/**
* Optional. Pagination token, returned earlier via
* ListCertificateAuthoritiesResponse.next_page_token.
*/
@com.google.api.client.util.Key
private java.lang.String pageToken;
/** Optional. Pagination token, returned earlier via
ListCertificateAuthoritiesResponse.next_page_token.
*/
public java.lang.String getPageToken() {
return pageToken;
}
/**
* Optional. Pagination token, returned earlier via
* ListCertificateAuthoritiesResponse.next_page_token.
*/
public List setPageToken(java.lang.String pageToken) {
this.pageToken = pageToken;
return this;
}
@Override
public List set(String parameterName, Object value) {
return (List) super.set(parameterName, value);
}
}
/**
* Update a CertificateAuthority.
*
* Create a request for the method "certificateAuthorities.patch".
*
* This request holds the parameters needed by the privateca server. After setting any optional
* parameters, call the {@link Patch#execute()} method to invoke the remote operation.
*
* @param name Output only. The resource name for this CertificateAuthority in the format
* `projects/locations/caPools/certificateAuthorities`.
* @param content the {@link com.google.api.services.privateca.v1.model.CertificateAuthority}
* @return the request
*/
public Patch patch(java.lang.String name, com.google.api.services.privateca.v1.model.CertificateAuthority content) throws java.io.IOException {
Patch result = new Patch(name, content);
initialize(result);
return result;
}
public class Patch extends CertificateAuthorityServiceRequest {
private static final String REST_PATH = "v1/{+name}";
private final java.util.regex.Pattern NAME_PATTERN =
java.util.regex.Pattern.compile("^projects/[^/]+/locations/[^/]+/caPools/[^/]+/certificateAuthorities/[^/]+$");
/**
* Update a CertificateAuthority.
*
* Create a request for the method "certificateAuthorities.patch".
*
* This request holds the parameters needed by the the privateca server. After setting any
* optional parameters, call the {@link Patch#execute()} method to invoke the remote operation.
* {@link
* Patch#initialize(com.google.api.client.googleapis.services.AbstractGoogleClientRequest)} must
* be called to initialize this instance immediately after invoking the constructor.
*
* @param name Output only. The resource name for this CertificateAuthority in the format
* `projects/locations/caPools/certificateAuthorities`.
* @param content the {@link com.google.api.services.privateca.v1.model.CertificateAuthority}
* @since 1.13
*/
protected Patch(java.lang.String name, com.google.api.services.privateca.v1.model.CertificateAuthority content) {
super(CertificateAuthorityService.this, "PATCH", REST_PATH, content, com.google.api.services.privateca.v1.model.Operation.class);
this.name = com.google.api.client.util.Preconditions.checkNotNull(name, "Required parameter name must be specified.");
if (!getSuppressPatternChecks()) {
com.google.api.client.util.Preconditions.checkArgument(NAME_PATTERN.matcher(name).matches(),
"Parameter name must conform to the pattern " +
"^projects/[^/]+/locations/[^/]+/caPools/[^/]+/certificateAuthorities/[^/]+$");
}
}
@Override
public Patch set$Xgafv(java.lang.String $Xgafv) {
return (Patch) super.set$Xgafv($Xgafv);
}
@Override
public Patch setAccessToken(java.lang.String accessToken) {
return (Patch) super.setAccessToken(accessToken);
}
@Override
public Patch setAlt(java.lang.String alt) {
return (Patch) super.setAlt(alt);
}
@Override
public Patch setCallback(java.lang.String callback) {
return (Patch) super.setCallback(callback);
}
@Override
public Patch setFields(java.lang.String fields) {
return (Patch) super.setFields(fields);
}
@Override
public Patch setKey(java.lang.String key) {
return (Patch) super.setKey(key);
}
@Override
public Patch setOauthToken(java.lang.String oauthToken) {
return (Patch) super.setOauthToken(oauthToken);
}
@Override
public Patch setPrettyPrint(java.lang.Boolean prettyPrint) {
return (Patch) super.setPrettyPrint(prettyPrint);
}
@Override
public Patch setQuotaUser(java.lang.String quotaUser) {
return (Patch) super.setQuotaUser(quotaUser);
}
@Override
public Patch setUploadType(java.lang.String uploadType) {
return (Patch) super.setUploadType(uploadType);
}
@Override
public Patch setUploadProtocol(java.lang.String uploadProtocol) {
return (Patch) super.setUploadProtocol(uploadProtocol);
}
/**
* Output only. The resource name for this CertificateAuthority in the format
* `projects/locations/caPools/certificateAuthorities`.
*/
@com.google.api.client.util.Key
private java.lang.String name;
/** Output only. The resource name for this CertificateAuthority in the format
`projects/locations/caPools/certificateAuthorities`.
*/
public java.lang.String getName() {
return name;
}
/**
* Output only. The resource name for this CertificateAuthority in the format
* `projects/locations/caPools/certificateAuthorities`.
*/
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/[^/]+/caPools/[^/]+/certificateAuthorities/[^/]+$");
}
this.name = name;
return this;
}
/**
* Optional. An ID to identify requests. Specify a unique request ID so that if you must
* retry your request, the server will know to ignore the request if it has already been
* completed. The server will guarantee that for at least 60 minutes since the first
* request. For example, consider a situation where you make an initial request and the
* request times out. If you make the request again with the same request ID, the server
* can check if original operation with the same request ID was received, and if so,
* will ignore the second request. This prevents clients from accidentally creating
* duplicate commitments. The request ID must be a valid UUID with the exception that
* zero UUID is not supported (00000000-0000-0000-0000-000000000000).
*/
@com.google.api.client.util.Key
private java.lang.String requestId;
/** Optional. An ID to identify requests. Specify a unique request ID so that if you must retry your
request, the server will know to ignore the request if it has already been completed. The server
will guarantee that for at least 60 minutes since the first request. For example, consider a
situation where you make an initial request and the request times out. If you make the request
again with the same request ID, the server can check if original operation with the same request ID
was received, and if so, will ignore the second request. This prevents clients from accidentally
creating duplicate commitments. The request ID must be a valid UUID with the exception that zero
UUID is not supported (00000000-0000-0000-0000-000000000000).
*/
public java.lang.String getRequestId() {
return requestId;
}
/**
* Optional. An ID to identify requests. Specify a unique request ID so that if you must
* retry your request, the server will know to ignore the request if it has already been
* completed. The server will guarantee that for at least 60 minutes since the first
* request. For example, consider a situation where you make an initial request and the
* request times out. If you make the request again with the same request ID, the server
* can check if original operation with the same request ID was received, and if so,
* will ignore the second request. This prevents clients from accidentally creating
* duplicate commitments. The request ID must be a valid UUID with the exception that
* zero UUID is not supported (00000000-0000-0000-0000-000000000000).
*/
public Patch setRequestId(java.lang.String requestId) {
this.requestId = requestId;
return this;
}
/** Required. A list of fields to be updated in this request. */
@com.google.api.client.util.Key
private String updateMask;
/** Required. A list of fields to be updated in this request.
*/
public String getUpdateMask() {
return updateMask;
}
/** Required. A list of fields to be updated in this request. */
public Patch setUpdateMask(String updateMask) {
this.updateMask = updateMask;
return this;
}
@Override
public Patch set(String parameterName, Object value) {
return (Patch) super.set(parameterName, value);
}
}
/**
* Undelete a CertificateAuthority that has been deleted.
*
* Create a request for the method "certificateAuthorities.undelete".
*
* This request holds the parameters needed by the privateca server. After setting any optional
* parameters, call the {@link Undelete#execute()} method to invoke the remote operation.
*
* @param name Required. The resource name for this CertificateAuthority in the format
* `projects/locations/caPools/certificateAuthorities`.
* @param content the {@link com.google.api.services.privateca.v1.model.UndeleteCertificateAuthorityRequest}
* @return the request
*/
public Undelete undelete(java.lang.String name, com.google.api.services.privateca.v1.model.UndeleteCertificateAuthorityRequest content) throws java.io.IOException {
Undelete result = new Undelete(name, content);
initialize(result);
return result;
}
public class Undelete extends CertificateAuthorityServiceRequest {
private static final String REST_PATH = "v1/{+name}:undelete";
private final java.util.regex.Pattern NAME_PATTERN =
java.util.regex.Pattern.compile("^projects/[^/]+/locations/[^/]+/caPools/[^/]+/certificateAuthorities/[^/]+$");
/**
* Undelete a CertificateAuthority that has been deleted.
*
* Create a request for the method "certificateAuthorities.undelete".
*
* This request holds the parameters needed by the the privateca server. After setting any
* optional parameters, call the {@link Undelete#execute()} method to invoke the remote operation.
* {@link
* Undelete#initialize(com.google.api.client.googleapis.services.AbstractGoogleClientRequest)}
* must be called to initialize this instance immediately after invoking the constructor.
*
* @param name Required. The resource name for this CertificateAuthority in the format
* `projects/locations/caPools/certificateAuthorities`.
* @param content the {@link com.google.api.services.privateca.v1.model.UndeleteCertificateAuthorityRequest}
* @since 1.13
*/
protected Undelete(java.lang.String name, com.google.api.services.privateca.v1.model.UndeleteCertificateAuthorityRequest content) {
super(CertificateAuthorityService.this, "POST", REST_PATH, content, com.google.api.services.privateca.v1.model.Operation.class);
this.name = com.google.api.client.util.Preconditions.checkNotNull(name, "Required parameter name must be specified.");
if (!getSuppressPatternChecks()) {
com.google.api.client.util.Preconditions.checkArgument(NAME_PATTERN.matcher(name).matches(),
"Parameter name must conform to the pattern " +
"^projects/[^/]+/locations/[^/]+/caPools/[^/]+/certificateAuthorities/[^/]+$");
}
}
@Override
public Undelete set$Xgafv(java.lang.String $Xgafv) {
return (Undelete) super.set$Xgafv($Xgafv);
}
@Override
public Undelete setAccessToken(java.lang.String accessToken) {
return (Undelete) super.setAccessToken(accessToken);
}
@Override
public Undelete setAlt(java.lang.String alt) {
return (Undelete) super.setAlt(alt);
}
@Override
public Undelete setCallback(java.lang.String callback) {
return (Undelete) super.setCallback(callback);
}
@Override
public Undelete setFields(java.lang.String fields) {
return (Undelete) super.setFields(fields);
}
@Override
public Undelete setKey(java.lang.String key) {
return (Undelete) super.setKey(key);
}
@Override
public Undelete setOauthToken(java.lang.String oauthToken) {
return (Undelete) super.setOauthToken(oauthToken);
}
@Override
public Undelete setPrettyPrint(java.lang.Boolean prettyPrint) {
return (Undelete) super.setPrettyPrint(prettyPrint);
}
@Override
public Undelete setQuotaUser(java.lang.String quotaUser) {
return (Undelete) super.setQuotaUser(quotaUser);
}
@Override
public Undelete setUploadType(java.lang.String uploadType) {
return (Undelete) super.setUploadType(uploadType);
}
@Override
public Undelete setUploadProtocol(java.lang.String uploadProtocol) {
return (Undelete) super.setUploadProtocol(uploadProtocol);
}
/**
* Required. The resource name for this CertificateAuthority in the format
* `projects/locations/caPools/certificateAuthorities`.
*/
@com.google.api.client.util.Key
private java.lang.String name;
/** Required. The resource name for this CertificateAuthority in the format
`projects/locations/caPools/certificateAuthorities`.
*/
public java.lang.String getName() {
return name;
}
/**
* Required. The resource name for this CertificateAuthority in the format
* `projects/locations/caPools/certificateAuthorities`.
*/
public Undelete 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/[^/]+/caPools/[^/]+/certificateAuthorities/[^/]+$");
}
this.name = name;
return this;
}
@Override
public Undelete set(String parameterName, Object value) {
return (Undelete) super.set(parameterName, value);
}
}
/**
* An accessor for creating requests from the CertificateRevocationLists collection.
*
* The typical use is:
*
* {@code CertificateAuthorityService privateca = new CertificateAuthorityService(...);}
* {@code CertificateAuthorityService.CertificateRevocationLists.List request = privateca.certificateRevocationLists().list(parameters ...)}
*
*
* @return the resource collection
*/
public CertificateRevocationLists certificateRevocationLists() {
return new CertificateRevocationLists();
}
/**
* The "certificateRevocationLists" collection of methods.
*/
public class CertificateRevocationLists {
/**
* Returns a CertificateRevocationList.
*
* Create a request for the method "certificateRevocationLists.get".
*
* This request holds the parameters needed by the privateca server. After setting any optional
* parameters, call the {@link Get#execute()} method to invoke the remote operation.
*
* @param name Required. The name of the CertificateRevocationList to get.
* @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 CertificateAuthorityServiceRequest {
private static final String REST_PATH = "v1/{+name}";
private final java.util.regex.Pattern NAME_PATTERN =
java.util.regex.Pattern.compile("^projects/[^/]+/locations/[^/]+/caPools/[^/]+/certificateAuthorities/[^/]+/certificateRevocationLists/[^/]+$");
/**
* Returns a CertificateRevocationList.
*
* Create a request for the method "certificateRevocationLists.get".
*
* This request holds the parameters needed by the the privateca 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 CertificateRevocationList to get.
* @since 1.13
*/
protected Get(java.lang.String name) {
super(CertificateAuthorityService.this, "GET", REST_PATH, null, com.google.api.services.privateca.v1.model.CertificateRevocationList.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/[^/]+/caPools/[^/]+/certificateAuthorities/[^/]+/certificateRevocationLists/[^/]+$");
}
}
@Override
public com.google.api.client.http.HttpResponse executeUsingHead() throws 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 CertificateRevocationList to get. */
@com.google.api.client.util.Key
private java.lang.String name;
/** Required. The name of the CertificateRevocationList to get.
*/
public java.lang.String getName() {
return name;
}
/** Required. The name of the CertificateRevocationList to get. */
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/[^/]+/caPools/[^/]+/certificateAuthorities/[^/]+/certificateRevocationLists/[^/]+$");
}
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 "certificateRevocationLists.getIamPolicy".
*
* This request holds the parameters needed by the privateca 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 CertificateAuthorityServiceRequest {
private static final String REST_PATH = "v1/{+resource}:getIamPolicy";
private final java.util.regex.Pattern RESOURCE_PATTERN =
java.util.regex.Pattern.compile("^projects/[^/]+/locations/[^/]+/caPools/[^/]+/certificateAuthorities/[^/]+/certificateRevocationLists/[^/]+$");
/**
* 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 "certificateRevocationLists.getIamPolicy".
*
* This request holds the parameters needed by the the privateca 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(CertificateAuthorityService.this, "GET", REST_PATH, null, com.google.api.services.privateca.v1.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/[^/]+/caPools/[^/]+/certificateAuthorities/[^/]+/certificateRevocationLists/[^/]+$");
}
}
@Override
public com.google.api.client.http.HttpResponse executeUsingHead() throws 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/[^/]+/caPools/[^/]+/certificateAuthorities/[^/]+/certificateRevocationLists/[^/]+$");
}
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 CertificateRevocationLists.
*
* Create a request for the method "certificateRevocationLists.list".
*
* This request holds the parameters needed by the privateca server. After setting any optional
* parameters, call the {@link List#execute()} method to invoke the remote operation.
*
* @param parent Required. The resource name of the location associated with the CertificateRevocationLists, in the
* format `projects/locations/caPools/certificateAuthorities`.
* @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 CertificateAuthorityServiceRequest {
private static final String REST_PATH = "v1/{+parent}/certificateRevocationLists";
private final java.util.regex.Pattern PARENT_PATTERN =
java.util.regex.Pattern.compile("^projects/[^/]+/locations/[^/]+/caPools/[^/]+/certificateAuthorities/[^/]+$");
/**
* Lists CertificateRevocationLists.
*
* Create a request for the method "certificateRevocationLists.list".
*
* This request holds the parameters needed by the the privateca 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 resource name of the location associated with the CertificateRevocationLists, in the
* format `projects/locations/caPools/certificateAuthorities`.
* @since 1.13
*/
protected List(java.lang.String parent) {
super(CertificateAuthorityService.this, "GET", REST_PATH, null, com.google.api.services.privateca.v1.model.ListCertificateRevocationListsResponse.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/[^/]+/caPools/[^/]+/certificateAuthorities/[^/]+$");
}
}
@Override
public com.google.api.client.http.HttpResponse executeUsingHead() throws 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 resource name of the location associated with the
* CertificateRevocationLists, in the format
* `projects/locations/caPools/certificateAuthorities`.
*/
@com.google.api.client.util.Key
private java.lang.String parent;
/** Required. The resource name of the location associated with the CertificateRevocationLists, in the
format `projects/locations/caPools/certificateAuthorities`.
*/
public java.lang.String getParent() {
return parent;
}
/**
* Required. The resource name of the location associated with the
* CertificateRevocationLists, in the format
* `projects/locations/caPools/certificateAuthorities`.
*/
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/[^/]+/caPools/[^/]+/certificateAuthorities/[^/]+$");
}
this.parent = parent;
return this;
}
/** Optional. Only include resources that match the filter in the response. */
@com.google.api.client.util.Key
private java.lang.String filter;
/** Optional. Only include resources that match the filter in the response.
*/
public java.lang.String getFilter() {
return filter;
}
/** Optional. Only include resources that match the filter in the response. */
public List setFilter(java.lang.String filter) {
this.filter = filter;
return this;
}
/** Optional. Specify how the results should be sorted. */
@com.google.api.client.util.Key
private java.lang.String orderBy;
/** Optional. Specify how the results should be sorted.
*/
public java.lang.String getOrderBy() {
return orderBy;
}
/** Optional. Specify how the results should be sorted. */
public List setOrderBy(java.lang.String orderBy) {
this.orderBy = orderBy;
return this;
}
/**
* Optional. Limit on the number of CertificateRevocationLists to include in the
* response. Further CertificateRevocationLists can subsequently be obtained by
* including the ListCertificateRevocationListsResponse.next_page_token in a
* subsequent request. If unspecified, the server will pick an appropriate default.
*/
@com.google.api.client.util.Key
private java.lang.Integer pageSize;
/** Optional. Limit on the number of CertificateRevocationLists to include in the response. Further
CertificateRevocationLists can subsequently be obtained by including the
ListCertificateRevocationListsResponse.next_page_token in a subsequent request. If unspecified, the
server will pick an appropriate default.
*/
public java.lang.Integer getPageSize() {
return pageSize;
}
/**
* Optional. Limit on the number of CertificateRevocationLists to include in the
* response. Further CertificateRevocationLists can subsequently be obtained by
* including the ListCertificateRevocationListsResponse.next_page_token in a
* subsequent request. If unspecified, the server will pick an appropriate default.
*/
public List setPageSize(java.lang.Integer pageSize) {
this.pageSize = pageSize;
return this;
}
/**
* Optional. Pagination token, returned earlier via
* ListCertificateRevocationListsResponse.next_page_token.
*/
@com.google.api.client.util.Key
private java.lang.String pageToken;
/** Optional. Pagination token, returned earlier via
ListCertificateRevocationListsResponse.next_page_token.
*/
public java.lang.String getPageToken() {
return pageToken;
}
/**
* Optional. Pagination token, returned earlier via
* ListCertificateRevocationListsResponse.next_page_token.
*/
public List setPageToken(java.lang.String pageToken) {
this.pageToken = pageToken;
return this;
}
@Override
public List set(String parameterName, Object value) {
return (List) super.set(parameterName, value);
}
}
/**
* Update a CertificateRevocationList.
*
* Create a request for the method "certificateRevocationLists.patch".
*
* This request holds the parameters needed by the privateca server. After setting any optional
* parameters, call the {@link Patch#execute()} method to invoke the remote operation.
*
* @param name Output only. The resource name for this CertificateRevocationList in the format
* `projects/locations/caPoolscertificateAuthorities/ certificateRevocationLists`.
* @param content the {@link com.google.api.services.privateca.v1.model.CertificateRevocationList}
* @return the request
*/
public Patch patch(java.lang.String name, com.google.api.services.privateca.v1.model.CertificateRevocationList content) throws java.io.IOException {
Patch result = new Patch(name, content);
initialize(result);
return result;
}
public class Patch extends CertificateAuthorityServiceRequest {
private static final String REST_PATH = "v1/{+name}";
private final java.util.regex.Pattern NAME_PATTERN =
java.util.regex.Pattern.compile("^projects/[^/]+/locations/[^/]+/caPools/[^/]+/certificateAuthorities/[^/]+/certificateRevocationLists/[^/]+$");
/**
* Update a CertificateRevocationList.
*
* Create a request for the method "certificateRevocationLists.patch".
*
* This request holds the parameters needed by the the privateca server. After setting any
* optional parameters, call the {@link Patch#execute()} method to invoke the remote operation.
* {@link
* Patch#initialize(com.google.api.client.googleapis.services.AbstractGoogleClientRequest)} must
* be called to initialize this instance immediately after invoking the constructor.
*
* @param name Output only. The resource name for this CertificateRevocationList in the format
* `projects/locations/caPoolscertificateAuthorities/ certificateRevocationLists`.
* @param content the {@link com.google.api.services.privateca.v1.model.CertificateRevocationList}
* @since 1.13
*/
protected Patch(java.lang.String name, com.google.api.services.privateca.v1.model.CertificateRevocationList content) {
super(CertificateAuthorityService.this, "PATCH", REST_PATH, content, com.google.api.services.privateca.v1.model.Operation.class);
this.name = com.google.api.client.util.Preconditions.checkNotNull(name, "Required parameter name must be specified.");
if (!getSuppressPatternChecks()) {
com.google.api.client.util.Preconditions.checkArgument(NAME_PATTERN.matcher(name).matches(),
"Parameter name must conform to the pattern " +
"^projects/[^/]+/locations/[^/]+/caPools/[^/]+/certificateAuthorities/[^/]+/certificateRevocationLists/[^/]+$");
}
}
@Override
public Patch set$Xgafv(java.lang.String $Xgafv) {
return (Patch) super.set$Xgafv($Xgafv);
}
@Override
public Patch setAccessToken(java.lang.String accessToken) {
return (Patch) super.setAccessToken(accessToken);
}
@Override
public Patch setAlt(java.lang.String alt) {
return (Patch) super.setAlt(alt);
}
@Override
public Patch setCallback(java.lang.String callback) {
return (Patch) super.setCallback(callback);
}
@Override
public Patch setFields(java.lang.String fields) {
return (Patch) super.setFields(fields);
}
@Override
public Patch setKey(java.lang.String key) {
return (Patch) super.setKey(key);
}
@Override
public Patch setOauthToken(java.lang.String oauthToken) {
return (Patch) super.setOauthToken(oauthToken);
}
@Override
public Patch setPrettyPrint(java.lang.Boolean prettyPrint) {
return (Patch) super.setPrettyPrint(prettyPrint);
}
@Override
public Patch setQuotaUser(java.lang.String quotaUser) {
return (Patch) super.setQuotaUser(quotaUser);
}
@Override
public Patch setUploadType(java.lang.String uploadType) {
return (Patch) super.setUploadType(uploadType);
}
@Override
public Patch setUploadProtocol(java.lang.String uploadProtocol) {
return (Patch) super.setUploadProtocol(uploadProtocol);
}
/**
* Output only. The resource name for this CertificateRevocationList in the format
* `projects/locations/caPoolscertificateAuthorities/ certificateRevocationLists`.
*/
@com.google.api.client.util.Key
private java.lang.String name;
/** Output only. The resource name for this CertificateRevocationList in the format
`projects/locations/caPoolscertificateAuthorities/ certificateRevocationLists`.
*/
public java.lang.String getName() {
return name;
}
/**
* Output only. The resource name for this CertificateRevocationList in the format
* `projects/locations/caPoolscertificateAuthorities/ certificateRevocationLists`.
*/
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/[^/]+/caPools/[^/]+/certificateAuthorities/[^/]+/certificateRevocationLists/[^/]+$");
}
this.name = name;
return this;
}
/**
* Optional. An ID to identify requests. Specify a unique request ID so that if you
* must retry your request, the server will know to ignore the request if it has
* already been completed. The server will guarantee that for at least 60 minutes
* since the first request. For example, consider a situation where you make an
* initial request and the request times out. If you make the request again with the
* same request ID, the server can check if original operation with the same request
* ID was received, and if so, will ignore the second request. This prevents clients
* from accidentally creating duplicate commitments. The request ID must be a valid
* UUID with the exception that zero UUID is not supported
* (00000000-0000-0000-0000-000000000000).
*/
@com.google.api.client.util.Key
private java.lang.String requestId;
/** Optional. An ID to identify requests. Specify a unique request ID so that if you must retry your
request, the server will know to ignore the request if it has already been completed. The server
will guarantee that for at least 60 minutes since the first request. For example, consider a
situation where you make an initial request and the request times out. If you make the request
again with the same request ID, the server can check if original operation with the same request ID
was received, and if so, will ignore the second request. This prevents clients from accidentally
creating duplicate commitments. The request ID must be a valid UUID with the exception that zero
UUID is not supported (00000000-0000-0000-0000-000000000000).
*/
public java.lang.String getRequestId() {
return requestId;
}
/**
* Optional. An ID to identify requests. Specify a unique request ID so that if you
* must retry your request, the server will know to ignore the request if it has
* already been completed. The server will guarantee that for at least 60 minutes
* since the first request. For example, consider a situation where you make an
* initial request and the request times out. If you make the request again with the
* same request ID, the server can check if original operation with the same request
* ID was received, and if so, will ignore the second request. This prevents clients
* from accidentally creating duplicate commitments. The request ID must be a valid
* UUID with the exception that zero UUID is not supported
* (00000000-0000-0000-0000-000000000000).
*/
public Patch setRequestId(java.lang.String requestId) {
this.requestId = requestId;
return this;
}
/** Required. A list of fields to be updated in this request. */
@com.google.api.client.util.Key
private String updateMask;
/** Required. A list of fields to be updated in this request.
*/
public String getUpdateMask() {
return updateMask;
}
/** Required. A list of fields to be updated in this request. */
public Patch setUpdateMask(String updateMask) {
this.updateMask = updateMask;
return this;
}
@Override
public Patch set(String parameterName, Object value) {
return (Patch) super.set(parameterName, value);
}
}
/**
* Sets the access control policy on the specified resource. Replaces any existing policy. Can
* return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED` errors.
*
* Create a request for the method "certificateRevocationLists.setIamPolicy".
*
* This request holds the parameters needed by the privateca 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.privateca.v1.model.SetIamPolicyRequest}
* @return the request
*/
public SetIamPolicy setIamPolicy(java.lang.String resource, com.google.api.services.privateca.v1.model.SetIamPolicyRequest content) throws java.io.IOException {
SetIamPolicy result = new SetIamPolicy(resource, content);
initialize(result);
return result;
}
public class SetIamPolicy extends CertificateAuthorityServiceRequest {
private static final String REST_PATH = "v1/{+resource}:setIamPolicy";
private final java.util.regex.Pattern RESOURCE_PATTERN =
java.util.regex.Pattern.compile("^projects/[^/]+/locations/[^/]+/caPools/[^/]+/certificateAuthorities/[^/]+/certificateRevocationLists/[^/]+$");
/**
* 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 "certificateRevocationLists.setIamPolicy".
*
* This request holds the parameters needed by the the privateca 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.privateca.v1.model.SetIamPolicyRequest}
* @since 1.13
*/
protected SetIamPolicy(java.lang.String resource, com.google.api.services.privateca.v1.model.SetIamPolicyRequest content) {
super(CertificateAuthorityService.this, "POST", REST_PATH, content, com.google.api.services.privateca.v1.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/[^/]+/caPools/[^/]+/certificateAuthorities/[^/]+/certificateRevocationLists/[^/]+$");
}
}
@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/[^/]+/caPools/[^/]+/certificateAuthorities/[^/]+/certificateRevocationLists/[^/]+$");
}
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 "certificateRevocationLists.testIamPermissions".
*
* This request holds the parameters needed by the privateca 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.privateca.v1.model.TestIamPermissionsRequest}
* @return the request
*/
public TestIamPermissions testIamPermissions(java.lang.String resource, com.google.api.services.privateca.v1.model.TestIamPermissionsRequest content) throws java.io.IOException {
TestIamPermissions result = new TestIamPermissions(resource, content);
initialize(result);
return result;
}
public class TestIamPermissions extends CertificateAuthorityServiceRequest {
private static final String REST_PATH = "v1/{+resource}:testIamPermissions";
private final java.util.regex.Pattern RESOURCE_PATTERN =
java.util.regex.Pattern.compile("^projects/[^/]+/locations/[^/]+/caPools/[^/]+/certificateAuthorities/[^/]+/certificateRevocationLists/[^/]+$");
/**
* 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 "certificateRevocationLists.testIamPermissions".
*
* This request holds the parameters needed by the the privateca 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.privateca.v1.model.TestIamPermissionsRequest}
* @since 1.13
*/
protected TestIamPermissions(java.lang.String resource, com.google.api.services.privateca.v1.model.TestIamPermissionsRequest content) {
super(CertificateAuthorityService.this, "POST", REST_PATH, content, com.google.api.services.privateca.v1.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/[^/]+/caPools/[^/]+/certificateAuthorities/[^/]+/certificateRevocationLists/[^/]+$");
}
}
@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/[^/]+/caPools/[^/]+/certificateAuthorities/[^/]+/certificateRevocationLists/[^/]+$");
}
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 Certificates collection.
*
* The typical use is:
*
* {@code CertificateAuthorityService privateca = new CertificateAuthorityService(...);}
* {@code CertificateAuthorityService.Certificates.List request = privateca.certificates().list(parameters ...)}
*
*
* @return the resource collection
*/
public Certificates certificates() {
return new Certificates();
}
/**
* The "certificates" collection of methods.
*/
public class Certificates {
/**
* Create a new Certificate in a given Project, Location from a particular CaPool.
*
* Create a request for the method "certificates.create".
*
* This request holds the parameters needed by the privateca server. After setting any optional
* parameters, call the {@link Create#execute()} method to invoke the remote operation.
*
* @param parent Required. The resource name of the CaPool associated with the Certificate, in the format
* `projects/locations/caPools`.
* @param content the {@link com.google.api.services.privateca.v1.model.Certificate}
* @return the request
*/
public Create create(java.lang.String parent, com.google.api.services.privateca.v1.model.Certificate content) throws java.io.IOException {
Create result = new Create(parent, content);
initialize(result);
return result;
}
public class Create extends CertificateAuthorityServiceRequest {
private static final String REST_PATH = "v1/{+parent}/certificates";
private final java.util.regex.Pattern PARENT_PATTERN =
java.util.regex.Pattern.compile("^projects/[^/]+/locations/[^/]+/caPools/[^/]+$");
/**
* Create a new Certificate in a given Project, Location from a particular CaPool.
*
* Create a request for the method "certificates.create".
*
* This request holds the parameters needed by the the privateca 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 resource name of the CaPool associated with the Certificate, in the format
* `projects/locations/caPools`.
* @param content the {@link com.google.api.services.privateca.v1.model.Certificate}
* @since 1.13
*/
protected Create(java.lang.String parent, com.google.api.services.privateca.v1.model.Certificate content) {
super(CertificateAuthorityService.this, "POST", REST_PATH, content, com.google.api.services.privateca.v1.model.Certificate.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/[^/]+/caPools/[^/]+$");
}
}
@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 resource name of the CaPool associated with the Certificate, in the
* format `projects/locations/caPools`.
*/
@com.google.api.client.util.Key
private java.lang.String parent;
/** Required. The resource name of the CaPool associated with the Certificate, in the format
`projects/locations/caPools`.
*/
public java.lang.String getParent() {
return parent;
}
/**
* Required. The resource name of the CaPool associated with the Certificate, in the
* format `projects/locations/caPools`.
*/
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/[^/]+/caPools/[^/]+$");
}
this.parent = parent;
return this;
}
/**
* Optional. It must be unique within a location and match the regular expression
* `[a-zA-Z0-9_-]{1,63}`. This field is required when using a CertificateAuthority in
* the Enterprise CertificateAuthority.Tier, but is optional and its value is ignored
* otherwise.
*/
@com.google.api.client.util.Key
private java.lang.String certificateId;
/** Optional. It must be unique within a location and match the regular expression
`[a-zA-Z0-9_-]{1,63}`. This field is required when using a CertificateAuthority in the Enterprise
CertificateAuthority.Tier, but is optional and its value is ignored otherwise.
*/
public java.lang.String getCertificateId() {
return certificateId;
}
/**
* Optional. It must be unique within a location and match the regular expression
* `[a-zA-Z0-9_-]{1,63}`. This field is required when using a CertificateAuthority in
* the Enterprise CertificateAuthority.Tier, but is optional and its value is ignored
* otherwise.
*/
public Create setCertificateId(java.lang.String certificateId) {
this.certificateId = certificateId;
return this;
}
/**
* Optional. The resource ID of the CertificateAuthority that should issue the
* certificate. This optional field will ignore the load-balancing scheme of the Pool
* and directly issue the certificate from the CA with the specified ID, contained in
* the same CaPool referenced by `parent`. Per-CA quota rules apply. If left empty, a
* CertificateAuthority will be chosen from the CaPool by the service. For example, to
* issue a Certificate from a Certificate Authority with resource name "projects/my-
* project/locations/us-central1/caPools/my-pool/certificateAuthorities/my-ca", you can
* set the parent to "projects/my-project/locations/us-central1/caPools/my-pool" and the
* issuing_certificate_authority_id to "my-ca".
*/
@com.google.api.client.util.Key
private java.lang.String issuingCertificateAuthorityId;
/** Optional. The resource ID of the CertificateAuthority that should issue the certificate. This
optional field will ignore the load-balancing scheme of the Pool and directly issue the certificate
from the CA with the specified ID, contained in the same CaPool referenced by `parent`. Per-CA
quota rules apply. If left empty, a CertificateAuthority will be chosen from the CaPool by the
service. For example, to issue a Certificate from a Certificate Authority with resource name
"projects/my-project/locations/us-central1/caPools/my-pool/certificateAuthorities/my-ca", you can
set the parent to "projects/my-project/locations/us-central1/caPools/my-pool" and the
issuing_certificate_authority_id to "my-ca".
*/
public java.lang.String getIssuingCertificateAuthorityId() {
return issuingCertificateAuthorityId;
}
/**
* Optional. The resource ID of the CertificateAuthority that should issue the
* certificate. This optional field will ignore the load-balancing scheme of the Pool
* and directly issue the certificate from the CA with the specified ID, contained in
* the same CaPool referenced by `parent`. Per-CA quota rules apply. If left empty, a
* CertificateAuthority will be chosen from the CaPool by the service. For example, to
* issue a Certificate from a Certificate Authority with resource name "projects/my-
* project/locations/us-central1/caPools/my-pool/certificateAuthorities/my-ca", you can
* set the parent to "projects/my-project/locations/us-central1/caPools/my-pool" and the
* issuing_certificate_authority_id to "my-ca".
*/
public Create setIssuingCertificateAuthorityId(java.lang.String issuingCertificateAuthorityId) {
this.issuingCertificateAuthorityId = issuingCertificateAuthorityId;
return this;
}
/**
* Optional. An ID to identify requests. Specify a unique request ID so that if you must
* retry your request, the server will know to ignore the request if it has already been
* completed. The server will guarantee that for at least 60 minutes since the first
* request. For example, consider a situation where you make an initial request and the
* request times out. If you make the request again with the same request ID, the server
* can check if original operation with the same request ID was received, and if so,
* will ignore the second request. This prevents clients from accidentally creating
* duplicate commitments. The request ID must be a valid UUID with the exception that
* zero UUID is not supported (00000000-0000-0000-0000-000000000000).
*/
@com.google.api.client.util.Key
private java.lang.String requestId;
/** Optional. An ID to identify requests. Specify a unique request ID so that if you must retry your
request, the server will know to ignore the request if it has already been completed. The server
will guarantee that for at least 60 minutes since the first request. For example, consider a
situation where you make an initial request and the request times out. If you make the request
again with the same request ID, the server can check if original operation with the same request ID
was received, and if so, will ignore the second request. This prevents clients from accidentally
creating duplicate commitments. The request ID must be a valid UUID with the exception that zero
UUID is not supported (00000000-0000-0000-0000-000000000000).
*/
public java.lang.String getRequestId() {
return requestId;
}
/**
* Optional. An ID to identify requests. Specify a unique request ID so that if you must
* retry your request, the server will know to ignore the request if it has already been
* completed. The server will guarantee that for at least 60 minutes since the first
* request. For example, consider a situation where you make an initial request and the
* request times out. If you make the request again with the same request ID, the server
* can check if original operation with the same request ID was received, and if so,
* will ignore the second request. This prevents clients from accidentally creating
* duplicate commitments. The request ID must be a valid UUID with the exception that
* zero UUID is not supported (00000000-0000-0000-0000-000000000000).
*/
public Create setRequestId(java.lang.String requestId) {
this.requestId = requestId;
return this;
}
/**
* Optional. If this is true, no Certificate resource will be persisted regardless of
* the CaPool's tier, and the returned Certificate will not contain the pem_certificate
* field.
*/
@com.google.api.client.util.Key
private java.lang.Boolean validateOnly;
/** Optional. If this is true, no Certificate resource will be persisted regardless of the CaPool's
tier, and the returned Certificate will not contain the pem_certificate field.
*/
public java.lang.Boolean getValidateOnly() {
return validateOnly;
}
/**
* Optional. If this is true, no Certificate resource will be persisted regardless of
* the CaPool's tier, and the returned Certificate will not contain the pem_certificate
* field.
*/
public Create setValidateOnly(java.lang.Boolean validateOnly) {
this.validateOnly = validateOnly;
return this;
}
@Override
public Create set(String parameterName, Object value) {
return (Create) super.set(parameterName, value);
}
}
/**
* Returns a Certificate.
*
* Create a request for the method "certificates.get".
*
* This request holds the parameters needed by the privateca server. After setting any optional
* parameters, call the {@link Get#execute()} method to invoke the remote operation.
*
* @param name Required. The name of the Certificate to get.
* @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 CertificateAuthorityServiceRequest {
private static final String REST_PATH = "v1/{+name}";
private final java.util.regex.Pattern NAME_PATTERN =
java.util.regex.Pattern.compile("^projects/[^/]+/locations/[^/]+/caPools/[^/]+/certificates/[^/]+$");
/**
* Returns a Certificate.
*
* Create a request for the method "certificates.get".
*
* This request holds the parameters needed by the the privateca 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 Certificate to get.
* @since 1.13
*/
protected Get(java.lang.String name) {
super(CertificateAuthorityService.this, "GET", REST_PATH, null, com.google.api.services.privateca.v1.model.Certificate.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/[^/]+/caPools/[^/]+/certificates/[^/]+$");
}
}
@Override
public com.google.api.client.http.HttpResponse executeUsingHead() throws 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 Certificate to get. */
@com.google.api.client.util.Key
private java.lang.String name;
/** Required. The name of the Certificate to get.
*/
public java.lang.String getName() {
return name;
}
/** Required. The name of the Certificate to get. */
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/[^/]+/caPools/[^/]+/certificates/[^/]+$");
}
this.name = name;
return this;
}
@Override
public Get set(String parameterName, Object value) {
return (Get) super.set(parameterName, value);
}
}
/**
* Lists Certificates.
*
* Create a request for the method "certificates.list".
*
* This request holds the parameters needed by the privateca server. After setting any optional
* parameters, call the {@link List#execute()} method to invoke the remote operation.
*
* @param parent Required. The resource name of the location associated with the Certificates, in the format
* `projects/locations/caPools`.
* @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 CertificateAuthorityServiceRequest {
private static final String REST_PATH = "v1/{+parent}/certificates";
private final java.util.regex.Pattern PARENT_PATTERN =
java.util.regex.Pattern.compile("^projects/[^/]+/locations/[^/]+/caPools/[^/]+$");
/**
* Lists Certificates.
*
* Create a request for the method "certificates.list".
*
* This request holds the parameters needed by the the privateca 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 resource name of the location associated with the Certificates, in the format
* `projects/locations/caPools`.
* @since 1.13
*/
protected List(java.lang.String parent) {
super(CertificateAuthorityService.this, "GET", REST_PATH, null, com.google.api.services.privateca.v1.model.ListCertificatesResponse.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/[^/]+/caPools/[^/]+$");
}
}
@Override
public com.google.api.client.http.HttpResponse executeUsingHead() throws 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 resource name of the location associated with the Certificates, in the
* format `projects/locations/caPools`.
*/
@com.google.api.client.util.Key
private java.lang.String parent;
/** Required. The resource name of the location associated with the Certificates, in the format
`projects/locations/caPools`.
*/
public java.lang.String getParent() {
return parent;
}
/**
* Required. The resource name of the location associated with the Certificates, in the
* format `projects/locations/caPools`.
*/
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/[^/]+/caPools/[^/]+$");
}
this.parent = parent;
return this;
}
/**
* Optional. Only include resources that match the filter in the response. For details
* on supported filters and syntax, see [Certificates Filtering
* documentation](https://cloud.google.com/certificate-authority-service/docs/sorting-
* filtering-certificates#filtering_support).
*/
@com.google.api.client.util.Key
private java.lang.String filter;
/** Optional. Only include resources that match the filter in the response. For details on supported
filters and syntax, see [Certificates Filtering documentation](https://cloud.google.com
/certificate-authority-service/docs/sorting-filtering-certificates#filtering_support).
*/
public java.lang.String getFilter() {
return filter;
}
/**
* Optional. Only include resources that match the filter in the response. For details
* on supported filters and syntax, see [Certificates Filtering
* documentation](https://cloud.google.com/certificate-authority-service/docs/sorting-
* filtering-certificates#filtering_support).
*/
public List setFilter(java.lang.String filter) {
this.filter = filter;
return this;
}
/**
* Optional. Specify how the results should be sorted. For details on supported fields
* and syntax, see [Certificates Sorting documentation](https://cloud.google.com
* /certificate-authority-service/docs/sorting-filtering-certificates#sorting_support).
*/
@com.google.api.client.util.Key
private java.lang.String orderBy;
/** Optional. Specify how the results should be sorted. For details on supported fields and syntax, see
[Certificates Sorting documentation](https://cloud.google.com/certificate-authority-service/docs
/sorting-filtering-certificates#sorting_support).
*/
public java.lang.String getOrderBy() {
return orderBy;
}
/**
* Optional. Specify how the results should be sorted. For details on supported fields
* and syntax, see [Certificates Sorting documentation](https://cloud.google.com
* /certificate-authority-service/docs/sorting-filtering-certificates#sorting_support).
*/
public List setOrderBy(java.lang.String orderBy) {
this.orderBy = orderBy;
return this;
}
/**
* Optional. Limit on the number of Certificates to include in the response. Further
* Certificates can subsequently be obtained by including the
* ListCertificatesResponse.next_page_token in a subsequent request. If unspecified, the
* server will pick an appropriate default.
*/
@com.google.api.client.util.Key
private java.lang.Integer pageSize;
/** Optional. Limit on the number of Certificates to include in the response. Further Certificates can
subsequently be obtained by including the ListCertificatesResponse.next_page_token in a subsequent
request. If unspecified, the server will pick an appropriate default.
*/
public java.lang.Integer getPageSize() {
return pageSize;
}
/**
* Optional. Limit on the number of Certificates to include in the response. Further
* Certificates can subsequently be obtained by including the
* ListCertificatesResponse.next_page_token in a subsequent request. If unspecified, the
* server will pick an appropriate default.
*/
public List setPageSize(java.lang.Integer pageSize) {
this.pageSize = pageSize;
return this;
}
/**
* Optional. Pagination token, returned earlier via
* ListCertificatesResponse.next_page_token.
*/
@com.google.api.client.util.Key
private java.lang.String pageToken;
/** Optional. Pagination token, returned earlier via ListCertificatesResponse.next_page_token.
*/
public java.lang.String getPageToken() {
return pageToken;
}
/**
* Optional. Pagination token, returned earlier via
* ListCertificatesResponse.next_page_token.
*/
public List setPageToken(java.lang.String pageToken) {
this.pageToken = pageToken;
return this;
}
@Override
public List set(String parameterName, Object value) {
return (List) super.set(parameterName, value);
}
}
/**
* Update a Certificate. Currently, the only field you can update is the labels field.
*
* Create a request for the method "certificates.patch".
*
* This request holds the parameters needed by the privateca server. After setting any optional
* parameters, call the {@link Patch#execute()} method to invoke the remote operation.
*
* @param name Output only. The resource name for this Certificate in the format
* `projects/locations/caPools/certificates`.
* @param content the {@link com.google.api.services.privateca.v1.model.Certificate}
* @return the request
*/
public Patch patch(java.lang.String name, com.google.api.services.privateca.v1.model.Certificate content) throws java.io.IOException {
Patch result = new Patch(name, content);
initialize(result);
return result;
}
public class Patch extends CertificateAuthorityServiceRequest {
private static final String REST_PATH = "v1/{+name}";
private final java.util.regex.Pattern NAME_PATTERN =
java.util.regex.Pattern.compile("^projects/[^/]+/locations/[^/]+/caPools/[^/]+/certificates/[^/]+$");
/**
* Update a Certificate. Currently, the only field you can update is the labels field.
*
* Create a request for the method "certificates.patch".
*
* This request holds the parameters needed by the the privateca server. After setting any
* optional parameters, call the {@link Patch#execute()} method to invoke the remote operation.
* {@link
* Patch#initialize(com.google.api.client.googleapis.services.AbstractGoogleClientRequest)} must
* be called to initialize this instance immediately after invoking the constructor.
*
* @param name Output only. The resource name for this Certificate in the format
* `projects/locations/caPools/certificates`.
* @param content the {@link com.google.api.services.privateca.v1.model.Certificate}
* @since 1.13
*/
protected Patch(java.lang.String name, com.google.api.services.privateca.v1.model.Certificate content) {
super(CertificateAuthorityService.this, "PATCH", REST_PATH, content, com.google.api.services.privateca.v1.model.Certificate.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/[^/]+/caPools/[^/]+/certificates/[^/]+$");
}
}
@Override
public Patch set$Xgafv(java.lang.String $Xgafv) {
return (Patch) super.set$Xgafv($Xgafv);
}
@Override
public Patch setAccessToken(java.lang.String accessToken) {
return (Patch) super.setAccessToken(accessToken);
}
@Override
public Patch setAlt(java.lang.String alt) {
return (Patch) super.setAlt(alt);
}
@Override
public Patch setCallback(java.lang.String callback) {
return (Patch) super.setCallback(callback);
}
@Override
public Patch setFields(java.lang.String fields) {
return (Patch) super.setFields(fields);
}
@Override
public Patch setKey(java.lang.String key) {
return (Patch) super.setKey(key);
}
@Override
public Patch setOauthToken(java.lang.String oauthToken) {
return (Patch) super.setOauthToken(oauthToken);
}
@Override
public Patch setPrettyPrint(java.lang.Boolean prettyPrint) {
return (Patch) super.setPrettyPrint(prettyPrint);
}
@Override
public Patch setQuotaUser(java.lang.String quotaUser) {
return (Patch) super.setQuotaUser(quotaUser);
}
@Override
public Patch setUploadType(java.lang.String uploadType) {
return (Patch) super.setUploadType(uploadType);
}
@Override
public Patch setUploadProtocol(java.lang.String uploadProtocol) {
return (Patch) super.setUploadProtocol(uploadProtocol);
}
/**
* Output only. The resource name for this Certificate in the format
* `projects/locations/caPools/certificates`.
*/
@com.google.api.client.util.Key
private java.lang.String name;
/** Output only. The resource name for this Certificate in the format
`projects/locations/caPools/certificates`.
*/
public java.lang.String getName() {
return name;
}
/**
* Output only. The resource name for this Certificate in the format
* `projects/locations/caPools/certificates`.
*/
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/[^/]+/caPools/[^/]+/certificates/[^/]+$");
}
this.name = name;
return this;
}
/**
* Optional. An ID to identify requests. Specify a unique request ID so that if you must
* retry your request, the server will know to ignore the request if it has already been
* completed. The server will guarantee that for at least 60 minutes since the first
* request. For example, consider a situation where you make an initial request and the
* request times out. If you make the request again with the same request ID, the server
* can check if original operation with the same request ID was received, and if so,
* will ignore the second request. This prevents clients from accidentally creating
* duplicate commitments. The request ID must be a valid UUID with the exception that
* zero UUID is not supported (00000000-0000-0000-0000-000000000000).
*/
@com.google.api.client.util.Key
private java.lang.String requestId;
/** Optional. An ID to identify requests. Specify a unique request ID so that if you must retry your
request, the server will know to ignore the request if it has already been completed. The server
will guarantee that for at least 60 minutes since the first request. For example, consider a
situation where you make an initial request and the request times out. If you make the request
again with the same request ID, the server can check if original operation with the same request ID
was received, and if so, will ignore the second request. This prevents clients from accidentally
creating duplicate commitments. The request ID must be a valid UUID with the exception that zero
UUID is not supported (00000000-0000-0000-0000-000000000000).
*/
public java.lang.String getRequestId() {
return requestId;
}
/**
* Optional. An ID to identify requests. Specify a unique request ID so that if you must
* retry your request, the server will know to ignore the request if it has already been
* completed. The server will guarantee that for at least 60 minutes since the first
* request. For example, consider a situation where you make an initial request and the
* request times out. If you make the request again with the same request ID, the server
* can check if original operation with the same request ID was received, and if so,
* will ignore the second request. This prevents clients from accidentally creating
* duplicate commitments. The request ID must be a valid UUID with the exception that
* zero UUID is not supported (00000000-0000-0000-0000-000000000000).
*/
public Patch setRequestId(java.lang.String requestId) {
this.requestId = requestId;
return this;
}
/** Required. A list of fields to be updated in this request. */
@com.google.api.client.util.Key
private String updateMask;
/** Required. A list of fields to be updated in this request.
*/
public String getUpdateMask() {
return updateMask;
}
/** Required. A list of fields to be updated in this request. */
public Patch setUpdateMask(String updateMask) {
this.updateMask = updateMask;
return this;
}
@Override
public Patch set(String parameterName, Object value) {
return (Patch) super.set(parameterName, value);
}
}
/**
* Revoke a Certificate.
*
* Create a request for the method "certificates.revoke".
*
* This request holds the parameters needed by the privateca server. After setting any optional
* parameters, call the {@link Revoke#execute()} method to invoke the remote operation.
*
* @param name Required. The resource name for this Certificate in the format
* `projects/locations/caPools/certificates`.
* @param content the {@link com.google.api.services.privateca.v1.model.RevokeCertificateRequest}
* @return the request
*/
public Revoke revoke(java.lang.String name, com.google.api.services.privateca.v1.model.RevokeCertificateRequest content) throws java.io.IOException {
Revoke result = new Revoke(name, content);
initialize(result);
return result;
}
public class Revoke extends CertificateAuthorityServiceRequest {
private static final String REST_PATH = "v1/{+name}:revoke";
private final java.util.regex.Pattern NAME_PATTERN =
java.util.regex.Pattern.compile("^projects/[^/]+/locations/[^/]+/caPools/[^/]+/certificates/[^/]+$");
/**
* Revoke a Certificate.
*
* Create a request for the method "certificates.revoke".
*
* This request holds the parameters needed by the the privateca server. After setting any
* optional parameters, call the {@link Revoke#execute()} method to invoke the remote operation.
* {@link
* Revoke#initialize(com.google.api.client.googleapis.services.AbstractGoogleClientRequest)} must
* be called to initialize this instance immediately after invoking the constructor.
*
* @param name Required. The resource name for this Certificate in the format
* `projects/locations/caPools/certificates`.
* @param content the {@link com.google.api.services.privateca.v1.model.RevokeCertificateRequest}
* @since 1.13
*/
protected Revoke(java.lang.String name, com.google.api.services.privateca.v1.model.RevokeCertificateRequest content) {
super(CertificateAuthorityService.this, "POST", REST_PATH, content, com.google.api.services.privateca.v1.model.Certificate.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/[^/]+/caPools/[^/]+/certificates/[^/]+$");
}
}
@Override
public Revoke set$Xgafv(java.lang.String $Xgafv) {
return (Revoke) super.set$Xgafv($Xgafv);
}
@Override
public Revoke setAccessToken(java.lang.String accessToken) {
return (Revoke) super.setAccessToken(accessToken);
}
@Override
public Revoke setAlt(java.lang.String alt) {
return (Revoke) super.setAlt(alt);
}
@Override
public Revoke setCallback(java.lang.String callback) {
return (Revoke) super.setCallback(callback);
}
@Override
public Revoke setFields(java.lang.String fields) {
return (Revoke) super.setFields(fields);
}
@Override
public Revoke setKey(java.lang.String key) {
return (Revoke) super.setKey(key);
}
@Override
public Revoke setOauthToken(java.lang.String oauthToken) {
return (Revoke) super.setOauthToken(oauthToken);
}
@Override
public Revoke setPrettyPrint(java.lang.Boolean prettyPrint) {
return (Revoke) super.setPrettyPrint(prettyPrint);
}
@Override
public Revoke setQuotaUser(java.lang.String quotaUser) {
return (Revoke) super.setQuotaUser(quotaUser);
}
@Override
public Revoke setUploadType(java.lang.String uploadType) {
return (Revoke) super.setUploadType(uploadType);
}
@Override
public Revoke setUploadProtocol(java.lang.String uploadProtocol) {
return (Revoke) super.setUploadProtocol(uploadProtocol);
}
/**
* Required. The resource name for this Certificate in the format
* `projects/locations/caPools/certificates`.
*/
@com.google.api.client.util.Key
private java.lang.String name;
/** Required. The resource name for this Certificate in the format
`projects/locations/caPools/certificates`.
*/
public java.lang.String getName() {
return name;
}
/**
* Required. The resource name for this Certificate in the format
* `projects/locations/caPools/certificates`.
*/
public Revoke 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/[^/]+/caPools/[^/]+/certificates/[^/]+$");
}
this.name = name;
return this;
}
@Override
public Revoke set(String parameterName, Object value) {
return (Revoke) super.set(parameterName, value);
}
}
}
}
/**
* An accessor for creating requests from the CertificateTemplates collection.
*
* The typical use is:
*
* {@code CertificateAuthorityService privateca = new CertificateAuthorityService(...);}
* {@code CertificateAuthorityService.CertificateTemplates.List request = privateca.certificateTemplates().list(parameters ...)}
*
*
* @return the resource collection
*/
public CertificateTemplates certificateTemplates() {
return new CertificateTemplates();
}
/**
* The "certificateTemplates" collection of methods.
*/
public class CertificateTemplates {
/**
* Create a new CertificateTemplate in a given Project and Location.
*
* Create a request for the method "certificateTemplates.create".
*
* This request holds the parameters needed by the privateca server. After setting any optional
* parameters, call the {@link Create#execute()} method to invoke the remote operation.
*
* @param parent Required. The resource name of the location associated with the CertificateTemplate, in the format
* `projects/locations`.
* @param content the {@link com.google.api.services.privateca.v1.model.CertificateTemplate}
* @return the request
*/
public Create create(java.lang.String parent, com.google.api.services.privateca.v1.model.CertificateTemplate content) throws java.io.IOException {
Create result = new Create(parent, content);
initialize(result);
return result;
}
public class Create extends CertificateAuthorityServiceRequest {
private static final String REST_PATH = "v1/{+parent}/certificateTemplates";
private final java.util.regex.Pattern PARENT_PATTERN =
java.util.regex.Pattern.compile("^projects/[^/]+/locations/[^/]+$");
/**
* Create a new CertificateTemplate in a given Project and Location.
*
* Create a request for the method "certificateTemplates.create".
*
* This request holds the parameters needed by the the privateca 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 resource name of the location associated with the CertificateTemplate, in the format
* `projects/locations`.
* @param content the {@link com.google.api.services.privateca.v1.model.CertificateTemplate}
* @since 1.13
*/
protected Create(java.lang.String parent, com.google.api.services.privateca.v1.model.CertificateTemplate content) {
super(CertificateAuthorityService.this, "POST", REST_PATH, content, com.google.api.services.privateca.v1.model.Operation.class);
this.parent = com.google.api.client.util.Preconditions.checkNotNull(parent, "Required parameter parent must be specified.");
if (!getSuppressPatternChecks()) {
com.google.api.client.util.Preconditions.checkArgument(PARENT_PATTERN.matcher(parent).matches(),
"Parameter parent must conform to the pattern " +
"^projects/[^/]+/locations/[^/]+$");
}
}
@Override
public Create set$Xgafv(java.lang.String $Xgafv) {
return (Create) super.set$Xgafv($Xgafv);
}
@Override
public Create setAccessToken(java.lang.String accessToken) {
return (Create) super.setAccessToken(accessToken);
}
@Override
public Create setAlt(java.lang.String alt) {
return (Create) super.setAlt(alt);
}
@Override
public Create setCallback(java.lang.String callback) {
return (Create) super.setCallback(callback);
}
@Override
public Create setFields(java.lang.String fields) {
return (Create) super.setFields(fields);
}
@Override
public Create setKey(java.lang.String key) {
return (Create) super.setKey(key);
}
@Override
public Create setOauthToken(java.lang.String oauthToken) {
return (Create) super.setOauthToken(oauthToken);
}
@Override
public Create setPrettyPrint(java.lang.Boolean prettyPrint) {
return (Create) super.setPrettyPrint(prettyPrint);
}
@Override
public Create setQuotaUser(java.lang.String quotaUser) {
return (Create) super.setQuotaUser(quotaUser);
}
@Override
public Create setUploadType(java.lang.String uploadType) {
return (Create) super.setUploadType(uploadType);
}
@Override
public Create setUploadProtocol(java.lang.String uploadProtocol) {
return (Create) super.setUploadProtocol(uploadProtocol);
}
/**
* Required. The resource name of the location associated with the CertificateTemplate, in
* the format `projects/locations`.
*/
@com.google.api.client.util.Key
private java.lang.String parent;
/** Required. The resource name of the location associated with the CertificateTemplate, in the format
`projects/locations`.
*/
public java.lang.String getParent() {
return parent;
}
/**
* Required. The resource name of the location associated with the CertificateTemplate, in
* the 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. It must be unique within a location and match the regular expression
* `[a-zA-Z0-9_-]{1,63}`
*/
@com.google.api.client.util.Key
private java.lang.String certificateTemplateId;
/** Required. It must be unique within a location and match the regular expression
`[a-zA-Z0-9_-]{1,63}`
*/
public java.lang.String getCertificateTemplateId() {
return certificateTemplateId;
}
/**
* Required. It must be unique within a location and match the regular expression
* `[a-zA-Z0-9_-]{1,63}`
*/
public Create setCertificateTemplateId(java.lang.String certificateTemplateId) {
this.certificateTemplateId = certificateTemplateId;
return this;
}
/**
* Optional. An ID to identify requests. Specify a unique request ID so that if you must
* retry your request, the server will know to ignore the request if it has already been
* completed. The server will guarantee that for at least 60 minutes since the first
* request. For example, consider a situation where you make an initial request and the
* request times out. If you make the request again with the same request ID, the server
* can check if original operation with the same request ID was received, and if so, will
* ignore the second request. This prevents clients from accidentally creating duplicate
* commitments. The request ID must be a valid UUID with the exception that zero UUID is
* not supported (00000000-0000-0000-0000-000000000000).
*/
@com.google.api.client.util.Key
private java.lang.String requestId;
/** Optional. An ID to identify requests. Specify a unique request ID so that if you must retry your
request, the server will know to ignore the request if it has already been completed. The server
will guarantee that for at least 60 minutes since the first request. For example, consider a
situation where you make an initial request and the request times out. If you make the request
again with the same request ID, the server can check if original operation with the same request ID
was received, and if so, will ignore the second request. This prevents clients from accidentally
creating duplicate commitments. The request ID must be a valid UUID with the exception that zero
UUID is not supported (00000000-0000-0000-0000-000000000000).
*/
public java.lang.String getRequestId() {
return requestId;
}
/**
* Optional. An ID to identify requests. Specify a unique request ID so that if you must
* retry your request, the server will know to ignore the request if it has already been
* completed. The server will guarantee that for at least 60 minutes since the first
* request. For example, consider a situation where you make an initial request and the
* request times out. If you make the request again with the same request ID, the server
* can check if original operation with the same request ID was received, and if so, will
* ignore the second request. This prevents clients from accidentally creating duplicate
* commitments. The request ID must be a valid UUID with the exception that zero UUID is
* not supported (00000000-0000-0000-0000-000000000000).
*/
public Create setRequestId(java.lang.String requestId) {
this.requestId = requestId;
return this;
}
@Override
public Create set(String parameterName, Object value) {
return (Create) super.set(parameterName, value);
}
}
/**
* DeleteCertificateTemplate deletes a CertificateTemplate.
*
* Create a request for the method "certificateTemplates.delete".
*
* This request holds the parameters needed by the privateca server. After setting any optional
* parameters, call the {@link Delete#execute()} method to invoke the remote operation.
*
* @param name Required. The resource name for this CertificateTemplate in the format
* `projects/locations/certificateTemplates`.
* @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 CertificateAuthorityServiceRequest {
private static final String REST_PATH = "v1/{+name}";
private final java.util.regex.Pattern NAME_PATTERN =
java.util.regex.Pattern.compile("^projects/[^/]+/locations/[^/]+/certificateTemplates/[^/]+$");
/**
* DeleteCertificateTemplate deletes a CertificateTemplate.
*
* Create a request for the method "certificateTemplates.delete".
*
* This request holds the parameters needed by the the privateca 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 resource name for this CertificateTemplate in the format
* `projects/locations/certificateTemplates`.
* @since 1.13
*/
protected Delete(java.lang.String name) {
super(CertificateAuthorityService.this, "DELETE", REST_PATH, null, com.google.api.services.privateca.v1.model.Operation.class);
this.name = com.google.api.client.util.Preconditions.checkNotNull(name, "Required parameter name must be specified.");
if (!getSuppressPatternChecks()) {
com.google.api.client.util.Preconditions.checkArgument(NAME_PATTERN.matcher(name).matches(),
"Parameter name must conform to the pattern " +
"^projects/[^/]+/locations/[^/]+/certificateTemplates/[^/]+$");
}
}
@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 resource name for this CertificateTemplate in the format
* `projects/locations/certificateTemplates`.
*/
@com.google.api.client.util.Key
private java.lang.String name;
/** Required. The resource name for this CertificateTemplate in the format
`projects/locations/certificateTemplates`.
*/
public java.lang.String getName() {
return name;
}
/**
* Required. The resource name for this CertificateTemplate in the format
* `projects/locations/certificateTemplates`.
*/
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/[^/]+/certificateTemplates/[^/]+$");
}
this.name = name;
return this;
}
/**
* Optional. An ID to identify requests. Specify a unique request ID so that if you must
* retry your request, the server will know to ignore the request if it has already been
* completed. The server will guarantee that for at least 60 minutes since the first
* request. For example, consider a situation where you make an initial request and the
* request times out. If you make the request again with the same request ID, the server
* can check if original operation with the same request ID was received, and if so, will
* ignore the second request. This prevents clients from accidentally creating duplicate
* commitments. The request ID must be a valid UUID with the exception that zero UUID is
* not supported (00000000-0000-0000-0000-000000000000).
*/
@com.google.api.client.util.Key
private java.lang.String requestId;
/** Optional. An ID to identify requests. Specify a unique request ID so that if you must retry your
request, the server will know to ignore the request if it has already been completed. The server
will guarantee that for at least 60 minutes since the first request. For example, consider a
situation where you make an initial request and the request times out. If you make the request
again with the same request ID, the server can check if original operation with the same request ID
was received, and if so, will ignore the second request. This prevents clients from accidentally
creating duplicate commitments. The request ID must be a valid UUID with the exception that zero
UUID is not supported (00000000-0000-0000-0000-000000000000).
*/
public java.lang.String getRequestId() {
return requestId;
}
/**
* Optional. An ID to identify requests. Specify a unique request ID so that if you must
* retry your request, the server will know to ignore the request if it has already been
* completed. The server will guarantee that for at least 60 minutes since the first
* request. For example, consider a situation where you make an initial request and the
* request times out. If you make the request again with the same request ID, the server
* can check if original operation with the same request ID was received, and if so, will
* ignore the second request. This prevents clients from accidentally creating duplicate
* commitments. The request ID must be a valid UUID with the exception that zero UUID is
* not supported (00000000-0000-0000-0000-000000000000).
*/
public Delete setRequestId(java.lang.String requestId) {
this.requestId = requestId;
return this;
}
@Override
public Delete set(String parameterName, Object value) {
return (Delete) super.set(parameterName, value);
}
}
/**
* Returns a CertificateTemplate.
*
* Create a request for the method "certificateTemplates.get".
*
* This request holds the parameters needed by the privateca server. After setting any optional
* parameters, call the {@link Get#execute()} method to invoke the remote operation.
*
* @param name Required. The name of the CertificateTemplate to get.
* @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 CertificateAuthorityServiceRequest {
private static final String REST_PATH = "v1/{+name}";
private final java.util.regex.Pattern NAME_PATTERN =
java.util.regex.Pattern.compile("^projects/[^/]+/locations/[^/]+/certificateTemplates/[^/]+$");
/**
* Returns a CertificateTemplate.
*
* Create a request for the method "certificateTemplates.get".
*
* This request holds the parameters needed by the the privateca 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 CertificateTemplate to get.
* @since 1.13
*/
protected Get(java.lang.String name) {
super(CertificateAuthorityService.this, "GET", REST_PATH, null, com.google.api.services.privateca.v1.model.CertificateTemplate.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/[^/]+/certificateTemplates/[^/]+$");
}
}
@Override
public com.google.api.client.http.HttpResponse executeUsingHead() throws 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 CertificateTemplate to get. */
@com.google.api.client.util.Key
private java.lang.String name;
/** Required. The name of the CertificateTemplate to get.
*/
public java.lang.String getName() {
return name;
}
/** Required. The name of the CertificateTemplate to get. */
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/[^/]+/certificateTemplates/[^/]+$");
}
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 "certificateTemplates.getIamPolicy".
*
* This request holds the parameters needed by the privateca 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 CertificateAuthorityServiceRequest {
private static final String REST_PATH = "v1/{+resource}:getIamPolicy";
private final java.util.regex.Pattern RESOURCE_PATTERN =
java.util.regex.Pattern.compile("^projects/[^/]+/locations/[^/]+/certificateTemplates/[^/]+$");
/**
* 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 "certificateTemplates.getIamPolicy".
*
* This request holds the parameters needed by the the privateca 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(CertificateAuthorityService.this, "GET", REST_PATH, null, com.google.api.services.privateca.v1.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/[^/]+/certificateTemplates/[^/]+$");
}
}
@Override
public com.google.api.client.http.HttpResponse executeUsingHead() throws 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/[^/]+/certificateTemplates/[^/]+$");
}
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 CertificateTemplates.
*
* Create a request for the method "certificateTemplates.list".
*
* This request holds the parameters needed by the privateca server. After setting any optional
* parameters, call the {@link List#execute()} method to invoke the remote operation.
*
* @param parent Required. The resource name of the location associated with the CertificateTemplates, in the 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 CertificateAuthorityServiceRequest {
private static final String REST_PATH = "v1/{+parent}/certificateTemplates";
private final java.util.regex.Pattern PARENT_PATTERN =
java.util.regex.Pattern.compile("^projects/[^/]+/locations/[^/]+$");
/**
* Lists CertificateTemplates.
*
* Create a request for the method "certificateTemplates.list".
*
* This request holds the parameters needed by the the privateca 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 resource name of the location associated with the CertificateTemplates, in the format
* `projects/locations`.
* @since 1.13
*/
protected List(java.lang.String parent) {
super(CertificateAuthorityService.this, "GET", REST_PATH, null, com.google.api.services.privateca.v1.model.ListCertificateTemplatesResponse.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 resource name of the location associated with the CertificateTemplates,
* in the format `projects/locations`.
*/
@com.google.api.client.util.Key
private java.lang.String parent;
/** Required. The resource name of the location associated with the CertificateTemplates, in the format
`projects/locations`.
*/
public java.lang.String getParent() {
return parent;
}
/**
* Required. The resource name of the location associated with the CertificateTemplates,
* in the 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;
}
/** Optional. Only include resources that match the filter in the response. */
@com.google.api.client.util.Key
private java.lang.String filter;
/** Optional. Only include resources that match the filter in the response.
*/
public java.lang.String getFilter() {
return filter;
}
/** Optional. Only include resources that match the filter in the response. */
public List setFilter(java.lang.String filter) {
this.filter = filter;
return this;
}
/** Optional. Specify how the results should be sorted. */
@com.google.api.client.util.Key
private java.lang.String orderBy;
/** Optional. Specify how the results should be sorted.
*/
public java.lang.String getOrderBy() {
return orderBy;
}
/** Optional. Specify how the results should be sorted. */
public List setOrderBy(java.lang.String orderBy) {
this.orderBy = orderBy;
return this;
}
/**
* Optional. Limit on the number of CertificateTemplates to include in the response.
* Further CertificateTemplates can subsequently be obtained by including the
* ListCertificateTemplatesResponse.next_page_token in a subsequent request. If
* unspecified, the server will pick an appropriate default.
*/
@com.google.api.client.util.Key
private java.lang.Integer pageSize;
/** Optional. Limit on the number of CertificateTemplates to include in the response. Further
CertificateTemplates can subsequently be obtained by including the
ListCertificateTemplatesResponse.next_page_token in a subsequent request. If unspecified, the
server will pick an appropriate default.
*/
public java.lang.Integer getPageSize() {
return pageSize;
}
/**
* Optional. Limit on the number of CertificateTemplates to include in the response.
* Further CertificateTemplates can subsequently be obtained by including the
* ListCertificateTemplatesResponse.next_page_token in a subsequent request. If
* unspecified, the server will pick an appropriate default.
*/
public List setPageSize(java.lang.Integer pageSize) {
this.pageSize = pageSize;
return this;
}
/**
* Optional. Pagination token, returned earlier via
* ListCertificateTemplatesResponse.next_page_token.
*/
@com.google.api.client.util.Key
private java.lang.String pageToken;
/** Optional. Pagination token, returned earlier via ListCertificateTemplatesResponse.next_page_token.
*/
public java.lang.String getPageToken() {
return pageToken;
}
/**
* Optional. Pagination token, returned earlier via
* ListCertificateTemplatesResponse.next_page_token.
*/
public List setPageToken(java.lang.String pageToken) {
this.pageToken = pageToken;
return this;
}
@Override
public List set(String parameterName, Object value) {
return (List) super.set(parameterName, value);
}
}
/**
* Update a CertificateTemplate.
*
* Create a request for the method "certificateTemplates.patch".
*
* This request holds the parameters needed by the privateca server. After setting any optional
* parameters, call the {@link Patch#execute()} method to invoke the remote operation.
*
* @param name Output only. The resource name for this CertificateTemplate in the format
* `projects/locations/certificateTemplates`.
* @param content the {@link com.google.api.services.privateca.v1.model.CertificateTemplate}
* @return the request
*/
public Patch patch(java.lang.String name, com.google.api.services.privateca.v1.model.CertificateTemplate content) throws java.io.IOException {
Patch result = new Patch(name, content);
initialize(result);
return result;
}
public class Patch extends CertificateAuthorityServiceRequest {
private static final String REST_PATH = "v1/{+name}";
private final java.util.regex.Pattern NAME_PATTERN =
java.util.regex.Pattern.compile("^projects/[^/]+/locations/[^/]+/certificateTemplates/[^/]+$");
/**
* Update a CertificateTemplate.
*
* Create a request for the method "certificateTemplates.patch".
*
* This request holds the parameters needed by the the privateca server. After setting any
* optional parameters, call the {@link Patch#execute()} method to invoke the remote operation.
* {@link
* Patch#initialize(com.google.api.client.googleapis.services.AbstractGoogleClientRequest)} must
* be called to initialize this instance immediately after invoking the constructor.
*
* @param name Output only. The resource name for this CertificateTemplate in the format
* `projects/locations/certificateTemplates`.
* @param content the {@link com.google.api.services.privateca.v1.model.CertificateTemplate}
* @since 1.13
*/
protected Patch(java.lang.String name, com.google.api.services.privateca.v1.model.CertificateTemplate content) {
super(CertificateAuthorityService.this, "PATCH", REST_PATH, content, com.google.api.services.privateca.v1.model.Operation.class);
this.name = com.google.api.client.util.Preconditions.checkNotNull(name, "Required parameter name must be specified.");
if (!getSuppressPatternChecks()) {
com.google.api.client.util.Preconditions.checkArgument(NAME_PATTERN.matcher(name).matches(),
"Parameter name must conform to the pattern " +
"^projects/[^/]+/locations/[^/]+/certificateTemplates/[^/]+$");
}
}
@Override
public Patch set$Xgafv(java.lang.String $Xgafv) {
return (Patch) super.set$Xgafv($Xgafv);
}
@Override
public Patch setAccessToken(java.lang.String accessToken) {
return (Patch) super.setAccessToken(accessToken);
}
@Override
public Patch setAlt(java.lang.String alt) {
return (Patch) super.setAlt(alt);
}
@Override
public Patch setCallback(java.lang.String callback) {
return (Patch) super.setCallback(callback);
}
@Override
public Patch setFields(java.lang.String fields) {
return (Patch) super.setFields(fields);
}
@Override
public Patch setKey(java.lang.String key) {
return (Patch) super.setKey(key);
}
@Override
public Patch setOauthToken(java.lang.String oauthToken) {
return (Patch) super.setOauthToken(oauthToken);
}
@Override
public Patch setPrettyPrint(java.lang.Boolean prettyPrint) {
return (Patch) super.setPrettyPrint(prettyPrint);
}
@Override
public Patch setQuotaUser(java.lang.String quotaUser) {
return (Patch) super.setQuotaUser(quotaUser);
}
@Override
public Patch setUploadType(java.lang.String uploadType) {
return (Patch) super.setUploadType(uploadType);
}
@Override
public Patch setUploadProtocol(java.lang.String uploadProtocol) {
return (Patch) super.setUploadProtocol(uploadProtocol);
}
/**
* Output only. The resource name for this CertificateTemplate in the format
* `projects/locations/certificateTemplates`.
*/
@com.google.api.client.util.Key
private java.lang.String name;
/** Output only. The resource name for this CertificateTemplate in the format
`projects/locations/certificateTemplates`.
*/
public java.lang.String getName() {
return name;
}
/**
* Output only. The resource name for this CertificateTemplate in the format
* `projects/locations/certificateTemplates`.
*/
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/[^/]+/certificateTemplates/[^/]+$");
}
this.name = name;
return this;
}
/**
* Optional. An ID to identify requests. Specify a unique request ID so that if you must
* retry your request, the server will know to ignore the request if it has already been
* completed. The server will guarantee that for at least 60 minutes since the first
* request. For example, consider a situation where you make an initial request and the
* request times out. If you make the request again with the same request ID, the server
* can check if original operation with the same request ID was received, and if so, will
* ignore the second request. This prevents clients from accidentally creating duplicate
* commitments. The request ID must be a valid UUID with the exception that zero UUID is
* not supported (00000000-0000-0000-0000-000000000000).
*/
@com.google.api.client.util.Key
private java.lang.String requestId;
/** Optional. An ID to identify requests. Specify a unique request ID so that if you must retry your
request, the server will know to ignore the request if it has already been completed. The server
will guarantee that for at least 60 minutes since the first request. For example, consider a
situation where you make an initial request and the request times out. If you make the request
again with the same request ID, the server can check if original operation with the same request ID
was received, and if so, will ignore the second request. This prevents clients from accidentally
creating duplicate commitments. The request ID must be a valid UUID with the exception that zero
UUID is not supported (00000000-0000-0000-0000-000000000000).
*/
public java.lang.String getRequestId() {
return requestId;
}
/**
* Optional. An ID to identify requests. Specify a unique request ID so that if you must
* retry your request, the server will know to ignore the request if it has already been
* completed. The server will guarantee that for at least 60 minutes since the first
* request. For example, consider a situation where you make an initial request and the
* request times out. If you make the request again with the same request ID, the server
* can check if original operation with the same request ID was received, and if so, will
* ignore the second request. This prevents clients from accidentally creating duplicate
* commitments. The request ID must be a valid UUID with the exception that zero UUID is
* not supported (00000000-0000-0000-0000-000000000000).
*/
public Patch setRequestId(java.lang.String requestId) {
this.requestId = requestId;
return this;
}
/** Required. A list of fields to be updated in this request. */
@com.google.api.client.util.Key
private String updateMask;
/** Required. A list of fields to be updated in this request.
*/
public String getUpdateMask() {
return updateMask;
}
/** Required. A list of fields to be updated in this request. */
public Patch setUpdateMask(String updateMask) {
this.updateMask = updateMask;
return this;
}
@Override
public Patch set(String parameterName, Object value) {
return (Patch) super.set(parameterName, value);
}
}
/**
* Sets the access control policy on the specified resource. Replaces any existing policy. Can
* return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED` errors.
*
* Create a request for the method "certificateTemplates.setIamPolicy".
*
* This request holds the parameters needed by the privateca 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.privateca.v1.model.SetIamPolicyRequest}
* @return the request
*/
public SetIamPolicy setIamPolicy(java.lang.String resource, com.google.api.services.privateca.v1.model.SetIamPolicyRequest content) throws java.io.IOException {
SetIamPolicy result = new SetIamPolicy(resource, content);
initialize(result);
return result;
}
public class SetIamPolicy extends CertificateAuthorityServiceRequest {
private static final String REST_PATH = "v1/{+resource}:setIamPolicy";
private final java.util.regex.Pattern RESOURCE_PATTERN =
java.util.regex.Pattern.compile("^projects/[^/]+/locations/[^/]+/certificateTemplates/[^/]+$");
/**
* 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 "certificateTemplates.setIamPolicy".
*
* This request holds the parameters needed by the the privateca 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.privateca.v1.model.SetIamPolicyRequest}
* @since 1.13
*/
protected SetIamPolicy(java.lang.String resource, com.google.api.services.privateca.v1.model.SetIamPolicyRequest content) {
super(CertificateAuthorityService.this, "POST", REST_PATH, content, com.google.api.services.privateca.v1.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/[^/]+/certificateTemplates/[^/]+$");
}
}
@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/[^/]+/certificateTemplates/[^/]+$");
}
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 "certificateTemplates.testIamPermissions".
*
* This request holds the parameters needed by the privateca 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.privateca.v1.model.TestIamPermissionsRequest}
* @return the request
*/
public TestIamPermissions testIamPermissions(java.lang.String resource, com.google.api.services.privateca.v1.model.TestIamPermissionsRequest content) throws java.io.IOException {
TestIamPermissions result = new TestIamPermissions(resource, content);
initialize(result);
return result;
}
public class TestIamPermissions extends CertificateAuthorityServiceRequest {
private static final String REST_PATH = "v1/{+resource}:testIamPermissions";
private final java.util.regex.Pattern RESOURCE_PATTERN =
java.util.regex.Pattern.compile("^projects/[^/]+/locations/[^/]+/certificateTemplates/[^/]+$");
/**
* 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 "certificateTemplates.testIamPermissions".
*
* This request holds the parameters needed by the the privateca 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.privateca.v1.model.TestIamPermissionsRequest}
* @since 1.13
*/
protected TestIamPermissions(java.lang.String resource, com.google.api.services.privateca.v1.model.TestIamPermissionsRequest content) {
super(CertificateAuthorityService.this, "POST", REST_PATH, content, com.google.api.services.privateca.v1.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/[^/]+/certificateTemplates/[^/]+$");
}
}
@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/[^/]+/certificateTemplates/[^/]+$");
}
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 Operations collection.
*
* The typical use is:
*
* {@code CertificateAuthorityService privateca = new CertificateAuthorityService(...);}
* {@code CertificateAuthorityService.Operations.List request = privateca.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 privateca 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.privateca.v1.model.CancelOperationRequest}
* @return the request
*/
public Cancel cancel(java.lang.String name, com.google.api.services.privateca.v1.model.CancelOperationRequest content) throws java.io.IOException {
Cancel result = new Cancel(name, content);
initialize(result);
return result;
}
public class Cancel extends CertificateAuthorityServiceRequest {
private static final String REST_PATH = "v1/{+name}:cancel";
private final java.util.regex.Pattern NAME_PATTERN =
java.util.regex.Pattern.compile("^projects/[^/]+/locations/[^/]+/operations/[^/]+$");
/**
* Starts asynchronous cancellation on a long-running operation. The server makes a best effort to
* cancel the operation, but success is not guaranteed. If the server doesn't support this method,
* it returns `google.rpc.Code.UNIMPLEMENTED`. Clients can use Operations.GetOperation or other
* methods to check whether the cancellation succeeded or whether the operation completed despite
* cancellation. On successful cancellation, the operation is not deleted; instead, it becomes an
* operation with an Operation.error value with a google.rpc.Status.code of 1, corresponding to
* `Code.CANCELLED`.
*
* Create a request for the method "operations.cancel".
*
* This request holds the parameters needed by the the privateca 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.privateca.v1.model.CancelOperationRequest}
* @since 1.13
*/
protected Cancel(java.lang.String name, com.google.api.services.privateca.v1.model.CancelOperationRequest content) {
super(CertificateAuthorityService.this, "POST", REST_PATH, content, com.google.api.services.privateca.v1.model.Empty.class);
this.name = com.google.api.client.util.Preconditions.checkNotNull(name, "Required parameter name must be specified.");
if (!getSuppressPatternChecks()) {
com.google.api.client.util.Preconditions.checkArgument(NAME_PATTERN.matcher(name).matches(),
"Parameter name must conform to the pattern " +
"^projects/[^/]+/locations/[^/]+/operations/[^/]+$");
}
}
@Override
public Cancel set$Xgafv(java.lang.String $Xgafv) {
return (Cancel) super.set$Xgafv($Xgafv);
}
@Override
public Cancel setAccessToken(java.lang.String accessToken) {
return (Cancel) super.setAccessToken(accessToken);
}
@Override
public Cancel setAlt(java.lang.String alt) {
return (Cancel) super.setAlt(alt);
}
@Override
public Cancel setCallback(java.lang.String callback) {
return (Cancel) super.setCallback(callback);
}
@Override
public Cancel setFields(java.lang.String fields) {
return (Cancel) super.setFields(fields);
}
@Override
public Cancel setKey(java.lang.String key) {
return (Cancel) super.setKey(key);
}
@Override
public Cancel setOauthToken(java.lang.String oauthToken) {
return (Cancel) super.setOauthToken(oauthToken);
}
@Override
public Cancel setPrettyPrint(java.lang.Boolean prettyPrint) {
return (Cancel) super.setPrettyPrint(prettyPrint);
}
@Override
public Cancel setQuotaUser(java.lang.String quotaUser) {
return (Cancel) super.setQuotaUser(quotaUser);
}
@Override
public Cancel setUploadType(java.lang.String uploadType) {
return (Cancel) super.setUploadType(uploadType);
}
@Override
public Cancel setUploadProtocol(java.lang.String uploadProtocol) {
return (Cancel) super.setUploadProtocol(uploadProtocol);
}
/** The name of the operation resource to be cancelled. */
@com.google.api.client.util.Key
private java.lang.String name;
/** The name of the operation resource to be cancelled.
*/
public java.lang.String getName() {
return name;
}
/** The name of the operation resource to be cancelled. */
public Cancel setName(java.lang.String name) {
if (!getSuppressPatternChecks()) {
com.google.api.client.util.Preconditions.checkArgument(NAME_PATTERN.matcher(name).matches(),
"Parameter name must conform to the pattern " +
"^projects/[^/]+/locations/[^/]+/operations/[^/]+$");
}
this.name = name;
return this;
}
@Override
public Cancel set(String parameterName, Object value) {
return (Cancel) super.set(parameterName, value);
}
}
/**
* Deletes a long-running operation. This method indicates that the client is no longer interested
* in the operation result. It does not cancel the operation. If the server doesn't support this
* method, it returns `google.rpc.Code.UNIMPLEMENTED`.
*
* Create a request for the method "operations.delete".
*
* This request holds the parameters needed by the privateca server. After setting any optional
* parameters, call the {@link Delete#execute()} method to invoke the remote operation.
*
* @param name The name of the operation resource to be deleted.
* @return the request
*/
public Delete delete(java.lang.String name) throws java.io.IOException {
Delete result = new Delete(name);
initialize(result);
return result;
}
public class Delete extends CertificateAuthorityServiceRequest {
private static final String REST_PATH = "v1/{+name}";
private final java.util.regex.Pattern NAME_PATTERN =
java.util.regex.Pattern.compile("^projects/[^/]+/locations/[^/]+/operations/[^/]+$");
/**
* Deletes a long-running operation. This method indicates that the client is no longer interested
* in the operation result. It does not cancel the operation. If the server doesn't support this
* method, it returns `google.rpc.Code.UNIMPLEMENTED`.
*
* Create a request for the method "operations.delete".
*
* This request holds the parameters needed by the the privateca server. After setting any
* optional parameters, call the {@link Delete#execute()} method to invoke the remote operation.
* {@link
* Delete#initialize(com.google.api.client.googleapis.services.AbstractGoogleClientRequest)} must
* be called to initialize this instance immediately after invoking the constructor.
*
* @param name The name of the operation resource to be deleted.
* @since 1.13
*/
protected Delete(java.lang.String name) {
super(CertificateAuthorityService.this, "DELETE", REST_PATH, null, com.google.api.services.privateca.v1.model.Empty.class);
this.name = com.google.api.client.util.Preconditions.checkNotNull(name, "Required parameter name must be specified.");
if (!getSuppressPatternChecks()) {
com.google.api.client.util.Preconditions.checkArgument(NAME_PATTERN.matcher(name).matches(),
"Parameter name must conform to the pattern " +
"^projects/[^/]+/locations/[^/]+/operations/[^/]+$");
}
}
@Override
public Delete set$Xgafv(java.lang.String $Xgafv) {
return (Delete) super.set$Xgafv($Xgafv);
}
@Override
public Delete setAccessToken(java.lang.String accessToken) {
return (Delete) super.setAccessToken(accessToken);
}
@Override
public Delete setAlt(java.lang.String alt) {
return (Delete) super.setAlt(alt);
}
@Override
public Delete setCallback(java.lang.String callback) {
return (Delete) super.setCallback(callback);
}
@Override
public Delete setFields(java.lang.String fields) {
return (Delete) super.setFields(fields);
}
@Override
public Delete setKey(java.lang.String key) {
return (Delete) super.setKey(key);
}
@Override
public Delete setOauthToken(java.lang.String oauthToken) {
return (Delete) super.setOauthToken(oauthToken);
}
@Override
public Delete setPrettyPrint(java.lang.Boolean prettyPrint) {
return (Delete) super.setPrettyPrint(prettyPrint);
}
@Override
public Delete setQuotaUser(java.lang.String quotaUser) {
return (Delete) super.setQuotaUser(quotaUser);
}
@Override
public Delete setUploadType(java.lang.String uploadType) {
return (Delete) super.setUploadType(uploadType);
}
@Override
public Delete setUploadProtocol(java.lang.String uploadProtocol) {
return (Delete) super.setUploadProtocol(uploadProtocol);
}
/** The name of the operation resource to be deleted. */
@com.google.api.client.util.Key
private java.lang.String name;
/** The name of the operation resource to be deleted.
*/
public java.lang.String getName() {
return name;
}
/** The name of the operation resource to be deleted. */
public Delete setName(java.lang.String name) {
if (!getSuppressPatternChecks()) {
com.google.api.client.util.Preconditions.checkArgument(NAME_PATTERN.matcher(name).matches(),
"Parameter name must conform to the pattern " +
"^projects/[^/]+/locations/[^/]+/operations/[^/]+$");
}
this.name = name;
return this;
}
@Override
public Delete set(String parameterName, Object value) {
return (Delete) super.set(parameterName, value);
}
}
/**
* Gets the latest state of a long-running operation. Clients can use this method to poll the
* operation result at intervals as recommended by the API service.
*
* Create a request for the method "operations.get".
*
* This request holds the parameters needed by the privateca 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 CertificateAuthorityServiceRequest {
private static final String REST_PATH = "v1/{+name}";
private final java.util.regex.Pattern NAME_PATTERN =
java.util.regex.Pattern.compile("^projects/[^/]+/locations/[^/]+/operations/[^/]+$");
/**
* Gets the latest state of a long-running operation. Clients can use this method to poll the
* operation result at intervals as recommended by the API service.
*
* Create a request for the method "operations.get".
*
* This request holds the parameters needed by the the privateca 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(CertificateAuthorityService.this, "GET", REST_PATH, null, com.google.api.services.privateca.v1.model.Operation.class);
this.name = com.google.api.client.util.Preconditions.checkNotNull(name, "Required parameter name must be specified.");
if (!getSuppressPatternChecks()) {
com.google.api.client.util.Preconditions.checkArgument(NAME_PATTERN.matcher(name).matches(),
"Parameter name must conform to the pattern " +
"^projects/[^/]+/locations/[^/]+/operations/[^/]+$");
}
}
@Override
public com.google.api.client.http.HttpResponse executeUsingHead() throws java.io.IOException {
return super.executeUsingHead();
}
@Override
public com.google.api.client.http.HttpRequest buildHttpRequestUsingHead() throws java.io.IOException {
return super.buildHttpRequestUsingHead();
}
@Override
public Get set$Xgafv(java.lang.String $Xgafv) {
return (Get) super.set$Xgafv($Xgafv);
}
@Override
public Get setAccessToken(java.lang.String accessToken) {
return (Get) super.setAccessToken(accessToken);
}
@Override
public Get setAlt(java.lang.String alt) {
return (Get) super.setAlt(alt);
}
@Override
public Get setCallback(java.lang.String callback) {
return (Get) super.setCallback(callback);
}
@Override
public Get setFields(java.lang.String fields) {
return (Get) super.setFields(fields);
}
@Override
public Get setKey(java.lang.String key) {
return (Get) super.setKey(key);
}
@Override
public Get setOauthToken(java.lang.String oauthToken) {
return (Get) super.setOauthToken(oauthToken);
}
@Override
public Get setPrettyPrint(java.lang.Boolean prettyPrint) {
return (Get) super.setPrettyPrint(prettyPrint);
}
@Override
public Get setQuotaUser(java.lang.String quotaUser) {
return (Get) super.setQuotaUser(quotaUser);
}
@Override
public Get setUploadType(java.lang.String uploadType) {
return (Get) super.setUploadType(uploadType);
}
@Override
public Get setUploadProtocol(java.lang.String uploadProtocol) {
return (Get) super.setUploadProtocol(uploadProtocol);
}
/** The name of the operation resource. */
@com.google.api.client.util.Key
private java.lang.String name;
/** The name of the operation resource.
*/
public java.lang.String getName() {
return name;
}
/** The name of the operation resource. */
public Get setName(java.lang.String name) {
if (!getSuppressPatternChecks()) {
com.google.api.client.util.Preconditions.checkArgument(NAME_PATTERN.matcher(name).matches(),
"Parameter name must conform to the pattern " +
"^projects/[^/]+/locations/[^/]+/operations/[^/]+$");
}
this.name = name;
return this;
}
@Override
public Get set(String parameterName, Object value) {
return (Get) super.set(parameterName, value);
}
}
/**
* Lists operations that match the specified filter in the request. If the server doesn't support
* this method, it returns `UNIMPLEMENTED`.
*
* Create a request for the method "operations.list".
*
* This request holds the parameters needed by the privateca server. After setting any optional
* parameters, call the {@link List#execute()} method to invoke the remote operation.
*
* @param name The name of the operation's parent resource.
* @return the request
*/
public List list(java.lang.String name) throws java.io.IOException {
List result = new List(name);
initialize(result);
return result;
}
public class List extends CertificateAuthorityServiceRequest {
private static final String REST_PATH = "v1/{+name}/operations";
private final java.util.regex.Pattern NAME_PATTERN =
java.util.regex.Pattern.compile("^projects/[^/]+/locations/[^/]+$");
/**
* Lists operations that match the specified filter in the request. If the server doesn't support
* this method, it returns `UNIMPLEMENTED`.
*
* Create a request for the method "operations.list".
*
* This request holds the parameters needed by the the privateca server. After setting any
* optional parameters, call the {@link List#execute()} method to invoke the remote operation.
* {@link List#initialize(com.google.api.client.googleapis.services.AbstractGoogleClientRequest)}
* must be called to initialize this instance immediately after invoking the constructor.
*
* @param name The name of the operation's parent resource.
* @since 1.13
*/
protected List(java.lang.String name) {
super(CertificateAuthorityService.this, "GET", REST_PATH, null, com.google.api.services.privateca.v1.model.ListOperationsResponse.class);
this.name = com.google.api.client.util.Preconditions.checkNotNull(name, "Required parameter name must be specified.");
if (!getSuppressPatternChecks()) {
com.google.api.client.util.Preconditions.checkArgument(NAME_PATTERN.matcher(name).matches(),
"Parameter name must conform to the pattern " +
"^projects/[^/]+/locations/[^/]+$");
}
}
@Override
public com.google.api.client.http.HttpResponse executeUsingHead() throws java.io.IOException {
return super.executeUsingHead();
}
@Override
public com.google.api.client.http.HttpRequest buildHttpRequestUsingHead() throws java.io.IOException {
return super.buildHttpRequestUsingHead();
}
@Override
public List set$Xgafv(java.lang.String $Xgafv) {
return (List) super.set$Xgafv($Xgafv);
}
@Override
public List setAccessToken(java.lang.String accessToken) {
return (List) super.setAccessToken(accessToken);
}
@Override
public List setAlt(java.lang.String alt) {
return (List) super.setAlt(alt);
}
@Override
public List setCallback(java.lang.String callback) {
return (List) super.setCallback(callback);
}
@Override
public List setFields(java.lang.String fields) {
return (List) super.setFields(fields);
}
@Override
public List setKey(java.lang.String key) {
return (List) super.setKey(key);
}
@Override
public List setOauthToken(java.lang.String oauthToken) {
return (List) super.setOauthToken(oauthToken);
}
@Override
public List setPrettyPrint(java.lang.Boolean prettyPrint) {
return (List) super.setPrettyPrint(prettyPrint);
}
@Override
public List setQuotaUser(java.lang.String quotaUser) {
return (List) super.setQuotaUser(quotaUser);
}
@Override
public List setUploadType(java.lang.String uploadType) {
return (List) super.setUploadType(uploadType);
}
@Override
public List setUploadProtocol(java.lang.String uploadProtocol) {
return (List) super.setUploadProtocol(uploadProtocol);
}
/** The name of the operation's parent resource. */
@com.google.api.client.util.Key
private java.lang.String name;
/** The name of the operation's parent resource.
*/
public java.lang.String getName() {
return name;
}
/** The name of the operation's parent resource. */
public List setName(java.lang.String name) {
if (!getSuppressPatternChecks()) {
com.google.api.client.util.Preconditions.checkArgument(NAME_PATTERN.matcher(name).matches(),
"Parameter name must conform to the pattern " +
"^projects/[^/]+/locations/[^/]+$");
}
this.name = name;
return this;
}
/** The standard list filter. */
@com.google.api.client.util.Key
private java.lang.String filter;
/** The standard list filter.
*/
public java.lang.String getFilter() {
return filter;
}
/** The standard list filter. */
public List setFilter(java.lang.String filter) {
this.filter = filter;
return this;
}
/** The standard list page size. */
@com.google.api.client.util.Key
private java.lang.Integer pageSize;
/** The standard list page size.
*/
public java.lang.Integer getPageSize() {
return pageSize;
}
/** The standard list page size. */
public List setPageSize(java.lang.Integer pageSize) {
this.pageSize = pageSize;
return this;
}
/** The standard list page token. */
@com.google.api.client.util.Key
private java.lang.String pageToken;
/** The standard list page token.
*/
public java.lang.String getPageToken() {
return pageToken;
}
/** The standard list page token. */
public List setPageToken(java.lang.String pageToken) {
this.pageToken = pageToken;
return this;
}
@Override
public List set(String parameterName, Object value) {
return (List) super.set(parameterName, value);
}
}
}
}
}
/**
* Builder for {@link CertificateAuthorityService}.
*
*
* 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 CertificateAuthorityService}. */
@Override
public CertificateAuthorityService build() {
return new CertificateAuthorityService(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 CertificateAuthorityServiceRequestInitializer}.
*
* @since 1.12
*/
public Builder setCertificateAuthorityServiceRequestInitializer(
CertificateAuthorityServiceRequestInitializer certificateauthorityserviceRequestInitializer) {
return (Builder) super.setGoogleClientRequestInitializer(certificateauthorityserviceRequestInitializer);
}
@Override
public Builder setGoogleClientRequestInitializer(
com.google.api.client.googleapis.services.GoogleClientRequestInitializer googleClientRequestInitializer) {
return (Builder) super.setGoogleClientRequestInitializer(googleClientRequestInitializer);
}
}
}