com.google.api.services.servicemanagement.ServiceManagement Maven / Gradle / Ivy
/*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
* in compliance with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software distributed under the License
* is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
* or implied. See the License for the specific language governing permissions and limitations under
* the License.
*/
/*
* This code was generated by https://github.com/googleapis/google-api-java-client-services/
* Modify at your own risk.
*/
package com.google.api.services.servicemanagement;
/**
* Service definition for ServiceManagement (v1).
*
*
* Google Service Management allows service producers to publish their services on Google Cloud Platform so that they can be discovered and used by service consumers.
*
*
*
* For more information about this service, see the
* API Documentation
*
*
*
* This service uses {@link ServiceManagementRequestInitializer} to initialize global parameters via its
* {@link Builder}.
*
*
* @since 1.3
* @author Google, Inc.
*/
@SuppressWarnings("javadoc")
public class ServiceManagement 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 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://servicemanagement.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://servicemanagement.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 ServiceManagement(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
*/
ServiceManagement(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 ServiceManagement servicemanagement = new ServiceManagement(...);}
* {@code ServiceManagement.Operations.List request = servicemanagement.operations().list(parameters ...)}
*
*
* @return the resource collection
*/
public Operations operations() {
return new Operations();
}
/**
* The "operations" collection of methods.
*/
public class 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 servicemanagement 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 ServiceManagementRequest {
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 servicemanagement 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(ServiceManagement.this, "GET", REST_PATH, null, com.google.api.services.servicemanagement.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 service operations that match the specified filter in the request.
*
* Create a request for the method "operations.list".
*
* This request holds the parameters needed by the servicemanagement server. After setting any
* optional parameters, call the {@link List#execute()} method to invoke the remote operation.
*
* @return the request
*/
public List list() throws java.io.IOException {
List result = new List();
initialize(result);
return result;
}
public class List extends ServiceManagementRequest {
private static final String REST_PATH = "v1/operations";
/**
* Lists service operations that match the specified filter in the request.
*
* Create a request for the method "operations.list".
*
* This request holds the parameters needed by the the servicemanagement server. After setting
* any optional parameters, call the {@link List#execute()} method to invoke the remote operation.
* {@link
* List#initialize(com.google.api.client.googleapis.services.AbstractGoogleClientRequest)} must be
* called to initialize this instance immediately after invoking the constructor.
*
* @since 1.13
*/
protected List() {
super(ServiceManagement.this, "GET", REST_PATH, null, com.google.api.services.servicemanagement.model.ListOperationsResponse.class);
}
@Override
public com.google.api.client.http.HttpResponse executeUsingHead() throws java.io.IOException {
return super.executeUsingHead();
}
@Override
public com.google.api.client.http.HttpRequest buildHttpRequestUsingHead() throws java.io.IOException {
return super.buildHttpRequestUsingHead();
}
@Override
public List set$Xgafv(java.lang.String $Xgafv) {
return (List) super.set$Xgafv($Xgafv);
}
@Override
public List setAccessToken(java.lang.String accessToken) {
return (List) super.setAccessToken(accessToken);
}
@Override
public List setAlt(java.lang.String alt) {
return (List) super.setAlt(alt);
}
@Override
public List 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);
}
/**
* A string for filtering Operations. The following filter fields are supported: *
* serviceName: Required. Only `=` operator is allowed. * startTime: The time this job was
* started, in ISO 8601 format. Allowed operators are `>=`, `>`, `<=`, and `<`. * status: Can
* be `done`, `in_progress`, or `failed`. Allowed operators are `=`, and `!=`. Filter
* expression supports conjunction (AND) and disjunction (OR) logical operators. However, the
* serviceName restriction must be at the top-level and can only be combined with other
* restrictions via the AND logical operator. Examples: * `serviceName={some-
* service}.googleapis.com` * `serviceName={some-service}.googleapis.com AND
* startTime>="2017-02-01"` * `serviceName={some-service}.googleapis.com AND status=done` *
* `serviceName={some-service}.googleapis.com AND (status=done OR startTime>="2017-02-01")`
*/
@com.google.api.client.util.Key
private java.lang.String filter;
/** A string for filtering Operations. The following filter fields are supported: * serviceName:
Required. Only `=` operator is allowed. * startTime: The time this job was started, in ISO 8601
format. Allowed operators are `>=`, `>`, `<=`, and `<`. * status: Can be `done`, `in_progress`, or
`failed`. Allowed operators are `=`, and `!=`. Filter expression supports conjunction (AND) and
disjunction (OR) logical operators. However, the serviceName restriction must be at the top-level
and can only be combined with other restrictions via the AND logical operator. Examples: *
`serviceName={some-service}.googleapis.com` * `serviceName={some-service}.googleapis.com AND
startTime>="2017-02-01"` * `serviceName={some-service}.googleapis.com AND status=done` *
`serviceName={some-service}.googleapis.com AND (status=done OR startTime>="2017-02-01")`
*/
public java.lang.String getFilter() {
return filter;
}
/**
* A string for filtering Operations. The following filter fields are supported: *
* serviceName: Required. Only `=` operator is allowed. * startTime: The time this job was
* started, in ISO 8601 format. Allowed operators are `>=`, `>`, `<=`, and `<`. * status: Can
* be `done`, `in_progress`, or `failed`. Allowed operators are `=`, and `!=`. Filter
* expression supports conjunction (AND) and disjunction (OR) logical operators. However, the
* serviceName restriction must be at the top-level and can only be combined with other
* restrictions via the AND logical operator. Examples: * `serviceName={some-
* service}.googleapis.com` * `serviceName={some-service}.googleapis.com AND
* startTime>="2017-02-01"` * `serviceName={some-service}.googleapis.com AND status=done` *
* `serviceName={some-service}.googleapis.com AND (status=done OR startTime>="2017-02-01")`
*/
public List setFilter(java.lang.String filter) {
this.filter = filter;
return this;
}
/** Not used. */
@com.google.api.client.util.Key
private java.lang.String name;
/** Not used.
*/
public java.lang.String getName() {
return name;
}
/** Not used. */
public List setName(java.lang.String name) {
this.name = name;
return this;
}
/**
* The maximum number of operations to return. If unspecified, defaults to 50. The maximum
* value is 100.
*/
@com.google.api.client.util.Key
private java.lang.Integer pageSize;
/** The maximum number of operations to return. If unspecified, defaults to 50. The maximum value is
100.
*/
public java.lang.Integer getPageSize() {
return pageSize;
}
/**
* The maximum number of operations to return. If unspecified, defaults to 50. The maximum
* value is 100.
*/
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 ServiceManagement servicemanagement = new ServiceManagement(...);}
* {@code ServiceManagement.Services.List request = servicemanagement.services().list(parameters ...)}
*
*
* @return the resource collection
*/
public Services services() {
return new Services();
}
/**
* The "services" collection of methods.
*/
public class Services {
/**
* Creates a new managed service. A managed service is immutable, and is subject to mandatory 30-day
* data retention. You cannot move a service or recreate it within 30 days after deletion. One
* producer project can own no more than 500 services. For security and reliability purposes, a
* production service should be hosted in a dedicated producer project. Operation
*
* Create a request for the method "services.create".
*
* This request holds the parameters needed by the servicemanagement server. After setting any
* optional parameters, call the {@link Create#execute()} method to invoke the remote operation.
*
* @param content the {@link com.google.api.services.servicemanagement.model.ManagedService}
* @return the request
*/
public Create create(com.google.api.services.servicemanagement.model.ManagedService content) throws java.io.IOException {
Create result = new Create(content);
initialize(result);
return result;
}
public class Create extends ServiceManagementRequest {
private static final String REST_PATH = "v1/services";
/**
* Creates a new managed service. A managed service is immutable, and is subject to mandatory
* 30-day data retention. You cannot move a service or recreate it within 30 days after deletion.
* One producer project can own no more than 500 services. For security and reliability purposes,
* a production service should be hosted in a dedicated producer project. Operation
*
* Create a request for the method "services.create".
*
* This request holds the parameters needed by the the servicemanagement server. After setting
* any optional parameters, call the {@link Create#execute()} method to invoke the remote
* operation. {@link
* Create#initialize(com.google.api.client.googleapis.services.AbstractGoogleClientRequest)} must
* be called to initialize this instance immediately after invoking the constructor.
*
* @param content the {@link com.google.api.services.servicemanagement.model.ManagedService}
* @since 1.13
*/
protected Create(com.google.api.services.servicemanagement.model.ManagedService content) {
super(ServiceManagement.this, "POST", REST_PATH, content, com.google.api.services.servicemanagement.model.Operation.class);
}
@Override
public Create set$Xgafv(java.lang.String $Xgafv) {
return (Create) super.set$Xgafv($Xgafv);
}
@Override
public Create setAccessToken(java.lang.String accessToken) {
return (Create) super.setAccessToken(accessToken);
}
@Override
public Create setAlt(java.lang.String alt) {
return (Create) super.setAlt(alt);
}
@Override
public Create 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);
}
@Override
public Create set(String parameterName, Object value) {
return (Create) super.set(parameterName, value);
}
}
/**
* Deletes a managed service. This method will change the service to the `Soft-Delete` state for 30
* days. Within this period, service producers may call UndeleteService to restore the service.
* After 30 days, the service will be permanently deleted. Operation
*
* Create a request for the method "services.delete".
*
* This request holds the parameters needed by the servicemanagement server. After setting any
* optional parameters, call the {@link Delete#execute()} method to invoke the remote operation.
*
* @param serviceName Required. The name of the service. See the [overview](https://cloud.google.com/service-
* management/overview) for naming requirements. For example: `example.googleapis.com`.
* @return the request
*/
public Delete delete(java.lang.String serviceName) throws java.io.IOException {
Delete result = new Delete(serviceName);
initialize(result);
return result;
}
public class Delete extends ServiceManagementRequest {
private static final String REST_PATH = "v1/services/{serviceName}";
/**
* Deletes a managed service. This method will change the service to the `Soft-Delete` state for
* 30 days. Within this period, service producers may call UndeleteService to restore the service.
* After 30 days, the service will be permanently deleted. Operation
*
* Create a request for the method "services.delete".
*
* This request holds the parameters needed by the the servicemanagement 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 serviceName Required. The name of the service. See the [overview](https://cloud.google.com/service-
* management/overview) for naming requirements. For example: `example.googleapis.com`.
* @since 1.13
*/
protected Delete(java.lang.String serviceName) {
super(ServiceManagement.this, "DELETE", REST_PATH, null, com.google.api.services.servicemanagement.model.Operation.class);
this.serviceName = com.google.api.client.util.Preconditions.checkNotNull(serviceName, "Required parameter serviceName must be specified.");
}
@Override
public Delete set$Xgafv(java.lang.String $Xgafv) {
return (Delete) super.set$Xgafv($Xgafv);
}
@Override
public Delete setAccessToken(java.lang.String accessToken) {
return (Delete) super.setAccessToken(accessToken);
}
@Override
public Delete setAlt(java.lang.String alt) {
return (Delete) super.setAlt(alt);
}
@Override
public Delete setCallback(java.lang.String callback) {
return (Delete) super.setCallback(callback);
}
@Override
public Delete setFields(java.lang.String fields) {
return (Delete) super.setFields(fields);
}
@Override
public Delete setKey(java.lang.String key) {
return (Delete) super.setKey(key);
}
@Override
public Delete setOauthToken(java.lang.String oauthToken) {
return (Delete) super.setOauthToken(oauthToken);
}
@Override
public Delete setPrettyPrint(java.lang.Boolean prettyPrint) {
return (Delete) super.setPrettyPrint(prettyPrint);
}
@Override
public Delete setQuotaUser(java.lang.String quotaUser) {
return (Delete) super.setQuotaUser(quotaUser);
}
@Override
public Delete setUploadType(java.lang.String uploadType) {
return (Delete) super.setUploadType(uploadType);
}
@Override
public Delete setUploadProtocol(java.lang.String uploadProtocol) {
return (Delete) super.setUploadProtocol(uploadProtocol);
}
/**
* Required. The name of the service. See the [overview](https://cloud.google.com/service-
* management/overview) for naming requirements. For example: `example.googleapis.com`.
*/
@com.google.api.client.util.Key
private java.lang.String serviceName;
/** Required. The name of the service. See the [overview](https://cloud.google.com/service-
management/overview) for naming requirements. For example: `example.googleapis.com`.
*/
public java.lang.String getServiceName() {
return serviceName;
}
/**
* Required. The name of the service. See the [overview](https://cloud.google.com/service-
* management/overview) for naming requirements. For example: `example.googleapis.com`.
*/
public Delete setServiceName(java.lang.String serviceName) {
this.serviceName = serviceName;
return this;
}
@Override
public Delete set(String parameterName, Object value) {
return (Delete) super.set(parameterName, value);
}
}
/**
* Generates and returns a report (errors, warnings and changes from existing configurations)
* associated with GenerateConfigReportRequest.new_value If GenerateConfigReportRequest.old_value is
* specified, GenerateConfigReportRequest will contain a single ChangeReport based on the comparison
* between GenerateConfigReportRequest.new_value and GenerateConfigReportRequest.old_value. If
* GenerateConfigReportRequest.old_value is not specified, this method will compare
* GenerateConfigReportRequest.new_value with the last pushed service configuration.
*
* Create a request for the method "services.generateConfigReport".
*
* This request holds the parameters needed by the servicemanagement server. After setting any
* optional parameters, call the {@link GenerateConfigReport#execute()} method to invoke the remote
* operation.
*
* @param content the {@link com.google.api.services.servicemanagement.model.GenerateConfigReportRequest}
* @return the request
*/
public GenerateConfigReport generateConfigReport(com.google.api.services.servicemanagement.model.GenerateConfigReportRequest content) throws java.io.IOException {
GenerateConfigReport result = new GenerateConfigReport(content);
initialize(result);
return result;
}
public class GenerateConfigReport extends ServiceManagementRequest {
private static final String REST_PATH = "v1/services:generateConfigReport";
/**
* Generates and returns a report (errors, warnings and changes from existing configurations)
* associated with GenerateConfigReportRequest.new_value If GenerateConfigReportRequest.old_value
* is specified, GenerateConfigReportRequest will contain a single ChangeReport based on the
* comparison between GenerateConfigReportRequest.new_value and
* GenerateConfigReportRequest.old_value. If GenerateConfigReportRequest.old_value is not
* specified, this method will compare GenerateConfigReportRequest.new_value with the last pushed
* service configuration.
*
* Create a request for the method "services.generateConfigReport".
*
* This request holds the parameters needed by the the servicemanagement server. After setting
* any optional parameters, call the {@link GenerateConfigReport#execute()} method to invoke the
* remote operation. {@link GenerateConfigReport#initialize(com.google.api.client.googleapis.s
* ervices.AbstractGoogleClientRequest)} must be called to initialize this instance immediately
* after invoking the constructor.
*
* @param content the {@link com.google.api.services.servicemanagement.model.GenerateConfigReportRequest}
* @since 1.13
*/
protected GenerateConfigReport(com.google.api.services.servicemanagement.model.GenerateConfigReportRequest content) {
super(ServiceManagement.this, "POST", REST_PATH, content, com.google.api.services.servicemanagement.model.GenerateConfigReportResponse.class);
}
@Override
public GenerateConfigReport set$Xgafv(java.lang.String $Xgafv) {
return (GenerateConfigReport) super.set$Xgafv($Xgafv);
}
@Override
public GenerateConfigReport setAccessToken(java.lang.String accessToken) {
return (GenerateConfigReport) super.setAccessToken(accessToken);
}
@Override
public GenerateConfigReport setAlt(java.lang.String alt) {
return (GenerateConfigReport) super.setAlt(alt);
}
@Override
public GenerateConfigReport setCallback(java.lang.String callback) {
return (GenerateConfigReport) super.setCallback(callback);
}
@Override
public GenerateConfigReport setFields(java.lang.String fields) {
return (GenerateConfigReport) super.setFields(fields);
}
@Override
public GenerateConfigReport setKey(java.lang.String key) {
return (GenerateConfigReport) super.setKey(key);
}
@Override
public GenerateConfigReport setOauthToken(java.lang.String oauthToken) {
return (GenerateConfigReport) super.setOauthToken(oauthToken);
}
@Override
public GenerateConfigReport setPrettyPrint(java.lang.Boolean prettyPrint) {
return (GenerateConfigReport) super.setPrettyPrint(prettyPrint);
}
@Override
public GenerateConfigReport setQuotaUser(java.lang.String quotaUser) {
return (GenerateConfigReport) super.setQuotaUser(quotaUser);
}
@Override
public GenerateConfigReport setUploadType(java.lang.String uploadType) {
return (GenerateConfigReport) super.setUploadType(uploadType);
}
@Override
public GenerateConfigReport setUploadProtocol(java.lang.String uploadProtocol) {
return (GenerateConfigReport) super.setUploadProtocol(uploadProtocol);
}
@Override
public GenerateConfigReport set(String parameterName, Object value) {
return (GenerateConfigReport) super.set(parameterName, value);
}
}
/**
* Gets a managed service. Authentication is required unless the service is public.
*
* Create a request for the method "services.get".
*
* This request holds the parameters needed by the servicemanagement server. After setting any
* optional parameters, call the {@link Get#execute()} method to invoke the remote operation.
*
* @param serviceName Required. The name of the service. See the `ServiceManager` overview for naming requirements. For
* example: `example.googleapis.com`.
* @return the request
*/
public Get get(java.lang.String serviceName) throws java.io.IOException {
Get result = new Get(serviceName);
initialize(result);
return result;
}
public class Get extends ServiceManagementRequest {
private static final String REST_PATH = "v1/services/{serviceName}";
/**
* Gets a managed service. Authentication is required unless the service is public.
*
* Create a request for the method "services.get".
*
* This request holds the parameters needed by the the servicemanagement 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 serviceName Required. The name of the service. See the `ServiceManager` overview for naming requirements. For
* example: `example.googleapis.com`.
* @since 1.13
*/
protected Get(java.lang.String serviceName) {
super(ServiceManagement.this, "GET", REST_PATH, null, com.google.api.services.servicemanagement.model.ManagedService.class);
this.serviceName = com.google.api.client.util.Preconditions.checkNotNull(serviceName, "Required parameter serviceName must be specified.");
}
@Override
public com.google.api.client.http.HttpResponse executeUsingHead() throws java.io.IOException {
return super.executeUsingHead();
}
@Override
public com.google.api.client.http.HttpRequest buildHttpRequestUsingHead() throws java.io.IOException {
return super.buildHttpRequestUsingHead();
}
@Override
public Get set$Xgafv(java.lang.String $Xgafv) {
return (Get) super.set$Xgafv($Xgafv);
}
@Override
public Get setAccessToken(java.lang.String accessToken) {
return (Get) super.setAccessToken(accessToken);
}
@Override
public Get setAlt(java.lang.String alt) {
return (Get) super.setAlt(alt);
}
@Override
public Get setCallback(java.lang.String callback) {
return (Get) super.setCallback(callback);
}
@Override
public Get setFields(java.lang.String fields) {
return (Get) super.setFields(fields);
}
@Override
public Get setKey(java.lang.String key) {
return (Get) super.setKey(key);
}
@Override
public Get setOauthToken(java.lang.String oauthToken) {
return (Get) super.setOauthToken(oauthToken);
}
@Override
public Get setPrettyPrint(java.lang.Boolean prettyPrint) {
return (Get) super.setPrettyPrint(prettyPrint);
}
@Override
public Get setQuotaUser(java.lang.String quotaUser) {
return (Get) super.setQuotaUser(quotaUser);
}
@Override
public Get setUploadType(java.lang.String uploadType) {
return (Get) super.setUploadType(uploadType);
}
@Override
public Get setUploadProtocol(java.lang.String uploadProtocol) {
return (Get) super.setUploadProtocol(uploadProtocol);
}
/**
* Required. The name of the service. See the `ServiceManager` overview for naming
* requirements. For example: `example.googleapis.com`.
*/
@com.google.api.client.util.Key
private java.lang.String serviceName;
/** Required. The name of the service. See the `ServiceManager` overview for naming requirements. For
example: `example.googleapis.com`.
*/
public java.lang.String getServiceName() {
return serviceName;
}
/**
* Required. The name of the service. See the `ServiceManager` overview for naming
* requirements. For example: `example.googleapis.com`.
*/
public Get setServiceName(java.lang.String serviceName) {
this.serviceName = serviceName;
return this;
}
@Override
public Get set(String parameterName, Object value) {
return (Get) super.set(parameterName, value);
}
}
/**
* Gets a service configuration (version) for a managed service.
*
* Create a request for the method "services.getConfig".
*
* This request holds the parameters needed by the servicemanagement server. After setting any
* optional parameters, call the {@link GetConfig#execute()} method to invoke the remote operation.
*
* @param serviceName Required. The name of the service. See the [overview](https://cloud.google.com/service-
* management/overview) for naming requirements. For example: `example.googleapis.com`.
* @return the request
*/
public GetConfig getConfig(java.lang.String serviceName) throws java.io.IOException {
GetConfig result = new GetConfig(serviceName);
initialize(result);
return result;
}
public class GetConfig extends ServiceManagementRequest {
private static final String REST_PATH = "v1/services/{serviceName}/config";
/**
* Gets a service configuration (version) for a managed service.
*
* Create a request for the method "services.getConfig".
*
* This request holds the parameters needed by the the servicemanagement server. After setting
* any optional parameters, call the {@link GetConfig#execute()} method to invoke the remote
* operation. {@link
* GetConfig#initialize(com.google.api.client.googleapis.services.AbstractGoogleClientRequest)}
* must be called to initialize this instance immediately after invoking the constructor.
*
* @param serviceName Required. The name of the service. See the [overview](https://cloud.google.com/service-
* management/overview) for naming requirements. For example: `example.googleapis.com`.
* @since 1.13
*/
protected GetConfig(java.lang.String serviceName) {
super(ServiceManagement.this, "GET", REST_PATH, null, com.google.api.services.servicemanagement.model.Service.class);
this.serviceName = com.google.api.client.util.Preconditions.checkNotNull(serviceName, "Required parameter serviceName must be specified.");
}
@Override
public com.google.api.client.http.HttpResponse executeUsingHead() throws java.io.IOException {
return super.executeUsingHead();
}
@Override
public com.google.api.client.http.HttpRequest buildHttpRequestUsingHead() throws java.io.IOException {
return super.buildHttpRequestUsingHead();
}
@Override
public GetConfig set$Xgafv(java.lang.String $Xgafv) {
return (GetConfig) super.set$Xgafv($Xgafv);
}
@Override
public GetConfig setAccessToken(java.lang.String accessToken) {
return (GetConfig) super.setAccessToken(accessToken);
}
@Override
public GetConfig setAlt(java.lang.String alt) {
return (GetConfig) super.setAlt(alt);
}
@Override
public GetConfig setCallback(java.lang.String callback) {
return (GetConfig) super.setCallback(callback);
}
@Override
public GetConfig setFields(java.lang.String fields) {
return (GetConfig) super.setFields(fields);
}
@Override
public GetConfig setKey(java.lang.String key) {
return (GetConfig) super.setKey(key);
}
@Override
public GetConfig setOauthToken(java.lang.String oauthToken) {
return (GetConfig) super.setOauthToken(oauthToken);
}
@Override
public GetConfig setPrettyPrint(java.lang.Boolean prettyPrint) {
return (GetConfig) super.setPrettyPrint(prettyPrint);
}
@Override
public GetConfig setQuotaUser(java.lang.String quotaUser) {
return (GetConfig) super.setQuotaUser(quotaUser);
}
@Override
public GetConfig setUploadType(java.lang.String uploadType) {
return (GetConfig) super.setUploadType(uploadType);
}
@Override
public GetConfig setUploadProtocol(java.lang.String uploadProtocol) {
return (GetConfig) super.setUploadProtocol(uploadProtocol);
}
/**
* Required. The name of the service. See the [overview](https://cloud.google.com/service-
* management/overview) for naming requirements. For example: `example.googleapis.com`.
*/
@com.google.api.client.util.Key
private java.lang.String serviceName;
/** Required. The name of the service. See the [overview](https://cloud.google.com/service-
management/overview) for naming requirements. For example: `example.googleapis.com`.
*/
public java.lang.String getServiceName() {
return serviceName;
}
/**
* Required. The name of the service. See the [overview](https://cloud.google.com/service-
* management/overview) for naming requirements. For example: `example.googleapis.com`.
*/
public GetConfig setServiceName(java.lang.String serviceName) {
this.serviceName = serviceName;
return this;
}
/**
* Required. The id of the service configuration resource. This field must be specified for
* the server to return all fields, including `SourceInfo`.
*/
@com.google.api.client.util.Key
private java.lang.String configId;
/** Required. The id of the service configuration resource. This field must be specified for the server
to return all fields, including `SourceInfo`.
*/
public java.lang.String getConfigId() {
return configId;
}
/**
* Required. The id of the service configuration resource. This field must be specified for
* the server to return all fields, including `SourceInfo`.
*/
public GetConfig setConfigId(java.lang.String configId) {
this.configId = configId;
return this;
}
/** Specifies which parts of the Service Config should be returned in the response. */
@com.google.api.client.util.Key
private java.lang.String view;
/** Specifies which parts of the Service Config should be returned in the response.
*/
public java.lang.String getView() {
return view;
}
/** Specifies which parts of the Service Config should be returned in the response. */
public GetConfig setView(java.lang.String view) {
this.view = view;
return this;
}
@Override
public GetConfig set(String parameterName, Object value) {
return (GetConfig) super.set(parameterName, value);
}
}
/**
* Gets the access control policy for a resource. Returns an empty policy if the resource exists and
* does not have a policy set.
*
* Create a request for the method "services.getIamPolicy".
*
* This request holds the parameters needed by the servicemanagement server. After setting any
* optional parameters, call the {@link GetIamPolicy#execute()} method to invoke the remote
* operation.
*
* @param resource REQUIRED: The resource for which the policy is being requested. See [Resource
* names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for
* this field.
* @param content the {@link com.google.api.services.servicemanagement.model.GetIamPolicyRequest}
* @return the request
*/
public GetIamPolicy getIamPolicy(java.lang.String resource, com.google.api.services.servicemanagement.model.GetIamPolicyRequest content) throws java.io.IOException {
GetIamPolicy result = new GetIamPolicy(resource, content);
initialize(result);
return result;
}
public class GetIamPolicy extends ServiceManagementRequest {
private static final String REST_PATH = "v1/{+resource}:getIamPolicy";
private final java.util.regex.Pattern RESOURCE_PATTERN =
java.util.regex.Pattern.compile("^services/[^/]+$");
/**
* Gets the access control policy for a resource. Returns an empty policy if the resource exists
* and does not have a policy set.
*
* Create a request for the method "services.getIamPolicy".
*
* This request holds the parameters needed by the the servicemanagement server. After setting
* any optional parameters, call the {@link GetIamPolicy#execute()} method to invoke the remote
* operation. {@link
* GetIamPolicy#initialize(com.google.api.client.googleapis.services.AbstractGoogleClientRequest)}
* must be called to initialize this instance immediately after invoking the constructor.
*
* @param resource REQUIRED: The resource for which the policy is being requested. See [Resource
* names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for
* this field.
* @param content the {@link com.google.api.services.servicemanagement.model.GetIamPolicyRequest}
* @since 1.13
*/
protected GetIamPolicy(java.lang.String resource, com.google.api.services.servicemanagement.model.GetIamPolicyRequest content) {
super(ServiceManagement.this, "POST", REST_PATH, content, com.google.api.services.servicemanagement.model.Policy.class);
this.resource = com.google.api.client.util.Preconditions.checkNotNull(resource, "Required parameter resource must be specified.");
if (!getSuppressPatternChecks()) {
com.google.api.client.util.Preconditions.checkArgument(RESOURCE_PATTERN.matcher(resource).matches(),
"Parameter resource must conform to the pattern " +
"^services/[^/]+$");
}
}
@Override
public GetIamPolicy set$Xgafv(java.lang.String $Xgafv) {
return (GetIamPolicy) super.set$Xgafv($Xgafv);
}
@Override
public GetIamPolicy setAccessToken(java.lang.String accessToken) {
return (GetIamPolicy) super.setAccessToken(accessToken);
}
@Override
public GetIamPolicy setAlt(java.lang.String alt) {
return (GetIamPolicy) super.setAlt(alt);
}
@Override
public GetIamPolicy setCallback(java.lang.String callback) {
return (GetIamPolicy) super.setCallback(callback);
}
@Override
public GetIamPolicy setFields(java.lang.String fields) {
return (GetIamPolicy) super.setFields(fields);
}
@Override
public GetIamPolicy setKey(java.lang.String key) {
return (GetIamPolicy) super.setKey(key);
}
@Override
public GetIamPolicy setOauthToken(java.lang.String oauthToken) {
return (GetIamPolicy) super.setOauthToken(oauthToken);
}
@Override
public GetIamPolicy setPrettyPrint(java.lang.Boolean prettyPrint) {
return (GetIamPolicy) super.setPrettyPrint(prettyPrint);
}
@Override
public GetIamPolicy setQuotaUser(java.lang.String quotaUser) {
return (GetIamPolicy) super.setQuotaUser(quotaUser);
}
@Override
public GetIamPolicy setUploadType(java.lang.String uploadType) {
return (GetIamPolicy) super.setUploadType(uploadType);
}
@Override
public GetIamPolicy setUploadProtocol(java.lang.String uploadProtocol) {
return (GetIamPolicy) super.setUploadProtocol(uploadProtocol);
}
/**
* REQUIRED: The resource for which the policy is being requested. See [Resource
* names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for
* this field.
*/
@com.google.api.client.util.Key
private java.lang.String resource;
/** REQUIRED: The resource for which the policy is being requested. See [Resource
names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this
field.
*/
public java.lang.String getResource() {
return resource;
}
/**
* REQUIRED: The resource for which the policy is being requested. See [Resource
* names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for
* this field.
*/
public GetIamPolicy setResource(java.lang.String resource) {
if (!getSuppressPatternChecks()) {
com.google.api.client.util.Preconditions.checkArgument(RESOURCE_PATTERN.matcher(resource).matches(),
"Parameter resource must conform to the pattern " +
"^services/[^/]+$");
}
this.resource = resource;
return this;
}
@Override
public GetIamPolicy set(String parameterName, Object value) {
return (GetIamPolicy) super.set(parameterName, value);
}
}
/**
* Lists managed services. Returns all public services. For authenticated users, also returns all
* services the calling user has "servicemanagement.services.get" permission for.
*
* Create a request for the method "services.list".
*
* This request holds the parameters needed by the servicemanagement server. After setting any
* optional parameters, call the {@link List#execute()} method to invoke the remote operation.
*
* @return the request
*/
public List list() throws java.io.IOException {
List result = new List();
initialize(result);
return result;
}
public class List extends ServiceManagementRequest {
private static final String REST_PATH = "v1/services";
/**
* Lists managed services. Returns all public services. For authenticated users, also returns all
* services the calling user has "servicemanagement.services.get" permission for.
*
* Create a request for the method "services.list".
*
* This request holds the parameters needed by the the servicemanagement server. After setting
* any optional parameters, call the {@link List#execute()} method to invoke the remote operation.
* {@link
* List#initialize(com.google.api.client.googleapis.services.AbstractGoogleClientRequest)} must be
* called to initialize this instance immediately after invoking the constructor.
*
* @since 1.13
*/
protected List() {
super(ServiceManagement.this, "GET", REST_PATH, null, com.google.api.services.servicemanagement.model.ListServicesResponse.class);
}
@Override
public com.google.api.client.http.HttpResponse executeUsingHead() throws java.io.IOException {
return super.executeUsingHead();
}
@Override
public com.google.api.client.http.HttpRequest buildHttpRequestUsingHead() throws java.io.IOException {
return super.buildHttpRequestUsingHead();
}
@Override
public List set$Xgafv(java.lang.String $Xgafv) {
return (List) super.set$Xgafv($Xgafv);
}
@Override
public List setAccessToken(java.lang.String accessToken) {
return (List) super.setAccessToken(accessToken);
}
@Override
public List setAlt(java.lang.String alt) {
return (List) super.setAlt(alt);
}
@Override
public List 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);
}
/**
* Include services consumed by the specified consumer. The Google Service Management
* implementation accepts the following forms: - project:
*/
@com.google.api.client.util.Key
private java.lang.String consumerId;
/** Include services consumed by the specified consumer. The Google Service Management implementation
accepts the following forms: - project:
*/
public java.lang.String getConsumerId() {
return consumerId;
}
/**
* Include services consumed by the specified consumer. The Google Service Management
* implementation accepts the following forms: - project:
*/
public List setConsumerId(java.lang.String consumerId) {
this.consumerId = consumerId;
return this;
}
/**
* The max number of items to include in the response list. Page size is 50 if not specified.
* Maximum value is 500.
*/
@com.google.api.client.util.Key
private java.lang.Integer pageSize;
/** The max number of items to include in the response list. Page size is 50 if not specified. Maximum
value is 500.
*/
public java.lang.Integer getPageSize() {
return pageSize;
}
/**
* The max number of items to include in the response list. Page size is 50 if not specified.
* Maximum value is 500.
*/
public List setPageSize(java.lang.Integer pageSize) {
this.pageSize = pageSize;
return this;
}
/** Token identifying which result to start with; returned by a previous list call. */
@com.google.api.client.util.Key
private java.lang.String pageToken;
/** Token identifying which result to start with; returned by a previous list call.
*/
public java.lang.String getPageToken() {
return pageToken;
}
/** Token identifying which result to start with; returned by a previous list call. */
public List setPageToken(java.lang.String pageToken) {
this.pageToken = pageToken;
return this;
}
/** Include services produced by the specified project. */
@com.google.api.client.util.Key
private java.lang.String producerProjectId;
/** Include services produced by the specified project.
*/
public java.lang.String getProducerProjectId() {
return producerProjectId;
}
/** Include services produced by the specified project. */
public List setProducerProjectId(java.lang.String producerProjectId) {
this.producerProjectId = producerProjectId;
return this;
}
@Override
public List set(String parameterName, Object value) {
return (List) super.set(parameterName, value);
}
}
/**
* Sets the access control policy on the specified resource. Replaces any existing policy. Can
* return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED` errors.
*
* Create a request for the method "services.setIamPolicy".
*
* This request holds the parameters needed by the servicemanagement server. After setting any
* optional parameters, call the {@link SetIamPolicy#execute()} method to invoke the remote
* operation.
*
* @param resource REQUIRED: The resource for which the policy is being specified. See [Resource
* names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for
* this field.
* @param content the {@link com.google.api.services.servicemanagement.model.SetIamPolicyRequest}
* @return the request
*/
public SetIamPolicy setIamPolicy(java.lang.String resource, com.google.api.services.servicemanagement.model.SetIamPolicyRequest content) throws java.io.IOException {
SetIamPolicy result = new SetIamPolicy(resource, content);
initialize(result);
return result;
}
public class SetIamPolicy extends ServiceManagementRequest {
private static final String REST_PATH = "v1/{+resource}:setIamPolicy";
private final java.util.regex.Pattern RESOURCE_PATTERN =
java.util.regex.Pattern.compile("^services/[^/]+$");
/**
* Sets the access control policy on the specified resource. Replaces any existing policy. Can
* return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED` errors.
*
* Create a request for the method "services.setIamPolicy".
*
* This request holds the parameters needed by the the servicemanagement server. After setting
* any optional parameters, call the {@link SetIamPolicy#execute()} method to invoke the remote
* operation. {@link
* SetIamPolicy#initialize(com.google.api.client.googleapis.services.AbstractGoogleClientRequest)}
* must be called to initialize this instance immediately after invoking the constructor.
*
* @param resource REQUIRED: The resource for which the policy is being specified. See [Resource
* names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for
* this field.
* @param content the {@link com.google.api.services.servicemanagement.model.SetIamPolicyRequest}
* @since 1.13
*/
protected SetIamPolicy(java.lang.String resource, com.google.api.services.servicemanagement.model.SetIamPolicyRequest content) {
super(ServiceManagement.this, "POST", REST_PATH, content, com.google.api.services.servicemanagement.model.Policy.class);
this.resource = com.google.api.client.util.Preconditions.checkNotNull(resource, "Required parameter resource must be specified.");
if (!getSuppressPatternChecks()) {
com.google.api.client.util.Preconditions.checkArgument(RESOURCE_PATTERN.matcher(resource).matches(),
"Parameter resource must conform to the pattern " +
"^services/[^/]+$");
}
}
@Override
public SetIamPolicy set$Xgafv(java.lang.String $Xgafv) {
return (SetIamPolicy) super.set$Xgafv($Xgafv);
}
@Override
public SetIamPolicy setAccessToken(java.lang.String accessToken) {
return (SetIamPolicy) super.setAccessToken(accessToken);
}
@Override
public SetIamPolicy setAlt(java.lang.String alt) {
return (SetIamPolicy) super.setAlt(alt);
}
@Override
public SetIamPolicy setCallback(java.lang.String callback) {
return (SetIamPolicy) super.setCallback(callback);
}
@Override
public SetIamPolicy setFields(java.lang.String fields) {
return (SetIamPolicy) super.setFields(fields);
}
@Override
public SetIamPolicy setKey(java.lang.String key) {
return (SetIamPolicy) super.setKey(key);
}
@Override
public SetIamPolicy setOauthToken(java.lang.String oauthToken) {
return (SetIamPolicy) super.setOauthToken(oauthToken);
}
@Override
public SetIamPolicy setPrettyPrint(java.lang.Boolean prettyPrint) {
return (SetIamPolicy) super.setPrettyPrint(prettyPrint);
}
@Override
public SetIamPolicy setQuotaUser(java.lang.String quotaUser) {
return (SetIamPolicy) super.setQuotaUser(quotaUser);
}
@Override
public SetIamPolicy setUploadType(java.lang.String uploadType) {
return (SetIamPolicy) super.setUploadType(uploadType);
}
@Override
public SetIamPolicy setUploadProtocol(java.lang.String uploadProtocol) {
return (SetIamPolicy) super.setUploadProtocol(uploadProtocol);
}
/**
* REQUIRED: The resource for which the policy is being specified. See [Resource
* names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for
* this field.
*/
@com.google.api.client.util.Key
private java.lang.String resource;
/** REQUIRED: The resource for which the policy is being specified. See [Resource
names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this
field.
*/
public java.lang.String getResource() {
return resource;
}
/**
* REQUIRED: The resource for which the policy is being specified. See [Resource
* names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for
* this field.
*/
public SetIamPolicy setResource(java.lang.String resource) {
if (!getSuppressPatternChecks()) {
com.google.api.client.util.Preconditions.checkArgument(RESOURCE_PATTERN.matcher(resource).matches(),
"Parameter resource must conform to the pattern " +
"^services/[^/]+$");
}
this.resource = resource;
return this;
}
@Override
public SetIamPolicy set(String parameterName, Object value) {
return (SetIamPolicy) super.set(parameterName, value);
}
}
/**
* Returns permissions that a caller has on the specified resource. If the resource does not exist,
* this will return an empty set of permissions, not a `NOT_FOUND` error. Note: This operation is
* designed to be used for building permission-aware UIs and command-line tools, not for
* authorization checking. This operation may "fail open" without warning.
*
* Create a request for the method "services.testIamPermissions".
*
* This request holds the parameters needed by the servicemanagement server. After setting any
* optional parameters, call the {@link TestIamPermissions#execute()} method to invoke the remote
* operation.
*
* @param resource REQUIRED: The resource for which the policy detail is being requested. See [Resource
* names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for
* this field.
* @param content the {@link com.google.api.services.servicemanagement.model.TestIamPermissionsRequest}
* @return the request
*/
public TestIamPermissions testIamPermissions(java.lang.String resource, com.google.api.services.servicemanagement.model.TestIamPermissionsRequest content) throws java.io.IOException {
TestIamPermissions result = new TestIamPermissions(resource, content);
initialize(result);
return result;
}
public class TestIamPermissions extends ServiceManagementRequest {
private static final String REST_PATH = "v1/{+resource}:testIamPermissions";
private final java.util.regex.Pattern RESOURCE_PATTERN =
java.util.regex.Pattern.compile("^services/[^/]+$");
/**
* Returns permissions that a caller has on the specified resource. If the resource does not
* exist, this will return an empty set of permissions, not a `NOT_FOUND` error. Note: This
* operation is designed to be used for building permission-aware UIs and command-line tools, not
* for authorization checking. This operation may "fail open" without warning.
*
* Create a request for the method "services.testIamPermissions".
*
* This request holds the parameters needed by the the servicemanagement server. After setting
* any optional parameters, call the {@link TestIamPermissions#execute()} method to invoke the
* remote operation. {@link TestIamPermissions#initialize(com.google.api.client.googleapis.ser
* vices.AbstractGoogleClientRequest)} must be called to initialize this instance immediately
* after invoking the constructor.
*
* @param resource REQUIRED: The resource for which the policy detail is being requested. See [Resource
* names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for
* this field.
* @param content the {@link com.google.api.services.servicemanagement.model.TestIamPermissionsRequest}
* @since 1.13
*/
protected TestIamPermissions(java.lang.String resource, com.google.api.services.servicemanagement.model.TestIamPermissionsRequest content) {
super(ServiceManagement.this, "POST", REST_PATH, content, com.google.api.services.servicemanagement.model.TestIamPermissionsResponse.class);
this.resource = com.google.api.client.util.Preconditions.checkNotNull(resource, "Required parameter resource must be specified.");
if (!getSuppressPatternChecks()) {
com.google.api.client.util.Preconditions.checkArgument(RESOURCE_PATTERN.matcher(resource).matches(),
"Parameter resource must conform to the pattern " +
"^services/[^/]+$");
}
}
@Override
public TestIamPermissions set$Xgafv(java.lang.String $Xgafv) {
return (TestIamPermissions) super.set$Xgafv($Xgafv);
}
@Override
public TestIamPermissions setAccessToken(java.lang.String accessToken) {
return (TestIamPermissions) super.setAccessToken(accessToken);
}
@Override
public TestIamPermissions setAlt(java.lang.String alt) {
return (TestIamPermissions) super.setAlt(alt);
}
@Override
public TestIamPermissions setCallback(java.lang.String callback) {
return (TestIamPermissions) super.setCallback(callback);
}
@Override
public TestIamPermissions setFields(java.lang.String fields) {
return (TestIamPermissions) super.setFields(fields);
}
@Override
public TestIamPermissions setKey(java.lang.String key) {
return (TestIamPermissions) super.setKey(key);
}
@Override
public TestIamPermissions setOauthToken(java.lang.String oauthToken) {
return (TestIamPermissions) super.setOauthToken(oauthToken);
}
@Override
public TestIamPermissions setPrettyPrint(java.lang.Boolean prettyPrint) {
return (TestIamPermissions) super.setPrettyPrint(prettyPrint);
}
@Override
public TestIamPermissions setQuotaUser(java.lang.String quotaUser) {
return (TestIamPermissions) super.setQuotaUser(quotaUser);
}
@Override
public TestIamPermissions setUploadType(java.lang.String uploadType) {
return (TestIamPermissions) super.setUploadType(uploadType);
}
@Override
public TestIamPermissions setUploadProtocol(java.lang.String uploadProtocol) {
return (TestIamPermissions) super.setUploadProtocol(uploadProtocol);
}
/**
* REQUIRED: The resource for which the policy detail is being requested. See [Resource
* names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for
* this field.
*/
@com.google.api.client.util.Key
private java.lang.String resource;
/** REQUIRED: The resource for which the policy detail is being requested. See [Resource
names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this
field.
*/
public java.lang.String getResource() {
return resource;
}
/**
* REQUIRED: The resource for which the policy detail is being requested. See [Resource
* names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for
* this field.
*/
public TestIamPermissions setResource(java.lang.String resource) {
if (!getSuppressPatternChecks()) {
com.google.api.client.util.Preconditions.checkArgument(RESOURCE_PATTERN.matcher(resource).matches(),
"Parameter resource must conform to the pattern " +
"^services/[^/]+$");
}
this.resource = resource;
return this;
}
@Override
public TestIamPermissions set(String parameterName, Object value) {
return (TestIamPermissions) super.set(parameterName, value);
}
}
/**
* Revives a previously deleted managed service. The method restores the service using the
* configuration at the time the service was deleted. The target service must exist and must have
* been deleted within the last 30 days. Operation
*
* Create a request for the method "services.undelete".
*
* This request holds the parameters needed by the servicemanagement server. After setting any
* optional parameters, call the {@link Undelete#execute()} method to invoke the remote operation.
*
* @param serviceName Required. The name of the service. See the [overview](https://cloud.google.com/service-
* management/overview) for naming requirements. For example: `example.googleapis.com`.
* @return the request
*/
public Undelete undelete(java.lang.String serviceName) throws java.io.IOException {
Undelete result = new Undelete(serviceName);
initialize(result);
return result;
}
public class Undelete extends ServiceManagementRequest {
private static final String REST_PATH = "v1/services/{serviceName}:undelete";
/**
* Revives a previously deleted managed service. The method restores the service using the
* configuration at the time the service was deleted. The target service must exist and must have
* been deleted within the last 30 days. Operation
*
* Create a request for the method "services.undelete".
*
* This request holds the parameters needed by the the servicemanagement server. After setting
* any optional parameters, call the {@link Undelete#execute()} method to invoke the remote
* operation. {@link
* Undelete#initialize(com.google.api.client.googleapis.services.AbstractGoogleClientRequest)}
* must be called to initialize this instance immediately after invoking the constructor.
*
* @param serviceName Required. The name of the service. See the [overview](https://cloud.google.com/service-
* management/overview) for naming requirements. For example: `example.googleapis.com`.
* @since 1.13
*/
protected Undelete(java.lang.String serviceName) {
super(ServiceManagement.this, "POST", REST_PATH, null, com.google.api.services.servicemanagement.model.Operation.class);
this.serviceName = com.google.api.client.util.Preconditions.checkNotNull(serviceName, "Required parameter serviceName must be specified.");
}
@Override
public Undelete set$Xgafv(java.lang.String $Xgafv) {
return (Undelete) super.set$Xgafv($Xgafv);
}
@Override
public Undelete setAccessToken(java.lang.String accessToken) {
return (Undelete) super.setAccessToken(accessToken);
}
@Override
public Undelete setAlt(java.lang.String alt) {
return (Undelete) super.setAlt(alt);
}
@Override
public Undelete setCallback(java.lang.String callback) {
return (Undelete) super.setCallback(callback);
}
@Override
public Undelete setFields(java.lang.String fields) {
return (Undelete) super.setFields(fields);
}
@Override
public Undelete setKey(java.lang.String key) {
return (Undelete) super.setKey(key);
}
@Override
public Undelete setOauthToken(java.lang.String oauthToken) {
return (Undelete) super.setOauthToken(oauthToken);
}
@Override
public Undelete setPrettyPrint(java.lang.Boolean prettyPrint) {
return (Undelete) super.setPrettyPrint(prettyPrint);
}
@Override
public Undelete setQuotaUser(java.lang.String quotaUser) {
return (Undelete) super.setQuotaUser(quotaUser);
}
@Override
public Undelete setUploadType(java.lang.String uploadType) {
return (Undelete) super.setUploadType(uploadType);
}
@Override
public Undelete setUploadProtocol(java.lang.String uploadProtocol) {
return (Undelete) super.setUploadProtocol(uploadProtocol);
}
/**
* Required. The name of the service. See the [overview](https://cloud.google.com/service-
* management/overview) for naming requirements. For example: `example.googleapis.com`.
*/
@com.google.api.client.util.Key
private java.lang.String serviceName;
/** Required. The name of the service. See the [overview](https://cloud.google.com/service-
management/overview) for naming requirements. For example: `example.googleapis.com`.
*/
public java.lang.String getServiceName() {
return serviceName;
}
/**
* Required. The name of the service. See the [overview](https://cloud.google.com/service-
* management/overview) for naming requirements. For example: `example.googleapis.com`.
*/
public Undelete setServiceName(java.lang.String serviceName) {
this.serviceName = serviceName;
return this;
}
@Override
public Undelete set(String parameterName, Object value) {
return (Undelete) super.set(parameterName, value);
}
}
/**
* An accessor for creating requests from the Configs collection.
*
* The typical use is:
*
* {@code ServiceManagement servicemanagement = new ServiceManagement(...);}
* {@code ServiceManagement.Configs.List request = servicemanagement.configs().list(parameters ...)}
*
*
* @return the resource collection
*/
public Configs configs() {
return new Configs();
}
/**
* The "configs" collection of methods.
*/
public class Configs {
/**
* Creates a new service configuration (version) for a managed service. This method only stores the
* service configuration. To roll out the service configuration to backend systems please call
* CreateServiceRollout. Only the 100 most recent service configurations and ones referenced by
* existing rollouts are kept for each service. The rest will be deleted eventually.
*
* Create a request for the method "configs.create".
*
* This request holds the parameters needed by the servicemanagement server. After setting any
* optional parameters, call the {@link Create#execute()} method to invoke the remote operation.
*
* @param serviceName Required. The name of the service. See the [overview](https://cloud.google.com/service-
* management/overview) for naming requirements. For example: `example.googleapis.com`.
* @param content the {@link com.google.api.services.servicemanagement.model.Service}
* @return the request
*/
public Create create(java.lang.String serviceName, com.google.api.services.servicemanagement.model.Service content) throws java.io.IOException {
Create result = new Create(serviceName, content);
initialize(result);
return result;
}
public class Create extends ServiceManagementRequest {
private static final String REST_PATH = "v1/services/{serviceName}/configs";
/**
* Creates a new service configuration (version) for a managed service. This method only stores
* the service configuration. To roll out the service configuration to backend systems please call
* CreateServiceRollout. Only the 100 most recent service configurations and ones referenced by
* existing rollouts are kept for each service. The rest will be deleted eventually.
*
* Create a request for the method "configs.create".
*
* This request holds the parameters needed by the the servicemanagement 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 serviceName Required. The name of the service. See the [overview](https://cloud.google.com/service-
* management/overview) for naming requirements. For example: `example.googleapis.com`.
* @param content the {@link com.google.api.services.servicemanagement.model.Service}
* @since 1.13
*/
protected Create(java.lang.String serviceName, com.google.api.services.servicemanagement.model.Service content) {
super(ServiceManagement.this, "POST", REST_PATH, content, com.google.api.services.servicemanagement.model.Service.class);
this.serviceName = com.google.api.client.util.Preconditions.checkNotNull(serviceName, "Required parameter serviceName must be specified.");
}
@Override
public Create set$Xgafv(java.lang.String $Xgafv) {
return (Create) super.set$Xgafv($Xgafv);
}
@Override
public Create setAccessToken(java.lang.String accessToken) {
return (Create) super.setAccessToken(accessToken);
}
@Override
public Create setAlt(java.lang.String alt) {
return (Create) super.setAlt(alt);
}
@Override
public Create setCallback(java.lang.String callback) {
return (Create) super.setCallback(callback);
}
@Override
public Create setFields(java.lang.String fields) {
return (Create) super.setFields(fields);
}
@Override
public Create setKey(java.lang.String key) {
return (Create) super.setKey(key);
}
@Override
public Create setOauthToken(java.lang.String oauthToken) {
return (Create) super.setOauthToken(oauthToken);
}
@Override
public Create setPrettyPrint(java.lang.Boolean prettyPrint) {
return (Create) super.setPrettyPrint(prettyPrint);
}
@Override
public Create setQuotaUser(java.lang.String quotaUser) {
return (Create) super.setQuotaUser(quotaUser);
}
@Override
public Create setUploadType(java.lang.String uploadType) {
return (Create) super.setUploadType(uploadType);
}
@Override
public Create setUploadProtocol(java.lang.String uploadProtocol) {
return (Create) super.setUploadProtocol(uploadProtocol);
}
/**
* Required. The name of the service. See the [overview](https://cloud.google.com/service-
* management/overview) for naming requirements. For example: `example.googleapis.com`.
*/
@com.google.api.client.util.Key
private java.lang.String serviceName;
/** Required. The name of the service. See the [overview](https://cloud.google.com/service-
management/overview) for naming requirements. For example: `example.googleapis.com`.
*/
public java.lang.String getServiceName() {
return serviceName;
}
/**
* Required. The name of the service. See the [overview](https://cloud.google.com/service-
* management/overview) for naming requirements. For example: `example.googleapis.com`.
*/
public Create setServiceName(java.lang.String serviceName) {
this.serviceName = serviceName;
return this;
}
@Override
public Create set(String parameterName, Object value) {
return (Create) super.set(parameterName, value);
}
}
/**
* Gets a service configuration (version) for a managed service.
*
* Create a request for the method "configs.get".
*
* This request holds the parameters needed by the servicemanagement server. After setting any
* optional parameters, call the {@link Get#execute()} method to invoke the remote operation.
*
* @param serviceName Required. The name of the service. See the [overview](https://cloud.google.com/service-
* management/overview) for naming requirements. For example: `example.googleapis.com`.
* @param configId Required. The id of the service configuration resource. This field must be specified for the server
* to return all fields, including `SourceInfo`.
* @return the request
*/
public Get get(java.lang.String serviceName, java.lang.String configId) throws java.io.IOException {
Get result = new Get(serviceName, configId);
initialize(result);
return result;
}
public class Get extends ServiceManagementRequest {
private static final String REST_PATH = "v1/services/{serviceName}/configs/{configId}";
/**
* Gets a service configuration (version) for a managed service.
*
* Create a request for the method "configs.get".
*
* This request holds the parameters needed by the the servicemanagement 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 serviceName Required. The name of the service. See the [overview](https://cloud.google.com/service-
* management/overview) for naming requirements. For example: `example.googleapis.com`.
* @param configId Required. The id of the service configuration resource. This field must be specified for the server
* to return all fields, including `SourceInfo`.
* @since 1.13
*/
protected Get(java.lang.String serviceName, java.lang.String configId) {
super(ServiceManagement.this, "GET", REST_PATH, null, com.google.api.services.servicemanagement.model.Service.class);
this.serviceName = com.google.api.client.util.Preconditions.checkNotNull(serviceName, "Required parameter serviceName must be specified.");
this.configId = com.google.api.client.util.Preconditions.checkNotNull(configId, "Required parameter configId must be specified.");
}
@Override
public com.google.api.client.http.HttpResponse executeUsingHead() throws java.io.IOException {
return super.executeUsingHead();
}
@Override
public com.google.api.client.http.HttpRequest buildHttpRequestUsingHead() throws java.io.IOException {
return super.buildHttpRequestUsingHead();
}
@Override
public Get set$Xgafv(java.lang.String $Xgafv) {
return (Get) super.set$Xgafv($Xgafv);
}
@Override
public Get setAccessToken(java.lang.String accessToken) {
return (Get) super.setAccessToken(accessToken);
}
@Override
public Get setAlt(java.lang.String alt) {
return (Get) super.setAlt(alt);
}
@Override
public Get setCallback(java.lang.String callback) {
return (Get) super.setCallback(callback);
}
@Override
public Get setFields(java.lang.String fields) {
return (Get) super.setFields(fields);
}
@Override
public Get setKey(java.lang.String key) {
return (Get) super.setKey(key);
}
@Override
public Get setOauthToken(java.lang.String oauthToken) {
return (Get) super.setOauthToken(oauthToken);
}
@Override
public Get setPrettyPrint(java.lang.Boolean prettyPrint) {
return (Get) super.setPrettyPrint(prettyPrint);
}
@Override
public Get setQuotaUser(java.lang.String quotaUser) {
return (Get) super.setQuotaUser(quotaUser);
}
@Override
public Get setUploadType(java.lang.String uploadType) {
return (Get) super.setUploadType(uploadType);
}
@Override
public Get setUploadProtocol(java.lang.String uploadProtocol) {
return (Get) super.setUploadProtocol(uploadProtocol);
}
/**
* Required. The name of the service. See the [overview](https://cloud.google.com/service-
* management/overview) for naming requirements. For example: `example.googleapis.com`.
*/
@com.google.api.client.util.Key
private java.lang.String serviceName;
/** Required. The name of the service. See the [overview](https://cloud.google.com/service-
management/overview) for naming requirements. For example: `example.googleapis.com`.
*/
public java.lang.String getServiceName() {
return serviceName;
}
/**
* Required. The name of the service. See the [overview](https://cloud.google.com/service-
* management/overview) for naming requirements. For example: `example.googleapis.com`.
*/
public Get setServiceName(java.lang.String serviceName) {
this.serviceName = serviceName;
return this;
}
/**
* Required. The id of the service configuration resource. This field must be specified for
* the server to return all fields, including `SourceInfo`.
*/
@com.google.api.client.util.Key
private java.lang.String configId;
/** Required. The id of the service configuration resource. This field must be specified for the server
to return all fields, including `SourceInfo`.
*/
public java.lang.String getConfigId() {
return configId;
}
/**
* Required. The id of the service configuration resource. This field must be specified for
* the server to return all fields, including `SourceInfo`.
*/
public Get setConfigId(java.lang.String configId) {
this.configId = configId;
return this;
}
/** Specifies which parts of the Service Config should be returned in the response. */
@com.google.api.client.util.Key
private java.lang.String view;
/** Specifies which parts of the Service Config should be returned in the response.
*/
public java.lang.String getView() {
return view;
}
/** Specifies which parts of the Service Config should be returned in the response. */
public Get setView(java.lang.String view) {
this.view = view;
return this;
}
@Override
public Get set(String parameterName, Object value) {
return (Get) super.set(parameterName, value);
}
}
/**
* Lists the history of the service configuration for a managed service, from the newest to the
* oldest.
*
* Create a request for the method "configs.list".
*
* This request holds the parameters needed by the servicemanagement server. After setting any
* optional parameters, call the {@link List#execute()} method to invoke the remote operation.
*
* @param serviceName Required. The name of the service. See the [overview](https://cloud.google.com/service-
* management/overview) for naming requirements. For example: `example.googleapis.com`.
* @return the request
*/
public List list(java.lang.String serviceName) throws java.io.IOException {
List result = new List(serviceName);
initialize(result);
return result;
}
public class List extends ServiceManagementRequest {
private static final String REST_PATH = "v1/services/{serviceName}/configs";
/**
* Lists the history of the service configuration for a managed service, from the newest to the
* oldest.
*
* Create a request for the method "configs.list".
*
* This request holds the parameters needed by the the servicemanagement 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 serviceName Required. The name of the service. See the [overview](https://cloud.google.com/service-
* management/overview) for naming requirements. For example: `example.googleapis.com`.
* @since 1.13
*/
protected List(java.lang.String serviceName) {
super(ServiceManagement.this, "GET", REST_PATH, null, com.google.api.services.servicemanagement.model.ListServiceConfigsResponse.class);
this.serviceName = com.google.api.client.util.Preconditions.checkNotNull(serviceName, "Required parameter serviceName must be specified.");
}
@Override
public com.google.api.client.http.HttpResponse executeUsingHead() throws java.io.IOException {
return super.executeUsingHead();
}
@Override
public com.google.api.client.http.HttpRequest buildHttpRequestUsingHead() throws java.io.IOException {
return super.buildHttpRequestUsingHead();
}
@Override
public List set$Xgafv(java.lang.String $Xgafv) {
return (List) super.set$Xgafv($Xgafv);
}
@Override
public List setAccessToken(java.lang.String accessToken) {
return (List) super.setAccessToken(accessToken);
}
@Override
public List setAlt(java.lang.String alt) {
return (List) super.setAlt(alt);
}
@Override
public List setCallback(java.lang.String callback) {
return (List) super.setCallback(callback);
}
@Override
public List setFields(java.lang.String fields) {
return (List) super.setFields(fields);
}
@Override
public List setKey(java.lang.String key) {
return (List) super.setKey(key);
}
@Override
public List setOauthToken(java.lang.String oauthToken) {
return (List) super.setOauthToken(oauthToken);
}
@Override
public List setPrettyPrint(java.lang.Boolean prettyPrint) {
return (List) super.setPrettyPrint(prettyPrint);
}
@Override
public List setQuotaUser(java.lang.String quotaUser) {
return (List) super.setQuotaUser(quotaUser);
}
@Override
public List setUploadType(java.lang.String uploadType) {
return (List) super.setUploadType(uploadType);
}
@Override
public List setUploadProtocol(java.lang.String uploadProtocol) {
return (List) super.setUploadProtocol(uploadProtocol);
}
/**
* Required. The name of the service. See the [overview](https://cloud.google.com/service-
* management/overview) for naming requirements. For example: `example.googleapis.com`.
*/
@com.google.api.client.util.Key
private java.lang.String serviceName;
/** Required. The name of the service. See the [overview](https://cloud.google.com/service-
management/overview) for naming requirements. For example: `example.googleapis.com`.
*/
public java.lang.String getServiceName() {
return serviceName;
}
/**
* Required. The name of the service. See the [overview](https://cloud.google.com/service-
* management/overview) for naming requirements. For example: `example.googleapis.com`.
*/
public List setServiceName(java.lang.String serviceName) {
this.serviceName = serviceName;
return this;
}
/**
* The max number of items to include in the response list. Page size is 50 if not
* specified. Maximum value is 100.
*/
@com.google.api.client.util.Key
private java.lang.Integer pageSize;
/** The max number of items to include in the response list. Page size is 50 if not specified. Maximum
value is 100.
*/
public java.lang.Integer getPageSize() {
return pageSize;
}
/**
* The max number of items to include in the response list. Page size is 50 if not
* specified. Maximum value is 100.
*/
public List setPageSize(java.lang.Integer pageSize) {
this.pageSize = pageSize;
return this;
}
/** The token of the page to retrieve. */
@com.google.api.client.util.Key
private java.lang.String pageToken;
/** The token of the page to retrieve.
*/
public java.lang.String getPageToken() {
return pageToken;
}
/** The token of the page to retrieve. */
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);
}
}
/**
* Creates a new service configuration (version) for a managed service based on user-supplied
* configuration source files (for example: OpenAPI Specification). This method stores the source
* configurations as well as the generated service configuration. To rollout the service
* configuration to other services, please call CreateServiceRollout. Only the 100 most recent
* configuration sources and ones referenced by existing service configurtions are kept for each
* service. The rest will be deleted eventually. Operation
*
* Create a request for the method "configs.submit".
*
* This request holds the parameters needed by the servicemanagement server. After setting any
* optional parameters, call the {@link Submit#execute()} method to invoke the remote operation.
*
* @param serviceName Required. The name of the service. See the [overview](https://cloud.google.com/service-
* management/overview) for naming requirements. For example: `example.googleapis.com`.
* @param content the {@link com.google.api.services.servicemanagement.model.SubmitConfigSourceRequest}
* @return the request
*/
public Submit submit(java.lang.String serviceName, com.google.api.services.servicemanagement.model.SubmitConfigSourceRequest content) throws java.io.IOException {
Submit result = new Submit(serviceName, content);
initialize(result);
return result;
}
public class Submit extends ServiceManagementRequest {
private static final String REST_PATH = "v1/services/{serviceName}/configs:submit";
/**
* Creates a new service configuration (version) for a managed service based on user-supplied
* configuration source files (for example: OpenAPI Specification). This method stores the source
* configurations as well as the generated service configuration. To rollout the service
* configuration to other services, please call CreateServiceRollout. Only the 100 most recent
* configuration sources and ones referenced by existing service configurtions are kept for each
* service. The rest will be deleted eventually. Operation
*
* Create a request for the method "configs.submit".
*
* This request holds the parameters needed by the the servicemanagement server. After setting
* any optional parameters, call the {@link Submit#execute()} method to invoke the remote
* operation. {@link
* Submit#initialize(com.google.api.client.googleapis.services.AbstractGoogleClientRequest)} must
* be called to initialize this instance immediately after invoking the constructor.
*
* @param serviceName Required. The name of the service. See the [overview](https://cloud.google.com/service-
* management/overview) for naming requirements. For example: `example.googleapis.com`.
* @param content the {@link com.google.api.services.servicemanagement.model.SubmitConfigSourceRequest}
* @since 1.13
*/
protected Submit(java.lang.String serviceName, com.google.api.services.servicemanagement.model.SubmitConfigSourceRequest content) {
super(ServiceManagement.this, "POST", REST_PATH, content, com.google.api.services.servicemanagement.model.Operation.class);
this.serviceName = com.google.api.client.util.Preconditions.checkNotNull(serviceName, "Required parameter serviceName must be specified.");
}
@Override
public Submit set$Xgafv(java.lang.String $Xgafv) {
return (Submit) super.set$Xgafv($Xgafv);
}
@Override
public Submit setAccessToken(java.lang.String accessToken) {
return (Submit) super.setAccessToken(accessToken);
}
@Override
public Submit setAlt(java.lang.String alt) {
return (Submit) super.setAlt(alt);
}
@Override
public Submit setCallback(java.lang.String callback) {
return (Submit) super.setCallback(callback);
}
@Override
public Submit setFields(java.lang.String fields) {
return (Submit) super.setFields(fields);
}
@Override
public Submit setKey(java.lang.String key) {
return (Submit) super.setKey(key);
}
@Override
public Submit setOauthToken(java.lang.String oauthToken) {
return (Submit) super.setOauthToken(oauthToken);
}
@Override
public Submit setPrettyPrint(java.lang.Boolean prettyPrint) {
return (Submit) super.setPrettyPrint(prettyPrint);
}
@Override
public Submit setQuotaUser(java.lang.String quotaUser) {
return (Submit) super.setQuotaUser(quotaUser);
}
@Override
public Submit setUploadType(java.lang.String uploadType) {
return (Submit) super.setUploadType(uploadType);
}
@Override
public Submit setUploadProtocol(java.lang.String uploadProtocol) {
return (Submit) super.setUploadProtocol(uploadProtocol);
}
/**
* Required. The name of the service. See the [overview](https://cloud.google.com/service-
* management/overview) for naming requirements. For example: `example.googleapis.com`.
*/
@com.google.api.client.util.Key
private java.lang.String serviceName;
/** Required. The name of the service. See the [overview](https://cloud.google.com/service-
management/overview) for naming requirements. For example: `example.googleapis.com`.
*/
public java.lang.String getServiceName() {
return serviceName;
}
/**
* Required. The name of the service. See the [overview](https://cloud.google.com/service-
* management/overview) for naming requirements. For example: `example.googleapis.com`.
*/
public Submit setServiceName(java.lang.String serviceName) {
this.serviceName = serviceName;
return this;
}
@Override
public Submit set(String parameterName, Object value) {
return (Submit) super.set(parameterName, value);
}
}
}
/**
* An accessor for creating requests from the Consumers collection.
*
* The typical use is:
*
* {@code ServiceManagement servicemanagement = new ServiceManagement(...);}
* {@code ServiceManagement.Consumers.List request = servicemanagement.consumers().list(parameters ...)}
*
*
* @return the resource collection
*/
public Consumers consumers() {
return new Consumers();
}
/**
* The "consumers" collection of methods.
*/
public class Consumers {
/**
* Gets the access control policy for a resource. Returns an empty policy if the resource exists and
* does not have a policy set.
*
* Create a request for the method "consumers.getIamPolicy".
*
* This request holds the parameters needed by the servicemanagement server. After setting any
* optional parameters, call the {@link GetIamPolicy#execute()} method to invoke the remote
* operation.
*
* @param resource REQUIRED: The resource for which the policy is being requested. See [Resource
* names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for
* this field.
* @param content the {@link com.google.api.services.servicemanagement.model.GetIamPolicyRequest}
* @return the request
*/
public GetIamPolicy getIamPolicy(java.lang.String resource, com.google.api.services.servicemanagement.model.GetIamPolicyRequest content) throws java.io.IOException {
GetIamPolicy result = new GetIamPolicy(resource, content);
initialize(result);
return result;
}
public class GetIamPolicy extends ServiceManagementRequest {
private static final String REST_PATH = "v1/{+resource}:getIamPolicy";
private final java.util.regex.Pattern RESOURCE_PATTERN =
java.util.regex.Pattern.compile("^services/[^/]+/consumers/[^/]+$");
/**
* Gets the access control policy for a resource. Returns an empty policy if the resource exists
* and does not have a policy set.
*
* Create a request for the method "consumers.getIamPolicy".
*
* This request holds the parameters needed by the the servicemanagement server. After setting
* any optional parameters, call the {@link GetIamPolicy#execute()} method to invoke the remote
* operation. {@link
* GetIamPolicy#initialize(com.google.api.client.googleapis.services.AbstractGoogleClientRequest)}
* must be called to initialize this instance immediately after invoking the constructor.
*
* @param resource REQUIRED: The resource for which the policy is being requested. See [Resource
* names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for
* this field.
* @param content the {@link com.google.api.services.servicemanagement.model.GetIamPolicyRequest}
* @since 1.13
*/
protected GetIamPolicy(java.lang.String resource, com.google.api.services.servicemanagement.model.GetIamPolicyRequest content) {
super(ServiceManagement.this, "POST", REST_PATH, content, com.google.api.services.servicemanagement.model.Policy.class);
this.resource = com.google.api.client.util.Preconditions.checkNotNull(resource, "Required parameter resource must be specified.");
if (!getSuppressPatternChecks()) {
com.google.api.client.util.Preconditions.checkArgument(RESOURCE_PATTERN.matcher(resource).matches(),
"Parameter resource must conform to the pattern " +
"^services/[^/]+/consumers/[^/]+$");
}
}
@Override
public GetIamPolicy set$Xgafv(java.lang.String $Xgafv) {
return (GetIamPolicy) super.set$Xgafv($Xgafv);
}
@Override
public GetIamPolicy setAccessToken(java.lang.String accessToken) {
return (GetIamPolicy) super.setAccessToken(accessToken);
}
@Override
public GetIamPolicy setAlt(java.lang.String alt) {
return (GetIamPolicy) super.setAlt(alt);
}
@Override
public GetIamPolicy setCallback(java.lang.String callback) {
return (GetIamPolicy) super.setCallback(callback);
}
@Override
public GetIamPolicy setFields(java.lang.String fields) {
return (GetIamPolicy) super.setFields(fields);
}
@Override
public GetIamPolicy setKey(java.lang.String key) {
return (GetIamPolicy) super.setKey(key);
}
@Override
public GetIamPolicy setOauthToken(java.lang.String oauthToken) {
return (GetIamPolicy) super.setOauthToken(oauthToken);
}
@Override
public GetIamPolicy setPrettyPrint(java.lang.Boolean prettyPrint) {
return (GetIamPolicy) super.setPrettyPrint(prettyPrint);
}
@Override
public GetIamPolicy setQuotaUser(java.lang.String quotaUser) {
return (GetIamPolicy) super.setQuotaUser(quotaUser);
}
@Override
public GetIamPolicy setUploadType(java.lang.String uploadType) {
return (GetIamPolicy) super.setUploadType(uploadType);
}
@Override
public GetIamPolicy setUploadProtocol(java.lang.String uploadProtocol) {
return (GetIamPolicy) super.setUploadProtocol(uploadProtocol);
}
/**
* REQUIRED: The resource for which the policy is being requested. See [Resource
* names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for
* this field.
*/
@com.google.api.client.util.Key
private java.lang.String resource;
/** REQUIRED: The resource for which the policy is being requested. See [Resource
names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this
field.
*/
public java.lang.String getResource() {
return resource;
}
/**
* REQUIRED: The resource for which the policy is being requested. See [Resource
* names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for
* this field.
*/
public GetIamPolicy setResource(java.lang.String resource) {
if (!getSuppressPatternChecks()) {
com.google.api.client.util.Preconditions.checkArgument(RESOURCE_PATTERN.matcher(resource).matches(),
"Parameter resource must conform to the pattern " +
"^services/[^/]+/consumers/[^/]+$");
}
this.resource = resource;
return this;
}
@Override
public GetIamPolicy set(String parameterName, Object value) {
return (GetIamPolicy) super.set(parameterName, value);
}
}
/**
* Sets the access control policy on the specified resource. Replaces any existing policy. Can
* return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED` errors.
*
* Create a request for the method "consumers.setIamPolicy".
*
* This request holds the parameters needed by the servicemanagement server. After setting any
* optional parameters, call the {@link SetIamPolicy#execute()} method to invoke the remote
* operation.
*
* @param resource REQUIRED: The resource for which the policy is being specified. See [Resource
* names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for
* this field.
* @param content the {@link com.google.api.services.servicemanagement.model.SetIamPolicyRequest}
* @return the request
*/
public SetIamPolicy setIamPolicy(java.lang.String resource, com.google.api.services.servicemanagement.model.SetIamPolicyRequest content) throws java.io.IOException {
SetIamPolicy result = new SetIamPolicy(resource, content);
initialize(result);
return result;
}
public class SetIamPolicy extends ServiceManagementRequest {
private static final String REST_PATH = "v1/{+resource}:setIamPolicy";
private final java.util.regex.Pattern RESOURCE_PATTERN =
java.util.regex.Pattern.compile("^services/[^/]+/consumers/[^/]+$");
/**
* Sets the access control policy on the specified resource. Replaces any existing policy. Can
* return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED` errors.
*
* Create a request for the method "consumers.setIamPolicy".
*
* This request holds the parameters needed by the the servicemanagement server. After setting
* any optional parameters, call the {@link SetIamPolicy#execute()} method to invoke the remote
* operation. {@link
* SetIamPolicy#initialize(com.google.api.client.googleapis.services.AbstractGoogleClientRequest)}
* must be called to initialize this instance immediately after invoking the constructor.
*
* @param resource REQUIRED: The resource for which the policy is being specified. See [Resource
* names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for
* this field.
* @param content the {@link com.google.api.services.servicemanagement.model.SetIamPolicyRequest}
* @since 1.13
*/
protected SetIamPolicy(java.lang.String resource, com.google.api.services.servicemanagement.model.SetIamPolicyRequest content) {
super(ServiceManagement.this, "POST", REST_PATH, content, com.google.api.services.servicemanagement.model.Policy.class);
this.resource = com.google.api.client.util.Preconditions.checkNotNull(resource, "Required parameter resource must be specified.");
if (!getSuppressPatternChecks()) {
com.google.api.client.util.Preconditions.checkArgument(RESOURCE_PATTERN.matcher(resource).matches(),
"Parameter resource must conform to the pattern " +
"^services/[^/]+/consumers/[^/]+$");
}
}
@Override
public SetIamPolicy set$Xgafv(java.lang.String $Xgafv) {
return (SetIamPolicy) super.set$Xgafv($Xgafv);
}
@Override
public SetIamPolicy setAccessToken(java.lang.String accessToken) {
return (SetIamPolicy) super.setAccessToken(accessToken);
}
@Override
public SetIamPolicy setAlt(java.lang.String alt) {
return (SetIamPolicy) super.setAlt(alt);
}
@Override
public SetIamPolicy setCallback(java.lang.String callback) {
return (SetIamPolicy) super.setCallback(callback);
}
@Override
public SetIamPolicy setFields(java.lang.String fields) {
return (SetIamPolicy) super.setFields(fields);
}
@Override
public SetIamPolicy setKey(java.lang.String key) {
return (SetIamPolicy) super.setKey(key);
}
@Override
public SetIamPolicy setOauthToken(java.lang.String oauthToken) {
return (SetIamPolicy) super.setOauthToken(oauthToken);
}
@Override
public SetIamPolicy setPrettyPrint(java.lang.Boolean prettyPrint) {
return (SetIamPolicy) super.setPrettyPrint(prettyPrint);
}
@Override
public SetIamPolicy setQuotaUser(java.lang.String quotaUser) {
return (SetIamPolicy) super.setQuotaUser(quotaUser);
}
@Override
public SetIamPolicy setUploadType(java.lang.String uploadType) {
return (SetIamPolicy) super.setUploadType(uploadType);
}
@Override
public SetIamPolicy setUploadProtocol(java.lang.String uploadProtocol) {
return (SetIamPolicy) super.setUploadProtocol(uploadProtocol);
}
/**
* REQUIRED: The resource for which the policy is being specified. See [Resource
* names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for
* this field.
*/
@com.google.api.client.util.Key
private java.lang.String resource;
/** REQUIRED: The resource for which the policy is being specified. See [Resource
names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this
field.
*/
public java.lang.String getResource() {
return resource;
}
/**
* REQUIRED: The resource for which the policy is being specified. See [Resource
* names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for
* this field.
*/
public SetIamPolicy setResource(java.lang.String resource) {
if (!getSuppressPatternChecks()) {
com.google.api.client.util.Preconditions.checkArgument(RESOURCE_PATTERN.matcher(resource).matches(),
"Parameter resource must conform to the pattern " +
"^services/[^/]+/consumers/[^/]+$");
}
this.resource = resource;
return this;
}
@Override
public SetIamPolicy set(String parameterName, Object value) {
return (SetIamPolicy) super.set(parameterName, value);
}
}
/**
* Returns permissions that a caller has on the specified resource. If the resource does not exist,
* this will return an empty set of permissions, not a `NOT_FOUND` error. Note: This operation is
* designed to be used for building permission-aware UIs and command-line tools, not for
* authorization checking. This operation may "fail open" without warning.
*
* Create a request for the method "consumers.testIamPermissions".
*
* This request holds the parameters needed by the servicemanagement server. After setting any
* optional parameters, call the {@link TestIamPermissions#execute()} method to invoke the remote
* operation.
*
* @param resource REQUIRED: The resource for which the policy detail is being requested. See [Resource
* names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for
* this field.
* @param content the {@link com.google.api.services.servicemanagement.model.TestIamPermissionsRequest}
* @return the request
*/
public TestIamPermissions testIamPermissions(java.lang.String resource, com.google.api.services.servicemanagement.model.TestIamPermissionsRequest content) throws java.io.IOException {
TestIamPermissions result = new TestIamPermissions(resource, content);
initialize(result);
return result;
}
public class TestIamPermissions extends ServiceManagementRequest {
private static final String REST_PATH = "v1/{+resource}:testIamPermissions";
private final java.util.regex.Pattern RESOURCE_PATTERN =
java.util.regex.Pattern.compile("^services/[^/]+/consumers/[^/]+$");
/**
* Returns permissions that a caller has on the specified resource. If the resource does not
* exist, this will return an empty set of permissions, not a `NOT_FOUND` error. Note: This
* operation is designed to be used for building permission-aware UIs and command-line tools, not
* for authorization checking. This operation may "fail open" without warning.
*
* Create a request for the method "consumers.testIamPermissions".
*
* This request holds the parameters needed by the the servicemanagement server. After setting
* any optional parameters, call the {@link TestIamPermissions#execute()} method to invoke the
* remote operation. {@link TestIamPermissions#initialize(com.google.api.client.googleapis.ser
* vices.AbstractGoogleClientRequest)} must be called to initialize this instance immediately
* after invoking the constructor.
*
* @param resource REQUIRED: The resource for which the policy detail is being requested. See [Resource
* names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for
* this field.
* @param content the {@link com.google.api.services.servicemanagement.model.TestIamPermissionsRequest}
* @since 1.13
*/
protected TestIamPermissions(java.lang.String resource, com.google.api.services.servicemanagement.model.TestIamPermissionsRequest content) {
super(ServiceManagement.this, "POST", REST_PATH, content, com.google.api.services.servicemanagement.model.TestIamPermissionsResponse.class);
this.resource = com.google.api.client.util.Preconditions.checkNotNull(resource, "Required parameter resource must be specified.");
if (!getSuppressPatternChecks()) {
com.google.api.client.util.Preconditions.checkArgument(RESOURCE_PATTERN.matcher(resource).matches(),
"Parameter resource must conform to the pattern " +
"^services/[^/]+/consumers/[^/]+$");
}
}
@Override
public TestIamPermissions set$Xgafv(java.lang.String $Xgafv) {
return (TestIamPermissions) super.set$Xgafv($Xgafv);
}
@Override
public TestIamPermissions setAccessToken(java.lang.String accessToken) {
return (TestIamPermissions) super.setAccessToken(accessToken);
}
@Override
public TestIamPermissions setAlt(java.lang.String alt) {
return (TestIamPermissions) super.setAlt(alt);
}
@Override
public TestIamPermissions setCallback(java.lang.String callback) {
return (TestIamPermissions) super.setCallback(callback);
}
@Override
public TestIamPermissions setFields(java.lang.String fields) {
return (TestIamPermissions) super.setFields(fields);
}
@Override
public TestIamPermissions setKey(java.lang.String key) {
return (TestIamPermissions) super.setKey(key);
}
@Override
public TestIamPermissions setOauthToken(java.lang.String oauthToken) {
return (TestIamPermissions) super.setOauthToken(oauthToken);
}
@Override
public TestIamPermissions setPrettyPrint(java.lang.Boolean prettyPrint) {
return (TestIamPermissions) super.setPrettyPrint(prettyPrint);
}
@Override
public TestIamPermissions setQuotaUser(java.lang.String quotaUser) {
return (TestIamPermissions) super.setQuotaUser(quotaUser);
}
@Override
public TestIamPermissions setUploadType(java.lang.String uploadType) {
return (TestIamPermissions) super.setUploadType(uploadType);
}
@Override
public TestIamPermissions setUploadProtocol(java.lang.String uploadProtocol) {
return (TestIamPermissions) super.setUploadProtocol(uploadProtocol);
}
/**
* REQUIRED: The resource for which the policy detail is being requested. See [Resource
* names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for
* this field.
*/
@com.google.api.client.util.Key
private java.lang.String resource;
/** REQUIRED: The resource for which the policy detail is being requested. See [Resource
names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this
field.
*/
public java.lang.String getResource() {
return resource;
}
/**
* REQUIRED: The resource for which the policy detail is being requested. See [Resource
* names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for
* this field.
*/
public TestIamPermissions setResource(java.lang.String resource) {
if (!getSuppressPatternChecks()) {
com.google.api.client.util.Preconditions.checkArgument(RESOURCE_PATTERN.matcher(resource).matches(),
"Parameter resource must conform to the pattern " +
"^services/[^/]+/consumers/[^/]+$");
}
this.resource = resource;
return this;
}
@Override
public TestIamPermissions set(String parameterName, Object value) {
return (TestIamPermissions) super.set(parameterName, value);
}
}
}
/**
* An accessor for creating requests from the Rollouts collection.
*
* The typical use is:
*
* {@code ServiceManagement servicemanagement = new ServiceManagement(...);}
* {@code ServiceManagement.Rollouts.List request = servicemanagement.rollouts().list(parameters ...)}
*
*
* @return the resource collection
*/
public Rollouts rollouts() {
return new Rollouts();
}
/**
* The "rollouts" collection of methods.
*/
public class Rollouts {
/**
* Creates a new service configuration rollout. Based on rollout, the Google Service Management will
* roll out the service configurations to different backend services. For example, the logging
* configuration will be pushed to Google Cloud Logging. Please note that any previous pending and
* running Rollouts and associated Operations will be automatically cancelled so that the latest
* Rollout will not be blocked by previous Rollouts. Only the 100 most recent (in any state) and the
* last 10 successful (if not already part of the set of 100 most recent) rollouts are kept for each
* service. The rest will be deleted eventually. Operation
*
* Create a request for the method "rollouts.create".
*
* This request holds the parameters needed by the servicemanagement server. After setting any
* optional parameters, call the {@link Create#execute()} method to invoke the remote operation.
*
* @param serviceName Required. The name of the service. See the [overview](https://cloud.google.com/service-
* management/overview) for naming requirements. For example: `example.googleapis.com`.
* @param content the {@link com.google.api.services.servicemanagement.model.Rollout}
* @return the request
*/
public Create create(java.lang.String serviceName, com.google.api.services.servicemanagement.model.Rollout content) throws java.io.IOException {
Create result = new Create(serviceName, content);
initialize(result);
return result;
}
public class Create extends ServiceManagementRequest {
private static final String REST_PATH = "v1/services/{serviceName}/rollouts";
/**
* Creates a new service configuration rollout. Based on rollout, the Google Service Management
* will roll out the service configurations to different backend services. For example, the
* logging configuration will be pushed to Google Cloud Logging. Please note that any previous
* pending and running Rollouts and associated Operations will be automatically cancelled so that
* the latest Rollout will not be blocked by previous Rollouts. Only the 100 most recent (in any
* state) and the last 10 successful (if not already part of the set of 100 most recent) rollouts
* are kept for each service. The rest will be deleted eventually. Operation
*
* Create a request for the method "rollouts.create".
*
* This request holds the parameters needed by the the servicemanagement 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 serviceName Required. The name of the service. See the [overview](https://cloud.google.com/service-
* management/overview) for naming requirements. For example: `example.googleapis.com`.
* @param content the {@link com.google.api.services.servicemanagement.model.Rollout}
* @since 1.13
*/
protected Create(java.lang.String serviceName, com.google.api.services.servicemanagement.model.Rollout content) {
super(ServiceManagement.this, "POST", REST_PATH, content, com.google.api.services.servicemanagement.model.Operation.class);
this.serviceName = com.google.api.client.util.Preconditions.checkNotNull(serviceName, "Required parameter serviceName must be specified.");
}
@Override
public Create set$Xgafv(java.lang.String $Xgafv) {
return (Create) super.set$Xgafv($Xgafv);
}
@Override
public Create setAccessToken(java.lang.String accessToken) {
return (Create) super.setAccessToken(accessToken);
}
@Override
public Create setAlt(java.lang.String alt) {
return (Create) super.setAlt(alt);
}
@Override
public Create setCallback(java.lang.String callback) {
return (Create) super.setCallback(callback);
}
@Override
public Create setFields(java.lang.String fields) {
return (Create) super.setFields(fields);
}
@Override
public Create setKey(java.lang.String key) {
return (Create) super.setKey(key);
}
@Override
public Create setOauthToken(java.lang.String oauthToken) {
return (Create) super.setOauthToken(oauthToken);
}
@Override
public Create setPrettyPrint(java.lang.Boolean prettyPrint) {
return (Create) super.setPrettyPrint(prettyPrint);
}
@Override
public Create setQuotaUser(java.lang.String quotaUser) {
return (Create) super.setQuotaUser(quotaUser);
}
@Override
public Create setUploadType(java.lang.String uploadType) {
return (Create) super.setUploadType(uploadType);
}
@Override
public Create setUploadProtocol(java.lang.String uploadProtocol) {
return (Create) super.setUploadProtocol(uploadProtocol);
}
/**
* Required. The name of the service. See the [overview](https://cloud.google.com/service-
* management/overview) for naming requirements. For example: `example.googleapis.com`.
*/
@com.google.api.client.util.Key
private java.lang.String serviceName;
/** Required. The name of the service. See the [overview](https://cloud.google.com/service-
management/overview) for naming requirements. For example: `example.googleapis.com`.
*/
public java.lang.String getServiceName() {
return serviceName;
}
/**
* Required. The name of the service. See the [overview](https://cloud.google.com/service-
* management/overview) for naming requirements. For example: `example.googleapis.com`.
*/
public Create setServiceName(java.lang.String serviceName) {
this.serviceName = serviceName;
return this;
}
@Override
public Create set(String parameterName, Object value) {
return (Create) super.set(parameterName, value);
}
}
/**
* Gets a service configuration rollout.
*
* Create a request for the method "rollouts.get".
*
* This request holds the parameters needed by the servicemanagement server. After setting any
* optional parameters, call the {@link Get#execute()} method to invoke the remote operation.
*
* @param serviceName Required. The name of the service. See the [overview](https://cloud.google.com/service-
* management/overview) for naming requirements. For example: `example.googleapis.com`.
* @param rolloutId Required. The id of the rollout resource.
* @return the request
*/
public Get get(java.lang.String serviceName, java.lang.String rolloutId) throws java.io.IOException {
Get result = new Get(serviceName, rolloutId);
initialize(result);
return result;
}
public class Get extends ServiceManagementRequest {
private static final String REST_PATH = "v1/services/{serviceName}/rollouts/{rolloutId}";
/**
* Gets a service configuration rollout.
*
* Create a request for the method "rollouts.get".
*
* This request holds the parameters needed by the the servicemanagement 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 serviceName Required. The name of the service. See the [overview](https://cloud.google.com/service-
* management/overview) for naming requirements. For example: `example.googleapis.com`.
* @param rolloutId Required. The id of the rollout resource.
* @since 1.13
*/
protected Get(java.lang.String serviceName, java.lang.String rolloutId) {
super(ServiceManagement.this, "GET", REST_PATH, null, com.google.api.services.servicemanagement.model.Rollout.class);
this.serviceName = com.google.api.client.util.Preconditions.checkNotNull(serviceName, "Required parameter serviceName must be specified.");
this.rolloutId = com.google.api.client.util.Preconditions.checkNotNull(rolloutId, "Required parameter rolloutId must be specified.");
}
@Override
public com.google.api.client.http.HttpResponse executeUsingHead() throws java.io.IOException {
return super.executeUsingHead();
}
@Override
public com.google.api.client.http.HttpRequest buildHttpRequestUsingHead() throws java.io.IOException {
return super.buildHttpRequestUsingHead();
}
@Override
public Get set$Xgafv(java.lang.String $Xgafv) {
return (Get) super.set$Xgafv($Xgafv);
}
@Override
public Get setAccessToken(java.lang.String accessToken) {
return (Get) super.setAccessToken(accessToken);
}
@Override
public Get setAlt(java.lang.String alt) {
return (Get) super.setAlt(alt);
}
@Override
public Get setCallback(java.lang.String callback) {
return (Get) super.setCallback(callback);
}
@Override
public Get setFields(java.lang.String fields) {
return (Get) super.setFields(fields);
}
@Override
public Get setKey(java.lang.String key) {
return (Get) super.setKey(key);
}
@Override
public Get setOauthToken(java.lang.String oauthToken) {
return (Get) super.setOauthToken(oauthToken);
}
@Override
public Get setPrettyPrint(java.lang.Boolean prettyPrint) {
return (Get) super.setPrettyPrint(prettyPrint);
}
@Override
public Get setQuotaUser(java.lang.String quotaUser) {
return (Get) super.setQuotaUser(quotaUser);
}
@Override
public Get setUploadType(java.lang.String uploadType) {
return (Get) super.setUploadType(uploadType);
}
@Override
public Get setUploadProtocol(java.lang.String uploadProtocol) {
return (Get) super.setUploadProtocol(uploadProtocol);
}
/**
* Required. The name of the service. See the [overview](https://cloud.google.com/service-
* management/overview) for naming requirements. For example: `example.googleapis.com`.
*/
@com.google.api.client.util.Key
private java.lang.String serviceName;
/** Required. The name of the service. See the [overview](https://cloud.google.com/service-
management/overview) for naming requirements. For example: `example.googleapis.com`.
*/
public java.lang.String getServiceName() {
return serviceName;
}
/**
* Required. The name of the service. See the [overview](https://cloud.google.com/service-
* management/overview) for naming requirements. For example: `example.googleapis.com`.
*/
public Get setServiceName(java.lang.String serviceName) {
this.serviceName = serviceName;
return this;
}
/** Required. The id of the rollout resource. */
@com.google.api.client.util.Key
private java.lang.String rolloutId;
/** Required. The id of the rollout resource.
*/
public java.lang.String getRolloutId() {
return rolloutId;
}
/** Required. The id of the rollout resource. */
public Get setRolloutId(java.lang.String rolloutId) {
this.rolloutId = rolloutId;
return this;
}
@Override
public Get set(String parameterName, Object value) {
return (Get) super.set(parameterName, value);
}
}
/**
* Lists the history of the service configuration rollouts for a managed service, from the newest to
* the oldest.
*
* Create a request for the method "rollouts.list".
*
* This request holds the parameters needed by the servicemanagement server. After setting any
* optional parameters, call the {@link List#execute()} method to invoke the remote operation.
*
* @param serviceName Required. The name of the service. See the [overview](https://cloud.google.com/service-
* management/overview) for naming requirements. For example: `example.googleapis.com`.
* @return the request
*/
public List list(java.lang.String serviceName) throws java.io.IOException {
List result = new List(serviceName);
initialize(result);
return result;
}
public class List extends ServiceManagementRequest {
private static final String REST_PATH = "v1/services/{serviceName}/rollouts";
/**
* Lists the history of the service configuration rollouts for a managed service, from the newest
* to the oldest.
*
* Create a request for the method "rollouts.list".
*
* This request holds the parameters needed by the the servicemanagement 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 serviceName Required. The name of the service. See the [overview](https://cloud.google.com/service-
* management/overview) for naming requirements. For example: `example.googleapis.com`.
* @since 1.13
*/
protected List(java.lang.String serviceName) {
super(ServiceManagement.this, "GET", REST_PATH, null, com.google.api.services.servicemanagement.model.ListServiceRolloutsResponse.class);
this.serviceName = com.google.api.client.util.Preconditions.checkNotNull(serviceName, "Required parameter serviceName must be specified.");
}
@Override
public com.google.api.client.http.HttpResponse executeUsingHead() throws java.io.IOException {
return super.executeUsingHead();
}
@Override
public com.google.api.client.http.HttpRequest buildHttpRequestUsingHead() throws java.io.IOException {
return super.buildHttpRequestUsingHead();
}
@Override
public List set$Xgafv(java.lang.String $Xgafv) {
return (List) super.set$Xgafv($Xgafv);
}
@Override
public List setAccessToken(java.lang.String accessToken) {
return (List) super.setAccessToken(accessToken);
}
@Override
public List setAlt(java.lang.String alt) {
return (List) super.setAlt(alt);
}
@Override
public List setCallback(java.lang.String callback) {
return (List) super.setCallback(callback);
}
@Override
public List setFields(java.lang.String fields) {
return (List) super.setFields(fields);
}
@Override
public List setKey(java.lang.String key) {
return (List) super.setKey(key);
}
@Override
public List setOauthToken(java.lang.String oauthToken) {
return (List) super.setOauthToken(oauthToken);
}
@Override
public List setPrettyPrint(java.lang.Boolean prettyPrint) {
return (List) super.setPrettyPrint(prettyPrint);
}
@Override
public List setQuotaUser(java.lang.String quotaUser) {
return (List) super.setQuotaUser(quotaUser);
}
@Override
public List setUploadType(java.lang.String uploadType) {
return (List) super.setUploadType(uploadType);
}
@Override
public List setUploadProtocol(java.lang.String uploadProtocol) {
return (List) super.setUploadProtocol(uploadProtocol);
}
/**
* Required. The name of the service. See the [overview](https://cloud.google.com/service-
* management/overview) for naming requirements. For example: `example.googleapis.com`.
*/
@com.google.api.client.util.Key
private java.lang.String serviceName;
/** Required. The name of the service. See the [overview](https://cloud.google.com/service-
management/overview) for naming requirements. For example: `example.googleapis.com`.
*/
public java.lang.String getServiceName() {
return serviceName;
}
/**
* Required. The name of the service. See the [overview](https://cloud.google.com/service-
* management/overview) for naming requirements. For example: `example.googleapis.com`.
*/
public List setServiceName(java.lang.String serviceName) {
this.serviceName = serviceName;
return this;
}
/**
* Required. Use `filter` to return subset of rollouts. The following filters are supported:
* -- By status. For example, `filter='status=SUCCESS'` -- By strategy. For example,
* `filter='strategy=TrafficPercentStrategy'`
*/
@com.google.api.client.util.Key
private java.lang.String filter;
/** Required. Use `filter` to return subset of rollouts. The following filters are supported: -- By
status. For example, `filter='status=SUCCESS'` -- By strategy. For example,
`filter='strategy=TrafficPercentStrategy'`
*/
public java.lang.String getFilter() {
return filter;
}
/**
* Required. Use `filter` to return subset of rollouts. The following filters are supported:
* -- By status. For example, `filter='status=SUCCESS'` -- By strategy. For example,
* `filter='strategy=TrafficPercentStrategy'`
*/
public List setFilter(java.lang.String filter) {
this.filter = filter;
return this;
}
/**
* The max number of items to include in the response list. Page size is 50 if not
* specified. Maximum value is 100.
*/
@com.google.api.client.util.Key
private java.lang.Integer pageSize;
/** The max number of items to include in the response list. Page size is 50 if not specified. Maximum
value is 100.
*/
public java.lang.Integer getPageSize() {
return pageSize;
}
/**
* The max number of items to include in the response list. Page size is 50 if not
* specified. Maximum value is 100.
*/
public List setPageSize(java.lang.Integer pageSize) {
this.pageSize = pageSize;
return this;
}
/** The token of the page to retrieve. */
@com.google.api.client.util.Key
private java.lang.String pageToken;
/** The token of the page to retrieve.
*/
public java.lang.String getPageToken() {
return pageToken;
}
/** The token of the page to retrieve. */
public List setPageToken(java.lang.String pageToken) {
this.pageToken = pageToken;
return this;
}
@Override
public List set(String parameterName, Object value) {
return (List) super.set(parameterName, value);
}
}
}
}
/**
* Builder for {@link ServiceManagement}.
*
*
* 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 ServiceManagement}. */
@Override
public ServiceManagement build() {
return new ServiceManagement(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 ServiceManagementRequestInitializer}.
*
* @since 1.12
*/
public Builder setServiceManagementRequestInitializer(
ServiceManagementRequestInitializer servicemanagementRequestInitializer) {
return (Builder) super.setGoogleClientRequestInitializer(servicemanagementRequestInitializer);
}
@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);
}
}
}