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

com.google.api.services.serviceconsumermanagement.v1.ServiceConsumerManagement Maven / Gradle / Ivy

There is a newer version: v1-rev20240905-2.0.0
Show newest version
/*
 * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
 * in compliance with the License. You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software distributed under the License
 * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
 * or implied. See the License for the specific language governing permissions and limitations under
 * the License.
 */
/*
 * This code was generated by https://github.com/googleapis/google-api-java-client-services/
 * Modify at your own risk.
 */

package com.google.api.services.serviceconsumermanagement.v1;

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

* Manages the service consumers of a Service Infrastructure service. *

* *

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

* *

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

* * @since 1.3 * @author Google, Inc. */ @SuppressWarnings("javadoc") public class ServiceConsumerManagement 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 Service Consumer Management 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://serviceconsumermanagement.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://serviceconsumermanagement.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 ServiceConsumerManagement(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 */ ServiceConsumerManagement(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 Operations collection. * *

The typical use is:

*
   *   {@code ServiceConsumerManagement serviceconsumermanagement = new ServiceConsumerManagement(...);}
   *   {@code ServiceConsumerManagement.Operations.List request = serviceconsumermanagement.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 serviceconsumermanagement 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.serviceconsumermanagement.v1.model.CancelOperationRequest} * @return the request */ public Cancel cancel(java.lang.String name, com.google.api.services.serviceconsumermanagement.v1.model.CancelOperationRequest content) throws java.io.IOException { Cancel result = new Cancel(name, content); initialize(result); return result; } public class Cancel extends ServiceConsumerManagementRequest { private static final String REST_PATH = "v1/{+name}:cancel"; private final java.util.regex.Pattern NAME_PATTERN = java.util.regex.Pattern.compile("^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 serviceconsumermanagement 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.serviceconsumermanagement.v1.model.CancelOperationRequest} * @since 1.13 */ protected Cancel(java.lang.String name, com.google.api.services.serviceconsumermanagement.v1.model.CancelOperationRequest content) { super(ServiceConsumerManagement.this, "POST", REST_PATH, content, com.google.api.services.serviceconsumermanagement.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 " + "^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 " + "^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 serviceconsumermanagement 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 ServiceConsumerManagementRequest { private static final String REST_PATH = "v1/{+name}"; private final java.util.regex.Pattern NAME_PATTERN = java.util.regex.Pattern.compile("^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 serviceconsumermanagement 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(ServiceConsumerManagement.this, "DELETE", REST_PATH, null, com.google.api.services.serviceconsumermanagement.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 " + "^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 " + "^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 serviceconsumermanagement 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 ServiceConsumerManagementRequest { private static final String REST_PATH = "v1/{+name}"; private final java.util.regex.Pattern NAME_PATTERN = java.util.regex.Pattern.compile("^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 serviceconsumermanagement 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(ServiceConsumerManagement.this, "GET", REST_PATH, null, com.google.api.services.serviceconsumermanagement.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 " + "^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 " + "^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 serviceconsumermanagement 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 ServiceConsumerManagementRequest { private static final String REST_PATH = "v1/{+name}"; private final java.util.regex.Pattern NAME_PATTERN = java.util.regex.Pattern.compile("^operations$"); /** * 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 serviceconsumermanagement 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(ServiceConsumerManagement.this, "GET", REST_PATH, null, com.google.api.services.serviceconsumermanagement.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 " + "^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 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 " + "^operations$"); } 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); } } } /** * An accessor for creating requests from the Services collection. * *

The typical use is:

*
   *   {@code ServiceConsumerManagement serviceconsumermanagement = new ServiceConsumerManagement(...);}
   *   {@code ServiceConsumerManagement.Services.List request = serviceconsumermanagement.services().list(parameters ...)}
   * 
* * @return the resource collection */ public Services services() { return new Services(); } /** * The "services" collection of methods. */ public class Services { /** * Search tenancy units for a managed service. * * Create a request for the method "services.search". * * This request holds the parameters needed by the serviceconsumermanagement server. After setting * any optional parameters, call the {@link Search#execute()} method to invoke the remote operation. * * @param parent Required. Service for which search is performed. services/{service} {service} the name of a service, * for example 'service.googleapis.com'. * @return the request */ public Search search(java.lang.String parent) throws java.io.IOException { Search result = new Search(parent); initialize(result); return result; } public class Search extends ServiceConsumerManagementRequest { private static final String REST_PATH = "v1/{+parent}:search"; private final java.util.regex.Pattern PARENT_PATTERN = java.util.regex.Pattern.compile("^services/[^/]+$"); /** * Search tenancy units for a managed service. * * Create a request for the method "services.search". * * This request holds the parameters needed by the the serviceconsumermanagement server. After * setting any optional parameters, call the {@link Search#execute()} method to invoke the remote * operation.

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

* * @param parent Required. Service for which search is performed. services/{service} {service} the name of a service, * for example 'service.googleapis.com'. * @since 1.13 */ protected Search(java.lang.String parent) { super(ServiceConsumerManagement.this, "GET", REST_PATH, null, com.google.api.services.serviceconsumermanagement.v1.model.SearchTenancyUnitsResponse.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 " + "^services/[^/]+$"); } } @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 Search set$Xgafv(java.lang.String $Xgafv) { return (Search) super.set$Xgafv($Xgafv); } @Override public Search setAccessToken(java.lang.String accessToken) { return (Search) super.setAccessToken(accessToken); } @Override public Search setAlt(java.lang.String alt) { return (Search) super.setAlt(alt); } @Override public Search setCallback(java.lang.String callback) { return (Search) super.setCallback(callback); } @Override public Search setFields(java.lang.String fields) { return (Search) super.setFields(fields); } @Override public Search setKey(java.lang.String key) { return (Search) super.setKey(key); } @Override public Search setOauthToken(java.lang.String oauthToken) { return (Search) super.setOauthToken(oauthToken); } @Override public Search setPrettyPrint(java.lang.Boolean prettyPrint) { return (Search) super.setPrettyPrint(prettyPrint); } @Override public Search setQuotaUser(java.lang.String quotaUser) { return (Search) super.setQuotaUser(quotaUser); } @Override public Search setUploadType(java.lang.String uploadType) { return (Search) super.setUploadType(uploadType); } @Override public Search setUploadProtocol(java.lang.String uploadProtocol) { return (Search) super.setUploadProtocol(uploadProtocol); } /** * Required. Service for which search is performed. services/{service} {service} the name of a * service, for example 'service.googleapis.com'. */ @com.google.api.client.util.Key private java.lang.String parent; /** Required. Service for which search is performed. services/{service} {service} the name of a service, for example 'service.googleapis.com'. */ public java.lang.String getParent() { return parent; } /** * Required. Service for which search is performed. services/{service} {service} the name of a * service, for example 'service.googleapis.com'. */ public Search 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 " + "^services/[^/]+$"); } this.parent = parent; return this; } /** * Optional. The maximum number of results returned by this request. Currently, the default * maximum is set to 1000. If `page_size` isn't provided or the size provided is a number * larger than 1000, it's automatically set to 1000. */ @com.google.api.client.util.Key private java.lang.Integer pageSize; /** Optional. The maximum number of results returned by this request. Currently, the default maximum is set to 1000. If `page_size` isn't provided or the size provided is a number larger than 1000, it's automatically set to 1000. */ public java.lang.Integer getPageSize() { return pageSize; } /** * Optional. The maximum number of results returned by this request. Currently, the default * maximum is set to 1000. If `page_size` isn't provided or the size provided is a number * larger than 1000, it's automatically set to 1000. */ public Search setPageSize(java.lang.Integer pageSize) { this.pageSize = pageSize; return this; } /** * Optional. The continuation token, which is used to page through large result sets. To get * the next page of results, set this parameter to the value of `nextPageToken` from the * previous response. */ @com.google.api.client.util.Key private java.lang.String pageToken; /** Optional. The continuation token, which is used to page through large result sets. To get the next page of results, set this parameter to the value of `nextPageToken` from the previous response. */ public java.lang.String getPageToken() { return pageToken; } /** * Optional. The continuation token, which is used to page through large result sets. To get * the next page of results, set this parameter to the value of `nextPageToken` from the * previous response. */ public Search setPageToken(java.lang.String pageToken) { this.pageToken = pageToken; return this; } /** * Optional. Set a query `{expression}` for querying tenancy units. Your `{expression}` must * be in the format: `field_name=literal_string`. The `field_name` is the name of the field * you want to compare. Supported fields are `tenant_resources.tag` and * `tenant_resources.resource`. For example, to search tenancy units that contain at least one * tenant resource with a given tag 'xyz', use the query `tenant_resources.tag=xyz`. To search * tenancy units that contain at least one tenant resource with a given resource name * 'projects/123456', use the query `tenant_resources.resource=projects/123456`. Multiple * expressions can be joined with `AND`s. Tenancy units must match all expressions to be * included in the result set. For example, `tenant_resources.tag=xyz AND * tenant_resources.resource=projects/123456` */ @com.google.api.client.util.Key private java.lang.String query; /** Optional. Set a query `{expression}` for querying tenancy units. Your `{expression}` must be in the format: `field_name=literal_string`. The `field_name` is the name of the field you want to compare. Supported fields are `tenant_resources.tag` and `tenant_resources.resource`. For example, to search tenancy units that contain at least one tenant resource with a given tag 'xyz', use the query `tenant_resources.tag=xyz`. To search tenancy units that contain at least one tenant resource with a given resource name 'projects/123456', use the query `tenant_resources.resource=projects/123456`. Multiple expressions can be joined with `AND`s. Tenancy units must match all expressions to be included in the result set. For example, `tenant_resources.tag=xyz AND tenant_resources.resource=projects/123456` */ public java.lang.String getQuery() { return query; } /** * Optional. Set a query `{expression}` for querying tenancy units. Your `{expression}` must * be in the format: `field_name=literal_string`. The `field_name` is the name of the field * you want to compare. Supported fields are `tenant_resources.tag` and * `tenant_resources.resource`. For example, to search tenancy units that contain at least one * tenant resource with a given tag 'xyz', use the query `tenant_resources.tag=xyz`. To search * tenancy units that contain at least one tenant resource with a given resource name * 'projects/123456', use the query `tenant_resources.resource=projects/123456`. Multiple * expressions can be joined with `AND`s. Tenancy units must match all expressions to be * included in the result set. For example, `tenant_resources.tag=xyz AND * tenant_resources.resource=projects/123456` */ public Search setQuery(java.lang.String query) { this.query = query; return this; } @Override public Search set(String parameterName, Object value) { return (Search) super.set(parameterName, value); } } /** * An accessor for creating requests from the TenancyUnits collection. * *

The typical use is:

*
     *   {@code ServiceConsumerManagement serviceconsumermanagement = new ServiceConsumerManagement(...);}
     *   {@code ServiceConsumerManagement.TenancyUnits.List request = serviceconsumermanagement.tenancyUnits().list(parameters ...)}
     * 
* * @return the resource collection */ public TenancyUnits tenancyUnits() { return new TenancyUnits(); } /** * The "tenancyUnits" collection of methods. */ public class TenancyUnits { /** * Add a new tenant project to the tenancy unit. There can be a maximum of 1024 tenant projects in a * tenancy unit. If there are previously failed `AddTenantProject` calls, you might need to call * `RemoveTenantProject` first to resolve them before you can make another call to * `AddTenantProject` with the same tag. Operation. * * Create a request for the method "tenancyUnits.addProject". * * This request holds the parameters needed by the serviceconsumermanagement server. After setting * any optional parameters, call the {@link AddProject#execute()} method to invoke the remote * operation. * * @param parent Required. Name of the tenancy unit. Such as * 'services/service.googleapis.com/projects/12345/tenancyUnits/abcd'. * @param content the {@link com.google.api.services.serviceconsumermanagement.v1.model.AddTenantProjectRequest} * @return the request */ public AddProject addProject(java.lang.String parent, com.google.api.services.serviceconsumermanagement.v1.model.AddTenantProjectRequest content) throws java.io.IOException { AddProject result = new AddProject(parent, content); initialize(result); return result; } public class AddProject extends ServiceConsumerManagementRequest { private static final String REST_PATH = "v1/{+parent}:addProject"; private final java.util.regex.Pattern PARENT_PATTERN = java.util.regex.Pattern.compile("^services/[^/]+/[^/]+/[^/]+/tenancyUnits/[^/]+$"); /** * Add a new tenant project to the tenancy unit. There can be a maximum of 1024 tenant projects in * a tenancy unit. If there are previously failed `AddTenantProject` calls, you might need to call * `RemoveTenantProject` first to resolve them before you can make another call to * `AddTenantProject` with the same tag. Operation. * * Create a request for the method "tenancyUnits.addProject". * * This request holds the parameters needed by the the serviceconsumermanagement server. After * setting any optional parameters, call the {@link AddProject#execute()} method to invoke the * remote operation.

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

* * @param parent Required. Name of the tenancy unit. Such as * 'services/service.googleapis.com/projects/12345/tenancyUnits/abcd'. * @param content the {@link com.google.api.services.serviceconsumermanagement.v1.model.AddTenantProjectRequest} * @since 1.13 */ protected AddProject(java.lang.String parent, com.google.api.services.serviceconsumermanagement.v1.model.AddTenantProjectRequest content) { super(ServiceConsumerManagement.this, "POST", REST_PATH, content, com.google.api.services.serviceconsumermanagement.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 " + "^services/[^/]+/[^/]+/[^/]+/tenancyUnits/[^/]+$"); } } @Override public AddProject set$Xgafv(java.lang.String $Xgafv) { return (AddProject) super.set$Xgafv($Xgafv); } @Override public AddProject setAccessToken(java.lang.String accessToken) { return (AddProject) super.setAccessToken(accessToken); } @Override public AddProject setAlt(java.lang.String alt) { return (AddProject) super.setAlt(alt); } @Override public AddProject setCallback(java.lang.String callback) { return (AddProject) super.setCallback(callback); } @Override public AddProject setFields(java.lang.String fields) { return (AddProject) super.setFields(fields); } @Override public AddProject setKey(java.lang.String key) { return (AddProject) super.setKey(key); } @Override public AddProject setOauthToken(java.lang.String oauthToken) { return (AddProject) super.setOauthToken(oauthToken); } @Override public AddProject setPrettyPrint(java.lang.Boolean prettyPrint) { return (AddProject) super.setPrettyPrint(prettyPrint); } @Override public AddProject setQuotaUser(java.lang.String quotaUser) { return (AddProject) super.setQuotaUser(quotaUser); } @Override public AddProject setUploadType(java.lang.String uploadType) { return (AddProject) super.setUploadType(uploadType); } @Override public AddProject setUploadProtocol(java.lang.String uploadProtocol) { return (AddProject) super.setUploadProtocol(uploadProtocol); } /** * Required. Name of the tenancy unit. Such as * 'services/service.googleapis.com/projects/12345/tenancyUnits/abcd'. */ @com.google.api.client.util.Key private java.lang.String parent; /** Required. Name of the tenancy unit. Such as 'services/service.googleapis.com/projects/12345/tenancyUnits/abcd'. */ public java.lang.String getParent() { return parent; } /** * Required. Name of the tenancy unit. Such as * 'services/service.googleapis.com/projects/12345/tenancyUnits/abcd'. */ public AddProject 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 " + "^services/[^/]+/[^/]+/[^/]+/tenancyUnits/[^/]+$"); } this.parent = parent; return this; } @Override public AddProject set(String parameterName, Object value) { return (AddProject) super.set(parameterName, value); } } /** * Apply a configuration to an existing tenant project. This project must exist in an active state * and have the original owner account. The caller must have permission to add a project to the * given tenancy unit. The configuration is applied, but any existing settings on the project aren't * modified. Specified policy bindings are applied. Existing bindings aren't modified. Specified * services are activated. No service is deactivated. If specified, new billing configuration is * applied. Omit a billing configuration to keep the existing one. A service account in the project * is created if previously non existed. Specified labels will be appended to tenant project, note * that the value of existing label key will be updated if the same label key is requested. The * specified folder is ignored, as moving a tenant project to a different folder isn't supported. * The operation fails if any of the steps fail, but no rollback of already applied configuration * changes is attempted. Operation. * * Create a request for the method "tenancyUnits.applyProjectConfig". * * This request holds the parameters needed by the serviceconsumermanagement server. After setting * any optional parameters, call the {@link ApplyProjectConfig#execute()} method to invoke the * remote operation. * * @param name Required. Name of the tenancy unit. Such as * 'services/service.googleapis.com/projects/12345/tenancyUnits/abcd'. * @param content the {@link com.google.api.services.serviceconsumermanagement.v1.model.ApplyTenantProjectConfigRequest} * @return the request */ public ApplyProjectConfig applyProjectConfig(java.lang.String name, com.google.api.services.serviceconsumermanagement.v1.model.ApplyTenantProjectConfigRequest content) throws java.io.IOException { ApplyProjectConfig result = new ApplyProjectConfig(name, content); initialize(result); return result; } public class ApplyProjectConfig extends ServiceConsumerManagementRequest { private static final String REST_PATH = "v1/{+name}:applyProjectConfig"; private final java.util.regex.Pattern NAME_PATTERN = java.util.regex.Pattern.compile("^services/[^/]+/[^/]+/[^/]+/tenancyUnits/[^/]+$"); /** * Apply a configuration to an existing tenant project. This project must exist in an active state * and have the original owner account. The caller must have permission to add a project to the * given tenancy unit. The configuration is applied, but any existing settings on the project * aren't modified. Specified policy bindings are applied. Existing bindings aren't modified. * Specified services are activated. No service is deactivated. If specified, new billing * configuration is applied. Omit a billing configuration to keep the existing one. A service * account in the project is created if previously non existed. Specified labels will be appended * to tenant project, note that the value of existing label key will be updated if the same label * key is requested. The specified folder is ignored, as moving a tenant project to a different * folder isn't supported. The operation fails if any of the steps fail, but no rollback of * already applied configuration changes is attempted. Operation. * * Create a request for the method "tenancyUnits.applyProjectConfig". * * This request holds the parameters needed by the the serviceconsumermanagement server. After * setting any optional parameters, call the {@link ApplyProjectConfig#execute()} method to invoke * the remote operation.

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

* * @param name Required. Name of the tenancy unit. Such as * 'services/service.googleapis.com/projects/12345/tenancyUnits/abcd'. * @param content the {@link com.google.api.services.serviceconsumermanagement.v1.model.ApplyTenantProjectConfigRequest} * @since 1.13 */ protected ApplyProjectConfig(java.lang.String name, com.google.api.services.serviceconsumermanagement.v1.model.ApplyTenantProjectConfigRequest content) { super(ServiceConsumerManagement.this, "POST", REST_PATH, content, com.google.api.services.serviceconsumermanagement.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 " + "^services/[^/]+/[^/]+/[^/]+/tenancyUnits/[^/]+$"); } } @Override public ApplyProjectConfig set$Xgafv(java.lang.String $Xgafv) { return (ApplyProjectConfig) super.set$Xgafv($Xgafv); } @Override public ApplyProjectConfig setAccessToken(java.lang.String accessToken) { return (ApplyProjectConfig) super.setAccessToken(accessToken); } @Override public ApplyProjectConfig setAlt(java.lang.String alt) { return (ApplyProjectConfig) super.setAlt(alt); } @Override public ApplyProjectConfig setCallback(java.lang.String callback) { return (ApplyProjectConfig) super.setCallback(callback); } @Override public ApplyProjectConfig setFields(java.lang.String fields) { return (ApplyProjectConfig) super.setFields(fields); } @Override public ApplyProjectConfig setKey(java.lang.String key) { return (ApplyProjectConfig) super.setKey(key); } @Override public ApplyProjectConfig setOauthToken(java.lang.String oauthToken) { return (ApplyProjectConfig) super.setOauthToken(oauthToken); } @Override public ApplyProjectConfig setPrettyPrint(java.lang.Boolean prettyPrint) { return (ApplyProjectConfig) super.setPrettyPrint(prettyPrint); } @Override public ApplyProjectConfig setQuotaUser(java.lang.String quotaUser) { return (ApplyProjectConfig) super.setQuotaUser(quotaUser); } @Override public ApplyProjectConfig setUploadType(java.lang.String uploadType) { return (ApplyProjectConfig) super.setUploadType(uploadType); } @Override public ApplyProjectConfig setUploadProtocol(java.lang.String uploadProtocol) { return (ApplyProjectConfig) super.setUploadProtocol(uploadProtocol); } /** * Required. Name of the tenancy unit. Such as * 'services/service.googleapis.com/projects/12345/tenancyUnits/abcd'. */ @com.google.api.client.util.Key private java.lang.String name; /** Required. Name of the tenancy unit. Such as 'services/service.googleapis.com/projects/12345/tenancyUnits/abcd'. */ public java.lang.String getName() { return name; } /** * Required. Name of the tenancy unit. Such as * 'services/service.googleapis.com/projects/12345/tenancyUnits/abcd'. */ public ApplyProjectConfig 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 " + "^services/[^/]+/[^/]+/[^/]+/tenancyUnits/[^/]+$"); } this.name = name; return this; } @Override public ApplyProjectConfig set(String parameterName, Object value) { return (ApplyProjectConfig) super.set(parameterName, value); } } /** * Attach an existing project to the tenancy unit as a new tenant resource. The project could either * be the tenant project reserved by calling `AddTenantProject` under a tenancy unit of a service * producer's project of a managed service, or from a separate project. The caller is checked * against a set of permissions as if calling `AddTenantProject` on the same service consumer. To * trigger the attachment, the targeted tenant project must be in a folder. Make sure the * ServiceConsumerManagement service account is the owner of that project. These two requirements * are already met if the project is reserved by calling `AddTenantProject`. Operation. * * Create a request for the method "tenancyUnits.attachProject". * * This request holds the parameters needed by the serviceconsumermanagement server. After setting * any optional parameters, call the {@link AttachProject#execute()} method to invoke the remote * operation. * * @param name Required. Name of the tenancy unit that the project will be attached to. Such as * 'services/service.googleapis.com/projects/12345/tenancyUnits/abcd'. * @param content the {@link com.google.api.services.serviceconsumermanagement.v1.model.AttachTenantProjectRequest} * @return the request */ public AttachProject attachProject(java.lang.String name, com.google.api.services.serviceconsumermanagement.v1.model.AttachTenantProjectRequest content) throws java.io.IOException { AttachProject result = new AttachProject(name, content); initialize(result); return result; } public class AttachProject extends ServiceConsumerManagementRequest { private static final String REST_PATH = "v1/{+name}:attachProject"; private final java.util.regex.Pattern NAME_PATTERN = java.util.regex.Pattern.compile("^services/[^/]+/[^/]+/[^/]+/tenancyUnits/[^/]+$"); /** * Attach an existing project to the tenancy unit as a new tenant resource. The project could * either be the tenant project reserved by calling `AddTenantProject` under a tenancy unit of a * service producer's project of a managed service, or from a separate project. The caller is * checked against a set of permissions as if calling `AddTenantProject` on the same service * consumer. To trigger the attachment, the targeted tenant project must be in a folder. Make sure * the ServiceConsumerManagement service account is the owner of that project. These two * requirements are already met if the project is reserved by calling `AddTenantProject`. * Operation. * * Create a request for the method "tenancyUnits.attachProject". * * This request holds the parameters needed by the the serviceconsumermanagement server. After * setting any optional parameters, call the {@link AttachProject#execute()} method to invoke the * remote operation.

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

* * @param name Required. Name of the tenancy unit that the project will be attached to. Such as * 'services/service.googleapis.com/projects/12345/tenancyUnits/abcd'. * @param content the {@link com.google.api.services.serviceconsumermanagement.v1.model.AttachTenantProjectRequest} * @since 1.13 */ protected AttachProject(java.lang.String name, com.google.api.services.serviceconsumermanagement.v1.model.AttachTenantProjectRequest content) { super(ServiceConsumerManagement.this, "POST", REST_PATH, content, com.google.api.services.serviceconsumermanagement.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 " + "^services/[^/]+/[^/]+/[^/]+/tenancyUnits/[^/]+$"); } } @Override public AttachProject set$Xgafv(java.lang.String $Xgafv) { return (AttachProject) super.set$Xgafv($Xgafv); } @Override public AttachProject setAccessToken(java.lang.String accessToken) { return (AttachProject) super.setAccessToken(accessToken); } @Override public AttachProject setAlt(java.lang.String alt) { return (AttachProject) super.setAlt(alt); } @Override public AttachProject setCallback(java.lang.String callback) { return (AttachProject) super.setCallback(callback); } @Override public AttachProject setFields(java.lang.String fields) { return (AttachProject) super.setFields(fields); } @Override public AttachProject setKey(java.lang.String key) { return (AttachProject) super.setKey(key); } @Override public AttachProject setOauthToken(java.lang.String oauthToken) { return (AttachProject) super.setOauthToken(oauthToken); } @Override public AttachProject setPrettyPrint(java.lang.Boolean prettyPrint) { return (AttachProject) super.setPrettyPrint(prettyPrint); } @Override public AttachProject setQuotaUser(java.lang.String quotaUser) { return (AttachProject) super.setQuotaUser(quotaUser); } @Override public AttachProject setUploadType(java.lang.String uploadType) { return (AttachProject) super.setUploadType(uploadType); } @Override public AttachProject setUploadProtocol(java.lang.String uploadProtocol) { return (AttachProject) super.setUploadProtocol(uploadProtocol); } /** * Required. Name of the tenancy unit that the project will be attached to. Such as * 'services/service.googleapis.com/projects/12345/tenancyUnits/abcd'. */ @com.google.api.client.util.Key private java.lang.String name; /** Required. Name of the tenancy unit that the project will be attached to. Such as 'services/service.googleapis.com/projects/12345/tenancyUnits/abcd'. */ public java.lang.String getName() { return name; } /** * Required. Name of the tenancy unit that the project will be attached to. Such as * 'services/service.googleapis.com/projects/12345/tenancyUnits/abcd'. */ public AttachProject 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 " + "^services/[^/]+/[^/]+/[^/]+/tenancyUnits/[^/]+$"); } this.name = name; return this; } @Override public AttachProject set(String parameterName, Object value) { return (AttachProject) super.set(parameterName, value); } } /** * Creates a tenancy unit with no tenant resources. If tenancy unit already exists, it will be * returned, however, in this case, returned TenancyUnit does not have tenant_resources field set * and ListTenancyUnits has to be used to get a complete TenancyUnit with all fields populated. * * Create a request for the method "tenancyUnits.create". * * This request holds the parameters needed by the serviceconsumermanagement server. After setting * any optional parameters, call the {@link Create#execute()} method to invoke the remote operation. * * @param parent Required. services/{service}/{collection id}/{resource id} {collection id} is the cloud resource * collection type representing the service consumer, for example 'projects', or * 'organizations'. {resource id} is the consumer numeric id, such as project number: * '123456'. {service} the name of a managed service, such as 'service.googleapis.com'. * Enables service binding using the new tenancy unit. * @param content the {@link com.google.api.services.serviceconsumermanagement.v1.model.CreateTenancyUnitRequest} * @return the request */ public Create create(java.lang.String parent, com.google.api.services.serviceconsumermanagement.v1.model.CreateTenancyUnitRequest content) throws java.io.IOException { Create result = new Create(parent, content); initialize(result); return result; } public class Create extends ServiceConsumerManagementRequest { private static final String REST_PATH = "v1/{+parent}/tenancyUnits"; private final java.util.regex.Pattern PARENT_PATTERN = java.util.regex.Pattern.compile("^services/[^/]+/[^/]+/[^/]+$"); /** * Creates a tenancy unit with no tenant resources. If tenancy unit already exists, it will be * returned, however, in this case, returned TenancyUnit does not have tenant_resources field set * and ListTenancyUnits has to be used to get a complete TenancyUnit with all fields populated. * * Create a request for the method "tenancyUnits.create". * * This request holds the parameters needed by the the serviceconsumermanagement 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. services/{service}/{collection id}/{resource id} {collection id} is the cloud resource * collection type representing the service consumer, for example 'projects', or * 'organizations'. {resource id} is the consumer numeric id, such as project number: * '123456'. {service} the name of a managed service, such as 'service.googleapis.com'. * Enables service binding using the new tenancy unit. * @param content the {@link com.google.api.services.serviceconsumermanagement.v1.model.CreateTenancyUnitRequest} * @since 1.13 */ protected Create(java.lang.String parent, com.google.api.services.serviceconsumermanagement.v1.model.CreateTenancyUnitRequest content) { super(ServiceConsumerManagement.this, "POST", REST_PATH, content, com.google.api.services.serviceconsumermanagement.v1.model.TenancyUnit.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 " + "^services/[^/]+/[^/]+/[^/]+$"); } } @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. services/{service}/{collection id}/{resource id} {collection id} is the cloud * resource collection type representing the service consumer, for example 'projects', or * 'organizations'. {resource id} is the consumer numeric id, such as project number: * '123456'. {service} the name of a managed service, such as 'service.googleapis.com'. * Enables service binding using the new tenancy unit. */ @com.google.api.client.util.Key private java.lang.String parent; /** Required. services/{service}/{collection id}/{resource id} {collection id} is the cloud resource collection type representing the service consumer, for example 'projects', or 'organizations'. {resource id} is the consumer numeric id, such as project number: '123456'. {service} the name of a managed service, such as 'service.googleapis.com'. Enables service binding using the new tenancy unit. */ public java.lang.String getParent() { return parent; } /** * Required. services/{service}/{collection id}/{resource id} {collection id} is the cloud * resource collection type representing the service consumer, for example 'projects', or * 'organizations'. {resource id} is the consumer numeric id, such as project number: * '123456'. {service} the name of a managed service, such as 'service.googleapis.com'. * Enables service binding using the new tenancy unit. */ 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 " + "^services/[^/]+/[^/]+/[^/]+$"); } this.parent = parent; return this; } @Override public Create set(String parameterName, Object value) { return (Create) super.set(parameterName, value); } } /** * Delete a tenancy unit. Before you delete the tenancy unit, there should be no tenant resources in * it that aren't in a DELETED state. Operation. * * Create a request for the method "tenancyUnits.delete". * * This request holds the parameters needed by the serviceconsumermanagement server. After setting * any optional parameters, call the {@link Delete#execute()} method to invoke the remote operation. * * @param name Required. Name of the tenancy unit 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 ServiceConsumerManagementRequest { private static final String REST_PATH = "v1/{+name}"; private final java.util.regex.Pattern NAME_PATTERN = java.util.regex.Pattern.compile("^services/[^/]+/[^/]+/[^/]+/tenancyUnits/[^/]+$"); /** * Delete a tenancy unit. Before you delete the tenancy unit, there should be no tenant resources * in it that aren't in a DELETED state. Operation. * * Create a request for the method "tenancyUnits.delete". * * This request holds the parameters needed by the the serviceconsumermanagement 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. Name of the tenancy unit to be deleted. * @since 1.13 */ protected Delete(java.lang.String name) { super(ServiceConsumerManagement.this, "DELETE", REST_PATH, null, com.google.api.services.serviceconsumermanagement.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 " + "^services/[^/]+/[^/]+/[^/]+/tenancyUnits/[^/]+$"); } } @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. Name of the tenancy unit to be deleted. */ @com.google.api.client.util.Key private java.lang.String name; /** Required. Name of the tenancy unit to be deleted. */ public java.lang.String getName() { return name; } /** Required. Name of the tenancy unit 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 " + "^services/[^/]+/[^/]+/[^/]+/tenancyUnits/[^/]+$"); } this.name = name; return this; } @Override public Delete set(String parameterName, Object value) { return (Delete) super.set(parameterName, value); } } /** * Deletes the specified project resource identified by a tenant resource tag. The mothod removes a * project lien with a 'TenantManager' origin if that was added. It will then attempt to delete the * project. If that operation fails, this method also fails. After the project has been deleted, the * tenant resource state is set to DELETED. To permanently remove resource metadata, call the * `RemoveTenantProject` method. New resources with the same tag can't be added if there are * existing resources in a DELETED state. Operation. * * Create a request for the method "tenancyUnits.deleteProject". * * This request holds the parameters needed by the serviceconsumermanagement server. After setting * any optional parameters, call the {@link DeleteProject#execute()} method to invoke the remote * operation. * * @param name Required. Name of the tenancy unit. Such as * 'services/service.googleapis.com/projects/12345/tenancyUnits/abcd'. * @param content the {@link com.google.api.services.serviceconsumermanagement.v1.model.DeleteTenantProjectRequest} * @return the request */ public DeleteProject deleteProject(java.lang.String name, com.google.api.services.serviceconsumermanagement.v1.model.DeleteTenantProjectRequest content) throws java.io.IOException { DeleteProject result = new DeleteProject(name, content); initialize(result); return result; } public class DeleteProject extends ServiceConsumerManagementRequest { private static final String REST_PATH = "v1/{+name}:deleteProject"; private final java.util.regex.Pattern NAME_PATTERN = java.util.regex.Pattern.compile("^services/[^/]+/[^/]+/[^/]+/tenancyUnits/[^/]+$"); /** * Deletes the specified project resource identified by a tenant resource tag. The mothod removes * a project lien with a 'TenantManager' origin if that was added. It will then attempt to delete * the project. If that operation fails, this method also fails. After the project has been * deleted, the tenant resource state is set to DELETED. To permanently remove resource metadata, * call the `RemoveTenantProject` method. New resources with the same tag can't be added if there * are existing resources in a DELETED state. Operation. * * Create a request for the method "tenancyUnits.deleteProject". * * This request holds the parameters needed by the the serviceconsumermanagement server. After * setting any optional parameters, call the {@link DeleteProject#execute()} method to invoke the * remote operation.

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

* * @param name Required. Name of the tenancy unit. Such as * 'services/service.googleapis.com/projects/12345/tenancyUnits/abcd'. * @param content the {@link com.google.api.services.serviceconsumermanagement.v1.model.DeleteTenantProjectRequest} * @since 1.13 */ protected DeleteProject(java.lang.String name, com.google.api.services.serviceconsumermanagement.v1.model.DeleteTenantProjectRequest content) { super(ServiceConsumerManagement.this, "POST", REST_PATH, content, com.google.api.services.serviceconsumermanagement.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 " + "^services/[^/]+/[^/]+/[^/]+/tenancyUnits/[^/]+$"); } } @Override public DeleteProject set$Xgafv(java.lang.String $Xgafv) { return (DeleteProject) super.set$Xgafv($Xgafv); } @Override public DeleteProject setAccessToken(java.lang.String accessToken) { return (DeleteProject) super.setAccessToken(accessToken); } @Override public DeleteProject setAlt(java.lang.String alt) { return (DeleteProject) super.setAlt(alt); } @Override public DeleteProject setCallback(java.lang.String callback) { return (DeleteProject) super.setCallback(callback); } @Override public DeleteProject setFields(java.lang.String fields) { return (DeleteProject) super.setFields(fields); } @Override public DeleteProject setKey(java.lang.String key) { return (DeleteProject) super.setKey(key); } @Override public DeleteProject setOauthToken(java.lang.String oauthToken) { return (DeleteProject) super.setOauthToken(oauthToken); } @Override public DeleteProject setPrettyPrint(java.lang.Boolean prettyPrint) { return (DeleteProject) super.setPrettyPrint(prettyPrint); } @Override public DeleteProject setQuotaUser(java.lang.String quotaUser) { return (DeleteProject) super.setQuotaUser(quotaUser); } @Override public DeleteProject setUploadType(java.lang.String uploadType) { return (DeleteProject) super.setUploadType(uploadType); } @Override public DeleteProject setUploadProtocol(java.lang.String uploadProtocol) { return (DeleteProject) super.setUploadProtocol(uploadProtocol); } /** * Required. Name of the tenancy unit. Such as * 'services/service.googleapis.com/projects/12345/tenancyUnits/abcd'. */ @com.google.api.client.util.Key private java.lang.String name; /** Required. Name of the tenancy unit. Such as 'services/service.googleapis.com/projects/12345/tenancyUnits/abcd'. */ public java.lang.String getName() { return name; } /** * Required. Name of the tenancy unit. Such as * 'services/service.googleapis.com/projects/12345/tenancyUnits/abcd'. */ public DeleteProject 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 " + "^services/[^/]+/[^/]+/[^/]+/tenancyUnits/[^/]+$"); } this.name = name; return this; } @Override public DeleteProject set(String parameterName, Object value) { return (DeleteProject) super.set(parameterName, value); } } /** * Find the tenancy unit for a managed service and service consumer. This method shouldn't be used * in a service producer's runtime path, for example to find the tenant project number when creating * VMs. Service producers must persist the tenant project's information after the project is * created. * * Create a request for the method "tenancyUnits.list". * * This request holds the parameters needed by the serviceconsumermanagement server. After setting * any optional parameters, call the {@link List#execute()} method to invoke the remote operation. * * @param parent Required. Managed service and service consumer. Required. services/{service}/{collection * id}/{resource id} {collection id} is the cloud resource collection type representing the * service consumer, for example 'projects', or 'organizations'. {resource id} is the * consumer numeric id, such as project number: '123456'. {service} the name of a service, * such as 'service.googleapis.com'. * @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 ServiceConsumerManagementRequest { private static final String REST_PATH = "v1/{+parent}/tenancyUnits"; private final java.util.regex.Pattern PARENT_PATTERN = java.util.regex.Pattern.compile("^services/[^/]+/[^/]+/[^/]+$"); /** * Find the tenancy unit for a managed service and service consumer. This method shouldn't be used * in a service producer's runtime path, for example to find the tenant project number when * creating VMs. Service producers must persist the tenant project's information after the project * is created. * * Create a request for the method "tenancyUnits.list". * * This request holds the parameters needed by the the serviceconsumermanagement 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. Managed service and service consumer. Required. services/{service}/{collection * id}/{resource id} {collection id} is the cloud resource collection type representing the * service consumer, for example 'projects', or 'organizations'. {resource id} is the * consumer numeric id, such as project number: '123456'. {service} the name of a service, * such as 'service.googleapis.com'. * @since 1.13 */ protected List(java.lang.String parent) { super(ServiceConsumerManagement.this, "GET", REST_PATH, null, com.google.api.services.serviceconsumermanagement.v1.model.ListTenancyUnitsResponse.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 " + "^services/[^/]+/[^/]+/[^/]+$"); } } @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. Managed service and service consumer. Required. services/{service}/{collection * id}/{resource id} {collection id} is the cloud resource collection type representing the * service consumer, for example 'projects', or 'organizations'. {resource id} is the * consumer numeric id, such as project number: '123456'. {service} the name of a service, * such as 'service.googleapis.com'. */ @com.google.api.client.util.Key private java.lang.String parent; /** Required. Managed service and service consumer. Required. services/{service}/{collection id}/{resource id} {collection id} is the cloud resource collection type representing the service consumer, for example 'projects', or 'organizations'. {resource id} is the consumer numeric id, such as project number: '123456'. {service} the name of a service, such as 'service.googleapis.com'. */ public java.lang.String getParent() { return parent; } /** * Required. Managed service and service consumer. Required. services/{service}/{collection * id}/{resource id} {collection id} is the cloud resource collection type representing the * service consumer, for example 'projects', or 'organizations'. {resource id} is the * consumer numeric id, such as project number: '123456'. {service} the name of a service, * such as 'service.googleapis.com'. */ 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 " + "^services/[^/]+/[^/]+/[^/]+$"); } this.parent = parent; return this; } /** Optional. Filter expression over tenancy resources field. Optional. */ @com.google.api.client.util.Key private java.lang.String filter; /** Optional. Filter expression over tenancy resources field. Optional. */ public java.lang.String getFilter() { return filter; } /** Optional. Filter expression over tenancy resources field. Optional. */ public List setFilter(java.lang.String filter) { this.filter = filter; return this; } /** Optional. The maximum number of results returned by this request. */ @com.google.api.client.util.Key private java.lang.Integer pageSize; /** Optional. The maximum number of results returned by this request. */ public java.lang.Integer getPageSize() { return pageSize; } /** Optional. The maximum number of results returned by this request. */ public List setPageSize(java.lang.Integer pageSize) { this.pageSize = pageSize; return this; } /** * Optional. The continuation token, which is used to page through large result sets. To get * the next page of results, set this parameter to the value of `nextPageToken` from the * previous response. */ @com.google.api.client.util.Key private java.lang.String pageToken; /** Optional. The continuation token, which is used to page through large result sets. To get the next page of results, set this parameter to the value of `nextPageToken` from the previous response. */ public java.lang.String getPageToken() { return pageToken; } /** * Optional. The continuation token, which is used to page through large result sets. To get * the next page of results, set this parameter to the value of `nextPageToken` from the * previous response. */ 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); } } /** * Removes the specified project resource identified by a tenant resource tag. The method removes * the project lien with 'TenantManager' origin if that was added. It then attempts to delete the * project. If that operation fails, this method also fails. Calls to remove already removed or non- * existent tenant project succeed. After the project has been deleted, or if was already in a * DELETED state, resource metadata is permanently removed from the tenancy unit. Operation. * * Create a request for the method "tenancyUnits.removeProject". * * This request holds the parameters needed by the serviceconsumermanagement server. After setting * any optional parameters, call the {@link RemoveProject#execute()} method to invoke the remote * operation. * * @param name Required. Name of the tenancy unit. Such as * 'services/service.googleapis.com/projects/12345/tenancyUnits/abcd'. * @param content the {@link com.google.api.services.serviceconsumermanagement.v1.model.RemoveTenantProjectRequest} * @return the request */ public RemoveProject removeProject(java.lang.String name, com.google.api.services.serviceconsumermanagement.v1.model.RemoveTenantProjectRequest content) throws java.io.IOException { RemoveProject result = new RemoveProject(name, content); initialize(result); return result; } public class RemoveProject extends ServiceConsumerManagementRequest { private static final String REST_PATH = "v1/{+name}:removeProject"; private final java.util.regex.Pattern NAME_PATTERN = java.util.regex.Pattern.compile("^services/[^/]+/[^/]+/[^/]+/tenancyUnits/[^/]+$"); /** * Removes the specified project resource identified by a tenant resource tag. The method removes * the project lien with 'TenantManager' origin if that was added. It then attempts to delete the * project. If that operation fails, this method also fails. Calls to remove already removed or * non-existent tenant project succeed. After the project has been deleted, or if was already in a * DELETED state, resource metadata is permanently removed from the tenancy unit. Operation. * * Create a request for the method "tenancyUnits.removeProject". * * This request holds the parameters needed by the the serviceconsumermanagement server. After * setting any optional parameters, call the {@link RemoveProject#execute()} method to invoke the * remote operation.

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

* * @param name Required. Name of the tenancy unit. Such as * 'services/service.googleapis.com/projects/12345/tenancyUnits/abcd'. * @param content the {@link com.google.api.services.serviceconsumermanagement.v1.model.RemoveTenantProjectRequest} * @since 1.13 */ protected RemoveProject(java.lang.String name, com.google.api.services.serviceconsumermanagement.v1.model.RemoveTenantProjectRequest content) { super(ServiceConsumerManagement.this, "POST", REST_PATH, content, com.google.api.services.serviceconsumermanagement.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 " + "^services/[^/]+/[^/]+/[^/]+/tenancyUnits/[^/]+$"); } } @Override public RemoveProject set$Xgafv(java.lang.String $Xgafv) { return (RemoveProject) super.set$Xgafv($Xgafv); } @Override public RemoveProject setAccessToken(java.lang.String accessToken) { return (RemoveProject) super.setAccessToken(accessToken); } @Override public RemoveProject setAlt(java.lang.String alt) { return (RemoveProject) super.setAlt(alt); } @Override public RemoveProject setCallback(java.lang.String callback) { return (RemoveProject) super.setCallback(callback); } @Override public RemoveProject setFields(java.lang.String fields) { return (RemoveProject) super.setFields(fields); } @Override public RemoveProject setKey(java.lang.String key) { return (RemoveProject) super.setKey(key); } @Override public RemoveProject setOauthToken(java.lang.String oauthToken) { return (RemoveProject) super.setOauthToken(oauthToken); } @Override public RemoveProject setPrettyPrint(java.lang.Boolean prettyPrint) { return (RemoveProject) super.setPrettyPrint(prettyPrint); } @Override public RemoveProject setQuotaUser(java.lang.String quotaUser) { return (RemoveProject) super.setQuotaUser(quotaUser); } @Override public RemoveProject setUploadType(java.lang.String uploadType) { return (RemoveProject) super.setUploadType(uploadType); } @Override public RemoveProject setUploadProtocol(java.lang.String uploadProtocol) { return (RemoveProject) super.setUploadProtocol(uploadProtocol); } /** * Required. Name of the tenancy unit. Such as * 'services/service.googleapis.com/projects/12345/tenancyUnits/abcd'. */ @com.google.api.client.util.Key private java.lang.String name; /** Required. Name of the tenancy unit. Such as 'services/service.googleapis.com/projects/12345/tenancyUnits/abcd'. */ public java.lang.String getName() { return name; } /** * Required. Name of the tenancy unit. Such as * 'services/service.googleapis.com/projects/12345/tenancyUnits/abcd'. */ public RemoveProject 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 " + "^services/[^/]+/[^/]+/[^/]+/tenancyUnits/[^/]+$"); } this.name = name; return this; } @Override public RemoveProject set(String parameterName, Object value) { return (RemoveProject) super.set(parameterName, value); } } /** * Attempts to undelete a previously deleted tenant project. The project must be in a DELETED state. * There are no guarantees that an undeleted project will be in a fully restored and functional * state. Call the `ApplyTenantProjectConfig` method to update its configuration and then validate * all managed service resources. Operation. * * Create a request for the method "tenancyUnits.undeleteProject". * * This request holds the parameters needed by the serviceconsumermanagement server. After setting * any optional parameters, call the {@link UndeleteProject#execute()} method to invoke the remote * operation. * * @param name Required. Name of the tenancy unit. Such as * 'services/service.googleapis.com/projects/12345/tenancyUnits/abcd'. * @param content the {@link com.google.api.services.serviceconsumermanagement.v1.model.UndeleteTenantProjectRequest} * @return the request */ public UndeleteProject undeleteProject(java.lang.String name, com.google.api.services.serviceconsumermanagement.v1.model.UndeleteTenantProjectRequest content) throws java.io.IOException { UndeleteProject result = new UndeleteProject(name, content); initialize(result); return result; } public class UndeleteProject extends ServiceConsumerManagementRequest { private static final String REST_PATH = "v1/{+name}:undeleteProject"; private final java.util.regex.Pattern NAME_PATTERN = java.util.regex.Pattern.compile("^services/[^/]+/[^/]+/[^/]+/tenancyUnits/[^/]+$"); /** * Attempts to undelete a previously deleted tenant project. The project must be in a DELETED * state. There are no guarantees that an undeleted project will be in a fully restored and * functional state. Call the `ApplyTenantProjectConfig` method to update its configuration and * then validate all managed service resources. Operation. * * Create a request for the method "tenancyUnits.undeleteProject". * * This request holds the parameters needed by the the serviceconsumermanagement server. After * setting any optional parameters, call the {@link UndeleteProject#execute()} method to invoke * the remote operation.

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

* * @param name Required. Name of the tenancy unit. Such as * 'services/service.googleapis.com/projects/12345/tenancyUnits/abcd'. * @param content the {@link com.google.api.services.serviceconsumermanagement.v1.model.UndeleteTenantProjectRequest} * @since 1.13 */ protected UndeleteProject(java.lang.String name, com.google.api.services.serviceconsumermanagement.v1.model.UndeleteTenantProjectRequest content) { super(ServiceConsumerManagement.this, "POST", REST_PATH, content, com.google.api.services.serviceconsumermanagement.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 " + "^services/[^/]+/[^/]+/[^/]+/tenancyUnits/[^/]+$"); } } @Override public UndeleteProject set$Xgafv(java.lang.String $Xgafv) { return (UndeleteProject) super.set$Xgafv($Xgafv); } @Override public UndeleteProject setAccessToken(java.lang.String accessToken) { return (UndeleteProject) super.setAccessToken(accessToken); } @Override public UndeleteProject setAlt(java.lang.String alt) { return (UndeleteProject) super.setAlt(alt); } @Override public UndeleteProject setCallback(java.lang.String callback) { return (UndeleteProject) super.setCallback(callback); } @Override public UndeleteProject setFields(java.lang.String fields) { return (UndeleteProject) super.setFields(fields); } @Override public UndeleteProject setKey(java.lang.String key) { return (UndeleteProject) super.setKey(key); } @Override public UndeleteProject setOauthToken(java.lang.String oauthToken) { return (UndeleteProject) super.setOauthToken(oauthToken); } @Override public UndeleteProject setPrettyPrint(java.lang.Boolean prettyPrint) { return (UndeleteProject) super.setPrettyPrint(prettyPrint); } @Override public UndeleteProject setQuotaUser(java.lang.String quotaUser) { return (UndeleteProject) super.setQuotaUser(quotaUser); } @Override public UndeleteProject setUploadType(java.lang.String uploadType) { return (UndeleteProject) super.setUploadType(uploadType); } @Override public UndeleteProject setUploadProtocol(java.lang.String uploadProtocol) { return (UndeleteProject) super.setUploadProtocol(uploadProtocol); } /** * Required. Name of the tenancy unit. Such as * 'services/service.googleapis.com/projects/12345/tenancyUnits/abcd'. */ @com.google.api.client.util.Key private java.lang.String name; /** Required. Name of the tenancy unit. Such as 'services/service.googleapis.com/projects/12345/tenancyUnits/abcd'. */ public java.lang.String getName() { return name; } /** * Required. Name of the tenancy unit. Such as * 'services/service.googleapis.com/projects/12345/tenancyUnits/abcd'. */ public UndeleteProject 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 " + "^services/[^/]+/[^/]+/[^/]+/tenancyUnits/[^/]+$"); } this.name = name; return this; } @Override public UndeleteProject set(String parameterName, Object value) { return (UndeleteProject) super.set(parameterName, value); } } } } /** * Builder for {@link ServiceConsumerManagement}. * *

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




© 2015 - 2024 Weber Informatics LLC | Privacy Policy