com.google.api.services.cloudcontrolspartner.v1.CloudControlsPartnerService 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.cloudcontrolspartner.v1;
/**
* Service definition for CloudControlsPartnerService (v1).
*
*
* Provides insights about your customers and their Assured Workloads based on your Sovereign Controls by Partners offering.
*
*
*
* For more information about this service, see the
* API Documentation
*
*
*
* This service uses {@link CloudControlsPartnerServiceRequestInitializer} to initialize global parameters via its
* {@link Builder}.
*
*
* @since 1.3
* @author Google, Inc.
*/
@SuppressWarnings("javadoc")
public class CloudControlsPartnerService extends com.google.api.client.googleapis.services.json.AbstractGoogleJsonClient {
// Note: Leave this static initializer at the top of the file.
static {
com.google.api.client.util.Preconditions.checkState(
(com.google.api.client.googleapis.GoogleUtils.MAJOR_VERSION == 1 &&
(com.google.api.client.googleapis.GoogleUtils.MINOR_VERSION >= 32 ||
(com.google.api.client.googleapis.GoogleUtils.MINOR_VERSION == 31 &&
com.google.api.client.googleapis.GoogleUtils.BUGFIX_VERSION >= 1))) ||
com.google.api.client.googleapis.GoogleUtils.MAJOR_VERSION >= 2,
"You are currently running with version %s of google-api-client. " +
"You need at least version 1.31.1 of google-api-client to run version " +
"2.0.0 of the Cloud Controls Partner 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://cloudcontrolspartner.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://cloudcontrolspartner.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 CloudControlsPartnerService(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
*/
CloudControlsPartnerService(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 Organizations collection.
*
* The typical use is:
*
* {@code CloudControlsPartnerService cloudcontrolspartner = new CloudControlsPartnerService(...);}
* {@code CloudControlsPartnerService.Organizations.List request = cloudcontrolspartner.organizations().list(parameters ...)}
*
*
* @return the resource collection
*/
public Organizations organizations() {
return new Organizations();
}
/**
* The "organizations" collection of methods.
*/
public class Organizations {
/**
* An accessor for creating requests from the Locations collection.
*
* The typical use is:
*
* {@code CloudControlsPartnerService cloudcontrolspartner = new CloudControlsPartnerService(...);}
* {@code CloudControlsPartnerService.Locations.List request = cloudcontrolspartner.locations().list(parameters ...)}
*
*
* @return the resource collection
*/
public Locations locations() {
return new Locations();
}
/**
* The "locations" collection of methods.
*/
public class Locations {
/**
* Get details of a Partner.
*
* Create a request for the method "locations.getPartner".
*
* This request holds the parameters needed by the cloudcontrolspartner server. After setting any
* optional parameters, call the {@link GetPartner#execute()} method to invoke the remote operation.
*
* @param name Required. Format: `organizations/{organization}/locations/{location}/partner`
* @return the request
*/
public GetPartner getPartner(java.lang.String name) throws java.io.IOException {
GetPartner result = new GetPartner(name);
initialize(result);
return result;
}
public class GetPartner extends CloudControlsPartnerServiceRequest {
private static final String REST_PATH = "v1/{+name}";
private final java.util.regex.Pattern NAME_PATTERN =
java.util.regex.Pattern.compile("^organizations/[^/]+/locations/[^/]+/partner$");
/**
* Get details of a Partner.
*
* Create a request for the method "locations.getPartner".
*
* This request holds the parameters needed by the the cloudcontrolspartner server. After setting
* any optional parameters, call the {@link GetPartner#execute()} method to invoke the remote
* operation. {@link
* GetPartner#initialize(com.google.api.client.googleapis.services.AbstractGoogleClientRequest)}
* must be called to initialize this instance immediately after invoking the constructor.
*
* @param name Required. Format: `organizations/{organization}/locations/{location}/partner`
* @since 1.13
*/
protected GetPartner(java.lang.String name) {
super(CloudControlsPartnerService.this, "GET", REST_PATH, null, com.google.api.services.cloudcontrolspartner.v1.model.Partner.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 " +
"^organizations/[^/]+/locations/[^/]+/partner$");
}
}
@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 GetPartner set$Xgafv(java.lang.String $Xgafv) {
return (GetPartner) super.set$Xgafv($Xgafv);
}
@Override
public GetPartner setAccessToken(java.lang.String accessToken) {
return (GetPartner) super.setAccessToken(accessToken);
}
@Override
public GetPartner setAlt(java.lang.String alt) {
return (GetPartner) super.setAlt(alt);
}
@Override
public GetPartner setCallback(java.lang.String callback) {
return (GetPartner) super.setCallback(callback);
}
@Override
public GetPartner setFields(java.lang.String fields) {
return (GetPartner) super.setFields(fields);
}
@Override
public GetPartner setKey(java.lang.String key) {
return (GetPartner) super.setKey(key);
}
@Override
public GetPartner setOauthToken(java.lang.String oauthToken) {
return (GetPartner) super.setOauthToken(oauthToken);
}
@Override
public GetPartner setPrettyPrint(java.lang.Boolean prettyPrint) {
return (GetPartner) super.setPrettyPrint(prettyPrint);
}
@Override
public GetPartner setQuotaUser(java.lang.String quotaUser) {
return (GetPartner) super.setQuotaUser(quotaUser);
}
@Override
public GetPartner setUploadType(java.lang.String uploadType) {
return (GetPartner) super.setUploadType(uploadType);
}
@Override
public GetPartner setUploadProtocol(java.lang.String uploadProtocol) {
return (GetPartner) super.setUploadProtocol(uploadProtocol);
}
/** Required. Format: `organizations/{organization}/locations/{location}/partner` */
@com.google.api.client.util.Key
private java.lang.String name;
/** Required. Format: `organizations/{organization}/locations/{location}/partner`
*/
public java.lang.String getName() {
return name;
}
/** Required. Format: `organizations/{organization}/locations/{location}/partner` */
public GetPartner 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 " +
"^organizations/[^/]+/locations/[^/]+/partner$");
}
this.name = name;
return this;
}
@Override
public GetPartner set(String parameterName, Object value) {
return (GetPartner) super.set(parameterName, value);
}
}
/**
* An accessor for creating requests from the Customers collection.
*
* The typical use is:
*
* {@code CloudControlsPartnerService cloudcontrolspartner = new CloudControlsPartnerService(...);}
* {@code CloudControlsPartnerService.Customers.List request = cloudcontrolspartner.customers().list(parameters ...)}
*
*
* @return the resource collection
*/
public Customers customers() {
return new Customers();
}
/**
* The "customers" collection of methods.
*/
public class Customers {
/**
* Gets details of a single customer
*
* Create a request for the method "customers.get".
*
* This request holds the parameters needed by the cloudcontrolspartner server. After setting any
* optional parameters, call the {@link Get#execute()} method to invoke the remote operation.
*
* @param name Required. Format: `organizations/{organization}/locations/{location}/customers/{customer}`
* @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 CloudControlsPartnerServiceRequest {
private static final String REST_PATH = "v1/{+name}";
private final java.util.regex.Pattern NAME_PATTERN =
java.util.regex.Pattern.compile("^organizations/[^/]+/locations/[^/]+/customers/[^/]+$");
/**
* Gets details of a single customer
*
* Create a request for the method "customers.get".
*
* This request holds the parameters needed by the the cloudcontrolspartner server. After setting
* any optional parameters, call the {@link Get#execute()} method to invoke the remote operation.
* {@link
* Get#initialize(com.google.api.client.googleapis.services.AbstractGoogleClientRequest)} must be
* called to initialize this instance immediately after invoking the constructor.
*
* @param name Required. Format: `organizations/{organization}/locations/{location}/customers/{customer}`
* @since 1.13
*/
protected Get(java.lang.String name) {
super(CloudControlsPartnerService.this, "GET", REST_PATH, null, com.google.api.services.cloudcontrolspartner.v1.model.Customer.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 " +
"^organizations/[^/]+/locations/[^/]+/customers/[^/]+$");
}
}
@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. Format:
* `organizations/{organization}/locations/{location}/customers/{customer}`
*/
@com.google.api.client.util.Key
private java.lang.String name;
/** Required. Format: `organizations/{organization}/locations/{location}/customers/{customer}`
*/
public java.lang.String getName() {
return name;
}
/**
* Required. Format:
* `organizations/{organization}/locations/{location}/customers/{customer}`
*/
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 " +
"^organizations/[^/]+/locations/[^/]+/customers/[^/]+$");
}
this.name = name;
return this;
}
@Override
public Get set(String parameterName, Object value) {
return (Get) super.set(parameterName, value);
}
}
/**
* Lists customers of a partner identified by its Google Cloud organization ID
*
* Create a request for the method "customers.list".
*
* This request holds the parameters needed by the cloudcontrolspartner server. After setting any
* optional parameters, call the {@link List#execute()} method to invoke the remote operation.
*
* @param parent Required. Parent resource Format: `organizations/{organization}/locations/{location}`
* @return the request
*/
public List list(java.lang.String parent) throws java.io.IOException {
List result = new List(parent);
initialize(result);
return result;
}
public class List extends CloudControlsPartnerServiceRequest {
private static final String REST_PATH = "v1/{+parent}/customers";
private final java.util.regex.Pattern PARENT_PATTERN =
java.util.regex.Pattern.compile("^organizations/[^/]+/locations/[^/]+$");
/**
* Lists customers of a partner identified by its Google Cloud organization ID
*
* Create a request for the method "customers.list".
*
* This request holds the parameters needed by the the cloudcontrolspartner server. After setting
* any optional parameters, call the {@link List#execute()} method to invoke the remote operation.
* {@link
* List#initialize(com.google.api.client.googleapis.services.AbstractGoogleClientRequest)} must be
* called to initialize this instance immediately after invoking the constructor.
*
* @param parent Required. Parent resource Format: `organizations/{organization}/locations/{location}`
* @since 1.13
*/
protected List(java.lang.String parent) {
super(CloudControlsPartnerService.this, "GET", REST_PATH, null, com.google.api.services.cloudcontrolspartner.v1.model.ListCustomersResponse.class);
this.parent = com.google.api.client.util.Preconditions.checkNotNull(parent, "Required parameter parent must be specified.");
if (!getSuppressPatternChecks()) {
com.google.api.client.util.Preconditions.checkArgument(PARENT_PATTERN.matcher(parent).matches(),
"Parameter parent must conform to the pattern " +
"^organizations/[^/]+/locations/[^/]+$");
}
}
@Override
public com.google.api.client.http.HttpResponse executeUsingHead() throws java.io.IOException {
return super.executeUsingHead();
}
@Override
public com.google.api.client.http.HttpRequest buildHttpRequestUsingHead() throws java.io.IOException {
return super.buildHttpRequestUsingHead();
}
@Override
public List set$Xgafv(java.lang.String $Xgafv) {
return (List) super.set$Xgafv($Xgafv);
}
@Override
public List setAccessToken(java.lang.String accessToken) {
return (List) super.setAccessToken(accessToken);
}
@Override
public List setAlt(java.lang.String alt) {
return (List) super.setAlt(alt);
}
@Override
public List setCallback(java.lang.String callback) {
return (List) super.setCallback(callback);
}
@Override
public List setFields(java.lang.String fields) {
return (List) super.setFields(fields);
}
@Override
public List setKey(java.lang.String key) {
return (List) super.setKey(key);
}
@Override
public List setOauthToken(java.lang.String oauthToken) {
return (List) super.setOauthToken(oauthToken);
}
@Override
public List setPrettyPrint(java.lang.Boolean prettyPrint) {
return (List) super.setPrettyPrint(prettyPrint);
}
@Override
public List setQuotaUser(java.lang.String quotaUser) {
return (List) super.setQuotaUser(quotaUser);
}
@Override
public List setUploadType(java.lang.String uploadType) {
return (List) super.setUploadType(uploadType);
}
@Override
public List setUploadProtocol(java.lang.String uploadProtocol) {
return (List) super.setUploadProtocol(uploadProtocol);
}
/**
* Required. Parent resource Format: `organizations/{organization}/locations/{location}`
*/
@com.google.api.client.util.Key
private java.lang.String parent;
/** Required. Parent resource Format: `organizations/{organization}/locations/{location}`
*/
public java.lang.String getParent() {
return parent;
}
/**
* Required. Parent resource Format: `organizations/{organization}/locations/{location}`
*/
public List setParent(java.lang.String parent) {
if (!getSuppressPatternChecks()) {
com.google.api.client.util.Preconditions.checkArgument(PARENT_PATTERN.matcher(parent).matches(),
"Parameter parent must conform to the pattern " +
"^organizations/[^/]+/locations/[^/]+$");
}
this.parent = parent;
return this;
}
/** Optional. Filtering results */
@com.google.api.client.util.Key
private java.lang.String filter;
/** Optional. Filtering results
*/
public java.lang.String getFilter() {
return filter;
}
/** Optional. Filtering results */
public List setFilter(java.lang.String filter) {
this.filter = filter;
return this;
}
/** Optional. Hint for how to order the results */
@com.google.api.client.util.Key
private java.lang.String orderBy;
/** Optional. Hint for how to order the results
*/
public java.lang.String getOrderBy() {
return orderBy;
}
/** Optional. Hint for how to order the results */
public List setOrderBy(java.lang.String orderBy) {
this.orderBy = orderBy;
return this;
}
/**
* The maximum number of Customers to return. The service may return fewer than this
* value. If unspecified, at most 500 Customers will be returned.
*/
@com.google.api.client.util.Key
private java.lang.Integer pageSize;
/** The maximum number of Customers to return. The service may return fewer than this value. If
unspecified, at most 500 Customers will be returned.
*/
public java.lang.Integer getPageSize() {
return pageSize;
}
/**
* The maximum number of Customers to return. The service may return fewer than this
* value. If unspecified, at most 500 Customers will be returned.
*/
public List setPageSize(java.lang.Integer pageSize) {
this.pageSize = pageSize;
return this;
}
/**
* A page token, received from a previous `ListCustomers` call. Provide this to retrieve
* the subsequent page.
*/
@com.google.api.client.util.Key
private java.lang.String pageToken;
/** A page token, received from a previous `ListCustomers` call. Provide this to retrieve the
subsequent page.
*/
public java.lang.String getPageToken() {
return pageToken;
}
/**
* A page token, received from a previous `ListCustomers` call. Provide this to retrieve
* the subsequent page.
*/
public List setPageToken(java.lang.String pageToken) {
this.pageToken = pageToken;
return this;
}
@Override
public List set(String parameterName, Object value) {
return (List) super.set(parameterName, value);
}
}
/**
* An accessor for creating requests from the Workloads collection.
*
* The typical use is:
*
* {@code CloudControlsPartnerService cloudcontrolspartner = new CloudControlsPartnerService(...);}
* {@code CloudControlsPartnerService.Workloads.List request = cloudcontrolspartner.workloads().list(parameters ...)}
*
*
* @return the resource collection
*/
public Workloads workloads() {
return new Workloads();
}
/**
* The "workloads" collection of methods.
*/
public class Workloads {
/**
* Gets details of a single workload
*
* Create a request for the method "workloads.get".
*
* This request holds the parameters needed by the cloudcontrolspartner server. After setting any
* optional parameters, call the {@link Get#execute()} method to invoke the remote operation.
*
* @param name Required. Format:
* `organizations/{organization}/locations/{location}/customers/{customer}/workloads/{workloa
* d}`
* @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 CloudControlsPartnerServiceRequest {
private static final String REST_PATH = "v1/{+name}";
private final java.util.regex.Pattern NAME_PATTERN =
java.util.regex.Pattern.compile("^organizations/[^/]+/locations/[^/]+/customers/[^/]+/workloads/[^/]+$");
/**
* Gets details of a single workload
*
* Create a request for the method "workloads.get".
*
* This request holds the parameters needed by the the cloudcontrolspartner server. After setting
* any optional parameters, call the {@link Get#execute()} method to invoke the remote operation.
* {@link
* Get#initialize(com.google.api.client.googleapis.services.AbstractGoogleClientRequest)} must be
* called to initialize this instance immediately after invoking the constructor.
*
* @param name Required. Format:
* `organizations/{organization}/locations/{location}/customers/{customer}/workloads/{workloa
* d}`
* @since 1.13
*/
protected Get(java.lang.String name) {
super(CloudControlsPartnerService.this, "GET", REST_PATH, null, com.google.api.services.cloudcontrolspartner.v1.model.Workload.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 " +
"^organizations/[^/]+/locations/[^/]+/customers/[^/]+/workloads/[^/]+$");
}
}
@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. Format: `organizations/{organization}/locations/{location}/customers/{custo
* mer}/workloads/{workload}`
*/
@com.google.api.client.util.Key
private java.lang.String name;
/** Required. Format:
`organizations/{organization}/locations/{location}/customers/{customer}/workloads/{workload}`
*/
public java.lang.String getName() {
return name;
}
/**
* Required. Format: `organizations/{organization}/locations/{location}/customers/{custo
* mer}/workloads/{workload}`
*/
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 " +
"^organizations/[^/]+/locations/[^/]+/customers/[^/]+/workloads/[^/]+$");
}
this.name = name;
return this;
}
@Override
public Get set(String parameterName, Object value) {
return (Get) super.set(parameterName, value);
}
}
/**
* Gets the EKM connections associated with a workload
*
* Create a request for the method "workloads.getEkmConnections".
*
* This request holds the parameters needed by the cloudcontrolspartner server. After setting any
* optional parameters, call the {@link GetEkmConnections#execute()} method to invoke the remote
* operation.
*
* @param name Required. Format: `organizations/{organization}/locations/{location}/customers/{customer}/workloads/
* {workload}/ekmConnections`
* @return the request
*/
public GetEkmConnections getEkmConnections(java.lang.String name) throws java.io.IOException {
GetEkmConnections result = new GetEkmConnections(name);
initialize(result);
return result;
}
public class GetEkmConnections extends CloudControlsPartnerServiceRequest {
private static final String REST_PATH = "v1/{+name}";
private final java.util.regex.Pattern NAME_PATTERN =
java.util.regex.Pattern.compile("^organizations/[^/]+/locations/[^/]+/customers/[^/]+/workloads/[^/]+/ekmConnections$");
/**
* Gets the EKM connections associated with a workload
*
* Create a request for the method "workloads.getEkmConnections".
*
* This request holds the parameters needed by the the cloudcontrolspartner server. After setting
* any optional parameters, call the {@link GetEkmConnections#execute()} method to invoke the
* remote operation. {@link GetEkmConnections#initialize(com.google.api.client.googleapis.serv
* ices.AbstractGoogleClientRequest)} must be called to initialize this instance immediately after
* invoking the constructor.
*
* @param name Required. Format: `organizations/{organization}/locations/{location}/customers/{customer}/workloads/
* {workload}/ekmConnections`
* @since 1.13
*/
protected GetEkmConnections(java.lang.String name) {
super(CloudControlsPartnerService.this, "GET", REST_PATH, null, com.google.api.services.cloudcontrolspartner.v1.model.EkmConnections.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 " +
"^organizations/[^/]+/locations/[^/]+/customers/[^/]+/workloads/[^/]+/ekmConnections$");
}
}
@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 GetEkmConnections set$Xgafv(java.lang.String $Xgafv) {
return (GetEkmConnections) super.set$Xgafv($Xgafv);
}
@Override
public GetEkmConnections setAccessToken(java.lang.String accessToken) {
return (GetEkmConnections) super.setAccessToken(accessToken);
}
@Override
public GetEkmConnections setAlt(java.lang.String alt) {
return (GetEkmConnections) super.setAlt(alt);
}
@Override
public GetEkmConnections setCallback(java.lang.String callback) {
return (GetEkmConnections) super.setCallback(callback);
}
@Override
public GetEkmConnections setFields(java.lang.String fields) {
return (GetEkmConnections) super.setFields(fields);
}
@Override
public GetEkmConnections setKey(java.lang.String key) {
return (GetEkmConnections) super.setKey(key);
}
@Override
public GetEkmConnections setOauthToken(java.lang.String oauthToken) {
return (GetEkmConnections) super.setOauthToken(oauthToken);
}
@Override
public GetEkmConnections setPrettyPrint(java.lang.Boolean prettyPrint) {
return (GetEkmConnections) super.setPrettyPrint(prettyPrint);
}
@Override
public GetEkmConnections setQuotaUser(java.lang.String quotaUser) {
return (GetEkmConnections) super.setQuotaUser(quotaUser);
}
@Override
public GetEkmConnections setUploadType(java.lang.String uploadType) {
return (GetEkmConnections) super.setUploadType(uploadType);
}
@Override
public GetEkmConnections setUploadProtocol(java.lang.String uploadProtocol) {
return (GetEkmConnections) super.setUploadProtocol(uploadProtocol);
}
/**
* Required. Format: `organizations/{organization}/locations/{location}/customers/{custo
* mer}/workloads/{workload}/ekmConnections`
*/
@com.google.api.client.util.Key
private java.lang.String name;
/** Required. Format: `organizations/{organization}/locations/{location}/customers/{customer}/workloads
/{workload}/ekmConnections`
*/
public java.lang.String getName() {
return name;
}
/**
* Required. Format: `organizations/{organization}/locations/{location}/customers/{custo
* mer}/workloads/{workload}/ekmConnections`
*/
public GetEkmConnections 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 " +
"^organizations/[^/]+/locations/[^/]+/customers/[^/]+/workloads/[^/]+/ekmConnections$");
}
this.name = name;
return this;
}
@Override
public GetEkmConnections set(String parameterName, Object value) {
return (GetEkmConnections) super.set(parameterName, value);
}
}
/**
* Gets the partner permissions granted for a workload
*
* Create a request for the method "workloads.getPartnerPermissions".
*
* This request holds the parameters needed by the cloudcontrolspartner server. After setting any
* optional parameters, call the {@link GetPartnerPermissions#execute()} method to invoke the remote
* operation.
*
* @param name Required. Name of the resource to get in the format: `organizations/{organization}/locations/{locati
* on}/customers/{customer}/workloads/{workload}/partnerPermissions`
* @return the request
*/
public GetPartnerPermissions getPartnerPermissions(java.lang.String name) throws java.io.IOException {
GetPartnerPermissions result = new GetPartnerPermissions(name);
initialize(result);
return result;
}
public class GetPartnerPermissions extends CloudControlsPartnerServiceRequest {
private static final String REST_PATH = "v1/{+name}";
private final java.util.regex.Pattern NAME_PATTERN =
java.util.regex.Pattern.compile("^organizations/[^/]+/locations/[^/]+/customers/[^/]+/workloads/[^/]+/partnerPermissions$");
/**
* Gets the partner permissions granted for a workload
*
* Create a request for the method "workloads.getPartnerPermissions".
*
* This request holds the parameters needed by the the cloudcontrolspartner server. After setting
* any optional parameters, call the {@link GetPartnerPermissions#execute()} method to invoke the
* remote operation. {@link GetPartnerPermissions#initialize(com.google.api.client.googleapis.
* services.AbstractGoogleClientRequest)} must be called to initialize this instance immediately
* after invoking the constructor.
*
* @param name Required. Name of the resource to get in the format: `organizations/{organization}/locations/{locati
* on}/customers/{customer}/workloads/{workload}/partnerPermissions`
* @since 1.13
*/
protected GetPartnerPermissions(java.lang.String name) {
super(CloudControlsPartnerService.this, "GET", REST_PATH, null, com.google.api.services.cloudcontrolspartner.v1.model.PartnerPermissions.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 " +
"^organizations/[^/]+/locations/[^/]+/customers/[^/]+/workloads/[^/]+/partnerPermissions$");
}
}
@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 GetPartnerPermissions set$Xgafv(java.lang.String $Xgafv) {
return (GetPartnerPermissions) super.set$Xgafv($Xgafv);
}
@Override
public GetPartnerPermissions setAccessToken(java.lang.String accessToken) {
return (GetPartnerPermissions) super.setAccessToken(accessToken);
}
@Override
public GetPartnerPermissions setAlt(java.lang.String alt) {
return (GetPartnerPermissions) super.setAlt(alt);
}
@Override
public GetPartnerPermissions setCallback(java.lang.String callback) {
return (GetPartnerPermissions) super.setCallback(callback);
}
@Override
public GetPartnerPermissions setFields(java.lang.String fields) {
return (GetPartnerPermissions) super.setFields(fields);
}
@Override
public GetPartnerPermissions setKey(java.lang.String key) {
return (GetPartnerPermissions) super.setKey(key);
}
@Override
public GetPartnerPermissions setOauthToken(java.lang.String oauthToken) {
return (GetPartnerPermissions) super.setOauthToken(oauthToken);
}
@Override
public GetPartnerPermissions setPrettyPrint(java.lang.Boolean prettyPrint) {
return (GetPartnerPermissions) super.setPrettyPrint(prettyPrint);
}
@Override
public GetPartnerPermissions setQuotaUser(java.lang.String quotaUser) {
return (GetPartnerPermissions) super.setQuotaUser(quotaUser);
}
@Override
public GetPartnerPermissions setUploadType(java.lang.String uploadType) {
return (GetPartnerPermissions) super.setUploadType(uploadType);
}
@Override
public GetPartnerPermissions setUploadProtocol(java.lang.String uploadProtocol) {
return (GetPartnerPermissions) super.setUploadProtocol(uploadProtocol);
}
/**
* Required. Name of the resource to get in the format: `organizations/{organization}/lo
* cations/{location}/customers/{customer}/workloads/{workload}/partnerPermissions`
*/
@com.google.api.client.util.Key
private java.lang.String name;
/** Required. Name of the resource to get in the format: `organizations/{organization}/locations/{locat
ion}/customers/{customer}/workloads/{workload}/partnerPermissions`
*/
public java.lang.String getName() {
return name;
}
/**
* Required. Name of the resource to get in the format: `organizations/{organization}/lo
* cations/{location}/customers/{customer}/workloads/{workload}/partnerPermissions`
*/
public GetPartnerPermissions 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 " +
"^organizations/[^/]+/locations/[^/]+/customers/[^/]+/workloads/[^/]+/partnerPermissions$");
}
this.name = name;
return this;
}
@Override
public GetPartnerPermissions set(String parameterName, Object value) {
return (GetPartnerPermissions) super.set(parameterName, value);
}
}
/**
* Lists customer workloads for a given customer org id
*
* Create a request for the method "workloads.list".
*
* This request holds the parameters needed by the cloudcontrolspartner server. After setting any
* optional parameters, call the {@link List#execute()} method to invoke the remote operation.
*
* @param parent Required. Parent resource Format:
* `organizations/{organization}/locations/{location}/customers/{customer}`
* @return the request
*/
public List list(java.lang.String parent) throws java.io.IOException {
List result = new List(parent);
initialize(result);
return result;
}
public class List extends CloudControlsPartnerServiceRequest {
private static final String REST_PATH = "v1/{+parent}/workloads";
private final java.util.regex.Pattern PARENT_PATTERN =
java.util.regex.Pattern.compile("^organizations/[^/]+/locations/[^/]+/customers/[^/]+$");
/**
* Lists customer workloads for a given customer org id
*
* Create a request for the method "workloads.list".
*
* This request holds the parameters needed by the the cloudcontrolspartner server. After setting
* any optional parameters, call the {@link List#execute()} method to invoke the remote operation.
* {@link
* List#initialize(com.google.api.client.googleapis.services.AbstractGoogleClientRequest)} must be
* called to initialize this instance immediately after invoking the constructor.
*
* @param parent Required. Parent resource Format:
* `organizations/{organization}/locations/{location}/customers/{customer}`
* @since 1.13
*/
protected List(java.lang.String parent) {
super(CloudControlsPartnerService.this, "GET", REST_PATH, null, com.google.api.services.cloudcontrolspartner.v1.model.ListWorkloadsResponse.class);
this.parent = com.google.api.client.util.Preconditions.checkNotNull(parent, "Required parameter parent must be specified.");
if (!getSuppressPatternChecks()) {
com.google.api.client.util.Preconditions.checkArgument(PARENT_PATTERN.matcher(parent).matches(),
"Parameter parent must conform to the pattern " +
"^organizations/[^/]+/locations/[^/]+/customers/[^/]+$");
}
}
@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. Parent resource Format:
* `organizations/{organization}/locations/{location}/customers/{customer}`
*/
@com.google.api.client.util.Key
private java.lang.String parent;
/** Required. Parent resource Format:
`organizations/{organization}/locations/{location}/customers/{customer}`
*/
public java.lang.String getParent() {
return parent;
}
/**
* Required. Parent resource Format:
* `organizations/{organization}/locations/{location}/customers/{customer}`
*/
public List setParent(java.lang.String parent) {
if (!getSuppressPatternChecks()) {
com.google.api.client.util.Preconditions.checkArgument(PARENT_PATTERN.matcher(parent).matches(),
"Parameter parent must conform to the pattern " +
"^organizations/[^/]+/locations/[^/]+/customers/[^/]+$");
}
this.parent = parent;
return this;
}
/** Optional. Filtering results. */
@com.google.api.client.util.Key
private java.lang.String filter;
/** Optional. Filtering results.
*/
public java.lang.String getFilter() {
return filter;
}
/** Optional. Filtering results. */
public List setFilter(java.lang.String filter) {
this.filter = filter;
return this;
}
/** Optional. Hint for how to order the results. */
@com.google.api.client.util.Key
private java.lang.String orderBy;
/** Optional. Hint for how to order the results.
*/
public java.lang.String getOrderBy() {
return orderBy;
}
/** Optional. Hint for how to order the results. */
public List setOrderBy(java.lang.String orderBy) {
this.orderBy = orderBy;
return this;
}
/**
* The maximum number of workloads to return. The service may return fewer than this
* value. If unspecified, at most 500 workloads will be returned.
*/
@com.google.api.client.util.Key
private java.lang.Integer pageSize;
/** The maximum number of workloads to return. The service may return fewer than this value. If
unspecified, at most 500 workloads will be returned.
*/
public java.lang.Integer getPageSize() {
return pageSize;
}
/**
* The maximum number of workloads to return. The service may return fewer than this
* value. If unspecified, at most 500 workloads will be returned.
*/
public List setPageSize(java.lang.Integer pageSize) {
this.pageSize = pageSize;
return this;
}
/**
* A page token, received from a previous `ListWorkloads` call. Provide this to retrieve
* the subsequent page.
*/
@com.google.api.client.util.Key
private java.lang.String pageToken;
/** A page token, received from a previous `ListWorkloads` call. Provide this to retrieve the
subsequent page.
*/
public java.lang.String getPageToken() {
return pageToken;
}
/**
* A page token, received from a previous `ListWorkloads` call. Provide this to retrieve
* the subsequent page.
*/
public List setPageToken(java.lang.String pageToken) {
this.pageToken = pageToken;
return this;
}
@Override
public List set(String parameterName, Object value) {
return (List) super.set(parameterName, value);
}
}
/**
* An accessor for creating requests from the AccessApprovalRequests collection.
*
* The typical use is:
*
* {@code CloudControlsPartnerService cloudcontrolspartner = new CloudControlsPartnerService(...);}
* {@code CloudControlsPartnerService.AccessApprovalRequests.List request = cloudcontrolspartner.accessApprovalRequests().list(parameters ...)}
*
*
* @return the resource collection
*/
public AccessApprovalRequests accessApprovalRequests() {
return new AccessApprovalRequests();
}
/**
* The "accessApprovalRequests" collection of methods.
*/
public class AccessApprovalRequests {
/**
* Deprecated: Only returns access approval requests directly associated with an assured workload
* folder.
*
* Create a request for the method "accessApprovalRequests.list".
*
* This request holds the parameters needed by the cloudcontrolspartner server. After setting any
* optional parameters, call the {@link List#execute()} method to invoke the remote operation.
*
* @param parent Required. Parent resource Format:
* `organizations/{organization}/locations/{location}/customers/{customer}/workloads/{workloa
* d}`
* @return the request
*/
public List list(java.lang.String parent) throws java.io.IOException {
List result = new List(parent);
initialize(result);
return result;
}
public class List extends CloudControlsPartnerServiceRequest {
private static final String REST_PATH = "v1/{+parent}/accessApprovalRequests";
private final java.util.regex.Pattern PARENT_PATTERN =
java.util.regex.Pattern.compile("^organizations/[^/]+/locations/[^/]+/customers/[^/]+/workloads/[^/]+$");
/**
* Deprecated: Only returns access approval requests directly associated with an assured workload
* folder.
*
* Create a request for the method "accessApprovalRequests.list".
*
* This request holds the parameters needed by the the cloudcontrolspartner server. After setting
* any optional parameters, call the {@link List#execute()} method to invoke the remote operation.
* {@link
* List#initialize(com.google.api.client.googleapis.services.AbstractGoogleClientRequest)} must be
* called to initialize this instance immediately after invoking the constructor.
*
* @param parent Required. Parent resource Format:
* `organizations/{organization}/locations/{location}/customers/{customer}/workloads/{workloa
* d}`
* @since 1.13
*/
protected List(java.lang.String parent) {
super(CloudControlsPartnerService.this, "GET", REST_PATH, null, com.google.api.services.cloudcontrolspartner.v1.model.ListAccessApprovalRequestsResponse.class);
this.parent = com.google.api.client.util.Preconditions.checkNotNull(parent, "Required parameter parent must be specified.");
if (!getSuppressPatternChecks()) {
com.google.api.client.util.Preconditions.checkArgument(PARENT_PATTERN.matcher(parent).matches(),
"Parameter parent must conform to the pattern " +
"^organizations/[^/]+/locations/[^/]+/customers/[^/]+/workloads/[^/]+$");
}
}
@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. Parent resource Format: `organizations/{organization}/locations/{location
* }/customers/{customer}/workloads/{workload}`
*/
@com.google.api.client.util.Key
private java.lang.String parent;
/** Required. Parent resource Format:
`organizations/{organization}/locations/{location}/customers/{customer}/workloads/{workload}`
*/
public java.lang.String getParent() {
return parent;
}
/**
* Required. Parent resource Format: `organizations/{organization}/locations/{location
* }/customers/{customer}/workloads/{workload}`
*/
public List setParent(java.lang.String parent) {
if (!getSuppressPatternChecks()) {
com.google.api.client.util.Preconditions.checkArgument(PARENT_PATTERN.matcher(parent).matches(),
"Parameter parent must conform to the pattern " +
"^organizations/[^/]+/locations/[^/]+/customers/[^/]+/workloads/[^/]+$");
}
this.parent = parent;
return this;
}
/** Optional. Filtering results. */
@com.google.api.client.util.Key
private java.lang.String filter;
/** Optional. Filtering results.
*/
public java.lang.String getFilter() {
return filter;
}
/** Optional. Filtering results. */
public List setFilter(java.lang.String filter) {
this.filter = filter;
return this;
}
/** Optional. Hint for how to order the results. */
@com.google.api.client.util.Key
private java.lang.String orderBy;
/** Optional. Hint for how to order the results.
*/
public java.lang.String getOrderBy() {
return orderBy;
}
/** Optional. Hint for how to order the results. */
public List setOrderBy(java.lang.String orderBy) {
this.orderBy = orderBy;
return this;
}
/**
* Optional. The maximum number of access requests to return. The service may return
* fewer than this value. If unspecified, at most 500 access requests will be
* returned.
*/
@com.google.api.client.util.Key
private java.lang.Integer pageSize;
/** Optional. The maximum number of access requests to return. The service may return fewer than this
value. If unspecified, at most 500 access requests will be returned.
*/
public java.lang.Integer getPageSize() {
return pageSize;
}
/**
* Optional. The maximum number of access requests to return. The service may return
* fewer than this value. If unspecified, at most 500 access requests will be
* returned.
*/
public List setPageSize(java.lang.Integer pageSize) {
this.pageSize = pageSize;
return this;
}
/**
* Optional. A page token, received from a previous `ListAccessApprovalRequests` call.
* Provide this to retrieve the subsequent page.
*/
@com.google.api.client.util.Key
private java.lang.String pageToken;
/** Optional. A page token, received from a previous `ListAccessApprovalRequests` call. Provide this to
retrieve the subsequent page.
*/
public java.lang.String getPageToken() {
return pageToken;
}
/**
* Optional. A page token, received from a previous `ListAccessApprovalRequests` call.
* Provide this to retrieve the subsequent page.
*/
public List setPageToken(java.lang.String pageToken) {
this.pageToken = pageToken;
return this;
}
@Override
public List set(String parameterName, Object value) {
return (List) super.set(parameterName, value);
}
}
}
/**
* An accessor for creating requests from the Violations collection.
*
* The typical use is:
*
* {@code CloudControlsPartnerService cloudcontrolspartner = new CloudControlsPartnerService(...);}
* {@code CloudControlsPartnerService.Violations.List request = cloudcontrolspartner.violations().list(parameters ...)}
*
*
* @return the resource collection
*/
public Violations violations() {
return new Violations();
}
/**
* The "violations" collection of methods.
*/
public class Violations {
/**
* Gets details of a single Violation.
*
* Create a request for the method "violations.get".
*
* This request holds the parameters needed by the cloudcontrolspartner server. After setting any
* optional parameters, call the {@link Get#execute()} method to invoke the remote operation.
*
* @param name Required. Format: `organizations/{organization}/locations/{location}/customers/{customer}/workloads/
* {workload}/violations/{violation}`
* @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 CloudControlsPartnerServiceRequest {
private static final String REST_PATH = "v1/{+name}";
private final java.util.regex.Pattern NAME_PATTERN =
java.util.regex.Pattern.compile("^organizations/[^/]+/locations/[^/]+/customers/[^/]+/workloads/[^/]+/violations/[^/]+$");
/**
* Gets details of a single Violation.
*
* Create a request for the method "violations.get".
*
* This request holds the parameters needed by the the cloudcontrolspartner server. After setting
* any optional parameters, call the {@link Get#execute()} method to invoke the remote operation.
* {@link
* Get#initialize(com.google.api.client.googleapis.services.AbstractGoogleClientRequest)} must be
* called to initialize this instance immediately after invoking the constructor.
*
* @param name Required. Format: `organizations/{organization}/locations/{location}/customers/{customer}/workloads/
* {workload}/violations/{violation}`
* @since 1.13
*/
protected Get(java.lang.String name) {
super(CloudControlsPartnerService.this, "GET", REST_PATH, null, com.google.api.services.cloudcontrolspartner.v1.model.Violation.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 " +
"^organizations/[^/]+/locations/[^/]+/customers/[^/]+/workloads/[^/]+/violations/[^/]+$");
}
}
@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. Format: `organizations/{organization}/locations/{location}/customers/{cus
* tomer}/workloads/{workload}/violations/{violation}`
*/
@com.google.api.client.util.Key
private java.lang.String name;
/** Required. Format: `organizations/{organization}/locations/{location}/customers/{customer}/workloads
/{workload}/violations/{violation}`
*/
public java.lang.String getName() {
return name;
}
/**
* Required. Format: `organizations/{organization}/locations/{location}/customers/{cus
* tomer}/workloads/{workload}/violations/{violation}`
*/
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 " +
"^organizations/[^/]+/locations/[^/]+/customers/[^/]+/workloads/[^/]+/violations/[^/]+$");
}
this.name = name;
return this;
}
@Override
public Get set(String parameterName, Object value) {
return (Get) super.set(parameterName, value);
}
}
/**
* Lists Violations for a workload Callers may also choose to read across multiple Customers or for
* a single customer as per [AIP-159](https://google.aip.dev/159) by using '-' (the hyphen or dash
* character) as a wildcard character instead of {customer} & {workload}. Format:
* `organizations/{organization}/locations/{location}/customers/{customer}/workloads/{workload}`
*
* Create a request for the method "violations.list".
*
* This request holds the parameters needed by the cloudcontrolspartner server. After setting any
* optional parameters, call the {@link List#execute()} method to invoke the remote operation.
*
* @param parent Required. Parent resource Format
* `organizations/{organization}/locations/{location}/customers/{customer}/workloads/{workloa
* d}`
* @return the request
*/
public List list(java.lang.String parent) throws java.io.IOException {
List result = new List(parent);
initialize(result);
return result;
}
public class List extends CloudControlsPartnerServiceRequest {
private static final String REST_PATH = "v1/{+parent}/violations";
private final java.util.regex.Pattern PARENT_PATTERN =
java.util.regex.Pattern.compile("^organizations/[^/]+/locations/[^/]+/customers/[^/]+/workloads/[^/]+$");
/**
* Lists Violations for a workload Callers may also choose to read across multiple Customers or
* for a single customer as per [AIP-159](https://google.aip.dev/159) by using '-' (the hyphen or
* dash character) as a wildcard character instead of {customer} & {workload}. Format:
* `organizations/{organization}/locations/{location}/customers/{customer}/workloads/{workload}`
*
* Create a request for the method "violations.list".
*
* This request holds the parameters needed by the the cloudcontrolspartner server. After setting
* any optional parameters, call the {@link List#execute()} method to invoke the remote operation.
* {@link
* List#initialize(com.google.api.client.googleapis.services.AbstractGoogleClientRequest)} must be
* called to initialize this instance immediately after invoking the constructor.
*
* @param parent Required. Parent resource Format
* `organizations/{organization}/locations/{location}/customers/{customer}/workloads/{workloa
* d}`
* @since 1.13
*/
protected List(java.lang.String parent) {
super(CloudControlsPartnerService.this, "GET", REST_PATH, null, com.google.api.services.cloudcontrolspartner.v1.model.ListViolationsResponse.class);
this.parent = com.google.api.client.util.Preconditions.checkNotNull(parent, "Required parameter parent must be specified.");
if (!getSuppressPatternChecks()) {
com.google.api.client.util.Preconditions.checkArgument(PARENT_PATTERN.matcher(parent).matches(),
"Parameter parent must conform to the pattern " +
"^organizations/[^/]+/locations/[^/]+/customers/[^/]+/workloads/[^/]+$");
}
}
@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. Parent resource Format `organizations/{organization}/locations/{location}
* /customers/{customer}/workloads/{workload}`
*/
@com.google.api.client.util.Key
private java.lang.String parent;
/** Required. Parent resource Format
`organizations/{organization}/locations/{location}/customers/{customer}/workloads/{workload}`
*/
public java.lang.String getParent() {
return parent;
}
/**
* Required. Parent resource Format `organizations/{organization}/locations/{location}
* /customers/{customer}/workloads/{workload}`
*/
public List setParent(java.lang.String parent) {
if (!getSuppressPatternChecks()) {
com.google.api.client.util.Preconditions.checkArgument(PARENT_PATTERN.matcher(parent).matches(),
"Parameter parent must conform to the pattern " +
"^organizations/[^/]+/locations/[^/]+/customers/[^/]+/workloads/[^/]+$");
}
this.parent = parent;
return this;
}
/** Optional. Filtering results */
@com.google.api.client.util.Key
private java.lang.String filter;
/** Optional. Filtering results
*/
public java.lang.String getFilter() {
return filter;
}
/** Optional. Filtering results */
public List setFilter(java.lang.String filter) {
this.filter = filter;
return this;
}
/**
* Optional. Exclusive end of the interval. If specified, a Timestamp matching this
* interval will have to be before the end.
*/
@com.google.api.client.util.Key("interval.endTime")
private String intervalEndTime;
/** Optional. Exclusive end of the interval. If specified, a Timestamp matching this interval will have
to be before the end.
*/
public String getIntervalEndTime() {
return intervalEndTime;
}
/**
* Optional. Exclusive end of the interval. If specified, a Timestamp matching this
* interval will have to be before the end.
*/
public List setIntervalEndTime(String intervalEndTime) {
this.intervalEndTime = intervalEndTime;
return this;
}
/**
* Optional. Inclusive start of the interval. If specified, a Timestamp matching this
* interval will have to be the same or after the start.
*/
@com.google.api.client.util.Key("interval.startTime")
private String intervalStartTime;
/** Optional. Inclusive start of the interval. If specified, a Timestamp matching this interval will
have to be the same or after the start.
*/
public String getIntervalStartTime() {
return intervalStartTime;
}
/**
* Optional. Inclusive start of the interval. If specified, a Timestamp matching this
* interval will have to be the same or after the start.
*/
public List setIntervalStartTime(String intervalStartTime) {
this.intervalStartTime = intervalStartTime;
return this;
}
/** Optional. Hint for how to order the results */
@com.google.api.client.util.Key
private java.lang.String orderBy;
/** Optional. Hint for how to order the results
*/
public java.lang.String getOrderBy() {
return orderBy;
}
/** Optional. Hint for how to order the results */
public List setOrderBy(java.lang.String orderBy) {
this.orderBy = orderBy;
return this;
}
/**
* Optional. The maximum number of customers row to return. The service may return
* fewer than this value. If unspecified, at most 10 customers will be returned.
*/
@com.google.api.client.util.Key
private java.lang.Integer pageSize;
/** Optional. The maximum number of customers row to return. The service may return fewer than this
value. If unspecified, at most 10 customers will be returned.
*/
public java.lang.Integer getPageSize() {
return pageSize;
}
/**
* Optional. The maximum number of customers row to return. The service may return
* fewer than this value. If unspecified, at most 10 customers will be returned.
*/
public List setPageSize(java.lang.Integer pageSize) {
this.pageSize = pageSize;
return this;
}
/**
* Optional. A page token, received from a previous `ListViolations` call. Provide
* this to retrieve the subsequent page.
*/
@com.google.api.client.util.Key
private java.lang.String pageToken;
/** Optional. A page token, received from a previous `ListViolations` call. Provide this to retrieve
the subsequent page.
*/
public java.lang.String getPageToken() {
return pageToken;
}
/**
* Optional. A page token, received from a previous `ListViolations` call. Provide
* this to retrieve the subsequent page.
*/
public List setPageToken(java.lang.String pageToken) {
this.pageToken = pageToken;
return this;
}
@Override
public List set(String parameterName, Object value) {
return (List) super.set(parameterName, value);
}
}
}
}
}
}
}
/**
* Builder for {@link CloudControlsPartnerService}.
*
*
* 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 CloudControlsPartnerService}. */
@Override
public CloudControlsPartnerService build() {
return new CloudControlsPartnerService(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 CloudControlsPartnerServiceRequestInitializer}.
*
* @since 1.12
*/
public Builder setCloudControlsPartnerServiceRequestInitializer(
CloudControlsPartnerServiceRequestInitializer cloudcontrolspartnerserviceRequestInitializer) {
return (Builder) super.setGoogleClientRequestInitializer(cloudcontrolspartnerserviceRequestInitializer);
}
@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);
}
}
}