com.google.api.services.securitycenter.v1.SecurityCommandCenter 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.securitycenter.v1;
/**
* Service definition for SecurityCommandCenter (v1).
*
*
* Security Command Center API provides access to temporal views of assets and findings within an organization.
*
*
*
* For more information about this service, see the
* API Documentation
*
*
*
* This service uses {@link SecurityCommandCenterRequestInitializer} to initialize global parameters via its
* {@link Builder}.
*
*
* @since 1.3
* @author Google, Inc.
*/
@SuppressWarnings("javadoc")
public class SecurityCommandCenter 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 Security Command Center 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://securitycenter.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://securitycenter.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 SecurityCommandCenter(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
*/
SecurityCommandCenter(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 Folders collection.
*
* The typical use is:
*
* {@code SecurityCommandCenter securitycenter = new SecurityCommandCenter(...);}
* {@code SecurityCommandCenter.Folders.List request = securitycenter.folders().list(parameters ...)}
*
*
* @return the resource collection
*/
public Folders folders() {
return new Folders();
}
/**
* The "folders" collection of methods.
*/
public class Folders {
/**
* An accessor for creating requests from the Assets collection.
*
* The typical use is:
*
* {@code SecurityCommandCenter securitycenter = new SecurityCommandCenter(...);}
* {@code SecurityCommandCenter.Assets.List request = securitycenter.assets().list(parameters ...)}
*
*
* @return the resource collection
*/
public Assets assets() {
return new Assets();
}
/**
* The "assets" collection of methods.
*/
public class Assets {
/**
* Filters an organization's assets and groups them by their specified properties.
*
* Create a request for the method "assets.group".
*
* This request holds the parameters needed by the securitycenter server. After setting any
* optional parameters, call the {@link Group#execute()} method to invoke the remote operation.
*
* @param parent Required. The name of the parent to group the assets by. Its format is
* `organizations/[organization_id]`, `folders/[folder_id]`, or `projects/[project_id]`.
* @param content the {@link com.google.api.services.securitycenter.v1.model.GroupAssetsRequest}
* @return the request
*/
public Group group(java.lang.String parent, com.google.api.services.securitycenter.v1.model.GroupAssetsRequest content) throws java.io.IOException {
Group result = new Group(parent, content);
initialize(result);
return result;
}
public class Group extends SecurityCommandCenterRequest {
private static final String REST_PATH = "v1/{+parent}/assets:group";
private final java.util.regex.Pattern PARENT_PATTERN =
java.util.regex.Pattern.compile("^folders/[^/]+$");
/**
* Filters an organization's assets and groups them by their specified properties.
*
* Create a request for the method "assets.group".
*
* This request holds the parameters needed by the the securitycenter server. After setting any
* optional parameters, call the {@link Group#execute()} method to invoke the remote operation.
* {@link
* Group#initialize(com.google.api.client.googleapis.services.AbstractGoogleClientRequest)} must
* be called to initialize this instance immediately after invoking the constructor.
*
* @param parent Required. The name of the parent to group the assets by. Its format is
* `organizations/[organization_id]`, `folders/[folder_id]`, or `projects/[project_id]`.
* @param content the {@link com.google.api.services.securitycenter.v1.model.GroupAssetsRequest}
* @since 1.13
*/
protected Group(java.lang.String parent, com.google.api.services.securitycenter.v1.model.GroupAssetsRequest content) {
super(SecurityCommandCenter.this, "POST", REST_PATH, content, com.google.api.services.securitycenter.v1.model.GroupAssetsResponse.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 " +
"^folders/[^/]+$");
}
}
@Override
public Group set$Xgafv(java.lang.String $Xgafv) {
return (Group) super.set$Xgafv($Xgafv);
}
@Override
public Group setAccessToken(java.lang.String accessToken) {
return (Group) super.setAccessToken(accessToken);
}
@Override
public Group setAlt(java.lang.String alt) {
return (Group) super.setAlt(alt);
}
@Override
public Group setCallback(java.lang.String callback) {
return (Group) super.setCallback(callback);
}
@Override
public Group setFields(java.lang.String fields) {
return (Group) super.setFields(fields);
}
@Override
public Group setKey(java.lang.String key) {
return (Group) super.setKey(key);
}
@Override
public Group setOauthToken(java.lang.String oauthToken) {
return (Group) super.setOauthToken(oauthToken);
}
@Override
public Group setPrettyPrint(java.lang.Boolean prettyPrint) {
return (Group) super.setPrettyPrint(prettyPrint);
}
@Override
public Group setQuotaUser(java.lang.String quotaUser) {
return (Group) super.setQuotaUser(quotaUser);
}
@Override
public Group setUploadType(java.lang.String uploadType) {
return (Group) super.setUploadType(uploadType);
}
@Override
public Group setUploadProtocol(java.lang.String uploadProtocol) {
return (Group) super.setUploadProtocol(uploadProtocol);
}
/**
* Required. The name of the parent to group the assets by. Its format is
* `organizations/[organization_id]`, `folders/[folder_id]`, or `projects/[project_id]`.
*/
@com.google.api.client.util.Key
private java.lang.String parent;
/** Required. The name of the parent to group the assets by. Its format is
`organizations/[organization_id]`, `folders/[folder_id]`, or `projects/[project_id]`.
*/
public java.lang.String getParent() {
return parent;
}
/**
* Required. The name of the parent to group the assets by. Its format is
* `organizations/[organization_id]`, `folders/[folder_id]`, or `projects/[project_id]`.
*/
public Group 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 " +
"^folders/[^/]+$");
}
this.parent = parent;
return this;
}
@Override
public Group set(String parameterName, Object value) {
return (Group) super.set(parameterName, value);
}
}
/**
* Lists an organization's assets.
*
* Create a request for the method "assets.list".
*
* This request holds the parameters needed by the securitycenter server. After setting any
* optional parameters, call the {@link List#execute()} method to invoke the remote operation.
*
* @param parent Required. The name of the parent resource that contains the assets. The value that you can specify
* on parent depends on the method in which you specify parent. You can specify one of the
* following values: `organizations/[organization_id]`, `folders/[folder_id]`, or
* `projects/[project_id]`.
* @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 SecurityCommandCenterRequest {
private static final String REST_PATH = "v1/{+parent}/assets";
private final java.util.regex.Pattern PARENT_PATTERN =
java.util.regex.Pattern.compile("^folders/[^/]+$");
/**
* Lists an organization's assets.
*
* Create a request for the method "assets.list".
*
* This request holds the parameters needed by the the securitycenter server. After setting any
* optional parameters, call the {@link List#execute()} method to invoke the remote operation.
* {@link List#initialize(com.google.api.client.googleapis.services.AbstractGoogleClientRequest)}
* must be called to initialize this instance immediately after invoking the constructor.
*
* @param parent Required. The name of the parent resource that contains the assets. The value that you can specify
* on parent depends on the method in which you specify parent. You can specify one of the
* following values: `organizations/[organization_id]`, `folders/[folder_id]`, or
* `projects/[project_id]`.
* @since 1.13
*/
protected List(java.lang.String parent) {
super(SecurityCommandCenter.this, "GET", REST_PATH, null, com.google.api.services.securitycenter.v1.model.ListAssetsResponse.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 " +
"^folders/[^/]+$");
}
}
@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 parent resource that contains the assets. The value that you
* can specify on parent depends on the method in which you specify parent. You can specify
* one of the following values: `organizations/[organization_id]`, `folders/[folder_id]`, or
* `projects/[project_id]`.
*/
@com.google.api.client.util.Key
private java.lang.String parent;
/** Required. The name of the parent resource that contains the assets. The value that you can specify
on parent depends on the method in which you specify parent. You can specify one of the following
values: `organizations/[organization_id]`, `folders/[folder_id]`, or `projects/[project_id]`.
*/
public java.lang.String getParent() {
return parent;
}
/**
* Required. The name of the parent resource that contains the assets. The value that you
* can specify on parent depends on the method in which you specify parent. You can specify
* one of the following values: `organizations/[organization_id]`, `folders/[folder_id]`, or
* `projects/[project_id]`.
*/
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 " +
"^folders/[^/]+$");
}
this.parent = parent;
return this;
}
/**
* When compare_duration is set, the ListAssetsResult's "state_change" attribute is updated
* to indicate whether the asset was added, removed, or remained present during the
* compare_duration period of time that precedes the read_time. This is the time between
* (read_time - compare_duration) and read_time. The state_change value is derived based on
* the presence of the asset at the two points in time. Intermediate state changes between
* the two times don't affect the result. For example, the results aren't affected if the
* asset is removed and re-created again. Possible "state_change" values when
* compare_duration is specified: * "ADDED": indicates that the asset was not present at the
* start of compare_duration, but present at read_time. * "REMOVED": indicates that the
* asset was present at the start of compare_duration, but not present at read_time. *
* "ACTIVE": indicates that the asset was present at both the start and the end of the time
* period defined by compare_duration and read_time. If compare_duration is not specified,
* then the only possible state_change is "UNUSED", which will be the state_change set for
* all assets present at read_time.
*/
@com.google.api.client.util.Key
private String compareDuration;
/** When compare_duration is set, the ListAssetsResult's "state_change" attribute is updated to
indicate whether the asset was added, removed, or remained present during the compare_duration
period of time that precedes the read_time. This is the time between (read_time - compare_duration)
and read_time. The state_change value is derived based on the presence of the asset at the two
points in time. Intermediate state changes between the two times don't affect the result. For
example, the results aren't affected if the asset is removed and re-created again. Possible
"state_change" values when compare_duration is specified: * "ADDED": indicates that the asset was
not present at the start of compare_duration, but present at read_time. * "REMOVED": indicates that
the asset was present at the start of compare_duration, but not present at read_time. * "ACTIVE":
indicates that the asset was present at both the start and the end of the time period defined by
compare_duration and read_time. If compare_duration is not specified, then the only possible
state_change is "UNUSED", which will be the state_change set for all assets present at read_time.
*/
public String getCompareDuration() {
return compareDuration;
}
/**
* When compare_duration is set, the ListAssetsResult's "state_change" attribute is updated
* to indicate whether the asset was added, removed, or remained present during the
* compare_duration period of time that precedes the read_time. This is the time between
* (read_time - compare_duration) and read_time. The state_change value is derived based on
* the presence of the asset at the two points in time. Intermediate state changes between
* the two times don't affect the result. For example, the results aren't affected if the
* asset is removed and re-created again. Possible "state_change" values when
* compare_duration is specified: * "ADDED": indicates that the asset was not present at the
* start of compare_duration, but present at read_time. * "REMOVED": indicates that the
* asset was present at the start of compare_duration, but not present at read_time. *
* "ACTIVE": indicates that the asset was present at both the start and the end of the time
* period defined by compare_duration and read_time. If compare_duration is not specified,
* then the only possible state_change is "UNUSED", which will be the state_change set for
* all assets present at read_time.
*/
public List setCompareDuration(String compareDuration) {
this.compareDuration = compareDuration;
return this;
}
/**
* A field mask to specify the ListAssetsResult fields to be listed in the response. An
* empty field mask will list all fields.
*/
@com.google.api.client.util.Key
private String fieldMask;
/** A field mask to specify the ListAssetsResult fields to be listed in the response. An empty field
mask will list all fields.
*/
public String getFieldMask() {
return fieldMask;
}
/**
* A field mask to specify the ListAssetsResult fields to be listed in the response. An
* empty field mask will list all fields.
*/
public List setFieldMask(String fieldMask) {
this.fieldMask = fieldMask;
return this;
}
/**
* Expression that defines the filter to apply across assets. The expression is a list of
* zero or more restrictions combined via logical operators `AND` and `OR`. Parentheses are
* supported, and `OR` has higher precedence than `AND`. Restrictions have the form ` ` and
* may have a `-` character in front of them to indicate negation. The fields map to those
* defined in the Asset resource. Examples include: * name *
* security_center_properties.resource_name * resource_properties.a_property *
* security_marks.marks.marka The supported operators are: * `=` for all value types. * `>`,
* `<`, `>=`, `<=` for integer values. * `:`, meaning substring matching, for strings. The
* supported value types are: * string literals in quotes. * integer literals without
* quotes. * boolean literals `true` and `false` without quotes. The following are the
* allowed field and operator combinations: * name: `=` * update_time: `=`, `>`, `<`, `>=`,
* `<=` Usage: This should be milliseconds since epoch or an RFC3339 string. Examples:
* `update_time = "2019-06-10T16:07:18-07:00"` `update_time = 1560208038000` * create_time:
* `=`, `>`, `<`, `>=`, `<=` Usage: This should be milliseconds since epoch or an RFC3339
* string. Examples: `create_time = "2019-06-10T16:07:18-07:00"` `create_time =
* 1560208038000` * iam_policy.policy_blob: `=`, `:` * resource_properties: `=`, `:`, `>`,
* `<`, `>=`, `<=` * security_marks.marks: `=`, `:` *
* security_center_properties.resource_name: `=`, `:` *
* security_center_properties.resource_display_name: `=`, `:` *
* security_center_properties.resource_type: `=`, `:` *
* security_center_properties.resource_parent: `=`, `:` *
* security_center_properties.resource_parent_display_name: `=`, `:` *
* security_center_properties.resource_project: `=`, `:` *
* security_center_properties.resource_project_display_name: `=`, `:` *
* security_center_properties.resource_owners: `=`, `:` For example,
* `resource_properties.size = 100` is a valid filter string. Use a partial match on the
* empty string to filter based on a property existing: `resource_properties.my_property :
* ""` Use a negated partial match on the empty string to filter based on a property not
* existing: `-resource_properties.my_property : ""`
*/
@com.google.api.client.util.Key
private java.lang.String filter;
/** Expression that defines the filter to apply across assets. The expression is a list of zero or more
restrictions combined via logical operators `AND` and `OR`. Parentheses are supported, and `OR` has
higher precedence than `AND`. Restrictions have the form ` ` and may have a `-` character in front
of them to indicate negation. The fields map to those defined in the Asset resource. Examples
include: * name * security_center_properties.resource_name * resource_properties.a_property *
security_marks.marks.marka The supported operators are: * `=` for all value types. * `>`, `<`,
`>=`, `<=` for integer values. * `:`, meaning substring matching, for strings. The supported value
types are: * string literals in quotes. * integer literals without quotes. * boolean literals
`true` and `false` without quotes. The following are the allowed field and operator combinations: *
name: `=` * update_time: `=`, `>`, `<`, `>=`, `<=` Usage: This should be milliseconds since epoch
or an RFC3339 string. Examples: `update_time = "2019-06-10T16:07:18-07:00"` `update_time =
1560208038000` * create_time: `=`, `>`, `<`, `>=`, `<=` Usage: This should be milliseconds since
epoch or an RFC3339 string. Examples: `create_time = "2019-06-10T16:07:18-07:00"` `create_time =
1560208038000` * iam_policy.policy_blob: `=`, `:` * resource_properties: `=`, `:`, `>`, `<`, `>=`,
`<=` * security_marks.marks: `=`, `:` * security_center_properties.resource_name: `=`, `:` *
security_center_properties.resource_display_name: `=`, `:` *
security_center_properties.resource_type: `=`, `:` * security_center_properties.resource_parent:
`=`, `:` * security_center_properties.resource_parent_display_name: `=`, `:` *
security_center_properties.resource_project: `=`, `:` *
security_center_properties.resource_project_display_name: `=`, `:` *
security_center_properties.resource_owners: `=`, `:` For example, `resource_properties.size = 100`
is a valid filter string. Use a partial match on the empty string to filter based on a property
existing: `resource_properties.my_property : ""` Use a negated partial match on the empty string to
filter based on a property not existing: `-resource_properties.my_property : ""`
*/
public java.lang.String getFilter() {
return filter;
}
/**
* Expression that defines the filter to apply across assets. The expression is a list of
* zero or more restrictions combined via logical operators `AND` and `OR`. Parentheses are
* supported, and `OR` has higher precedence than `AND`. Restrictions have the form ` ` and
* may have a `-` character in front of them to indicate negation. The fields map to those
* defined in the Asset resource. Examples include: * name *
* security_center_properties.resource_name * resource_properties.a_property *
* security_marks.marks.marka The supported operators are: * `=` for all value types. * `>`,
* `<`, `>=`, `<=` for integer values. * `:`, meaning substring matching, for strings. The
* supported value types are: * string literals in quotes. * integer literals without
* quotes. * boolean literals `true` and `false` without quotes. The following are the
* allowed field and operator combinations: * name: `=` * update_time: `=`, `>`, `<`, `>=`,
* `<=` Usage: This should be milliseconds since epoch or an RFC3339 string. Examples:
* `update_time = "2019-06-10T16:07:18-07:00"` `update_time = 1560208038000` * create_time:
* `=`, `>`, `<`, `>=`, `<=` Usage: This should be milliseconds since epoch or an RFC3339
* string. Examples: `create_time = "2019-06-10T16:07:18-07:00"` `create_time =
* 1560208038000` * iam_policy.policy_blob: `=`, `:` * resource_properties: `=`, `:`, `>`,
* `<`, `>=`, `<=` * security_marks.marks: `=`, `:` *
* security_center_properties.resource_name: `=`, `:` *
* security_center_properties.resource_display_name: `=`, `:` *
* security_center_properties.resource_type: `=`, `:` *
* security_center_properties.resource_parent: `=`, `:` *
* security_center_properties.resource_parent_display_name: `=`, `:` *
* security_center_properties.resource_project: `=`, `:` *
* security_center_properties.resource_project_display_name: `=`, `:` *
* security_center_properties.resource_owners: `=`, `:` For example,
* `resource_properties.size = 100` is a valid filter string. Use a partial match on the
* empty string to filter based on a property existing: `resource_properties.my_property :
* ""` Use a negated partial match on the empty string to filter based on a property not
* existing: `-resource_properties.my_property : ""`
*/
public List setFilter(java.lang.String filter) {
this.filter = filter;
return this;
}
/**
* Expression that defines what fields and order to use for sorting. The string value should
* follow SQL syntax: comma separated list of fields. For example:
* "name,resource_properties.a_property". The default sorting order is ascending. To specify
* descending order for a field, a suffix " desc" should be appended to the field name. For
* example: "name desc,resource_properties.a_property". Redundant space characters in the
* syntax are insignificant. "name desc,resource_properties.a_property" and " name desc ,
* resource_properties.a_property " are equivalent. The following fields are supported: name
* update_time resource_properties security_marks.marks
* security_center_properties.resource_name security_center_properties.resource_display_name
* security_center_properties.resource_parent
* security_center_properties.resource_parent_display_name
* security_center_properties.resource_project
* security_center_properties.resource_project_display_name
* security_center_properties.resource_type
*/
@com.google.api.client.util.Key
private java.lang.String orderBy;
/** Expression that defines what fields and order to use for sorting. The string value should follow
SQL syntax: comma separated list of fields. For example: "name,resource_properties.a_property". The
default sorting order is ascending. To specify descending order for a field, a suffix " desc"
should be appended to the field name. For example: "name desc,resource_properties.a_property".
Redundant space characters in the syntax are insignificant. "name
desc,resource_properties.a_property" and " name desc , resource_properties.a_property " are
equivalent. The following fields are supported: name update_time resource_properties
security_marks.marks security_center_properties.resource_name
security_center_properties.resource_display_name security_center_properties.resource_parent
security_center_properties.resource_parent_display_name security_center_properties.resource_project
security_center_properties.resource_project_display_name security_center_properties.resource_type
*/
public java.lang.String getOrderBy() {
return orderBy;
}
/**
* Expression that defines what fields and order to use for sorting. The string value should
* follow SQL syntax: comma separated list of fields. For example:
* "name,resource_properties.a_property". The default sorting order is ascending. To specify
* descending order for a field, a suffix " desc" should be appended to the field name. For
* example: "name desc,resource_properties.a_property". Redundant space characters in the
* syntax are insignificant. "name desc,resource_properties.a_property" and " name desc ,
* resource_properties.a_property " are equivalent. The following fields are supported: name
* update_time resource_properties security_marks.marks
* security_center_properties.resource_name security_center_properties.resource_display_name
* security_center_properties.resource_parent
* security_center_properties.resource_parent_display_name
* security_center_properties.resource_project
* security_center_properties.resource_project_display_name
* security_center_properties.resource_type
*/
public List setOrderBy(java.lang.String orderBy) {
this.orderBy = orderBy;
return this;
}
/**
* The maximum number of results to return in a single response. Default is 10, minimum is
* 1, maximum is 1000.
*/
@com.google.api.client.util.Key
private java.lang.Integer pageSize;
/** The maximum number of results to return in a single response. Default is 10, minimum is 1, maximum
is 1000.
*/
public java.lang.Integer getPageSize() {
return pageSize;
}
/**
* The maximum number of results to return in a single response. Default is 10, minimum is
* 1, maximum is 1000.
*/
public List setPageSize(java.lang.Integer pageSize) {
this.pageSize = pageSize;
return this;
}
/**
* The value returned by the last `ListAssetsResponse`; indicates that this is a
* continuation of a prior `ListAssets` call, and that the system should return the next
* page of data.
*/
@com.google.api.client.util.Key
private java.lang.String pageToken;
/** The value returned by the last `ListAssetsResponse`; indicates that this is a continuation of a
prior `ListAssets` call, and that the system should return the next page of data.
*/
public java.lang.String getPageToken() {
return pageToken;
}
/**
* The value returned by the last `ListAssetsResponse`; indicates that this is a
* continuation of a prior `ListAssets` call, and that the system should return the next
* page of data.
*/
public List setPageToken(java.lang.String pageToken) {
this.pageToken = pageToken;
return this;
}
/**
* Time used as a reference point when filtering assets. The filter is limited to assets
* existing at the supplied time and their values are those at that specific time. Absence
* of this field will default to the API's version of NOW.
*/
@com.google.api.client.util.Key
private String readTime;
/** Time used as a reference point when filtering assets. The filter is limited to assets existing at
the supplied time and their values are those at that specific time. Absence of this field will
default to the API's version of NOW.
*/
public String getReadTime() {
return readTime;
}
/**
* Time used as a reference point when filtering assets. The filter is limited to assets
* existing at the supplied time and their values are those at that specific time. Absence
* of this field will default to the API's version of NOW.
*/
public List setReadTime(String readTime) {
this.readTime = readTime;
return this;
}
@Override
public List set(String parameterName, Object value) {
return (List) super.set(parameterName, value);
}
}
/**
* Updates security marks.
*
* Create a request for the method "assets.updateSecurityMarks".
*
* This request holds the parameters needed by the securitycenter server. After setting any
* optional parameters, call the {@link UpdateSecurityMarks#execute()} method to invoke the remote
* operation.
*
* @param name The relative resource name of the SecurityMarks. See:
* https://cloud.google.com/apis/design/resource_names#relative_resource_name Examples:
* "organizations/{organization_id}/assets/{asset_id}/securityMarks"
* "organizations/{organization_id}/sources/{source_id}/findings/{finding_id}/securityMarks".
* @param content the {@link com.google.api.services.securitycenter.v1.model.SecurityMarks}
* @return the request
*/
public UpdateSecurityMarks updateSecurityMarks(java.lang.String name, com.google.api.services.securitycenter.v1.model.SecurityMarks content) throws java.io.IOException {
UpdateSecurityMarks result = new UpdateSecurityMarks(name, content);
initialize(result);
return result;
}
public class UpdateSecurityMarks extends SecurityCommandCenterRequest {
private static final String REST_PATH = "v1/{+name}";
private final java.util.regex.Pattern NAME_PATTERN =
java.util.regex.Pattern.compile("^folders/[^/]+/assets/[^/]+/securityMarks$");
/**
* Updates security marks.
*
* Create a request for the method "assets.updateSecurityMarks".
*
* This request holds the parameters needed by the the securitycenter server. After setting any
* optional parameters, call the {@link UpdateSecurityMarks#execute()} method to invoke the remote
* operation. {@link UpdateSecurityMarks#initialize(com.google.api.client.googleapis.services.
* AbstractGoogleClientRequest)} must be called to initialize this instance immediately after
* invoking the constructor.
*
* @param name The relative resource name of the SecurityMarks. See:
* https://cloud.google.com/apis/design/resource_names#relative_resource_name Examples:
* "organizations/{organization_id}/assets/{asset_id}/securityMarks"
* "organizations/{organization_id}/sources/{source_id}/findings/{finding_id}/securityMarks".
* @param content the {@link com.google.api.services.securitycenter.v1.model.SecurityMarks}
* @since 1.13
*/
protected UpdateSecurityMarks(java.lang.String name, com.google.api.services.securitycenter.v1.model.SecurityMarks content) {
super(SecurityCommandCenter.this, "PATCH", REST_PATH, content, com.google.api.services.securitycenter.v1.model.SecurityMarks.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 " +
"^folders/[^/]+/assets/[^/]+/securityMarks$");
}
}
@Override
public UpdateSecurityMarks set$Xgafv(java.lang.String $Xgafv) {
return (UpdateSecurityMarks) super.set$Xgafv($Xgafv);
}
@Override
public UpdateSecurityMarks setAccessToken(java.lang.String accessToken) {
return (UpdateSecurityMarks) super.setAccessToken(accessToken);
}
@Override
public UpdateSecurityMarks setAlt(java.lang.String alt) {
return (UpdateSecurityMarks) super.setAlt(alt);
}
@Override
public UpdateSecurityMarks setCallback(java.lang.String callback) {
return (UpdateSecurityMarks) super.setCallback(callback);
}
@Override
public UpdateSecurityMarks setFields(java.lang.String fields) {
return (UpdateSecurityMarks) super.setFields(fields);
}
@Override
public UpdateSecurityMarks setKey(java.lang.String key) {
return (UpdateSecurityMarks) super.setKey(key);
}
@Override
public UpdateSecurityMarks setOauthToken(java.lang.String oauthToken) {
return (UpdateSecurityMarks) super.setOauthToken(oauthToken);
}
@Override
public UpdateSecurityMarks setPrettyPrint(java.lang.Boolean prettyPrint) {
return (UpdateSecurityMarks) super.setPrettyPrint(prettyPrint);
}
@Override
public UpdateSecurityMarks setQuotaUser(java.lang.String quotaUser) {
return (UpdateSecurityMarks) super.setQuotaUser(quotaUser);
}
@Override
public UpdateSecurityMarks setUploadType(java.lang.String uploadType) {
return (UpdateSecurityMarks) super.setUploadType(uploadType);
}
@Override
public UpdateSecurityMarks setUploadProtocol(java.lang.String uploadProtocol) {
return (UpdateSecurityMarks) super.setUploadProtocol(uploadProtocol);
}
/**
* The relative resource name of the SecurityMarks. See:
* https://cloud.google.com/apis/design/resource_names#relative_resource_name Examples:
* "organizations/{organization_id}/assets/{asset_id}/securityMarks" "organizations/{organiz
* ation_id}/sources/{source_id}/findings/{finding_id}/securityMarks".
*/
@com.google.api.client.util.Key
private java.lang.String name;
/** The relative resource name of the SecurityMarks. See:
https://cloud.google.com/apis/design/resource_names#relative_resource_name Examples:
"organizations/{organization_id}/assets/{asset_id}/securityMarks"
"organizations/{organization_id}/sources/{source_id}/findings/{finding_id}/securityMarks".
*/
public java.lang.String getName() {
return name;
}
/**
* The relative resource name of the SecurityMarks. See:
* https://cloud.google.com/apis/design/resource_names#relative_resource_name Examples:
* "organizations/{organization_id}/assets/{asset_id}/securityMarks" "organizations/{organiz
* ation_id}/sources/{source_id}/findings/{finding_id}/securityMarks".
*/
public UpdateSecurityMarks 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 " +
"^folders/[^/]+/assets/[^/]+/securityMarks$");
}
this.name = name;
return this;
}
/**
* The time at which the updated SecurityMarks take effect. If not set uses current server
* time. Updates will be applied to the SecurityMarks that are active immediately preceding
* this time. Must be earlier or equal to the server time.
*/
@com.google.api.client.util.Key
private String startTime;
/** The time at which the updated SecurityMarks take effect. If not set uses current server time.
Updates will be applied to the SecurityMarks that are active immediately preceding this time. Must
be earlier or equal to the server time.
*/
public String getStartTime() {
return startTime;
}
/**
* The time at which the updated SecurityMarks take effect. If not set uses current server
* time. Updates will be applied to the SecurityMarks that are active immediately preceding
* this time. Must be earlier or equal to the server time.
*/
public UpdateSecurityMarks setStartTime(String startTime) {
this.startTime = startTime;
return this;
}
/**
* The FieldMask to use when updating the security marks resource. The field mask must not
* contain duplicate fields. If empty or set to "marks", all marks will be replaced.
* Individual marks can be updated using "marks.".
*/
@com.google.api.client.util.Key
private String updateMask;
/** The FieldMask to use when updating the security marks resource. The field mask must not contain
duplicate fields. If empty or set to "marks", all marks will be replaced. Individual marks can be
updated using "marks.".
*/
public String getUpdateMask() {
return updateMask;
}
/**
* The FieldMask to use when updating the security marks resource. The field mask must not
* contain duplicate fields. If empty or set to "marks", all marks will be replaced.
* Individual marks can be updated using "marks.".
*/
public UpdateSecurityMarks setUpdateMask(String updateMask) {
this.updateMask = updateMask;
return this;
}
@Override
public UpdateSecurityMarks set(String parameterName, Object value) {
return (UpdateSecurityMarks) super.set(parameterName, value);
}
}
}
/**
* An accessor for creating requests from the BigQueryExports collection.
*
* The typical use is:
*
* {@code SecurityCommandCenter securitycenter = new SecurityCommandCenter(...);}
* {@code SecurityCommandCenter.BigQueryExports.List request = securitycenter.bigQueryExports().list(parameters ...)}
*
*
* @return the resource collection
*/
public BigQueryExports bigQueryExports() {
return new BigQueryExports();
}
/**
* The "bigQueryExports" collection of methods.
*/
public class BigQueryExports {
/**
* Creates a BigQuery export.
*
* Create a request for the method "bigQueryExports.create".
*
* This request holds the parameters needed by the securitycenter server. After setting any
* optional parameters, call the {@link Create#execute()} method to invoke the remote operation.
*
* @param parent Required. The name of the parent resource of the new BigQuery export. Its format is
* `organizations/[organization_id]`, `folders/[folder_id]`, or `projects/[project_id]`.
* @param content the {@link com.google.api.services.securitycenter.v1.model.GoogleCloudSecuritycenterV1BigQueryExport}
* @return the request
*/
public Create create(java.lang.String parent, com.google.api.services.securitycenter.v1.model.GoogleCloudSecuritycenterV1BigQueryExport content) throws java.io.IOException {
Create result = new Create(parent, content);
initialize(result);
return result;
}
public class Create extends SecurityCommandCenterRequest {
private static final String REST_PATH = "v1/{+parent}/bigQueryExports";
private final java.util.regex.Pattern PARENT_PATTERN =
java.util.regex.Pattern.compile("^folders/[^/]+$");
/**
* Creates a BigQuery export.
*
* Create a request for the method "bigQueryExports.create".
*
* This request holds the parameters needed by the the securitycenter server. After setting any
* optional parameters, call the {@link Create#execute()} method to invoke the remote operation.
* {@link
* Create#initialize(com.google.api.client.googleapis.services.AbstractGoogleClientRequest)} must
* be called to initialize this instance immediately after invoking the constructor.
*
* @param parent Required. The name of the parent resource of the new BigQuery export. Its format is
* `organizations/[organization_id]`, `folders/[folder_id]`, or `projects/[project_id]`.
* @param content the {@link com.google.api.services.securitycenter.v1.model.GoogleCloudSecuritycenterV1BigQueryExport}
* @since 1.13
*/
protected Create(java.lang.String parent, com.google.api.services.securitycenter.v1.model.GoogleCloudSecuritycenterV1BigQueryExport content) {
super(SecurityCommandCenter.this, "POST", REST_PATH, content, com.google.api.services.securitycenter.v1.model.GoogleCloudSecuritycenterV1BigQueryExport.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 " +
"^folders/[^/]+$");
}
}
@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 parent resource of the new BigQuery export. Its format is
* `organizations/[organization_id]`, `folders/[folder_id]`, or `projects/[project_id]`.
*/
@com.google.api.client.util.Key
private java.lang.String parent;
/** Required. The name of the parent resource of the new BigQuery export. Its format is
`organizations/[organization_id]`, `folders/[folder_id]`, or `projects/[project_id]`.
*/
public java.lang.String getParent() {
return parent;
}
/**
* Required. The name of the parent resource of the new BigQuery export. Its format is
* `organizations/[organization_id]`, `folders/[folder_id]`, or `projects/[project_id]`.
*/
public Create setParent(java.lang.String parent) {
if (!getSuppressPatternChecks()) {
com.google.api.client.util.Preconditions.checkArgument(PARENT_PATTERN.matcher(parent).matches(),
"Parameter parent must conform to the pattern " +
"^folders/[^/]+$");
}
this.parent = parent;
return this;
}
/**
* Required. Unique identifier provided by the client within the parent scope. It must
* consist of only lowercase letters, numbers, and hyphens, must start with a letter, must
* end with either a letter or a number, and must be 63 characters or less.
*/
@com.google.api.client.util.Key
private java.lang.String bigQueryExportId;
/** Required. Unique identifier provided by the client within the parent scope. It must consist of only
lowercase letters, numbers, and hyphens, must start with a letter, must end with either a letter or
a number, and must be 63 characters or less.
*/
public java.lang.String getBigQueryExportId() {
return bigQueryExportId;
}
/**
* Required. Unique identifier provided by the client within the parent scope. It must
* consist of only lowercase letters, numbers, and hyphens, must start with a letter, must
* end with either a letter or a number, and must be 63 characters or less.
*/
public Create setBigQueryExportId(java.lang.String bigQueryExportId) {
this.bigQueryExportId = bigQueryExportId;
return this;
}
@Override
public Create set(String parameterName, Object value) {
return (Create) super.set(parameterName, value);
}
}
/**
* Deletes an existing BigQuery export.
*
* Create a request for the method "bigQueryExports.delete".
*
* This request holds the parameters needed by the securitycenter server. After setting any
* optional parameters, call the {@link Delete#execute()} method to invoke the remote operation.
*
* @param name Required. The name of the BigQuery export to delete. Its format is
* `organizations/{organization}/bigQueryExports/{export_id}`,
* `folders/{folder}/bigQueryExports/{export_id}`, or
* `projects/{project}/bigQueryExports/{export_id}`
* @return the request
*/
public Delete delete(java.lang.String name) throws java.io.IOException {
Delete result = new Delete(name);
initialize(result);
return result;
}
public class Delete extends SecurityCommandCenterRequest {
private static final String REST_PATH = "v1/{+name}";
private final java.util.regex.Pattern NAME_PATTERN =
java.util.regex.Pattern.compile("^folders/[^/]+/bigQueryExports/[^/]+$");
/**
* Deletes an existing BigQuery export.
*
* Create a request for the method "bigQueryExports.delete".
*
* This request holds the parameters needed by the the securitycenter server. After setting any
* optional parameters, call the {@link Delete#execute()} method to invoke the remote operation.
* {@link
* Delete#initialize(com.google.api.client.googleapis.services.AbstractGoogleClientRequest)} must
* be called to initialize this instance immediately after invoking the constructor.
*
* @param name Required. The name of the BigQuery export to delete. Its format is
* `organizations/{organization}/bigQueryExports/{export_id}`,
* `folders/{folder}/bigQueryExports/{export_id}`, or
* `projects/{project}/bigQueryExports/{export_id}`
* @since 1.13
*/
protected Delete(java.lang.String name) {
super(SecurityCommandCenter.this, "DELETE", REST_PATH, null, com.google.api.services.securitycenter.v1.model.Empty.class);
this.name = com.google.api.client.util.Preconditions.checkNotNull(name, "Required parameter name must be specified.");
if (!getSuppressPatternChecks()) {
com.google.api.client.util.Preconditions.checkArgument(NAME_PATTERN.matcher(name).matches(),
"Parameter name must conform to the pattern " +
"^folders/[^/]+/bigQueryExports/[^/]+$");
}
}
@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 BigQuery export to delete. Its format is
* `organizations/{organization}/bigQueryExports/{export_id}`,
* `folders/{folder}/bigQueryExports/{export_id}`, or
* `projects/{project}/bigQueryExports/{export_id}`
*/
@com.google.api.client.util.Key
private java.lang.String name;
/** Required. The name of the BigQuery export to delete. Its format is
`organizations/{organization}/bigQueryExports/{export_id}`,
`folders/{folder}/bigQueryExports/{export_id}`, or `projects/{project}/bigQueryExports/{export_id}`
*/
public java.lang.String getName() {
return name;
}
/**
* Required. The name of the BigQuery export to delete. Its format is
* `organizations/{organization}/bigQueryExports/{export_id}`,
* `folders/{folder}/bigQueryExports/{export_id}`, or
* `projects/{project}/bigQueryExports/{export_id}`
*/
public Delete setName(java.lang.String name) {
if (!getSuppressPatternChecks()) {
com.google.api.client.util.Preconditions.checkArgument(NAME_PATTERN.matcher(name).matches(),
"Parameter name must conform to the pattern " +
"^folders/[^/]+/bigQueryExports/[^/]+$");
}
this.name = name;
return this;
}
@Override
public Delete set(String parameterName, Object value) {
return (Delete) super.set(parameterName, value);
}
}
/**
* Gets a BigQuery export.
*
* Create a request for the method "bigQueryExports.get".
*
* This request holds the parameters needed by the securitycenter server. After setting any
* optional parameters, call the {@link Get#execute()} method to invoke the remote operation.
*
* @param name Required. Name of the BigQuery export to retrieve. Its format is
* `organizations/{organization}/bigQueryExports/{export_id}`,
* `folders/{folder}/bigQueryExports/{export_id}`, or
* `projects/{project}/bigQueryExports/{export_id}`
* @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 SecurityCommandCenterRequest {
private static final String REST_PATH = "v1/{+name}";
private final java.util.regex.Pattern NAME_PATTERN =
java.util.regex.Pattern.compile("^folders/[^/]+/bigQueryExports/[^/]+$");
/**
* Gets a BigQuery export.
*
* Create a request for the method "bigQueryExports.get".
*
* This request holds the parameters needed by the the securitycenter 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. Name of the BigQuery export to retrieve. Its format is
* `organizations/{organization}/bigQueryExports/{export_id}`,
* `folders/{folder}/bigQueryExports/{export_id}`, or
* `projects/{project}/bigQueryExports/{export_id}`
* @since 1.13
*/
protected Get(java.lang.String name) {
super(SecurityCommandCenter.this, "GET", REST_PATH, null, com.google.api.services.securitycenter.v1.model.GoogleCloudSecuritycenterV1BigQueryExport.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 " +
"^folders/[^/]+/bigQueryExports/[^/]+$");
}
}
@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. Name of the BigQuery export to retrieve. Its format is
* `organizations/{organization}/bigQueryExports/{export_id}`,
* `folders/{folder}/bigQueryExports/{export_id}`, or
* `projects/{project}/bigQueryExports/{export_id}`
*/
@com.google.api.client.util.Key
private java.lang.String name;
/** Required. Name of the BigQuery export to retrieve. Its format is
`organizations/{organization}/bigQueryExports/{export_id}`,
`folders/{folder}/bigQueryExports/{export_id}`, or `projects/{project}/bigQueryExports/{export_id}`
*/
public java.lang.String getName() {
return name;
}
/**
* Required. Name of the BigQuery export to retrieve. Its format is
* `organizations/{organization}/bigQueryExports/{export_id}`,
* `folders/{folder}/bigQueryExports/{export_id}`, or
* `projects/{project}/bigQueryExports/{export_id}`
*/
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 " +
"^folders/[^/]+/bigQueryExports/[^/]+$");
}
this.name = name;
return this;
}
@Override
public Get set(String parameterName, Object value) {
return (Get) super.set(parameterName, value);
}
}
/**
* Lists BigQuery exports. Note that when requesting BigQuery exports at a given level all exports
* under that level are also returned e.g. if requesting BigQuery exports under a folder, then all
* BigQuery exports immediately under the folder plus the ones created under the projects within the
* folder are returned.
*
* Create a request for the method "bigQueryExports.list".
*
* This request holds the parameters needed by the securitycenter server. After setting any
* optional parameters, call the {@link List#execute()} method to invoke the remote operation.
*
* @param parent Required. The parent, which owns the collection of BigQuery exports. Its format is
* `organizations/[organization_id]`, `folders/[folder_id]`, `projects/[project_id]`.
* @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 SecurityCommandCenterRequest {
private static final String REST_PATH = "v1/{+parent}/bigQueryExports";
private final java.util.regex.Pattern PARENT_PATTERN =
java.util.regex.Pattern.compile("^folders/[^/]+$");
/**
* Lists BigQuery exports. Note that when requesting BigQuery exports at a given level all exports
* under that level are also returned e.g. if requesting BigQuery exports under a folder, then all
* BigQuery exports immediately under the folder plus the ones created under the projects within
* the folder are returned.
*
* Create a request for the method "bigQueryExports.list".
*
* This request holds the parameters needed by the the securitycenter server. After setting any
* optional parameters, call the {@link List#execute()} method to invoke the remote operation.
* {@link List#initialize(com.google.api.client.googleapis.services.AbstractGoogleClientRequest)}
* must be called to initialize this instance immediately after invoking the constructor.
*
* @param parent Required. The parent, which owns the collection of BigQuery exports. Its format is
* `organizations/[organization_id]`, `folders/[folder_id]`, `projects/[project_id]`.
* @since 1.13
*/
protected List(java.lang.String parent) {
super(SecurityCommandCenter.this, "GET", REST_PATH, null, com.google.api.services.securitycenter.v1.model.ListBigQueryExportsResponse.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 " +
"^folders/[^/]+$");
}
}
@Override
public com.google.api.client.http.HttpResponse executeUsingHead() throws java.io.IOException {
return super.executeUsingHead();
}
@Override
public com.google.api.client.http.HttpRequest buildHttpRequestUsingHead() throws java.io.IOException {
return super.buildHttpRequestUsingHead();
}
@Override
public List set$Xgafv(java.lang.String $Xgafv) {
return (List) super.set$Xgafv($Xgafv);
}
@Override
public List setAccessToken(java.lang.String accessToken) {
return (List) super.setAccessToken(accessToken);
}
@Override
public List setAlt(java.lang.String alt) {
return (List) super.setAlt(alt);
}
@Override
public List setCallback(java.lang.String callback) {
return (List) super.setCallback(callback);
}
@Override
public List setFields(java.lang.String fields) {
return (List) super.setFields(fields);
}
@Override
public List setKey(java.lang.String key) {
return (List) super.setKey(key);
}
@Override
public List setOauthToken(java.lang.String oauthToken) {
return (List) super.setOauthToken(oauthToken);
}
@Override
public List setPrettyPrint(java.lang.Boolean prettyPrint) {
return (List) super.setPrettyPrint(prettyPrint);
}
@Override
public List setQuotaUser(java.lang.String quotaUser) {
return (List) super.setQuotaUser(quotaUser);
}
@Override
public List setUploadType(java.lang.String uploadType) {
return (List) super.setUploadType(uploadType);
}
@Override
public List setUploadProtocol(java.lang.String uploadProtocol) {
return (List) super.setUploadProtocol(uploadProtocol);
}
/**
* Required. The parent, which owns the collection of BigQuery exports. Its format is
* `organizations/[organization_id]`, `folders/[folder_id]`, `projects/[project_id]`.
*/
@com.google.api.client.util.Key
private java.lang.String parent;
/** Required. The parent, which owns the collection of BigQuery exports. Its format is
`organizations/[organization_id]`, `folders/[folder_id]`, `projects/[project_id]`.
*/
public java.lang.String getParent() {
return parent;
}
/**
* Required. The parent, which owns the collection of BigQuery exports. Its format is
* `organizations/[organization_id]`, `folders/[folder_id]`, `projects/[project_id]`.
*/
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 " +
"^folders/[^/]+$");
}
this.parent = parent;
return this;
}
/**
* The maximum number of configs to return. The service may return fewer than this value. If
* unspecified, at most 10 configs will be returned. The maximum value is 1000; values above
* 1000 will be coerced to 1000.
*/
@com.google.api.client.util.Key
private java.lang.Integer pageSize;
/** The maximum number of configs to return. The service may return fewer than this value. If
unspecified, at most 10 configs will be returned. The maximum value is 1000; values above 1000 will
be coerced to 1000.
*/
public java.lang.Integer getPageSize() {
return pageSize;
}
/**
* The maximum number of configs to return. The service may return fewer than this value. If
* unspecified, at most 10 configs will be returned. The maximum value is 1000; values above
* 1000 will be coerced to 1000.
*/
public List setPageSize(java.lang.Integer pageSize) {
this.pageSize = pageSize;
return this;
}
/**
* A page token, received from a previous `ListBigQueryExports` call. Provide this to
* retrieve the subsequent page. When paginating, all other parameters provided to
* `ListBigQueryExports` must match the call that provided the page token.
*/
@com.google.api.client.util.Key
private java.lang.String pageToken;
/** A page token, received from a previous `ListBigQueryExports` call. Provide this to retrieve the
subsequent page. When paginating, all other parameters provided to `ListBigQueryExports` must match
the call that provided the page token.
*/
public java.lang.String getPageToken() {
return pageToken;
}
/**
* A page token, received from a previous `ListBigQueryExports` call. Provide this to
* retrieve the subsequent page. When paginating, all other parameters provided to
* `ListBigQueryExports` must match the call that provided the 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);
}
}
/**
* Updates a BigQuery export.
*
* Create a request for the method "bigQueryExports.patch".
*
* This request holds the parameters needed by the securitycenter server. After setting any
* optional parameters, call the {@link Patch#execute()} method to invoke the remote operation.
*
* @param name The relative resource name of this export. See:
* https://cloud.google.com/apis/design/resource_names#relative_resource_name. Example
* format: "organizations/{organization_id}/bigQueryExports/{export_id}" Example format:
* "folders/{folder_id}/bigQueryExports/{export_id}" Example format:
* "projects/{project_id}/bigQueryExports/{export_id}" This field is provided in responses,
* and is ignored when provided in create requests.
* @param content the {@link com.google.api.services.securitycenter.v1.model.GoogleCloudSecuritycenterV1BigQueryExport}
* @return the request
*/
public Patch patch(java.lang.String name, com.google.api.services.securitycenter.v1.model.GoogleCloudSecuritycenterV1BigQueryExport content) throws java.io.IOException {
Patch result = new Patch(name, content);
initialize(result);
return result;
}
public class Patch extends SecurityCommandCenterRequest {
private static final String REST_PATH = "v1/{+name}";
private final java.util.regex.Pattern NAME_PATTERN =
java.util.regex.Pattern.compile("^folders/[^/]+/bigQueryExports/[^/]+$");
/**
* Updates a BigQuery export.
*
* Create a request for the method "bigQueryExports.patch".
*
* This request holds the parameters needed by the the securitycenter server. After setting any
* optional parameters, call the {@link Patch#execute()} method to invoke the remote operation.
* {@link
* Patch#initialize(com.google.api.client.googleapis.services.AbstractGoogleClientRequest)} must
* be called to initialize this instance immediately after invoking the constructor.
*
* @param name The relative resource name of this export. See:
* https://cloud.google.com/apis/design/resource_names#relative_resource_name. Example
* format: "organizations/{organization_id}/bigQueryExports/{export_id}" Example format:
* "folders/{folder_id}/bigQueryExports/{export_id}" Example format:
* "projects/{project_id}/bigQueryExports/{export_id}" This field is provided in responses,
* and is ignored when provided in create requests.
* @param content the {@link com.google.api.services.securitycenter.v1.model.GoogleCloudSecuritycenterV1BigQueryExport}
* @since 1.13
*/
protected Patch(java.lang.String name, com.google.api.services.securitycenter.v1.model.GoogleCloudSecuritycenterV1BigQueryExport content) {
super(SecurityCommandCenter.this, "PATCH", REST_PATH, content, com.google.api.services.securitycenter.v1.model.GoogleCloudSecuritycenterV1BigQueryExport.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 " +
"^folders/[^/]+/bigQueryExports/[^/]+$");
}
}
@Override
public Patch set$Xgafv(java.lang.String $Xgafv) {
return (Patch) super.set$Xgafv($Xgafv);
}
@Override
public Patch setAccessToken(java.lang.String accessToken) {
return (Patch) super.setAccessToken(accessToken);
}
@Override
public Patch setAlt(java.lang.String alt) {
return (Patch) super.setAlt(alt);
}
@Override
public Patch setCallback(java.lang.String callback) {
return (Patch) super.setCallback(callback);
}
@Override
public Patch setFields(java.lang.String fields) {
return (Patch) super.setFields(fields);
}
@Override
public Patch setKey(java.lang.String key) {
return (Patch) super.setKey(key);
}
@Override
public Patch setOauthToken(java.lang.String oauthToken) {
return (Patch) super.setOauthToken(oauthToken);
}
@Override
public Patch setPrettyPrint(java.lang.Boolean prettyPrint) {
return (Patch) super.setPrettyPrint(prettyPrint);
}
@Override
public Patch setQuotaUser(java.lang.String quotaUser) {
return (Patch) super.setQuotaUser(quotaUser);
}
@Override
public Patch setUploadType(java.lang.String uploadType) {
return (Patch) super.setUploadType(uploadType);
}
@Override
public Patch setUploadProtocol(java.lang.String uploadProtocol) {
return (Patch) super.setUploadProtocol(uploadProtocol);
}
/**
* The relative resource name of this export. See:
* https://cloud.google.com/apis/design/resource_names#relative_resource_name. Example
* format: "organizations/{organization_id}/bigQueryExports/{export_id}" Example format:
* "folders/{folder_id}/bigQueryExports/{export_id}" Example format:
* "projects/{project_id}/bigQueryExports/{export_id}" This field is provided in responses,
* and is ignored when provided in create requests.
*/
@com.google.api.client.util.Key
private java.lang.String name;
/** The relative resource name of this export. See:
https://cloud.google.com/apis/design/resource_names#relative_resource_name. Example format:
"organizations/{organization_id}/bigQueryExports/{export_id}" Example format:
"folders/{folder_id}/bigQueryExports/{export_id}" Example format:
"projects/{project_id}/bigQueryExports/{export_id}" This field is provided in responses, and is
ignored when provided in create requests.
*/
public java.lang.String getName() {
return name;
}
/**
* The relative resource name of this export. See:
* https://cloud.google.com/apis/design/resource_names#relative_resource_name. Example
* format: "organizations/{organization_id}/bigQueryExports/{export_id}" Example format:
* "folders/{folder_id}/bigQueryExports/{export_id}" Example format:
* "projects/{project_id}/bigQueryExports/{export_id}" This field is provided in responses,
* and is ignored when provided in create requests.
*/
public Patch setName(java.lang.String name) {
if (!getSuppressPatternChecks()) {
com.google.api.client.util.Preconditions.checkArgument(NAME_PATTERN.matcher(name).matches(),
"Parameter name must conform to the pattern " +
"^folders/[^/]+/bigQueryExports/[^/]+$");
}
this.name = name;
return this;
}
/** The list of fields to be updated. If empty all mutable fields will be updated. */
@com.google.api.client.util.Key
private String updateMask;
/** The list of fields to be updated. If empty all mutable fields will be updated.
*/
public String getUpdateMask() {
return updateMask;
}
/** The list of fields to be updated. If empty all mutable fields will be updated. */
public Patch setUpdateMask(String updateMask) {
this.updateMask = updateMask;
return this;
}
@Override
public Patch set(String parameterName, Object value) {
return (Patch) super.set(parameterName, value);
}
}
}
/**
* An accessor for creating requests from the EventThreatDetectionSettings collection.
*
* The typical use is:
*
* {@code SecurityCommandCenter securitycenter = new SecurityCommandCenter(...);}
* {@code SecurityCommandCenter.EventThreatDetectionSettings.List request = securitycenter.eventThreatDetectionSettings().list(parameters ...)}
*
*
* @return the resource collection
*/
public EventThreatDetectionSettings eventThreatDetectionSettings() {
return new EventThreatDetectionSettings();
}
/**
* The "eventThreatDetectionSettings" collection of methods.
*/
public class EventThreatDetectionSettings {
/**
* Validates the given Event Threat Detection custom module.
*
* Create a request for the method "eventThreatDetectionSettings.validateCustomModule".
*
* This request holds the parameters needed by the securitycenter server. After setting any
* optional parameters, call the {@link ValidateCustomModule#execute()} method to invoke the remote
* operation.
*
* @param parent Required. Resource name of the parent to validate the Custom Module under. Its format is: *
* `organizations/{organization}/eventThreatDetectionSettings`. *
* `folders/{folder}/eventThreatDetectionSettings`. *
* `projects/{project}/eventThreatDetectionSettings`.
* @param content the {@link com.google.api.services.securitycenter.v1.model.ValidateEventThreatDetectionCustomModuleRequest}
* @return the request
*/
public ValidateCustomModule validateCustomModule(java.lang.String parent, com.google.api.services.securitycenter.v1.model.ValidateEventThreatDetectionCustomModuleRequest content) throws java.io.IOException {
ValidateCustomModule result = new ValidateCustomModule(parent, content);
initialize(result);
return result;
}
public class ValidateCustomModule extends SecurityCommandCenterRequest {
private static final String REST_PATH = "v1/{+parent}:validateCustomModule";
private final java.util.regex.Pattern PARENT_PATTERN =
java.util.regex.Pattern.compile("^folders/[^/]+/eventThreatDetectionSettings$");
/**
* Validates the given Event Threat Detection custom module.
*
* Create a request for the method "eventThreatDetectionSettings.validateCustomModule".
*
* This request holds the parameters needed by the the securitycenter server. After setting any
* optional parameters, call the {@link ValidateCustomModule#execute()} method to invoke the
* remote operation. {@link ValidateCustomModule#initialize(com.google.api.client.googleapis.s
* ervices.AbstractGoogleClientRequest)} must be called to initialize this instance immediately
* after invoking the constructor.
*
* @param parent Required. Resource name of the parent to validate the Custom Module under. Its format is: *
* `organizations/{organization}/eventThreatDetectionSettings`. *
* `folders/{folder}/eventThreatDetectionSettings`. *
* `projects/{project}/eventThreatDetectionSettings`.
* @param content the {@link com.google.api.services.securitycenter.v1.model.ValidateEventThreatDetectionCustomModuleRequest}
* @since 1.13
*/
protected ValidateCustomModule(java.lang.String parent, com.google.api.services.securitycenter.v1.model.ValidateEventThreatDetectionCustomModuleRequest content) {
super(SecurityCommandCenter.this, "POST", REST_PATH, content, com.google.api.services.securitycenter.v1.model.ValidateEventThreatDetectionCustomModuleResponse.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 " +
"^folders/[^/]+/eventThreatDetectionSettings$");
}
}
@Override
public ValidateCustomModule set$Xgafv(java.lang.String $Xgafv) {
return (ValidateCustomModule) super.set$Xgafv($Xgafv);
}
@Override
public ValidateCustomModule setAccessToken(java.lang.String accessToken) {
return (ValidateCustomModule) super.setAccessToken(accessToken);
}
@Override
public ValidateCustomModule setAlt(java.lang.String alt) {
return (ValidateCustomModule) super.setAlt(alt);
}
@Override
public ValidateCustomModule setCallback(java.lang.String callback) {
return (ValidateCustomModule) super.setCallback(callback);
}
@Override
public ValidateCustomModule setFields(java.lang.String fields) {
return (ValidateCustomModule) super.setFields(fields);
}
@Override
public ValidateCustomModule setKey(java.lang.String key) {
return (ValidateCustomModule) super.setKey(key);
}
@Override
public ValidateCustomModule setOauthToken(java.lang.String oauthToken) {
return (ValidateCustomModule) super.setOauthToken(oauthToken);
}
@Override
public ValidateCustomModule setPrettyPrint(java.lang.Boolean prettyPrint) {
return (ValidateCustomModule) super.setPrettyPrint(prettyPrint);
}
@Override
public ValidateCustomModule setQuotaUser(java.lang.String quotaUser) {
return (ValidateCustomModule) super.setQuotaUser(quotaUser);
}
@Override
public ValidateCustomModule setUploadType(java.lang.String uploadType) {
return (ValidateCustomModule) super.setUploadType(uploadType);
}
@Override
public ValidateCustomModule setUploadProtocol(java.lang.String uploadProtocol) {
return (ValidateCustomModule) super.setUploadProtocol(uploadProtocol);
}
/**
* Required. Resource name of the parent to validate the Custom Module under. Its format is:
* * `organizations/{organization}/eventThreatDetectionSettings`. *
* `folders/{folder}/eventThreatDetectionSettings`. *
* `projects/{project}/eventThreatDetectionSettings`.
*/
@com.google.api.client.util.Key
private java.lang.String parent;
/** Required. Resource name of the parent to validate the Custom Module under. Its format is: *
`organizations/{organization}/eventThreatDetectionSettings`. *
`folders/{folder}/eventThreatDetectionSettings`. *
`projects/{project}/eventThreatDetectionSettings`.
*/
public java.lang.String getParent() {
return parent;
}
/**
* Required. Resource name of the parent to validate the Custom Module under. Its format is:
* * `organizations/{organization}/eventThreatDetectionSettings`. *
* `folders/{folder}/eventThreatDetectionSettings`. *
* `projects/{project}/eventThreatDetectionSettings`.
*/
public ValidateCustomModule 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 " +
"^folders/[^/]+/eventThreatDetectionSettings$");
}
this.parent = parent;
return this;
}
@Override
public ValidateCustomModule set(String parameterName, Object value) {
return (ValidateCustomModule) super.set(parameterName, value);
}
}
/**
* An accessor for creating requests from the CustomModules collection.
*
* The typical use is:
*
* {@code SecurityCommandCenter securitycenter = new SecurityCommandCenter(...);}
* {@code SecurityCommandCenter.CustomModules.List request = securitycenter.customModules().list(parameters ...)}
*
*
* @return the resource collection
*/
public CustomModules customModules() {
return new CustomModules();
}
/**
* The "customModules" collection of methods.
*/
public class CustomModules {
/**
* Creates a resident Event Threat Detection custom module at the scope of the given Resource
* Manager parent, and also creates inherited custom modules for all descendants of the given
* parent. These modules are enabled by default.
*
* Create a request for the method "customModules.create".
*
* This request holds the parameters needed by the securitycenter server. After setting any
* optional parameters, call the {@link Create#execute()} method to invoke the remote operation.
*
* @param parent Required. The new custom module's parent. Its format is: *
* `organizations/{organization}/eventThreatDetectionSettings`. *
* `folders/{folder}/eventThreatDetectionSettings`. *
* `projects/{project}/eventThreatDetectionSettings`.
* @param content the {@link com.google.api.services.securitycenter.v1.model.EventThreatDetectionCustomModule}
* @return the request
*/
public Create create(java.lang.String parent, com.google.api.services.securitycenter.v1.model.EventThreatDetectionCustomModule content) throws java.io.IOException {
Create result = new Create(parent, content);
initialize(result);
return result;
}
public class Create extends SecurityCommandCenterRequest {
private static final String REST_PATH = "v1/{+parent}/customModules";
private final java.util.regex.Pattern PARENT_PATTERN =
java.util.regex.Pattern.compile("^folders/[^/]+/eventThreatDetectionSettings$");
/**
* Creates a resident Event Threat Detection custom module at the scope of the given Resource
* Manager parent, and also creates inherited custom modules for all descendants of the given
* parent. These modules are enabled by default.
*
* Create a request for the method "customModules.create".
*
* This request holds the parameters needed by the the securitycenter server. After setting any
* optional parameters, call the {@link Create#execute()} method to invoke the remote operation.
* {@link
* Create#initialize(com.google.api.client.googleapis.services.AbstractGoogleClientRequest)} must
* be called to initialize this instance immediately after invoking the constructor.
*
* @param parent Required. The new custom module's parent. Its format is: *
* `organizations/{organization}/eventThreatDetectionSettings`. *
* `folders/{folder}/eventThreatDetectionSettings`. *
* `projects/{project}/eventThreatDetectionSettings`.
* @param content the {@link com.google.api.services.securitycenter.v1.model.EventThreatDetectionCustomModule}
* @since 1.13
*/
protected Create(java.lang.String parent, com.google.api.services.securitycenter.v1.model.EventThreatDetectionCustomModule content) {
super(SecurityCommandCenter.this, "POST", REST_PATH, content, com.google.api.services.securitycenter.v1.model.EventThreatDetectionCustomModule.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 " +
"^folders/[^/]+/eventThreatDetectionSettings$");
}
}
@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 new custom module's parent. Its format is: *
* `organizations/{organization}/eventThreatDetectionSettings`. *
* `folders/{folder}/eventThreatDetectionSettings`. *
* `projects/{project}/eventThreatDetectionSettings`.
*/
@com.google.api.client.util.Key
private java.lang.String parent;
/** Required. The new custom module's parent. Its format is: *
`organizations/{organization}/eventThreatDetectionSettings`. *
`folders/{folder}/eventThreatDetectionSettings`. *
`projects/{project}/eventThreatDetectionSettings`.
*/
public java.lang.String getParent() {
return parent;
}
/**
* Required. The new custom module's parent. Its format is: *
* `organizations/{organization}/eventThreatDetectionSettings`. *
* `folders/{folder}/eventThreatDetectionSettings`. *
* `projects/{project}/eventThreatDetectionSettings`.
*/
public Create setParent(java.lang.String parent) {
if (!getSuppressPatternChecks()) {
com.google.api.client.util.Preconditions.checkArgument(PARENT_PATTERN.matcher(parent).matches(),
"Parameter parent must conform to the pattern " +
"^folders/[^/]+/eventThreatDetectionSettings$");
}
this.parent = parent;
return this;
}
@Override
public Create set(String parameterName, Object value) {
return (Create) super.set(parameterName, value);
}
}
/**
* Deletes the specified Event Threat Detection custom module and all of its descendants in the
* Resource Manager hierarchy. This method is only supported for resident custom modules.
*
* Create a request for the method "customModules.delete".
*
* This request holds the parameters needed by the securitycenter server. After setting any
* optional parameters, call the {@link Delete#execute()} method to invoke the remote operation.
*
* @param name Required. Name of the custom module to delete. Its format is: *
* `organizations/{organization}/eventThreatDetectionSettings/customModules/{module}`. *
* `folders/{folder}/eventThreatDetectionSettings/customModules/{module}`. *
* `projects/{project}/eventThreatDetectionSettings/customModules/{module}`.
* @return the request
*/
public Delete delete(java.lang.String name) throws java.io.IOException {
Delete result = new Delete(name);
initialize(result);
return result;
}
public class Delete extends SecurityCommandCenterRequest {
private static final String REST_PATH = "v1/{+name}";
private final java.util.regex.Pattern NAME_PATTERN =
java.util.regex.Pattern.compile("^folders/[^/]+/eventThreatDetectionSettings/customModules/[^/]+$");
/**
* Deletes the specified Event Threat Detection custom module and all of its descendants in the
* Resource Manager hierarchy. This method is only supported for resident custom modules.
*
* Create a request for the method "customModules.delete".
*
* This request holds the parameters needed by the the securitycenter server. After setting any
* optional parameters, call the {@link Delete#execute()} method to invoke the remote operation.
* {@link
* Delete#initialize(com.google.api.client.googleapis.services.AbstractGoogleClientRequest)} must
* be called to initialize this instance immediately after invoking the constructor.
*
* @param name Required. Name of the custom module to delete. Its format is: *
* `organizations/{organization}/eventThreatDetectionSettings/customModules/{module}`. *
* `folders/{folder}/eventThreatDetectionSettings/customModules/{module}`. *
* `projects/{project}/eventThreatDetectionSettings/customModules/{module}`.
* @since 1.13
*/
protected Delete(java.lang.String name) {
super(SecurityCommandCenter.this, "DELETE", REST_PATH, null, com.google.api.services.securitycenter.v1.model.Empty.class);
this.name = com.google.api.client.util.Preconditions.checkNotNull(name, "Required parameter name must be specified.");
if (!getSuppressPatternChecks()) {
com.google.api.client.util.Preconditions.checkArgument(NAME_PATTERN.matcher(name).matches(),
"Parameter name must conform to the pattern " +
"^folders/[^/]+/eventThreatDetectionSettings/customModules/[^/]+$");
}
}
@Override
public Delete set$Xgafv(java.lang.String $Xgafv) {
return (Delete) super.set$Xgafv($Xgafv);
}
@Override
public Delete setAccessToken(java.lang.String accessToken) {
return (Delete) super.setAccessToken(accessToken);
}
@Override
public Delete setAlt(java.lang.String alt) {
return (Delete) super.setAlt(alt);
}
@Override
public Delete setCallback(java.lang.String callback) {
return (Delete) super.setCallback(callback);
}
@Override
public Delete setFields(java.lang.String fields) {
return (Delete) super.setFields(fields);
}
@Override
public Delete setKey(java.lang.String key) {
return (Delete) super.setKey(key);
}
@Override
public Delete setOauthToken(java.lang.String oauthToken) {
return (Delete) super.setOauthToken(oauthToken);
}
@Override
public Delete setPrettyPrint(java.lang.Boolean prettyPrint) {
return (Delete) super.setPrettyPrint(prettyPrint);
}
@Override
public Delete setQuotaUser(java.lang.String quotaUser) {
return (Delete) super.setQuotaUser(quotaUser);
}
@Override
public Delete setUploadType(java.lang.String uploadType) {
return (Delete) super.setUploadType(uploadType);
}
@Override
public Delete setUploadProtocol(java.lang.String uploadProtocol) {
return (Delete) super.setUploadProtocol(uploadProtocol);
}
/**
* Required. Name of the custom module to delete. Its format is: *
* `organizations/{organization}/eventThreatDetectionSettings/customModules/{module}`. *
* `folders/{folder}/eventThreatDetectionSettings/customModules/{module}`. *
* `projects/{project}/eventThreatDetectionSettings/customModules/{module}`.
*/
@com.google.api.client.util.Key
private java.lang.String name;
/** Required. Name of the custom module to delete. Its format is: *
`organizations/{organization}/eventThreatDetectionSettings/customModules/{module}`. *
`folders/{folder}/eventThreatDetectionSettings/customModules/{module}`. *
`projects/{project}/eventThreatDetectionSettings/customModules/{module}`.
*/
public java.lang.String getName() {
return name;
}
/**
* Required. Name of the custom module to delete. Its format is: *
* `organizations/{organization}/eventThreatDetectionSettings/customModules/{module}`. *
* `folders/{folder}/eventThreatDetectionSettings/customModules/{module}`. *
* `projects/{project}/eventThreatDetectionSettings/customModules/{module}`.
*/
public Delete setName(java.lang.String name) {
if (!getSuppressPatternChecks()) {
com.google.api.client.util.Preconditions.checkArgument(NAME_PATTERN.matcher(name).matches(),
"Parameter name must conform to the pattern " +
"^folders/[^/]+/eventThreatDetectionSettings/customModules/[^/]+$");
}
this.name = name;
return this;
}
@Override
public Delete set(String parameterName, Object value) {
return (Delete) super.set(parameterName, value);
}
}
/**
* Gets an Event Threat Detection custom module.
*
* Create a request for the method "customModules.get".
*
* This request holds the parameters needed by the securitycenter server. After setting any
* optional parameters, call the {@link Get#execute()} method to invoke the remote operation.
*
* @param name Required. Name of the custom module to get. Its format is: *
* `organizations/{organization}/eventThreatDetectionSettings/customModules/{module}`. *
* `folders/{folder}/eventThreatDetectionSettings/customModules/{module}`. *
* `projects/{project}/eventThreatDetectionSettings/customModules/{module}`.
* @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 SecurityCommandCenterRequest {
private static final String REST_PATH = "v1/{+name}";
private final java.util.regex.Pattern NAME_PATTERN =
java.util.regex.Pattern.compile("^folders/[^/]+/eventThreatDetectionSettings/customModules/[^/]+$");
/**
* Gets an Event Threat Detection custom module.
*
* Create a request for the method "customModules.get".
*
* This request holds the parameters needed by the the securitycenter 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. Name of the custom module to get. Its format is: *
* `organizations/{organization}/eventThreatDetectionSettings/customModules/{module}`. *
* `folders/{folder}/eventThreatDetectionSettings/customModules/{module}`. *
* `projects/{project}/eventThreatDetectionSettings/customModules/{module}`.
* @since 1.13
*/
protected Get(java.lang.String name) {
super(SecurityCommandCenter.this, "GET", REST_PATH, null, com.google.api.services.securitycenter.v1.model.EventThreatDetectionCustomModule.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 " +
"^folders/[^/]+/eventThreatDetectionSettings/customModules/[^/]+$");
}
}
@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. Name of the custom module to get. Its format is: *
* `organizations/{organization}/eventThreatDetectionSettings/customModules/{module}`. *
* `folders/{folder}/eventThreatDetectionSettings/customModules/{module}`. *
* `projects/{project}/eventThreatDetectionSettings/customModules/{module}`.
*/
@com.google.api.client.util.Key
private java.lang.String name;
/** Required. Name of the custom module to get. Its format is: *
`organizations/{organization}/eventThreatDetectionSettings/customModules/{module}`. *
`folders/{folder}/eventThreatDetectionSettings/customModules/{module}`. *
`projects/{project}/eventThreatDetectionSettings/customModules/{module}`.
*/
public java.lang.String getName() {
return name;
}
/**
* Required. Name of the custom module to get. Its format is: *
* `organizations/{organization}/eventThreatDetectionSettings/customModules/{module}`. *
* `folders/{folder}/eventThreatDetectionSettings/customModules/{module}`. *
* `projects/{project}/eventThreatDetectionSettings/customModules/{module}`.
*/
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 " +
"^folders/[^/]+/eventThreatDetectionSettings/customModules/[^/]+$");
}
this.name = name;
return this;
}
@Override
public Get set(String parameterName, Object value) {
return (Get) super.set(parameterName, value);
}
}
/**
* Lists all Event Threat Detection custom modules for the given Resource Manager parent. This
* includes resident modules defined at the scope of the parent along with modules inherited from
* ancestors.
*
* Create a request for the method "customModules.list".
*
* This request holds the parameters needed by the securitycenter server. After setting any
* optional parameters, call the {@link List#execute()} method to invoke the remote operation.
*
* @param parent Required. Name of the parent to list custom modules under. Its format is: *
* `organizations/{organization}/eventThreatDetectionSettings`. *
* `folders/{folder}/eventThreatDetectionSettings`. *
* `projects/{project}/eventThreatDetectionSettings`.
* @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 SecurityCommandCenterRequest {
private static final String REST_PATH = "v1/{+parent}/customModules";
private final java.util.regex.Pattern PARENT_PATTERN =
java.util.regex.Pattern.compile("^folders/[^/]+/eventThreatDetectionSettings$");
/**
* Lists all Event Threat Detection custom modules for the given Resource Manager parent. This
* includes resident modules defined at the scope of the parent along with modules inherited from
* ancestors.
*
* Create a request for the method "customModules.list".
*
* This request holds the parameters needed by the the securitycenter 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. Name of the parent to list custom modules under. Its format is: *
* `organizations/{organization}/eventThreatDetectionSettings`. *
* `folders/{folder}/eventThreatDetectionSettings`. *
* `projects/{project}/eventThreatDetectionSettings`.
* @since 1.13
*/
protected List(java.lang.String parent) {
super(SecurityCommandCenter.this, "GET", REST_PATH, null, com.google.api.services.securitycenter.v1.model.ListEventThreatDetectionCustomModulesResponse.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 " +
"^folders/[^/]+/eventThreatDetectionSettings$");
}
}
@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. Name of the parent to list custom modules under. Its format is: *
* `organizations/{organization}/eventThreatDetectionSettings`. *
* `folders/{folder}/eventThreatDetectionSettings`. *
* `projects/{project}/eventThreatDetectionSettings`.
*/
@com.google.api.client.util.Key
private java.lang.String parent;
/** Required. Name of the parent to list custom modules under. Its format is: *
`organizations/{organization}/eventThreatDetectionSettings`. *
`folders/{folder}/eventThreatDetectionSettings`. *
`projects/{project}/eventThreatDetectionSettings`.
*/
public java.lang.String getParent() {
return parent;
}
/**
* Required. Name of the parent to list custom modules under. Its format is: *
* `organizations/{organization}/eventThreatDetectionSettings`. *
* `folders/{folder}/eventThreatDetectionSettings`. *
* `projects/{project}/eventThreatDetectionSettings`.
*/
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 " +
"^folders/[^/]+/eventThreatDetectionSettings$");
}
this.parent = parent;
return this;
}
/**
* The maximum number of modules to return. The service may return fewer than this value.
* If unspecified, at most 10 configs will be returned. The maximum value is 1000; values
* above 1000 will be coerced to 1000.
*/
@com.google.api.client.util.Key
private java.lang.Integer pageSize;
/** The maximum number of modules to return. The service may return fewer than this value. If
unspecified, at most 10 configs will be returned. The maximum value is 1000; values above 1000 will
be coerced to 1000.
*/
public java.lang.Integer getPageSize() {
return pageSize;
}
/**
* The maximum number of modules to return. The service may return fewer than this value.
* If unspecified, at most 10 configs will be returned. The maximum value is 1000; values
* above 1000 will be coerced to 1000.
*/
public List setPageSize(java.lang.Integer pageSize) {
this.pageSize = pageSize;
return this;
}
/**
* A page token, received from a previous `ListEventThreatDetectionCustomModules` call.
* Provide this to retrieve the subsequent page. When paginating, all other parameters
* provided to `ListEventThreatDetectionCustomModules` must match the call that provided
* the page token.
*/
@com.google.api.client.util.Key
private java.lang.String pageToken;
/** A page token, received from a previous `ListEventThreatDetectionCustomModules` call. Provide this
to retrieve the subsequent page. When paginating, all other parameters provided to
`ListEventThreatDetectionCustomModules` must match the call that provided the page token.
*/
public java.lang.String getPageToken() {
return pageToken;
}
/**
* A page token, received from a previous `ListEventThreatDetectionCustomModules` call.
* Provide this to retrieve the subsequent page. When paginating, all other parameters
* provided to `ListEventThreatDetectionCustomModules` must match the call that provided
* the 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);
}
}
/**
* Lists all resident Event Threat Detection custom modules under the given Resource Manager parent
* and its descendants.
*
* Create a request for the method "customModules.listDescendant".
*
* This request holds the parameters needed by the securitycenter server. After setting any
* optional parameters, call the {@link ListDescendant#execute()} method to invoke the remote
* operation.
*
* @param parent Required. Name of the parent to list custom modules under. Its format is: *
* `organizations/{organization}/eventThreatDetectionSettings`. *
* `folders/{folder}/eventThreatDetectionSettings`. *
* `projects/{project}/eventThreatDetectionSettings`.
* @return the request
*/
public ListDescendant listDescendant(java.lang.String parent) throws java.io.IOException {
ListDescendant result = new ListDescendant(parent);
initialize(result);
return result;
}
public class ListDescendant extends SecurityCommandCenterRequest {
private static final String REST_PATH = "v1/{+parent}/customModules:listDescendant";
private final java.util.regex.Pattern PARENT_PATTERN =
java.util.regex.Pattern.compile("^folders/[^/]+/eventThreatDetectionSettings$");
/**
* Lists all resident Event Threat Detection custom modules under the given Resource Manager
* parent and its descendants.
*
* Create a request for the method "customModules.listDescendant".
*
* This request holds the parameters needed by the the securitycenter server. After setting any
* optional parameters, call the {@link ListDescendant#execute()} method to invoke the remote
* operation. {@link ListDescendant#initialize(com.google.api.client.googleapis.services.Abstr
* actGoogleClientRequest)} must be called to initialize this instance immediately after invoking
* the constructor.
*
* @param parent Required. Name of the parent to list custom modules under. Its format is: *
* `organizations/{organization}/eventThreatDetectionSettings`. *
* `folders/{folder}/eventThreatDetectionSettings`. *
* `projects/{project}/eventThreatDetectionSettings`.
* @since 1.13
*/
protected ListDescendant(java.lang.String parent) {
super(SecurityCommandCenter.this, "GET", REST_PATH, null, com.google.api.services.securitycenter.v1.model.ListDescendantEventThreatDetectionCustomModulesResponse.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 " +
"^folders/[^/]+/eventThreatDetectionSettings$");
}
}
@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 ListDescendant set$Xgafv(java.lang.String $Xgafv) {
return (ListDescendant) super.set$Xgafv($Xgafv);
}
@Override
public ListDescendant setAccessToken(java.lang.String accessToken) {
return (ListDescendant) super.setAccessToken(accessToken);
}
@Override
public ListDescendant setAlt(java.lang.String alt) {
return (ListDescendant) super.setAlt(alt);
}
@Override
public ListDescendant setCallback(java.lang.String callback) {
return (ListDescendant) super.setCallback(callback);
}
@Override
public ListDescendant setFields(java.lang.String fields) {
return (ListDescendant) super.setFields(fields);
}
@Override
public ListDescendant setKey(java.lang.String key) {
return (ListDescendant) super.setKey(key);
}
@Override
public ListDescendant setOauthToken(java.lang.String oauthToken) {
return (ListDescendant) super.setOauthToken(oauthToken);
}
@Override
public ListDescendant setPrettyPrint(java.lang.Boolean prettyPrint) {
return (ListDescendant) super.setPrettyPrint(prettyPrint);
}
@Override
public ListDescendant setQuotaUser(java.lang.String quotaUser) {
return (ListDescendant) super.setQuotaUser(quotaUser);
}
@Override
public ListDescendant setUploadType(java.lang.String uploadType) {
return (ListDescendant) super.setUploadType(uploadType);
}
@Override
public ListDescendant setUploadProtocol(java.lang.String uploadProtocol) {
return (ListDescendant) super.setUploadProtocol(uploadProtocol);
}
/**
* Required. Name of the parent to list custom modules under. Its format is: *
* `organizations/{organization}/eventThreatDetectionSettings`. *
* `folders/{folder}/eventThreatDetectionSettings`. *
* `projects/{project}/eventThreatDetectionSettings`.
*/
@com.google.api.client.util.Key
private java.lang.String parent;
/** Required. Name of the parent to list custom modules under. Its format is: *
`organizations/{organization}/eventThreatDetectionSettings`. *
`folders/{folder}/eventThreatDetectionSettings`. *
`projects/{project}/eventThreatDetectionSettings`.
*/
public java.lang.String getParent() {
return parent;
}
/**
* Required. Name of the parent to list custom modules under. Its format is: *
* `organizations/{organization}/eventThreatDetectionSettings`. *
* `folders/{folder}/eventThreatDetectionSettings`. *
* `projects/{project}/eventThreatDetectionSettings`.
*/
public ListDescendant 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 " +
"^folders/[^/]+/eventThreatDetectionSettings$");
}
this.parent = parent;
return this;
}
/**
* The maximum number of modules to return. The service may return fewer than this value.
* If unspecified, at most 10 configs will be returned. The maximum value is 1000; values
* above 1000 will be coerced to 1000.
*/
@com.google.api.client.util.Key
private java.lang.Integer pageSize;
/** The maximum number of modules to return. The service may return fewer than this value. If
unspecified, at most 10 configs will be returned. The maximum value is 1000; values above 1000 will
be coerced to 1000.
*/
public java.lang.Integer getPageSize() {
return pageSize;
}
/**
* The maximum number of modules to return. The service may return fewer than this value.
* If unspecified, at most 10 configs will be returned. The maximum value is 1000; values
* above 1000 will be coerced to 1000.
*/
public ListDescendant setPageSize(java.lang.Integer pageSize) {
this.pageSize = pageSize;
return this;
}
/**
* A page token, received from a previous
* `ListDescendantEventThreatDetectionCustomModules` call. Provide this to retrieve the
* subsequent page. When paginating, all other parameters provided to
* `ListDescendantEventThreatDetectionCustomModules` must match the call that provided the
* page token.
*/
@com.google.api.client.util.Key
private java.lang.String pageToken;
/** A page token, received from a previous `ListDescendantEventThreatDetectionCustomModules` call.
Provide this to retrieve the subsequent page. When paginating, all other parameters provided to
`ListDescendantEventThreatDetectionCustomModules` must match the call that provided the page token.
*/
public java.lang.String getPageToken() {
return pageToken;
}
/**
* A page token, received from a previous
* `ListDescendantEventThreatDetectionCustomModules` call. Provide this to retrieve the
* subsequent page. When paginating, all other parameters provided to
* `ListDescendantEventThreatDetectionCustomModules` must match the call that provided the
* page token.
*/
public ListDescendant setPageToken(java.lang.String pageToken) {
this.pageToken = pageToken;
return this;
}
@Override
public ListDescendant set(String parameterName, Object value) {
return (ListDescendant) super.set(parameterName, value);
}
}
/**
* Updates the Event Threat Detection custom module with the given name based on the given update
* mask. Updating the enablement state is supported for both resident and inherited modules (though
* resident modules cannot have an enablement state of "inherited"). Updating the display name or
* configuration of a module is supported for resident modules only. The type of a module cannot be
* changed.
*
* Create a request for the method "customModules.patch".
*
* This request holds the parameters needed by the securitycenter server. After setting any
* optional parameters, call the {@link Patch#execute()} method to invoke the remote operation.
*
* @param name Immutable. The resource name of the Event Threat Detection custom module. Its format is: *
* `organizations/{organization}/eventThreatDetectionSettings/customModules/{module}`. *
* `folders/{folder}/eventThreatDetectionSettings/customModules/{module}`. *
* `projects/{project}/eventThreatDetectionSettings/customModules/{module}`.
* @param content the {@link com.google.api.services.securitycenter.v1.model.EventThreatDetectionCustomModule}
* @return the request
*/
public Patch patch(java.lang.String name, com.google.api.services.securitycenter.v1.model.EventThreatDetectionCustomModule content) throws java.io.IOException {
Patch result = new Patch(name, content);
initialize(result);
return result;
}
public class Patch extends SecurityCommandCenterRequest {
private static final String REST_PATH = "v1/{+name}";
private final java.util.regex.Pattern NAME_PATTERN =
java.util.regex.Pattern.compile("^folders/[^/]+/eventThreatDetectionSettings/customModules/[^/]+$");
/**
* Updates the Event Threat Detection custom module with the given name based on the given update
* mask. Updating the enablement state is supported for both resident and inherited modules
* (though resident modules cannot have an enablement state of "inherited"). Updating the display
* name or configuration of a module is supported for resident modules only. The type of a module
* cannot be changed.
*
* Create a request for the method "customModules.patch".
*
* This request holds the parameters needed by the the securitycenter server. After setting any
* optional parameters, call the {@link Patch#execute()} method to invoke the remote operation.
* {@link
* Patch#initialize(com.google.api.client.googleapis.services.AbstractGoogleClientRequest)} must
* be called to initialize this instance immediately after invoking the constructor.
*
* @param name Immutable. The resource name of the Event Threat Detection custom module. Its format is: *
* `organizations/{organization}/eventThreatDetectionSettings/customModules/{module}`. *
* `folders/{folder}/eventThreatDetectionSettings/customModules/{module}`. *
* `projects/{project}/eventThreatDetectionSettings/customModules/{module}`.
* @param content the {@link com.google.api.services.securitycenter.v1.model.EventThreatDetectionCustomModule}
* @since 1.13
*/
protected Patch(java.lang.String name, com.google.api.services.securitycenter.v1.model.EventThreatDetectionCustomModule content) {
super(SecurityCommandCenter.this, "PATCH", REST_PATH, content, com.google.api.services.securitycenter.v1.model.EventThreatDetectionCustomModule.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 " +
"^folders/[^/]+/eventThreatDetectionSettings/customModules/[^/]+$");
}
}
@Override
public Patch set$Xgafv(java.lang.String $Xgafv) {
return (Patch) super.set$Xgafv($Xgafv);
}
@Override
public Patch setAccessToken(java.lang.String accessToken) {
return (Patch) super.setAccessToken(accessToken);
}
@Override
public Patch setAlt(java.lang.String alt) {
return (Patch) super.setAlt(alt);
}
@Override
public Patch setCallback(java.lang.String callback) {
return (Patch) super.setCallback(callback);
}
@Override
public Patch setFields(java.lang.String fields) {
return (Patch) super.setFields(fields);
}
@Override
public Patch setKey(java.lang.String key) {
return (Patch) super.setKey(key);
}
@Override
public Patch setOauthToken(java.lang.String oauthToken) {
return (Patch) super.setOauthToken(oauthToken);
}
@Override
public Patch setPrettyPrint(java.lang.Boolean prettyPrint) {
return (Patch) super.setPrettyPrint(prettyPrint);
}
@Override
public Patch setQuotaUser(java.lang.String quotaUser) {
return (Patch) super.setQuotaUser(quotaUser);
}
@Override
public Patch setUploadType(java.lang.String uploadType) {
return (Patch) super.setUploadType(uploadType);
}
@Override
public Patch setUploadProtocol(java.lang.String uploadProtocol) {
return (Patch) super.setUploadProtocol(uploadProtocol);
}
/**
* Immutable. The resource name of the Event Threat Detection custom module. Its format
* is: *
* `organizations/{organization}/eventThreatDetectionSettings/customModules/{module}`. *
* `folders/{folder}/eventThreatDetectionSettings/customModules/{module}`. *
* `projects/{project}/eventThreatDetectionSettings/customModules/{module}`.
*/
@com.google.api.client.util.Key
private java.lang.String name;
/** Immutable. The resource name of the Event Threat Detection custom module. Its format is: *
`organizations/{organization}/eventThreatDetectionSettings/customModules/{module}`. *
`folders/{folder}/eventThreatDetectionSettings/customModules/{module}`. *
`projects/{project}/eventThreatDetectionSettings/customModules/{module}`.
*/
public java.lang.String getName() {
return name;
}
/**
* Immutable. The resource name of the Event Threat Detection custom module. Its format
* is: *
* `organizations/{organization}/eventThreatDetectionSettings/customModules/{module}`. *
* `folders/{folder}/eventThreatDetectionSettings/customModules/{module}`. *
* `projects/{project}/eventThreatDetectionSettings/customModules/{module}`.
*/
public Patch setName(java.lang.String name) {
if (!getSuppressPatternChecks()) {
com.google.api.client.util.Preconditions.checkArgument(NAME_PATTERN.matcher(name).matches(),
"Parameter name must conform to the pattern " +
"^folders/[^/]+/eventThreatDetectionSettings/customModules/[^/]+$");
}
this.name = name;
return this;
}
/** The list of fields to be updated. If empty all mutable fields will be updated. */
@com.google.api.client.util.Key
private String updateMask;
/** The list of fields to be updated. If empty all mutable fields will be updated.
*/
public String getUpdateMask() {
return updateMask;
}
/** The list of fields to be updated. If empty all mutable fields will be updated. */
public Patch setUpdateMask(String updateMask) {
this.updateMask = updateMask;
return this;
}
@Override
public Patch set(String parameterName, Object value) {
return (Patch) super.set(parameterName, value);
}
}
}
/**
* An accessor for creating requests from the EffectiveCustomModules collection.
*
* The typical use is:
*
* {@code SecurityCommandCenter securitycenter = new SecurityCommandCenter(...);}
* {@code SecurityCommandCenter.EffectiveCustomModules.List request = securitycenter.effectiveCustomModules().list(parameters ...)}
*
*
* @return the resource collection
*/
public EffectiveCustomModules effectiveCustomModules() {
return new EffectiveCustomModules();
}
/**
* The "effectiveCustomModules" collection of methods.
*/
public class EffectiveCustomModules {
/**
* Gets an effective Event Threat Detection custom module at the given level.
*
* Create a request for the method "effectiveCustomModules.get".
*
* This request holds the parameters needed by the securitycenter server. After setting any
* optional parameters, call the {@link Get#execute()} method to invoke the remote operation.
*
* @param name Required. The resource name of the effective Event Threat Detection custom module. Its format is: *
* `organizations/{organization}/eventThreatDetectionSettings/effectiveCustomModules/{module}
* `. * `folders/{folder}/eventThreatDetectionSettings/effectiveCustomModules/{module}`. *
* `projects/{project}/eventThreatDetectionSettings/effectiveCustomModules/{module}`.
* @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 SecurityCommandCenterRequest {
private static final String REST_PATH = "v1/{+name}";
private final java.util.regex.Pattern NAME_PATTERN =
java.util.regex.Pattern.compile("^folders/[^/]+/eventThreatDetectionSettings/effectiveCustomModules/[^/]+$");
/**
* Gets an effective Event Threat Detection custom module at the given level.
*
* Create a request for the method "effectiveCustomModules.get".
*
* This request holds the parameters needed by the the securitycenter server. After setting any
* optional parameters, call the {@link Get#execute()} method to invoke the remote operation.
* {@link Get#initialize(com.google.api.client.googleapis.services.AbstractGoogleClientRequest)}
* must be called to initialize this instance immediately after invoking the constructor.
*
* @param name Required. The resource name of the effective Event Threat Detection custom module. Its format is: *
* `organizations/{organization}/eventThreatDetectionSettings/effectiveCustomModules/{module}
* `. * `folders/{folder}/eventThreatDetectionSettings/effectiveCustomModules/{module}`. *
* `projects/{project}/eventThreatDetectionSettings/effectiveCustomModules/{module}`.
* @since 1.13
*/
protected Get(java.lang.String name) {
super(SecurityCommandCenter.this, "GET", REST_PATH, null, com.google.api.services.securitycenter.v1.model.EffectiveEventThreatDetectionCustomModule.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 " +
"^folders/[^/]+/eventThreatDetectionSettings/effectiveCustomModules/[^/]+$");
}
}
@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 resource name of the effective Event Threat Detection custom module. Its
* format is: * `organizations/{organization}/eventThreatDetectionSettings/effectiveCustom
* Modules/{module}`. *
* `folders/{folder}/eventThreatDetectionSettings/effectiveCustomModules/{module}`. *
* `projects/{project}/eventThreatDetectionSettings/effectiveCustomModules/{module}`.
*/
@com.google.api.client.util.Key
private java.lang.String name;
/** Required. The resource name of the effective Event Threat Detection custom module. Its format is: *
`organizations/{organization}/eventThreatDetectionSettings/effectiveCustomModules/{module}`. *
`folders/{folder}/eventThreatDetectionSettings/effectiveCustomModules/{module}`. *
`projects/{project}/eventThreatDetectionSettings/effectiveCustomModules/{module}`.
*/
public java.lang.String getName() {
return name;
}
/**
* Required. The resource name of the effective Event Threat Detection custom module. Its
* format is: * `organizations/{organization}/eventThreatDetectionSettings/effectiveCustom
* Modules/{module}`. *
* `folders/{folder}/eventThreatDetectionSettings/effectiveCustomModules/{module}`. *
* `projects/{project}/eventThreatDetectionSettings/effectiveCustomModules/{module}`.
*/
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 " +
"^folders/[^/]+/eventThreatDetectionSettings/effectiveCustomModules/[^/]+$");
}
this.name = name;
return this;
}
@Override
public Get set(String parameterName, Object value) {
return (Get) super.set(parameterName, value);
}
}
/**
* Lists all effective Event Threat Detection custom modules for the given parent. This includes
* resident modules defined at the scope of the parent along with modules inherited from its
* ancestors.
*
* Create a request for the method "effectiveCustomModules.list".
*
* This request holds the parameters needed by the securitycenter server. After setting any
* optional parameters, call the {@link List#execute()} method to invoke the remote operation.
*
* @param parent Required. Name of the parent to list custom modules for. Its format is: *
* `organizations/{organization}/eventThreatDetectionSettings`. *
* `folders/{folder}/eventThreatDetectionSettings`. *
* `projects/{project}/eventThreatDetectionSettings`.
* @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 SecurityCommandCenterRequest {
private static final String REST_PATH = "v1/{+parent}/effectiveCustomModules";
private final java.util.regex.Pattern PARENT_PATTERN =
java.util.regex.Pattern.compile("^folders/[^/]+/eventThreatDetectionSettings$");
/**
* Lists all effective Event Threat Detection custom modules for the given parent. This includes
* resident modules defined at the scope of the parent along with modules inherited from its
* ancestors.
*
* Create a request for the method "effectiveCustomModules.list".
*
* This request holds the parameters needed by the the securitycenter 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. Name of the parent to list custom modules for. Its format is: *
* `organizations/{organization}/eventThreatDetectionSettings`. *
* `folders/{folder}/eventThreatDetectionSettings`. *
* `projects/{project}/eventThreatDetectionSettings`.
* @since 1.13
*/
protected List(java.lang.String parent) {
super(SecurityCommandCenter.this, "GET", REST_PATH, null, com.google.api.services.securitycenter.v1.model.ListEffectiveEventThreatDetectionCustomModulesResponse.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 " +
"^folders/[^/]+/eventThreatDetectionSettings$");
}
}
@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. Name of the parent to list custom modules for. Its format is: *
* `organizations/{organization}/eventThreatDetectionSettings`. *
* `folders/{folder}/eventThreatDetectionSettings`. *
* `projects/{project}/eventThreatDetectionSettings`.
*/
@com.google.api.client.util.Key
private java.lang.String parent;
/** Required. Name of the parent to list custom modules for. Its format is: *
`organizations/{organization}/eventThreatDetectionSettings`. *
`folders/{folder}/eventThreatDetectionSettings`. *
`projects/{project}/eventThreatDetectionSettings`.
*/
public java.lang.String getParent() {
return parent;
}
/**
* Required. Name of the parent to list custom modules for. Its format is: *
* `organizations/{organization}/eventThreatDetectionSettings`. *
* `folders/{folder}/eventThreatDetectionSettings`. *
* `projects/{project}/eventThreatDetectionSettings`.
*/
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 " +
"^folders/[^/]+/eventThreatDetectionSettings$");
}
this.parent = parent;
return this;
}
/**
* The maximum number of modules to return. The service may return fewer than this value.
* If unspecified, at most 10 configs will be returned. The maximum value is 1000; values
* above 1000 will be coerced to 1000.
*/
@com.google.api.client.util.Key
private java.lang.Integer pageSize;
/** The maximum number of modules to return. The service may return fewer than this value. If
unspecified, at most 10 configs will be returned. The maximum value is 1000; values above 1000 will
be coerced to 1000.
*/
public java.lang.Integer getPageSize() {
return pageSize;
}
/**
* The maximum number of modules to return. The service may return fewer than this value.
* If unspecified, at most 10 configs will be returned. The maximum value is 1000; values
* above 1000 will be coerced to 1000.
*/
public List setPageSize(java.lang.Integer pageSize) {
this.pageSize = pageSize;
return this;
}
/**
* A page token, received from a previous `ListEffectiveEventThreatDetectionCustomModules`
* call. Provide this to retrieve the subsequent page. When paginating, all other
* parameters provided to `ListEffectiveEventThreatDetectionCustomModules` must match the
* call that provided the page token.
*/
@com.google.api.client.util.Key
private java.lang.String pageToken;
/** A page token, received from a previous `ListEffectiveEventThreatDetectionCustomModules` call.
Provide this to retrieve the subsequent page. When paginating, all other parameters provided to
`ListEffectiveEventThreatDetectionCustomModules` must match the call that provided the page token.
*/
public java.lang.String getPageToken() {
return pageToken;
}
/**
* A page token, received from a previous `ListEffectiveEventThreatDetectionCustomModules`
* call. Provide this to retrieve the subsequent page. When paginating, all other
* parameters provided to `ListEffectiveEventThreatDetectionCustomModules` must match the
* call that provided the 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 Findings collection.
*
* The typical use is:
*
* {@code SecurityCommandCenter securitycenter = new SecurityCommandCenter(...);}
* {@code SecurityCommandCenter.Findings.List request = securitycenter.findings().list(parameters ...)}
*
*
* @return the resource collection
*/
public Findings findings() {
return new Findings();
}
/**
* The "findings" collection of methods.
*/
public class Findings {
/**
* Kicks off an LRO to bulk mute findings for a parent based on a filter. The parent can be either
* an organization, folder or project. The findings matched by the filter will be muted after the
* LRO is done.
*
* Create a request for the method "findings.bulkMute".
*
* This request holds the parameters needed by the securitycenter server. After setting any
* optional parameters, call the {@link BulkMute#execute()} method to invoke the remote operation.
*
* @param parent Required. The parent, at which bulk action needs to be applied. Its format is
* `organizations/[organization_id]`, `folders/[folder_id]`, `projects/[project_id]`.
* @param content the {@link com.google.api.services.securitycenter.v1.model.BulkMuteFindingsRequest}
* @return the request
*/
public BulkMute bulkMute(java.lang.String parent, com.google.api.services.securitycenter.v1.model.BulkMuteFindingsRequest content) throws java.io.IOException {
BulkMute result = new BulkMute(parent, content);
initialize(result);
return result;
}
public class BulkMute extends SecurityCommandCenterRequest {
private static final String REST_PATH = "v1/{+parent}/findings:bulkMute";
private final java.util.regex.Pattern PARENT_PATTERN =
java.util.regex.Pattern.compile("^folders/[^/]+$");
/**
* Kicks off an LRO to bulk mute findings for a parent based on a filter. The parent can be either
* an organization, folder or project. The findings matched by the filter will be muted after the
* LRO is done.
*
* Create a request for the method "findings.bulkMute".
*
* This request holds the parameters needed by the the securitycenter server. After setting any
* optional parameters, call the {@link BulkMute#execute()} method to invoke the remote operation.
* {@link
* BulkMute#initialize(com.google.api.client.googleapis.services.AbstractGoogleClientRequest)}
* must be called to initialize this instance immediately after invoking the constructor.
*
* @param parent Required. The parent, at which bulk action needs to be applied. Its format is
* `organizations/[organization_id]`, `folders/[folder_id]`, `projects/[project_id]`.
* @param content the {@link com.google.api.services.securitycenter.v1.model.BulkMuteFindingsRequest}
* @since 1.13
*/
protected BulkMute(java.lang.String parent, com.google.api.services.securitycenter.v1.model.BulkMuteFindingsRequest content) {
super(SecurityCommandCenter.this, "POST", REST_PATH, content, com.google.api.services.securitycenter.v1.model.Operation.class);
this.parent = com.google.api.client.util.Preconditions.checkNotNull(parent, "Required parameter parent must be specified.");
if (!getSuppressPatternChecks()) {
com.google.api.client.util.Preconditions.checkArgument(PARENT_PATTERN.matcher(parent).matches(),
"Parameter parent must conform to the pattern " +
"^folders/[^/]+$");
}
}
@Override
public BulkMute set$Xgafv(java.lang.String $Xgafv) {
return (BulkMute) super.set$Xgafv($Xgafv);
}
@Override
public BulkMute setAccessToken(java.lang.String accessToken) {
return (BulkMute) super.setAccessToken(accessToken);
}
@Override
public BulkMute setAlt(java.lang.String alt) {
return (BulkMute) super.setAlt(alt);
}
@Override
public BulkMute setCallback(java.lang.String callback) {
return (BulkMute) super.setCallback(callback);
}
@Override
public BulkMute setFields(java.lang.String fields) {
return (BulkMute) super.setFields(fields);
}
@Override
public BulkMute setKey(java.lang.String key) {
return (BulkMute) super.setKey(key);
}
@Override
public BulkMute setOauthToken(java.lang.String oauthToken) {
return (BulkMute) super.setOauthToken(oauthToken);
}
@Override
public BulkMute setPrettyPrint(java.lang.Boolean prettyPrint) {
return (BulkMute) super.setPrettyPrint(prettyPrint);
}
@Override
public BulkMute setQuotaUser(java.lang.String quotaUser) {
return (BulkMute) super.setQuotaUser(quotaUser);
}
@Override
public BulkMute setUploadType(java.lang.String uploadType) {
return (BulkMute) super.setUploadType(uploadType);
}
@Override
public BulkMute setUploadProtocol(java.lang.String uploadProtocol) {
return (BulkMute) super.setUploadProtocol(uploadProtocol);
}
/**
* Required. The parent, at which bulk action needs to be applied. Its format is
* `organizations/[organization_id]`, `folders/[folder_id]`, `projects/[project_id]`.
*/
@com.google.api.client.util.Key
private java.lang.String parent;
/** Required. The parent, at which bulk action needs to be applied. Its format is
`organizations/[organization_id]`, `folders/[folder_id]`, `projects/[project_id]`.
*/
public java.lang.String getParent() {
return parent;
}
/**
* Required. The parent, at which bulk action needs to be applied. Its format is
* `organizations/[organization_id]`, `folders/[folder_id]`, `projects/[project_id]`.
*/
public BulkMute 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 " +
"^folders/[^/]+$");
}
this.parent = parent;
return this;
}
@Override
public BulkMute set(String parameterName, Object value) {
return (BulkMute) super.set(parameterName, value);
}
}
}
/**
* An accessor for creating requests from the Locations collection.
*
* The typical use is:
*
* {@code SecurityCommandCenter securitycenter = new SecurityCommandCenter(...);}
* {@code SecurityCommandCenter.Locations.List request = securitycenter.locations().list(parameters ...)}
*
*
* @return the resource collection
*/
public Locations locations() {
return new Locations();
}
/**
* The "locations" collection of methods.
*/
public class Locations {
/**
* An accessor for creating requests from the MuteConfigs collection.
*
* The typical use is:
*
* {@code SecurityCommandCenter securitycenter = new SecurityCommandCenter(...);}
* {@code SecurityCommandCenter.MuteConfigs.List request = securitycenter.muteConfigs().list(parameters ...)}
*
*
* @return the resource collection
*/
public MuteConfigs muteConfigs() {
return new MuteConfigs();
}
/**
* The "muteConfigs" collection of methods.
*/
public class MuteConfigs {
/**
* Deletes an existing mute config.
*
* Create a request for the method "muteConfigs.delete".
*
* This request holds the parameters needed by the securitycenter server. After setting any
* optional parameters, call the {@link Delete#execute()} method to invoke the remote operation.
*
* @param name Required. Name of the mute config to delete. Its format is
* `organizations/{organization}/muteConfigs/{config_id}`,
* `folders/{folder}/muteConfigs/{config_id}`, `projects/{project}/muteConfigs/{config_id}`,
* `organizations/{organization}/locations/global/muteConfigs/{config_id}`,
* `folders/{folder}/locations/global/muteConfigs/{config_id}`, or
* `projects/{project}/locations/global/muteConfigs/{config_id}`.
* @return the request
*/
public Delete delete(java.lang.String name) throws java.io.IOException {
Delete result = new Delete(name);
initialize(result);
return result;
}
public class Delete extends SecurityCommandCenterRequest {
private static final String REST_PATH = "v1/{+name}";
private final java.util.regex.Pattern NAME_PATTERN =
java.util.regex.Pattern.compile("^folders/[^/]+/locations/[^/]+/muteConfigs/[^/]+$");
/**
* Deletes an existing mute config.
*
* Create a request for the method "muteConfigs.delete".
*
* This request holds the parameters needed by the the securitycenter server. After setting any
* optional parameters, call the {@link Delete#execute()} method to invoke the remote operation.
* {@link
* Delete#initialize(com.google.api.client.googleapis.services.AbstractGoogleClientRequest)} must
* be called to initialize this instance immediately after invoking the constructor.
*
* @param name Required. Name of the mute config to delete. Its format is
* `organizations/{organization}/muteConfigs/{config_id}`,
* `folders/{folder}/muteConfigs/{config_id}`, `projects/{project}/muteConfigs/{config_id}`,
* `organizations/{organization}/locations/global/muteConfigs/{config_id}`,
* `folders/{folder}/locations/global/muteConfigs/{config_id}`, or
* `projects/{project}/locations/global/muteConfigs/{config_id}`.
* @since 1.13
*/
protected Delete(java.lang.String name) {
super(SecurityCommandCenter.this, "DELETE", REST_PATH, null, com.google.api.services.securitycenter.v1.model.Empty.class);
this.name = com.google.api.client.util.Preconditions.checkNotNull(name, "Required parameter name must be specified.");
if (!getSuppressPatternChecks()) {
com.google.api.client.util.Preconditions.checkArgument(NAME_PATTERN.matcher(name).matches(),
"Parameter name must conform to the pattern " +
"^folders/[^/]+/locations/[^/]+/muteConfigs/[^/]+$");
}
}
@Override
public Delete set$Xgafv(java.lang.String $Xgafv) {
return (Delete) super.set$Xgafv($Xgafv);
}
@Override
public Delete setAccessToken(java.lang.String accessToken) {
return (Delete) super.setAccessToken(accessToken);
}
@Override
public Delete setAlt(java.lang.String alt) {
return (Delete) super.setAlt(alt);
}
@Override
public Delete setCallback(java.lang.String callback) {
return (Delete) super.setCallback(callback);
}
@Override
public Delete setFields(java.lang.String fields) {
return (Delete) super.setFields(fields);
}
@Override
public Delete setKey(java.lang.String key) {
return (Delete) super.setKey(key);
}
@Override
public Delete setOauthToken(java.lang.String oauthToken) {
return (Delete) super.setOauthToken(oauthToken);
}
@Override
public Delete setPrettyPrint(java.lang.Boolean prettyPrint) {
return (Delete) super.setPrettyPrint(prettyPrint);
}
@Override
public Delete setQuotaUser(java.lang.String quotaUser) {
return (Delete) super.setQuotaUser(quotaUser);
}
@Override
public Delete setUploadType(java.lang.String uploadType) {
return (Delete) super.setUploadType(uploadType);
}
@Override
public Delete setUploadProtocol(java.lang.String uploadProtocol) {
return (Delete) super.setUploadProtocol(uploadProtocol);
}
/**
* Required. Name of the mute config to delete. Its format is
* `organizations/{organization}/muteConfigs/{config_id}`,
* `folders/{folder}/muteConfigs/{config_id}`,
* `projects/{project}/muteConfigs/{config_id}`,
* `organizations/{organization}/locations/global/muteConfigs/{config_id}`,
* `folders/{folder}/locations/global/muteConfigs/{config_id}`, or
* `projects/{project}/locations/global/muteConfigs/{config_id}`.
*/
@com.google.api.client.util.Key
private java.lang.String name;
/** Required. Name of the mute config to delete. Its format is
`organizations/{organization}/muteConfigs/{config_id}`, `folders/{folder}/muteConfigs/{config_id}`,
`projects/{project}/muteConfigs/{config_id}`,
`organizations/{organization}/locations/global/muteConfigs/{config_id}`,
`folders/{folder}/locations/global/muteConfigs/{config_id}`, or
`projects/{project}/locations/global/muteConfigs/{config_id}`.
*/
public java.lang.String getName() {
return name;
}
/**
* Required. Name of the mute config to delete. Its format is
* `organizations/{organization}/muteConfigs/{config_id}`,
* `folders/{folder}/muteConfigs/{config_id}`,
* `projects/{project}/muteConfigs/{config_id}`,
* `organizations/{organization}/locations/global/muteConfigs/{config_id}`,
* `folders/{folder}/locations/global/muteConfigs/{config_id}`, or
* `projects/{project}/locations/global/muteConfigs/{config_id}`.
*/
public Delete setName(java.lang.String name) {
if (!getSuppressPatternChecks()) {
com.google.api.client.util.Preconditions.checkArgument(NAME_PATTERN.matcher(name).matches(),
"Parameter name must conform to the pattern " +
"^folders/[^/]+/locations/[^/]+/muteConfigs/[^/]+$");
}
this.name = name;
return this;
}
@Override
public Delete set(String parameterName, Object value) {
return (Delete) super.set(parameterName, value);
}
}
/**
* Gets a mute config.
*
* Create a request for the method "muteConfigs.get".
*
* This request holds the parameters needed by the securitycenter server. After setting any
* optional parameters, call the {@link Get#execute()} method to invoke the remote operation.
*
* @param name Required. Name of the mute config to retrieve. Its format is
* `organizations/{organization}/muteConfigs/{config_id}`,
* `folders/{folder}/muteConfigs/{config_id}`, `projects/{project}/muteConfigs/{config_id}`,
* `organizations/{organization}/locations/global/muteConfigs/{config_id}`,
* `folders/{folder}/locations/global/muteConfigs/{config_id}`, or
* `projects/{project}/locations/global/muteConfigs/{config_id}`.
* @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 SecurityCommandCenterRequest {
private static final String REST_PATH = "v1/{+name}";
private final java.util.regex.Pattern NAME_PATTERN =
java.util.regex.Pattern.compile("^folders/[^/]+/locations/[^/]+/muteConfigs/[^/]+$");
/**
* Gets a mute config.
*
* Create a request for the method "muteConfigs.get".
*
* This request holds the parameters needed by the the securitycenter 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. Name of the mute config to retrieve. Its format is
* `organizations/{organization}/muteConfigs/{config_id}`,
* `folders/{folder}/muteConfigs/{config_id}`, `projects/{project}/muteConfigs/{config_id}`,
* `organizations/{organization}/locations/global/muteConfigs/{config_id}`,
* `folders/{folder}/locations/global/muteConfigs/{config_id}`, or
* `projects/{project}/locations/global/muteConfigs/{config_id}`.
* @since 1.13
*/
protected Get(java.lang.String name) {
super(SecurityCommandCenter.this, "GET", REST_PATH, null, com.google.api.services.securitycenter.v1.model.GoogleCloudSecuritycenterV1MuteConfig.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 " +
"^folders/[^/]+/locations/[^/]+/muteConfigs/[^/]+$");
}
}
@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. Name of the mute config to retrieve. Its format is
* `organizations/{organization}/muteConfigs/{config_id}`,
* `folders/{folder}/muteConfigs/{config_id}`,
* `projects/{project}/muteConfigs/{config_id}`,
* `organizations/{organization}/locations/global/muteConfigs/{config_id}`,
* `folders/{folder}/locations/global/muteConfigs/{config_id}`, or
* `projects/{project}/locations/global/muteConfigs/{config_id}`.
*/
@com.google.api.client.util.Key
private java.lang.String name;
/** Required. Name of the mute config to retrieve. Its format is
`organizations/{organization}/muteConfigs/{config_id}`, `folders/{folder}/muteConfigs/{config_id}`,
`projects/{project}/muteConfigs/{config_id}`,
`organizations/{organization}/locations/global/muteConfigs/{config_id}`,
`folders/{folder}/locations/global/muteConfigs/{config_id}`, or
`projects/{project}/locations/global/muteConfigs/{config_id}`.
*/
public java.lang.String getName() {
return name;
}
/**
* Required. Name of the mute config to retrieve. Its format is
* `organizations/{organization}/muteConfigs/{config_id}`,
* `folders/{folder}/muteConfigs/{config_id}`,
* `projects/{project}/muteConfigs/{config_id}`,
* `organizations/{organization}/locations/global/muteConfigs/{config_id}`,
* `folders/{folder}/locations/global/muteConfigs/{config_id}`, or
* `projects/{project}/locations/global/muteConfigs/{config_id}`.
*/
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 " +
"^folders/[^/]+/locations/[^/]+/muteConfigs/[^/]+$");
}
this.name = name;
return this;
}
@Override
public Get set(String parameterName, Object value) {
return (Get) super.set(parameterName, value);
}
}
/**
* Updates a mute config.
*
* Create a request for the method "muteConfigs.patch".
*
* This request holds the parameters needed by the securitycenter server. After setting any
* optional parameters, call the {@link Patch#execute()} method to invoke the remote operation.
*
* @param name This field will be ignored if provided on config creation. Format
* `organizations/{organization}/muteConfigs/{mute_config}`
* `folders/{folder}/muteConfigs/{mute_config}`
* `projects/{project}/muteConfigs/{mute_config}`
* `organizations/{organization}/locations/global/muteConfigs/{mute_config}`
* `folders/{folder}/locations/global/muteConfigs/{mute_config}`
* `projects/{project}/locations/global/muteConfigs/{mute_config}`
* @param content the {@link com.google.api.services.securitycenter.v1.model.GoogleCloudSecuritycenterV1MuteConfig}
* @return the request
*/
public Patch patch(java.lang.String name, com.google.api.services.securitycenter.v1.model.GoogleCloudSecuritycenterV1MuteConfig content) throws java.io.IOException {
Patch result = new Patch(name, content);
initialize(result);
return result;
}
public class Patch extends SecurityCommandCenterRequest {
private static final String REST_PATH = "v1/{+name}";
private final java.util.regex.Pattern NAME_PATTERN =
java.util.regex.Pattern.compile("^folders/[^/]+/locations/[^/]+/muteConfigs/[^/]+$");
/**
* Updates a mute config.
*
* Create a request for the method "muteConfigs.patch".
*
* This request holds the parameters needed by the the securitycenter server. After setting any
* optional parameters, call the {@link Patch#execute()} method to invoke the remote operation.
* {@link
* Patch#initialize(com.google.api.client.googleapis.services.AbstractGoogleClientRequest)} must
* be called to initialize this instance immediately after invoking the constructor.
*
* @param name This field will be ignored if provided on config creation. Format
* `organizations/{organization}/muteConfigs/{mute_config}`
* `folders/{folder}/muteConfigs/{mute_config}`
* `projects/{project}/muteConfigs/{mute_config}`
* `organizations/{organization}/locations/global/muteConfigs/{mute_config}`
* `folders/{folder}/locations/global/muteConfigs/{mute_config}`
* `projects/{project}/locations/global/muteConfigs/{mute_config}`
* @param content the {@link com.google.api.services.securitycenter.v1.model.GoogleCloudSecuritycenterV1MuteConfig}
* @since 1.13
*/
protected Patch(java.lang.String name, com.google.api.services.securitycenter.v1.model.GoogleCloudSecuritycenterV1MuteConfig content) {
super(SecurityCommandCenter.this, "PATCH", REST_PATH, content, com.google.api.services.securitycenter.v1.model.GoogleCloudSecuritycenterV1MuteConfig.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 " +
"^folders/[^/]+/locations/[^/]+/muteConfigs/[^/]+$");
}
}
@Override
public Patch set$Xgafv(java.lang.String $Xgafv) {
return (Patch) super.set$Xgafv($Xgafv);
}
@Override
public Patch setAccessToken(java.lang.String accessToken) {
return (Patch) super.setAccessToken(accessToken);
}
@Override
public Patch setAlt(java.lang.String alt) {
return (Patch) super.setAlt(alt);
}
@Override
public Patch setCallback(java.lang.String callback) {
return (Patch) super.setCallback(callback);
}
@Override
public Patch setFields(java.lang.String fields) {
return (Patch) super.setFields(fields);
}
@Override
public Patch setKey(java.lang.String key) {
return (Patch) super.setKey(key);
}
@Override
public Patch setOauthToken(java.lang.String oauthToken) {
return (Patch) super.setOauthToken(oauthToken);
}
@Override
public Patch setPrettyPrint(java.lang.Boolean prettyPrint) {
return (Patch) super.setPrettyPrint(prettyPrint);
}
@Override
public Patch setQuotaUser(java.lang.String quotaUser) {
return (Patch) super.setQuotaUser(quotaUser);
}
@Override
public Patch setUploadType(java.lang.String uploadType) {
return (Patch) super.setUploadType(uploadType);
}
@Override
public Patch setUploadProtocol(java.lang.String uploadProtocol) {
return (Patch) super.setUploadProtocol(uploadProtocol);
}
/**
* This field will be ignored if provided on config creation. Format
* `organizations/{organization}/muteConfigs/{mute_config}`
* `folders/{folder}/muteConfigs/{mute_config}`
* `projects/{project}/muteConfigs/{mute_config}`
* `organizations/{organization}/locations/global/muteConfigs/{mute_config}`
* `folders/{folder}/locations/global/muteConfigs/{mute_config}`
* `projects/{project}/locations/global/muteConfigs/{mute_config}`
*/
@com.google.api.client.util.Key
private java.lang.String name;
/** This field will be ignored if provided on config creation. Format
`organizations/{organization}/muteConfigs/{mute_config}`
`folders/{folder}/muteConfigs/{mute_config}` `projects/{project}/muteConfigs/{mute_config}`
`organizations/{organization}/locations/global/muteConfigs/{mute_config}`
`folders/{folder}/locations/global/muteConfigs/{mute_config}`
`projects/{project}/locations/global/muteConfigs/{mute_config}`
*/
public java.lang.String getName() {
return name;
}
/**
* This field will be ignored if provided on config creation. Format
* `organizations/{organization}/muteConfigs/{mute_config}`
* `folders/{folder}/muteConfigs/{mute_config}`
* `projects/{project}/muteConfigs/{mute_config}`
* `organizations/{organization}/locations/global/muteConfigs/{mute_config}`
* `folders/{folder}/locations/global/muteConfigs/{mute_config}`
* `projects/{project}/locations/global/muteConfigs/{mute_config}`
*/
public Patch setName(java.lang.String name) {
if (!getSuppressPatternChecks()) {
com.google.api.client.util.Preconditions.checkArgument(NAME_PATTERN.matcher(name).matches(),
"Parameter name must conform to the pattern " +
"^folders/[^/]+/locations/[^/]+/muteConfigs/[^/]+$");
}
this.name = name;
return this;
}
/** The list of fields to be updated. If empty all mutable fields will be updated. */
@com.google.api.client.util.Key
private String updateMask;
/** The list of fields to be updated. If empty all mutable fields will be updated.
*/
public String getUpdateMask() {
return updateMask;
}
/** The list of fields to be updated. If empty all mutable fields will be updated. */
public Patch setUpdateMask(String updateMask) {
this.updateMask = updateMask;
return this;
}
@Override
public Patch set(String parameterName, Object value) {
return (Patch) super.set(parameterName, value);
}
}
}
}
/**
* An accessor for creating requests from the MuteConfigs collection.
*
* The typical use is:
*
* {@code SecurityCommandCenter securitycenter = new SecurityCommandCenter(...);}
* {@code SecurityCommandCenter.MuteConfigs.List request = securitycenter.muteConfigs().list(parameters ...)}
*
*
* @return the resource collection
*/
public MuteConfigs muteConfigs() {
return new MuteConfigs();
}
/**
* The "muteConfigs" collection of methods.
*/
public class MuteConfigs {
/**
* Creates a mute config.
*
* Create a request for the method "muteConfigs.create".
*
* This request holds the parameters needed by the securitycenter server. After setting any
* optional parameters, call the {@link Create#execute()} method to invoke the remote operation.
*
* @param parent Required. Resource name of the new mute configs's parent. Its format is
* `organizations/[organization_id]`, `folders/[folder_id]`, or `projects/[project_id]`.
* @param content the {@link com.google.api.services.securitycenter.v1.model.GoogleCloudSecuritycenterV1MuteConfig}
* @return the request
*/
public Create create(java.lang.String parent, com.google.api.services.securitycenter.v1.model.GoogleCloudSecuritycenterV1MuteConfig content) throws java.io.IOException {
Create result = new Create(parent, content);
initialize(result);
return result;
}
public class Create extends SecurityCommandCenterRequest {
private static final String REST_PATH = "v1/{+parent}/muteConfigs";
private final java.util.regex.Pattern PARENT_PATTERN =
java.util.regex.Pattern.compile("^folders/[^/]+$");
/**
* Creates a mute config.
*
* Create a request for the method "muteConfigs.create".
*
* This request holds the parameters needed by the the securitycenter server. After setting any
* optional parameters, call the {@link Create#execute()} method to invoke the remote operation.
* {@link
* Create#initialize(com.google.api.client.googleapis.services.AbstractGoogleClientRequest)} must
* be called to initialize this instance immediately after invoking the constructor.
*
* @param parent Required. Resource name of the new mute configs's parent. Its format is
* `organizations/[organization_id]`, `folders/[folder_id]`, or `projects/[project_id]`.
* @param content the {@link com.google.api.services.securitycenter.v1.model.GoogleCloudSecuritycenterV1MuteConfig}
* @since 1.13
*/
protected Create(java.lang.String parent, com.google.api.services.securitycenter.v1.model.GoogleCloudSecuritycenterV1MuteConfig content) {
super(SecurityCommandCenter.this, "POST", REST_PATH, content, com.google.api.services.securitycenter.v1.model.GoogleCloudSecuritycenterV1MuteConfig.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 " +
"^folders/[^/]+$");
}
}
@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. Resource name of the new mute configs's parent. Its format is
* `organizations/[organization_id]`, `folders/[folder_id]`, or `projects/[project_id]`.
*/
@com.google.api.client.util.Key
private java.lang.String parent;
/** Required. Resource name of the new mute configs's parent. Its format is
`organizations/[organization_id]`, `folders/[folder_id]`, or `projects/[project_id]`.
*/
public java.lang.String getParent() {
return parent;
}
/**
* Required. Resource name of the new mute configs's parent. Its format is
* `organizations/[organization_id]`, `folders/[folder_id]`, or `projects/[project_id]`.
*/
public Create setParent(java.lang.String parent) {
if (!getSuppressPatternChecks()) {
com.google.api.client.util.Preconditions.checkArgument(PARENT_PATTERN.matcher(parent).matches(),
"Parameter parent must conform to the pattern " +
"^folders/[^/]+$");
}
this.parent = parent;
return this;
}
/**
* Required. Unique identifier provided by the client within the parent scope. It must
* consist of only lowercase letters, numbers, and hyphens, must start with a letter, must
* end with either a letter or a number, and must be 63 characters or less.
*/
@com.google.api.client.util.Key
private java.lang.String muteConfigId;
/** Required. Unique identifier provided by the client within the parent scope. It must consist of only
lowercase letters, numbers, and hyphens, must start with a letter, must end with either a letter or
a number, and must be 63 characters or less.
*/
public java.lang.String getMuteConfigId() {
return muteConfigId;
}
/**
* Required. Unique identifier provided by the client within the parent scope. It must
* consist of only lowercase letters, numbers, and hyphens, must start with a letter, must
* end with either a letter or a number, and must be 63 characters or less.
*/
public Create setMuteConfigId(java.lang.String muteConfigId) {
this.muteConfigId = muteConfigId;
return this;
}
@Override
public Create set(String parameterName, Object value) {
return (Create) super.set(parameterName, value);
}
}
/**
* Deletes an existing mute config.
*
* Create a request for the method "muteConfigs.delete".
*
* This request holds the parameters needed by the securitycenter server. After setting any
* optional parameters, call the {@link Delete#execute()} method to invoke the remote operation.
*
* @param name Required. Name of the mute config to delete. Its format is
* `organizations/{organization}/muteConfigs/{config_id}`,
* `folders/{folder}/muteConfigs/{config_id}`, `projects/{project}/muteConfigs/{config_id}`,
* `organizations/{organization}/locations/global/muteConfigs/{config_id}`,
* `folders/{folder}/locations/global/muteConfigs/{config_id}`, or
* `projects/{project}/locations/global/muteConfigs/{config_id}`.
* @return the request
*/
public Delete delete(java.lang.String name) throws java.io.IOException {
Delete result = new Delete(name);
initialize(result);
return result;
}
public class Delete extends SecurityCommandCenterRequest {
private static final String REST_PATH = "v1/{+name}";
private final java.util.regex.Pattern NAME_PATTERN =
java.util.regex.Pattern.compile("^folders/[^/]+/muteConfigs/[^/]+$");
/**
* Deletes an existing mute config.
*
* Create a request for the method "muteConfigs.delete".
*
* This request holds the parameters needed by the the securitycenter server. After setting any
* optional parameters, call the {@link Delete#execute()} method to invoke the remote operation.
* {@link
* Delete#initialize(com.google.api.client.googleapis.services.AbstractGoogleClientRequest)} must
* be called to initialize this instance immediately after invoking the constructor.
*
* @param name Required. Name of the mute config to delete. Its format is
* `organizations/{organization}/muteConfigs/{config_id}`,
* `folders/{folder}/muteConfigs/{config_id}`, `projects/{project}/muteConfigs/{config_id}`,
* `organizations/{organization}/locations/global/muteConfigs/{config_id}`,
* `folders/{folder}/locations/global/muteConfigs/{config_id}`, or
* `projects/{project}/locations/global/muteConfigs/{config_id}`.
* @since 1.13
*/
protected Delete(java.lang.String name) {
super(SecurityCommandCenter.this, "DELETE", REST_PATH, null, com.google.api.services.securitycenter.v1.model.Empty.class);
this.name = com.google.api.client.util.Preconditions.checkNotNull(name, "Required parameter name must be specified.");
if (!getSuppressPatternChecks()) {
com.google.api.client.util.Preconditions.checkArgument(NAME_PATTERN.matcher(name).matches(),
"Parameter name must conform to the pattern " +
"^folders/[^/]+/muteConfigs/[^/]+$");
}
}
@Override
public Delete set$Xgafv(java.lang.String $Xgafv) {
return (Delete) super.set$Xgafv($Xgafv);
}
@Override
public Delete setAccessToken(java.lang.String accessToken) {
return (Delete) super.setAccessToken(accessToken);
}
@Override
public Delete setAlt(java.lang.String alt) {
return (Delete) super.setAlt(alt);
}
@Override
public Delete setCallback(java.lang.String callback) {
return (Delete) super.setCallback(callback);
}
@Override
public Delete setFields(java.lang.String fields) {
return (Delete) super.setFields(fields);
}
@Override
public Delete setKey(java.lang.String key) {
return (Delete) super.setKey(key);
}
@Override
public Delete setOauthToken(java.lang.String oauthToken) {
return (Delete) super.setOauthToken(oauthToken);
}
@Override
public Delete setPrettyPrint(java.lang.Boolean prettyPrint) {
return (Delete) super.setPrettyPrint(prettyPrint);
}
@Override
public Delete setQuotaUser(java.lang.String quotaUser) {
return (Delete) super.setQuotaUser(quotaUser);
}
@Override
public Delete setUploadType(java.lang.String uploadType) {
return (Delete) super.setUploadType(uploadType);
}
@Override
public Delete setUploadProtocol(java.lang.String uploadProtocol) {
return (Delete) super.setUploadProtocol(uploadProtocol);
}
/**
* Required. Name of the mute config to delete. Its format is
* `organizations/{organization}/muteConfigs/{config_id}`,
* `folders/{folder}/muteConfigs/{config_id}`, `projects/{project}/muteConfigs/{config_id}`,
* `organizations/{organization}/locations/global/muteConfigs/{config_id}`,
* `folders/{folder}/locations/global/muteConfigs/{config_id}`, or
* `projects/{project}/locations/global/muteConfigs/{config_id}`.
*/
@com.google.api.client.util.Key
private java.lang.String name;
/** Required. Name of the mute config to delete. Its format is
`organizations/{organization}/muteConfigs/{config_id}`, `folders/{folder}/muteConfigs/{config_id}`,
`projects/{project}/muteConfigs/{config_id}`,
`organizations/{organization}/locations/global/muteConfigs/{config_id}`,
`folders/{folder}/locations/global/muteConfigs/{config_id}`, or
`projects/{project}/locations/global/muteConfigs/{config_id}`.
*/
public java.lang.String getName() {
return name;
}
/**
* Required. Name of the mute config to delete. Its format is
* `organizations/{organization}/muteConfigs/{config_id}`,
* `folders/{folder}/muteConfigs/{config_id}`, `projects/{project}/muteConfigs/{config_id}`,
* `organizations/{organization}/locations/global/muteConfigs/{config_id}`,
* `folders/{folder}/locations/global/muteConfigs/{config_id}`, or
* `projects/{project}/locations/global/muteConfigs/{config_id}`.
*/
public Delete setName(java.lang.String name) {
if (!getSuppressPatternChecks()) {
com.google.api.client.util.Preconditions.checkArgument(NAME_PATTERN.matcher(name).matches(),
"Parameter name must conform to the pattern " +
"^folders/[^/]+/muteConfigs/[^/]+$");
}
this.name = name;
return this;
}
@Override
public Delete set(String parameterName, Object value) {
return (Delete) super.set(parameterName, value);
}
}
/**
* Gets a mute config.
*
* Create a request for the method "muteConfigs.get".
*
* This request holds the parameters needed by the securitycenter server. After setting any
* optional parameters, call the {@link Get#execute()} method to invoke the remote operation.
*
* @param name Required. Name of the mute config to retrieve. Its format is
* `organizations/{organization}/muteConfigs/{config_id}`,
* `folders/{folder}/muteConfigs/{config_id}`, `projects/{project}/muteConfigs/{config_id}`,
* `organizations/{organization}/locations/global/muteConfigs/{config_id}`,
* `folders/{folder}/locations/global/muteConfigs/{config_id}`, or
* `projects/{project}/locations/global/muteConfigs/{config_id}`.
* @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 SecurityCommandCenterRequest {
private static final String REST_PATH = "v1/{+name}";
private final java.util.regex.Pattern NAME_PATTERN =
java.util.regex.Pattern.compile("^folders/[^/]+/muteConfigs/[^/]+$");
/**
* Gets a mute config.
*
* Create a request for the method "muteConfigs.get".
*
* This request holds the parameters needed by the the securitycenter 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. Name of the mute config to retrieve. Its format is
* `organizations/{organization}/muteConfigs/{config_id}`,
* `folders/{folder}/muteConfigs/{config_id}`, `projects/{project}/muteConfigs/{config_id}`,
* `organizations/{organization}/locations/global/muteConfigs/{config_id}`,
* `folders/{folder}/locations/global/muteConfigs/{config_id}`, or
* `projects/{project}/locations/global/muteConfigs/{config_id}`.
* @since 1.13
*/
protected Get(java.lang.String name) {
super(SecurityCommandCenter.this, "GET", REST_PATH, null, com.google.api.services.securitycenter.v1.model.GoogleCloudSecuritycenterV1MuteConfig.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 " +
"^folders/[^/]+/muteConfigs/[^/]+$");
}
}
@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. Name of the mute config to retrieve. Its format is
* `organizations/{organization}/muteConfigs/{config_id}`,
* `folders/{folder}/muteConfigs/{config_id}`, `projects/{project}/muteConfigs/{config_id}`,
* `organizations/{organization}/locations/global/muteConfigs/{config_id}`,
* `folders/{folder}/locations/global/muteConfigs/{config_id}`, or
* `projects/{project}/locations/global/muteConfigs/{config_id}`.
*/
@com.google.api.client.util.Key
private java.lang.String name;
/** Required. Name of the mute config to retrieve. Its format is
`organizations/{organization}/muteConfigs/{config_id}`, `folders/{folder}/muteConfigs/{config_id}`,
`projects/{project}/muteConfigs/{config_id}`,
`organizations/{organization}/locations/global/muteConfigs/{config_id}`,
`folders/{folder}/locations/global/muteConfigs/{config_id}`, or
`projects/{project}/locations/global/muteConfigs/{config_id}`.
*/
public java.lang.String getName() {
return name;
}
/**
* Required. Name of the mute config to retrieve. Its format is
* `organizations/{organization}/muteConfigs/{config_id}`,
* `folders/{folder}/muteConfigs/{config_id}`, `projects/{project}/muteConfigs/{config_id}`,
* `organizations/{organization}/locations/global/muteConfigs/{config_id}`,
* `folders/{folder}/locations/global/muteConfigs/{config_id}`, or
* `projects/{project}/locations/global/muteConfigs/{config_id}`.
*/
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 " +
"^folders/[^/]+/muteConfigs/[^/]+$");
}
this.name = name;
return this;
}
@Override
public Get set(String parameterName, Object value) {
return (Get) super.set(parameterName, value);
}
}
/**
* Lists mute configs.
*
* Create a request for the method "muteConfigs.list".
*
* This request holds the parameters needed by the securitycenter server. After setting any
* optional parameters, call the {@link List#execute()} method to invoke the remote operation.
*
* @param parent Required. The parent, which owns the collection of mute configs. Its format is
* `organizations/[organization_id]`, `folders/[folder_id]`, `projects/[project_id]`.
* @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 SecurityCommandCenterRequest {
private static final String REST_PATH = "v1/{+parent}/muteConfigs";
private final java.util.regex.Pattern PARENT_PATTERN =
java.util.regex.Pattern.compile("^folders/[^/]+$");
/**
* Lists mute configs.
*
* Create a request for the method "muteConfigs.list".
*
* This request holds the parameters needed by the the securitycenter server. After setting any
* optional parameters, call the {@link List#execute()} method to invoke the remote operation.
* {@link List#initialize(com.google.api.client.googleapis.services.AbstractGoogleClientRequest)}
* must be called to initialize this instance immediately after invoking the constructor.
*
* @param parent Required. The parent, which owns the collection of mute configs. Its format is
* `organizations/[organization_id]`, `folders/[folder_id]`, `projects/[project_id]`.
* @since 1.13
*/
protected List(java.lang.String parent) {
super(SecurityCommandCenter.this, "GET", REST_PATH, null, com.google.api.services.securitycenter.v1.model.ListMuteConfigsResponse.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 " +
"^folders/[^/]+$");
}
}
@Override
public com.google.api.client.http.HttpResponse executeUsingHead() throws java.io.IOException {
return super.executeUsingHead();
}
@Override
public com.google.api.client.http.HttpRequest buildHttpRequestUsingHead() throws java.io.IOException {
return super.buildHttpRequestUsingHead();
}
@Override
public List set$Xgafv(java.lang.String $Xgafv) {
return (List) super.set$Xgafv($Xgafv);
}
@Override
public List setAccessToken(java.lang.String accessToken) {
return (List) super.setAccessToken(accessToken);
}
@Override
public List setAlt(java.lang.String alt) {
return (List) super.setAlt(alt);
}
@Override
public List setCallback(java.lang.String callback) {
return (List) super.setCallback(callback);
}
@Override
public List setFields(java.lang.String fields) {
return (List) super.setFields(fields);
}
@Override
public List setKey(java.lang.String key) {
return (List) super.setKey(key);
}
@Override
public List setOauthToken(java.lang.String oauthToken) {
return (List) super.setOauthToken(oauthToken);
}
@Override
public List setPrettyPrint(java.lang.Boolean prettyPrint) {
return (List) super.setPrettyPrint(prettyPrint);
}
@Override
public List setQuotaUser(java.lang.String quotaUser) {
return (List) super.setQuotaUser(quotaUser);
}
@Override
public List setUploadType(java.lang.String uploadType) {
return (List) super.setUploadType(uploadType);
}
@Override
public List setUploadProtocol(java.lang.String uploadProtocol) {
return (List) super.setUploadProtocol(uploadProtocol);
}
/**
* Required. The parent, which owns the collection of mute configs. Its format is
* `organizations/[organization_id]`, `folders/[folder_id]`, `projects/[project_id]`.
*/
@com.google.api.client.util.Key
private java.lang.String parent;
/** Required. The parent, which owns the collection of mute configs. Its format is
`organizations/[organization_id]`, `folders/[folder_id]`, `projects/[project_id]`.
*/
public java.lang.String getParent() {
return parent;
}
/**
* Required. The parent, which owns the collection of mute configs. Its format is
* `organizations/[organization_id]`, `folders/[folder_id]`, `projects/[project_id]`.
*/
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 " +
"^folders/[^/]+$");
}
this.parent = parent;
return this;
}
/**
* The maximum number of configs to return. The service may return fewer than this value. If
* unspecified, at most 10 configs will be returned. The maximum value is 1000; values above
* 1000 will be coerced to 1000.
*/
@com.google.api.client.util.Key
private java.lang.Integer pageSize;
/** The maximum number of configs to return. The service may return fewer than this value. If
unspecified, at most 10 configs will be returned. The maximum value is 1000; values above 1000 will
be coerced to 1000.
*/
public java.lang.Integer getPageSize() {
return pageSize;
}
/**
* The maximum number of configs to return. The service may return fewer than this value. If
* unspecified, at most 10 configs will be returned. The maximum value is 1000; values above
* 1000 will be coerced to 1000.
*/
public List setPageSize(java.lang.Integer pageSize) {
this.pageSize = pageSize;
return this;
}
/**
* A page token, received from a previous `ListMuteConfigs` call. Provide this to retrieve
* the subsequent page. When paginating, all other parameters provided to `ListMuteConfigs`
* must match the call that provided the page token.
*/
@com.google.api.client.util.Key
private java.lang.String pageToken;
/** A page token, received from a previous `ListMuteConfigs` call. Provide this to retrieve the
subsequent page. When paginating, all other parameters provided to `ListMuteConfigs` must match the
call that provided the page token.
*/
public java.lang.String getPageToken() {
return pageToken;
}
/**
* A page token, received from a previous `ListMuteConfigs` call. Provide this to retrieve
* the subsequent page. When paginating, all other parameters provided to `ListMuteConfigs`
* must match the call that provided the 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);
}
}
/**
* Updates a mute config.
*
* Create a request for the method "muteConfigs.patch".
*
* This request holds the parameters needed by the securitycenter server. After setting any
* optional parameters, call the {@link Patch#execute()} method to invoke the remote operation.
*
* @param name This field will be ignored if provided on config creation. Format
* `organizations/{organization}/muteConfigs/{mute_config}`
* `folders/{folder}/muteConfigs/{mute_config}`
* `projects/{project}/muteConfigs/{mute_config}`
* `organizations/{organization}/locations/global/muteConfigs/{mute_config}`
* `folders/{folder}/locations/global/muteConfigs/{mute_config}`
* `projects/{project}/locations/global/muteConfigs/{mute_config}`
* @param content the {@link com.google.api.services.securitycenter.v1.model.GoogleCloudSecuritycenterV1MuteConfig}
* @return the request
*/
public Patch patch(java.lang.String name, com.google.api.services.securitycenter.v1.model.GoogleCloudSecuritycenterV1MuteConfig content) throws java.io.IOException {
Patch result = new Patch(name, content);
initialize(result);
return result;
}
public class Patch extends SecurityCommandCenterRequest {
private static final String REST_PATH = "v1/{+name}";
private final java.util.regex.Pattern NAME_PATTERN =
java.util.regex.Pattern.compile("^folders/[^/]+/muteConfigs/[^/]+$");
/**
* Updates a mute config.
*
* Create a request for the method "muteConfigs.patch".
*
* This request holds the parameters needed by the the securitycenter server. After setting any
* optional parameters, call the {@link Patch#execute()} method to invoke the remote operation.
* {@link
* Patch#initialize(com.google.api.client.googleapis.services.AbstractGoogleClientRequest)} must
* be called to initialize this instance immediately after invoking the constructor.
*
* @param name This field will be ignored if provided on config creation. Format
* `organizations/{organization}/muteConfigs/{mute_config}`
* `folders/{folder}/muteConfigs/{mute_config}`
* `projects/{project}/muteConfigs/{mute_config}`
* `organizations/{organization}/locations/global/muteConfigs/{mute_config}`
* `folders/{folder}/locations/global/muteConfigs/{mute_config}`
* `projects/{project}/locations/global/muteConfigs/{mute_config}`
* @param content the {@link com.google.api.services.securitycenter.v1.model.GoogleCloudSecuritycenterV1MuteConfig}
* @since 1.13
*/
protected Patch(java.lang.String name, com.google.api.services.securitycenter.v1.model.GoogleCloudSecuritycenterV1MuteConfig content) {
super(SecurityCommandCenter.this, "PATCH", REST_PATH, content, com.google.api.services.securitycenter.v1.model.GoogleCloudSecuritycenterV1MuteConfig.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 " +
"^folders/[^/]+/muteConfigs/[^/]+$");
}
}
@Override
public Patch set$Xgafv(java.lang.String $Xgafv) {
return (Patch) super.set$Xgafv($Xgafv);
}
@Override
public Patch setAccessToken(java.lang.String accessToken) {
return (Patch) super.setAccessToken(accessToken);
}
@Override
public Patch setAlt(java.lang.String alt) {
return (Patch) super.setAlt(alt);
}
@Override
public Patch setCallback(java.lang.String callback) {
return (Patch) super.setCallback(callback);
}
@Override
public Patch setFields(java.lang.String fields) {
return (Patch) super.setFields(fields);
}
@Override
public Patch setKey(java.lang.String key) {
return (Patch) super.setKey(key);
}
@Override
public Patch setOauthToken(java.lang.String oauthToken) {
return (Patch) super.setOauthToken(oauthToken);
}
@Override
public Patch setPrettyPrint(java.lang.Boolean prettyPrint) {
return (Patch) super.setPrettyPrint(prettyPrint);
}
@Override
public Patch setQuotaUser(java.lang.String quotaUser) {
return (Patch) super.setQuotaUser(quotaUser);
}
@Override
public Patch setUploadType(java.lang.String uploadType) {
return (Patch) super.setUploadType(uploadType);
}
@Override
public Patch setUploadProtocol(java.lang.String uploadProtocol) {
return (Patch) super.setUploadProtocol(uploadProtocol);
}
/**
* This field will be ignored if provided on config creation. Format
* `organizations/{organization}/muteConfigs/{mute_config}`
* `folders/{folder}/muteConfigs/{mute_config}`
* `projects/{project}/muteConfigs/{mute_config}`
* `organizations/{organization}/locations/global/muteConfigs/{mute_config}`
* `folders/{folder}/locations/global/muteConfigs/{mute_config}`
* `projects/{project}/locations/global/muteConfigs/{mute_config}`
*/
@com.google.api.client.util.Key
private java.lang.String name;
/** This field will be ignored if provided on config creation. Format
`organizations/{organization}/muteConfigs/{mute_config}`
`folders/{folder}/muteConfigs/{mute_config}` `projects/{project}/muteConfigs/{mute_config}`
`organizations/{organization}/locations/global/muteConfigs/{mute_config}`
`folders/{folder}/locations/global/muteConfigs/{mute_config}`
`projects/{project}/locations/global/muteConfigs/{mute_config}`
*/
public java.lang.String getName() {
return name;
}
/**
* This field will be ignored if provided on config creation. Format
* `organizations/{organization}/muteConfigs/{mute_config}`
* `folders/{folder}/muteConfigs/{mute_config}`
* `projects/{project}/muteConfigs/{mute_config}`
* `organizations/{organization}/locations/global/muteConfigs/{mute_config}`
* `folders/{folder}/locations/global/muteConfigs/{mute_config}`
* `projects/{project}/locations/global/muteConfigs/{mute_config}`
*/
public Patch setName(java.lang.String name) {
if (!getSuppressPatternChecks()) {
com.google.api.client.util.Preconditions.checkArgument(NAME_PATTERN.matcher(name).matches(),
"Parameter name must conform to the pattern " +
"^folders/[^/]+/muteConfigs/[^/]+$");
}
this.name = name;
return this;
}
/** The list of fields to be updated. If empty all mutable fields will be updated. */
@com.google.api.client.util.Key
private String updateMask;
/** The list of fields to be updated. If empty all mutable fields will be updated.
*/
public String getUpdateMask() {
return updateMask;
}
/** The list of fields to be updated. If empty all mutable fields will be updated. */
public Patch setUpdateMask(String updateMask) {
this.updateMask = updateMask;
return this;
}
@Override
public Patch set(String parameterName, Object value) {
return (Patch) super.set(parameterName, value);
}
}
}
/**
* An accessor for creating requests from the NotificationConfigs collection.
*
* The typical use is:
*
* {@code SecurityCommandCenter securitycenter = new SecurityCommandCenter(...);}
* {@code SecurityCommandCenter.NotificationConfigs.List request = securitycenter.notificationConfigs().list(parameters ...)}
*
*
* @return the resource collection
*/
public NotificationConfigs notificationConfigs() {
return new NotificationConfigs();
}
/**
* The "notificationConfigs" collection of methods.
*/
public class NotificationConfigs {
/**
* Creates a notification config.
*
* Create a request for the method "notificationConfigs.create".
*
* This request holds the parameters needed by the securitycenter server. After setting any
* optional parameters, call the {@link Create#execute()} method to invoke the remote operation.
*
* @param parent Required. Resource name of the new notification config's parent. Its format is
* `organizations/[organization_id]`, `folders/[folder_id]`, or `projects/[project_id]`.
* @param content the {@link com.google.api.services.securitycenter.v1.model.NotificationConfig}
* @return the request
*/
public Create create(java.lang.String parent, com.google.api.services.securitycenter.v1.model.NotificationConfig content) throws java.io.IOException {
Create result = new Create(parent, content);
initialize(result);
return result;
}
public class Create extends SecurityCommandCenterRequest {
private static final String REST_PATH = "v1/{+parent}/notificationConfigs";
private final java.util.regex.Pattern PARENT_PATTERN =
java.util.regex.Pattern.compile("^folders/[^/]+$");
/**
* Creates a notification config.
*
* Create a request for the method "notificationConfigs.create".
*
* This request holds the parameters needed by the the securitycenter server. After setting any
* optional parameters, call the {@link Create#execute()} method to invoke the remote operation.
* {@link
* Create#initialize(com.google.api.client.googleapis.services.AbstractGoogleClientRequest)} must
* be called to initialize this instance immediately after invoking the constructor.
*
* @param parent Required. Resource name of the new notification config's parent. Its format is
* `organizations/[organization_id]`, `folders/[folder_id]`, or `projects/[project_id]`.
* @param content the {@link com.google.api.services.securitycenter.v1.model.NotificationConfig}
* @since 1.13
*/
protected Create(java.lang.String parent, com.google.api.services.securitycenter.v1.model.NotificationConfig content) {
super(SecurityCommandCenter.this, "POST", REST_PATH, content, com.google.api.services.securitycenter.v1.model.NotificationConfig.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 " +
"^folders/[^/]+$");
}
}
@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. Resource name of the new notification config's parent. Its format is
* `organizations/[organization_id]`, `folders/[folder_id]`, or `projects/[project_id]`.
*/
@com.google.api.client.util.Key
private java.lang.String parent;
/** Required. Resource name of the new notification config's parent. Its format is
`organizations/[organization_id]`, `folders/[folder_id]`, or `projects/[project_id]`.
*/
public java.lang.String getParent() {
return parent;
}
/**
* Required. Resource name of the new notification config's parent. Its format is
* `organizations/[organization_id]`, `folders/[folder_id]`, or `projects/[project_id]`.
*/
public Create setParent(java.lang.String parent) {
if (!getSuppressPatternChecks()) {
com.google.api.client.util.Preconditions.checkArgument(PARENT_PATTERN.matcher(parent).matches(),
"Parameter parent must conform to the pattern " +
"^folders/[^/]+$");
}
this.parent = parent;
return this;
}
/**
* Required. Unique identifier provided by the client within the parent scope. It must be
* between 1 and 128 characters and contain alphanumeric characters, underscores, or hyphens
* only.
*/
@com.google.api.client.util.Key
private java.lang.String configId;
/** Required. Unique identifier provided by the client within the parent scope. It must be between 1
and 128 characters and contain alphanumeric characters, underscores, or hyphens only.
*/
public java.lang.String getConfigId() {
return configId;
}
/**
* Required. Unique identifier provided by the client within the parent scope. It must be
* between 1 and 128 characters and contain alphanumeric characters, underscores, or hyphens
* only.
*/
public Create setConfigId(java.lang.String configId) {
this.configId = configId;
return this;
}
@Override
public Create set(String parameterName, Object value) {
return (Create) super.set(parameterName, value);
}
}
/**
* Deletes a notification config.
*
* Create a request for the method "notificationConfigs.delete".
*
* This request holds the parameters needed by the securitycenter server. After setting any
* optional parameters, call the {@link Delete#execute()} method to invoke the remote operation.
*
* @param name Required. Name of the notification config to delete. Its format is
* `organizations/[organization_id]/notificationConfigs/[config_id]`,
* `folders/[folder_id]/notificationConfigs/[config_id]`, or
* `projects/[project_id]/notificationConfigs/[config_id]`.
* @return the request
*/
public Delete delete(java.lang.String name) throws java.io.IOException {
Delete result = new Delete(name);
initialize(result);
return result;
}
public class Delete extends SecurityCommandCenterRequest {
private static final String REST_PATH = "v1/{+name}";
private final java.util.regex.Pattern NAME_PATTERN =
java.util.regex.Pattern.compile("^folders/[^/]+/notificationConfigs/[^/]+$");
/**
* Deletes a notification config.
*
* Create a request for the method "notificationConfigs.delete".
*
* This request holds the parameters needed by the the securitycenter server. After setting any
* optional parameters, call the {@link Delete#execute()} method to invoke the remote operation.
* {@link
* Delete#initialize(com.google.api.client.googleapis.services.AbstractGoogleClientRequest)} must
* be called to initialize this instance immediately after invoking the constructor.
*
* @param name Required. Name of the notification config to delete. Its format is
* `organizations/[organization_id]/notificationConfigs/[config_id]`,
* `folders/[folder_id]/notificationConfigs/[config_id]`, or
* `projects/[project_id]/notificationConfigs/[config_id]`.
* @since 1.13
*/
protected Delete(java.lang.String name) {
super(SecurityCommandCenter.this, "DELETE", REST_PATH, null, com.google.api.services.securitycenter.v1.model.Empty.class);
this.name = com.google.api.client.util.Preconditions.checkNotNull(name, "Required parameter name must be specified.");
if (!getSuppressPatternChecks()) {
com.google.api.client.util.Preconditions.checkArgument(NAME_PATTERN.matcher(name).matches(),
"Parameter name must conform to the pattern " +
"^folders/[^/]+/notificationConfigs/[^/]+$");
}
}
@Override
public Delete set$Xgafv(java.lang.String $Xgafv) {
return (Delete) super.set$Xgafv($Xgafv);
}
@Override
public Delete setAccessToken(java.lang.String accessToken) {
return (Delete) super.setAccessToken(accessToken);
}
@Override
public Delete setAlt(java.lang.String alt) {
return (Delete) super.setAlt(alt);
}
@Override
public Delete setCallback(java.lang.String callback) {
return (Delete) super.setCallback(callback);
}
@Override
public Delete setFields(java.lang.String fields) {
return (Delete) super.setFields(fields);
}
@Override
public Delete setKey(java.lang.String key) {
return (Delete) super.setKey(key);
}
@Override
public Delete setOauthToken(java.lang.String oauthToken) {
return (Delete) super.setOauthToken(oauthToken);
}
@Override
public Delete setPrettyPrint(java.lang.Boolean prettyPrint) {
return (Delete) super.setPrettyPrint(prettyPrint);
}
@Override
public Delete setQuotaUser(java.lang.String quotaUser) {
return (Delete) super.setQuotaUser(quotaUser);
}
@Override
public Delete setUploadType(java.lang.String uploadType) {
return (Delete) super.setUploadType(uploadType);
}
@Override
public Delete setUploadProtocol(java.lang.String uploadProtocol) {
return (Delete) super.setUploadProtocol(uploadProtocol);
}
/**
* Required. Name of the notification config to delete. Its format is
* `organizations/[organization_id]/notificationConfigs/[config_id]`,
* `folders/[folder_id]/notificationConfigs/[config_id]`, or
* `projects/[project_id]/notificationConfigs/[config_id]`.
*/
@com.google.api.client.util.Key
private java.lang.String name;
/** Required. Name of the notification config to delete. Its format is
`organizations/[organization_id]/notificationConfigs/[config_id]`,
`folders/[folder_id]/notificationConfigs/[config_id]`, or
`projects/[project_id]/notificationConfigs/[config_id]`.
*/
public java.lang.String getName() {
return name;
}
/**
* Required. Name of the notification config to delete. Its format is
* `organizations/[organization_id]/notificationConfigs/[config_id]`,
* `folders/[folder_id]/notificationConfigs/[config_id]`, or
* `projects/[project_id]/notificationConfigs/[config_id]`.
*/
public Delete setName(java.lang.String name) {
if (!getSuppressPatternChecks()) {
com.google.api.client.util.Preconditions.checkArgument(NAME_PATTERN.matcher(name).matches(),
"Parameter name must conform to the pattern " +
"^folders/[^/]+/notificationConfigs/[^/]+$");
}
this.name = name;
return this;
}
@Override
public Delete set(String parameterName, Object value) {
return (Delete) super.set(parameterName, value);
}
}
/**
* Gets a notification config.
*
* Create a request for the method "notificationConfigs.get".
*
* This request holds the parameters needed by the securitycenter server. After setting any
* optional parameters, call the {@link Get#execute()} method to invoke the remote operation.
*
* @param name Required. Name of the notification config to get. Its format is
* `organizations/[organization_id]/notificationConfigs/[config_id]`,
* `folders/[folder_id]/notificationConfigs/[config_id]`, or
* `projects/[project_id]/notificationConfigs/[config_id]`.
* @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 SecurityCommandCenterRequest {
private static final String REST_PATH = "v1/{+name}";
private final java.util.regex.Pattern NAME_PATTERN =
java.util.regex.Pattern.compile("^folders/[^/]+/notificationConfigs/[^/]+$");
/**
* Gets a notification config.
*
* Create a request for the method "notificationConfigs.get".
*
* This request holds the parameters needed by the the securitycenter 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. Name of the notification config to get. Its format is
* `organizations/[organization_id]/notificationConfigs/[config_id]`,
* `folders/[folder_id]/notificationConfigs/[config_id]`, or
* `projects/[project_id]/notificationConfigs/[config_id]`.
* @since 1.13
*/
protected Get(java.lang.String name) {
super(SecurityCommandCenter.this, "GET", REST_PATH, null, com.google.api.services.securitycenter.v1.model.NotificationConfig.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 " +
"^folders/[^/]+/notificationConfigs/[^/]+$");
}
}
@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. Name of the notification config to get. Its format is
* `organizations/[organization_id]/notificationConfigs/[config_id]`,
* `folders/[folder_id]/notificationConfigs/[config_id]`, or
* `projects/[project_id]/notificationConfigs/[config_id]`.
*/
@com.google.api.client.util.Key
private java.lang.String name;
/** Required. Name of the notification config to get. Its format is
`organizations/[organization_id]/notificationConfigs/[config_id]`,
`folders/[folder_id]/notificationConfigs/[config_id]`, or
`projects/[project_id]/notificationConfigs/[config_id]`.
*/
public java.lang.String getName() {
return name;
}
/**
* Required. Name of the notification config to get. Its format is
* `organizations/[organization_id]/notificationConfigs/[config_id]`,
* `folders/[folder_id]/notificationConfigs/[config_id]`, or
* `projects/[project_id]/notificationConfigs/[config_id]`.
*/
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 " +
"^folders/[^/]+/notificationConfigs/[^/]+$");
}
this.name = name;
return this;
}
@Override
public Get set(String parameterName, Object value) {
return (Get) super.set(parameterName, value);
}
}
/**
* Lists notification configs.
*
* Create a request for the method "notificationConfigs.list".
*
* This request holds the parameters needed by the securitycenter server. After setting any
* optional parameters, call the {@link List#execute()} method to invoke the remote operation.
*
* @param parent Required. The name of the parent in which to list the notification configurations. Its format is
* "organizations/[organization_id]", "folders/[folder_id]", or "projects/[project_id]".
* @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 SecurityCommandCenterRequest {
private static final String REST_PATH = "v1/{+parent}/notificationConfigs";
private final java.util.regex.Pattern PARENT_PATTERN =
java.util.regex.Pattern.compile("^folders/[^/]+$");
/**
* Lists notification configs.
*
* Create a request for the method "notificationConfigs.list".
*
* This request holds the parameters needed by the the securitycenter server. After setting any
* optional parameters, call the {@link List#execute()} method to invoke the remote operation.
* {@link List#initialize(com.google.api.client.googleapis.services.AbstractGoogleClientRequest)}
* must be called to initialize this instance immediately after invoking the constructor.
*
* @param parent Required. The name of the parent in which to list the notification configurations. Its format is
* "organizations/[organization_id]", "folders/[folder_id]", or "projects/[project_id]".
* @since 1.13
*/
protected List(java.lang.String parent) {
super(SecurityCommandCenter.this, "GET", REST_PATH, null, com.google.api.services.securitycenter.v1.model.ListNotificationConfigsResponse.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 " +
"^folders/[^/]+$");
}
}
@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 parent in which to list the notification configurations. Its
* format is "organizations/[organization_id]", "folders/[folder_id]", or
* "projects/[project_id]".
*/
@com.google.api.client.util.Key
private java.lang.String parent;
/** Required. The name of the parent in which to list the notification configurations. Its format is
"organizations/[organization_id]", "folders/[folder_id]", or "projects/[project_id]".
*/
public java.lang.String getParent() {
return parent;
}
/**
* Required. The name of the parent in which to list the notification configurations. Its
* format is "organizations/[organization_id]", "folders/[folder_id]", or
* "projects/[project_id]".
*/
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 " +
"^folders/[^/]+$");
}
this.parent = parent;
return this;
}
/**
* The maximum number of results to return in a single response. Default is 10, minimum is
* 1, maximum is 1000.
*/
@com.google.api.client.util.Key
private java.lang.Integer pageSize;
/** The maximum number of results to return in a single response. Default is 10, minimum is 1, maximum
is 1000.
*/
public java.lang.Integer getPageSize() {
return pageSize;
}
/**
* The maximum number of results to return in a single response. Default is 10, minimum is
* 1, maximum is 1000.
*/
public List setPageSize(java.lang.Integer pageSize) {
this.pageSize = pageSize;
return this;
}
/**
* The value returned by the last `ListNotificationConfigsResponse`; indicates that this is
* a continuation of a prior `ListNotificationConfigs` call, and that the system should
* return the next page of data.
*/
@com.google.api.client.util.Key
private java.lang.String pageToken;
/** The value returned by the last `ListNotificationConfigsResponse`; indicates that this is a
continuation of a prior `ListNotificationConfigs` call, and that the system should return the next
page of data.
*/
public java.lang.String getPageToken() {
return pageToken;
}
/**
* The value returned by the last `ListNotificationConfigsResponse`; indicates that this is
* a continuation of a prior `ListNotificationConfigs` call, and that the system should
* return the next page of data.
*/
public List setPageToken(java.lang.String pageToken) {
this.pageToken = pageToken;
return this;
}
@Override
public List set(String parameterName, Object value) {
return (List) super.set(parameterName, value);
}
}
/**
* Updates a notification config. The following update fields are allowed: description,
* pubsub_topic, streaming_config.filter
*
* Create a request for the method "notificationConfigs.patch".
*
* This request holds the parameters needed by the securitycenter server. After setting any
* optional parameters, call the {@link Patch#execute()} method to invoke the remote operation.
*
* @param name The relative resource name of this notification config. See:
* https://cloud.google.com/apis/design/resource_names#relative_resource_name Example:
* "organizations/{organization_id}/notificationConfigs/notify_public_bucket",
* "folders/{folder_id}/notificationConfigs/notify_public_bucket", or
* "projects/{project_id}/notificationConfigs/notify_public_bucket".
* @param content the {@link com.google.api.services.securitycenter.v1.model.NotificationConfig}
* @return the request
*/
public Patch patch(java.lang.String name, com.google.api.services.securitycenter.v1.model.NotificationConfig content) throws java.io.IOException {
Patch result = new Patch(name, content);
initialize(result);
return result;
}
public class Patch extends SecurityCommandCenterRequest {
private static final String REST_PATH = "v1/{+name}";
private final java.util.regex.Pattern NAME_PATTERN =
java.util.regex.Pattern.compile("^folders/[^/]+/notificationConfigs/[^/]+$");
/**
* Updates a notification config. The following update fields are allowed: description,
* pubsub_topic, streaming_config.filter
*
* Create a request for the method "notificationConfigs.patch".
*
* This request holds the parameters needed by the the securitycenter server. After setting any
* optional parameters, call the {@link Patch#execute()} method to invoke the remote operation.
* {@link
* Patch#initialize(com.google.api.client.googleapis.services.AbstractGoogleClientRequest)} must
* be called to initialize this instance immediately after invoking the constructor.
*
* @param name The relative resource name of this notification config. See:
* https://cloud.google.com/apis/design/resource_names#relative_resource_name Example:
* "organizations/{organization_id}/notificationConfigs/notify_public_bucket",
* "folders/{folder_id}/notificationConfigs/notify_public_bucket", or
* "projects/{project_id}/notificationConfigs/notify_public_bucket".
* @param content the {@link com.google.api.services.securitycenter.v1.model.NotificationConfig}
* @since 1.13
*/
protected Patch(java.lang.String name, com.google.api.services.securitycenter.v1.model.NotificationConfig content) {
super(SecurityCommandCenter.this, "PATCH", REST_PATH, content, com.google.api.services.securitycenter.v1.model.NotificationConfig.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 " +
"^folders/[^/]+/notificationConfigs/[^/]+$");
}
}
@Override
public Patch set$Xgafv(java.lang.String $Xgafv) {
return (Patch) super.set$Xgafv($Xgafv);
}
@Override
public Patch setAccessToken(java.lang.String accessToken) {
return (Patch) super.setAccessToken(accessToken);
}
@Override
public Patch setAlt(java.lang.String alt) {
return (Patch) super.setAlt(alt);
}
@Override
public Patch setCallback(java.lang.String callback) {
return (Patch) super.setCallback(callback);
}
@Override
public Patch setFields(java.lang.String fields) {
return (Patch) super.setFields(fields);
}
@Override
public Patch setKey(java.lang.String key) {
return (Patch) super.setKey(key);
}
@Override
public Patch setOauthToken(java.lang.String oauthToken) {
return (Patch) super.setOauthToken(oauthToken);
}
@Override
public Patch setPrettyPrint(java.lang.Boolean prettyPrint) {
return (Patch) super.setPrettyPrint(prettyPrint);
}
@Override
public Patch setQuotaUser(java.lang.String quotaUser) {
return (Patch) super.setQuotaUser(quotaUser);
}
@Override
public Patch setUploadType(java.lang.String uploadType) {
return (Patch) super.setUploadType(uploadType);
}
@Override
public Patch setUploadProtocol(java.lang.String uploadProtocol) {
return (Patch) super.setUploadProtocol(uploadProtocol);
}
/**
* The relative resource name of this notification config. See:
* https://cloud.google.com/apis/design/resource_names#relative_resource_name Example:
* "organizations/{organization_id}/notificationConfigs/notify_public_bucket",
* "folders/{folder_id}/notificationConfigs/notify_public_bucket", or
* "projects/{project_id}/notificationConfigs/notify_public_bucket".
*/
@com.google.api.client.util.Key
private java.lang.String name;
/** The relative resource name of this notification config. See:
https://cloud.google.com/apis/design/resource_names#relative_resource_name Example:
"organizations/{organization_id}/notificationConfigs/notify_public_bucket",
"folders/{folder_id}/notificationConfigs/notify_public_bucket", or
"projects/{project_id}/notificationConfigs/notify_public_bucket".
*/
public java.lang.String getName() {
return name;
}
/**
* The relative resource name of this notification config. See:
* https://cloud.google.com/apis/design/resource_names#relative_resource_name Example:
* "organizations/{organization_id}/notificationConfigs/notify_public_bucket",
* "folders/{folder_id}/notificationConfigs/notify_public_bucket", or
* "projects/{project_id}/notificationConfigs/notify_public_bucket".
*/
public Patch setName(java.lang.String name) {
if (!getSuppressPatternChecks()) {
com.google.api.client.util.Preconditions.checkArgument(NAME_PATTERN.matcher(name).matches(),
"Parameter name must conform to the pattern " +
"^folders/[^/]+/notificationConfigs/[^/]+$");
}
this.name = name;
return this;
}
/**
* The FieldMask to use when updating the notification config. If empty all mutable fields
* will be updated.
*/
@com.google.api.client.util.Key
private String updateMask;
/** The FieldMask to use when updating the notification config. If empty all mutable fields will be
updated.
*/
public String getUpdateMask() {
return updateMask;
}
/**
* The FieldMask to use when updating the notification config. If empty all mutable fields
* will be updated.
*/
public Patch setUpdateMask(String updateMask) {
this.updateMask = updateMask;
return this;
}
@Override
public Patch set(String parameterName, Object value) {
return (Patch) super.set(parameterName, value);
}
}
}
/**
* An accessor for creating requests from the SecurityHealthAnalyticsSettings collection.
*
* The typical use is:
*
* {@code SecurityCommandCenter securitycenter = new SecurityCommandCenter(...);}
* {@code SecurityCommandCenter.SecurityHealthAnalyticsSettings.List request = securitycenter.securityHealthAnalyticsSettings().list(parameters ...)}
*
*
* @return the resource collection
*/
public SecurityHealthAnalyticsSettings securityHealthAnalyticsSettings() {
return new SecurityHealthAnalyticsSettings();
}
/**
* The "securityHealthAnalyticsSettings" collection of methods.
*/
public class SecurityHealthAnalyticsSettings {
/**
* An accessor for creating requests from the CustomModules collection.
*
* The typical use is:
*
* {@code SecurityCommandCenter securitycenter = new SecurityCommandCenter(...);}
* {@code SecurityCommandCenter.CustomModules.List request = securitycenter.customModules().list(parameters ...)}
*
*
* @return the resource collection
*/
public CustomModules customModules() {
return new CustomModules();
}
/**
* The "customModules" collection of methods.
*/
public class CustomModules {
/**
* Creates a resident SecurityHealthAnalyticsCustomModule at the scope of the given CRM parent, and
* also creates inherited SecurityHealthAnalyticsCustomModules for all CRM descendants of the given
* parent. These modules are enabled by default.
*
* Create a request for the method "customModules.create".
*
* This request holds the parameters needed by the securitycenter server. After setting any
* optional parameters, call the {@link Create#execute()} method to invoke the remote operation.
*
* @param parent Required. Resource name of the new custom module's parent. Its format is
* `organizations/{organization}/securityHealthAnalyticsSettings`,
* `folders/{folder}/securityHealthAnalyticsSettings`, or
* `projects/{project}/securityHealthAnalyticsSettings`
* @param content the {@link com.google.api.services.securitycenter.v1.model.GoogleCloudSecuritycenterV1SecurityHealthAnalyticsCustomModule}
* @return the request
*/
public Create create(java.lang.String parent, com.google.api.services.securitycenter.v1.model.GoogleCloudSecuritycenterV1SecurityHealthAnalyticsCustomModule content) throws java.io.IOException {
Create result = new Create(parent, content);
initialize(result);
return result;
}
public class Create extends SecurityCommandCenterRequest {
private static final String REST_PATH = "v1/{+parent}/customModules";
private final java.util.regex.Pattern PARENT_PATTERN =
java.util.regex.Pattern.compile("^folders/[^/]+/securityHealthAnalyticsSettings$");
/**
* Creates a resident SecurityHealthAnalyticsCustomModule at the scope of the given CRM parent,
* and also creates inherited SecurityHealthAnalyticsCustomModules for all CRM descendants of the
* given parent. These modules are enabled by default.
*
* Create a request for the method "customModules.create".
*
* This request holds the parameters needed by the the securitycenter server. After setting any
* optional parameters, call the {@link Create#execute()} method to invoke the remote operation.
* {@link
* Create#initialize(com.google.api.client.googleapis.services.AbstractGoogleClientRequest)} must
* be called to initialize this instance immediately after invoking the constructor.
*
* @param parent Required. Resource name of the new custom module's parent. Its format is
* `organizations/{organization}/securityHealthAnalyticsSettings`,
* `folders/{folder}/securityHealthAnalyticsSettings`, or
* `projects/{project}/securityHealthAnalyticsSettings`
* @param content the {@link com.google.api.services.securitycenter.v1.model.GoogleCloudSecuritycenterV1SecurityHealthAnalyticsCustomModule}
* @since 1.13
*/
protected Create(java.lang.String parent, com.google.api.services.securitycenter.v1.model.GoogleCloudSecuritycenterV1SecurityHealthAnalyticsCustomModule content) {
super(SecurityCommandCenter.this, "POST", REST_PATH, content, com.google.api.services.securitycenter.v1.model.GoogleCloudSecuritycenterV1SecurityHealthAnalyticsCustomModule.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 " +
"^folders/[^/]+/securityHealthAnalyticsSettings$");
}
}
@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. Resource name of the new custom module's parent. Its format is
* `organizations/{organization}/securityHealthAnalyticsSettings`,
* `folders/{folder}/securityHealthAnalyticsSettings`, or
* `projects/{project}/securityHealthAnalyticsSettings`
*/
@com.google.api.client.util.Key
private java.lang.String parent;
/** Required. Resource name of the new custom module's parent. Its format is
`organizations/{organization}/securityHealthAnalyticsSettings`,
`folders/{folder}/securityHealthAnalyticsSettings`, or
`projects/{project}/securityHealthAnalyticsSettings`
*/
public java.lang.String getParent() {
return parent;
}
/**
* Required. Resource name of the new custom module's parent. Its format is
* `organizations/{organization}/securityHealthAnalyticsSettings`,
* `folders/{folder}/securityHealthAnalyticsSettings`, or
* `projects/{project}/securityHealthAnalyticsSettings`
*/
public Create setParent(java.lang.String parent) {
if (!getSuppressPatternChecks()) {
com.google.api.client.util.Preconditions.checkArgument(PARENT_PATTERN.matcher(parent).matches(),
"Parameter parent must conform to the pattern " +
"^folders/[^/]+/securityHealthAnalyticsSettings$");
}
this.parent = parent;
return this;
}
@Override
public Create set(String parameterName, Object value) {
return (Create) super.set(parameterName, value);
}
}
/**
* Deletes the specified SecurityHealthAnalyticsCustomModule and all of its descendants in the CRM
* hierarchy. This method is only supported for resident custom modules.
*
* Create a request for the method "customModules.delete".
*
* This request holds the parameters needed by the securitycenter server. After setting any
* optional parameters, call the {@link Delete#execute()} method to invoke the remote operation.
*
* @param name Required. Name of the custom module to delete. Its format is
* `organizations/{organization}/securityHealthAnalyticsSettings/customModules/{customModule}
* `, `folders/{folder}/securityHealthAnalyticsSettings/customModules/{customModule}`, or
* `projects/{project}/securityHealthAnalyticsSettings/customModules/{customModule}`
* @return the request
*/
public Delete delete(java.lang.String name) throws java.io.IOException {
Delete result = new Delete(name);
initialize(result);
return result;
}
public class Delete extends SecurityCommandCenterRequest {
private static final String REST_PATH = "v1/{+name}";
private final java.util.regex.Pattern NAME_PATTERN =
java.util.regex.Pattern.compile("^folders/[^/]+/securityHealthAnalyticsSettings/customModules/[^/]+$");
/**
* Deletes the specified SecurityHealthAnalyticsCustomModule and all of its descendants in the CRM
* hierarchy. This method is only supported for resident custom modules.
*
* Create a request for the method "customModules.delete".
*
* This request holds the parameters needed by the the securitycenter server. After setting any
* optional parameters, call the {@link Delete#execute()} method to invoke the remote operation.
* {@link
* Delete#initialize(com.google.api.client.googleapis.services.AbstractGoogleClientRequest)} must
* be called to initialize this instance immediately after invoking the constructor.
*
* @param name Required. Name of the custom module to delete. Its format is
* `organizations/{organization}/securityHealthAnalyticsSettings/customModules/{customModule}
* `, `folders/{folder}/securityHealthAnalyticsSettings/customModules/{customModule}`, or
* `projects/{project}/securityHealthAnalyticsSettings/customModules/{customModule}`
* @since 1.13
*/
protected Delete(java.lang.String name) {
super(SecurityCommandCenter.this, "DELETE", REST_PATH, null, com.google.api.services.securitycenter.v1.model.Empty.class);
this.name = com.google.api.client.util.Preconditions.checkNotNull(name, "Required parameter name must be specified.");
if (!getSuppressPatternChecks()) {
com.google.api.client.util.Preconditions.checkArgument(NAME_PATTERN.matcher(name).matches(),
"Parameter name must conform to the pattern " +
"^folders/[^/]+/securityHealthAnalyticsSettings/customModules/[^/]+$");
}
}
@Override
public Delete set$Xgafv(java.lang.String $Xgafv) {
return (Delete) super.set$Xgafv($Xgafv);
}
@Override
public Delete setAccessToken(java.lang.String accessToken) {
return (Delete) super.setAccessToken(accessToken);
}
@Override
public Delete setAlt(java.lang.String alt) {
return (Delete) super.setAlt(alt);
}
@Override
public Delete setCallback(java.lang.String callback) {
return (Delete) super.setCallback(callback);
}
@Override
public Delete setFields(java.lang.String fields) {
return (Delete) super.setFields(fields);
}
@Override
public Delete setKey(java.lang.String key) {
return (Delete) super.setKey(key);
}
@Override
public Delete setOauthToken(java.lang.String oauthToken) {
return (Delete) super.setOauthToken(oauthToken);
}
@Override
public Delete setPrettyPrint(java.lang.Boolean prettyPrint) {
return (Delete) super.setPrettyPrint(prettyPrint);
}
@Override
public Delete setQuotaUser(java.lang.String quotaUser) {
return (Delete) super.setQuotaUser(quotaUser);
}
@Override
public Delete setUploadType(java.lang.String uploadType) {
return (Delete) super.setUploadType(uploadType);
}
@Override
public Delete setUploadProtocol(java.lang.String uploadProtocol) {
return (Delete) super.setUploadProtocol(uploadProtocol);
}
/**
* Required. Name of the custom module to delete. Its format is `organizations/{organizati
* on}/securityHealthAnalyticsSettings/customModules/{customModule}`,
* `folders/{folder}/securityHealthAnalyticsSettings/customModules/{customModule}`, or
* `projects/{project}/securityHealthAnalyticsSettings/customModules/{customModule}`
*/
@com.google.api.client.util.Key
private java.lang.String name;
/** Required. Name of the custom module to delete. Its format is
`organizations/{organization}/securityHealthAnalyticsSettings/customModules/{customModule}`,
`folders/{folder}/securityHealthAnalyticsSettings/customModules/{customModule}`, or
`projects/{project}/securityHealthAnalyticsSettings/customModules/{customModule}`
*/
public java.lang.String getName() {
return name;
}
/**
* Required. Name of the custom module to delete. Its format is `organizations/{organizati
* on}/securityHealthAnalyticsSettings/customModules/{customModule}`,
* `folders/{folder}/securityHealthAnalyticsSettings/customModules/{customModule}`, or
* `projects/{project}/securityHealthAnalyticsSettings/customModules/{customModule}`
*/
public Delete setName(java.lang.String name) {
if (!getSuppressPatternChecks()) {
com.google.api.client.util.Preconditions.checkArgument(NAME_PATTERN.matcher(name).matches(),
"Parameter name must conform to the pattern " +
"^folders/[^/]+/securityHealthAnalyticsSettings/customModules/[^/]+$");
}
this.name = name;
return this;
}
@Override
public Delete set(String parameterName, Object value) {
return (Delete) super.set(parameterName, value);
}
}
/**
* Retrieves a SecurityHealthAnalyticsCustomModule.
*
* Create a request for the method "customModules.get".
*
* This request holds the parameters needed by the securitycenter server. After setting any
* optional parameters, call the {@link Get#execute()} method to invoke the remote operation.
*
* @param name Required. Name of the custom module to get. Its format is
* `organizations/{organization}/securityHealthAnalyticsSettings/customModules/{customModule}
* `, `folders/{folder}/securityHealthAnalyticsSettings/customModules/{customModule}`, or
* `projects/{project}/securityHealthAnalyticsSettings/customModules/{customModule}`
* @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 SecurityCommandCenterRequest {
private static final String REST_PATH = "v1/{+name}";
private final java.util.regex.Pattern NAME_PATTERN =
java.util.regex.Pattern.compile("^folders/[^/]+/securityHealthAnalyticsSettings/customModules/[^/]+$");
/**
* Retrieves a SecurityHealthAnalyticsCustomModule.
*
* Create a request for the method "customModules.get".
*
* This request holds the parameters needed by the the securitycenter 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. Name of the custom module to get. Its format is
* `organizations/{organization}/securityHealthAnalyticsSettings/customModules/{customModule}
* `, `folders/{folder}/securityHealthAnalyticsSettings/customModules/{customModule}`, or
* `projects/{project}/securityHealthAnalyticsSettings/customModules/{customModule}`
* @since 1.13
*/
protected Get(java.lang.String name) {
super(SecurityCommandCenter.this, "GET", REST_PATH, null, com.google.api.services.securitycenter.v1.model.GoogleCloudSecuritycenterV1SecurityHealthAnalyticsCustomModule.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 " +
"^folders/[^/]+/securityHealthAnalyticsSettings/customModules/[^/]+$");
}
}
@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. Name of the custom module to get. Its format is `organizations/{organization}
* /securityHealthAnalyticsSettings/customModules/{customModule}`,
* `folders/{folder}/securityHealthAnalyticsSettings/customModules/{customModule}`, or
* `projects/{project}/securityHealthAnalyticsSettings/customModules/{customModule}`
*/
@com.google.api.client.util.Key
private java.lang.String name;
/** Required. Name of the custom module to get. Its format is
`organizations/{organization}/securityHealthAnalyticsSettings/customModules/{customModule}`,
`folders/{folder}/securityHealthAnalyticsSettings/customModules/{customModule}`, or
`projects/{project}/securityHealthAnalyticsSettings/customModules/{customModule}`
*/
public java.lang.String getName() {
return name;
}
/**
* Required. Name of the custom module to get. Its format is `organizations/{organization}
* /securityHealthAnalyticsSettings/customModules/{customModule}`,
* `folders/{folder}/securityHealthAnalyticsSettings/customModules/{customModule}`, or
* `projects/{project}/securityHealthAnalyticsSettings/customModules/{customModule}`
*/
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 " +
"^folders/[^/]+/securityHealthAnalyticsSettings/customModules/[^/]+$");
}
this.name = name;
return this;
}
@Override
public Get set(String parameterName, Object value) {
return (Get) super.set(parameterName, value);
}
}
/**
* Returns a list of all SecurityHealthAnalyticsCustomModules for the given parent. This includes
* resident modules defined at the scope of the parent, and inherited modules, inherited from CRM
* ancestors.
*
* Create a request for the method "customModules.list".
*
* This request holds the parameters needed by the securitycenter server. After setting any
* optional parameters, call the {@link List#execute()} method to invoke the remote operation.
*
* @param parent Required. Name of parent to list custom modules. Its format is
* `organizations/{organization}/securityHealthAnalyticsSettings`,
* `folders/{folder}/securityHealthAnalyticsSettings`, or
* `projects/{project}/securityHealthAnalyticsSettings`
* @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 SecurityCommandCenterRequest {
private static final String REST_PATH = "v1/{+parent}/customModules";
private final java.util.regex.Pattern PARENT_PATTERN =
java.util.regex.Pattern.compile("^folders/[^/]+/securityHealthAnalyticsSettings$");
/**
* Returns a list of all SecurityHealthAnalyticsCustomModules for the given parent. This includes
* resident modules defined at the scope of the parent, and inherited modules, inherited from CRM
* ancestors.
*
* Create a request for the method "customModules.list".
*
* This request holds the parameters needed by the the securitycenter 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. Name of parent to list custom modules. Its format is
* `organizations/{organization}/securityHealthAnalyticsSettings`,
* `folders/{folder}/securityHealthAnalyticsSettings`, or
* `projects/{project}/securityHealthAnalyticsSettings`
* @since 1.13
*/
protected List(java.lang.String parent) {
super(SecurityCommandCenter.this, "GET", REST_PATH, null, com.google.api.services.securitycenter.v1.model.ListSecurityHealthAnalyticsCustomModulesResponse.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 " +
"^folders/[^/]+/securityHealthAnalyticsSettings$");
}
}
@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. Name of parent to list custom modules. Its format is
* `organizations/{organization}/securityHealthAnalyticsSettings`,
* `folders/{folder}/securityHealthAnalyticsSettings`, or
* `projects/{project}/securityHealthAnalyticsSettings`
*/
@com.google.api.client.util.Key
private java.lang.String parent;
/** Required. Name of parent to list custom modules. Its format is
`organizations/{organization}/securityHealthAnalyticsSettings`,
`folders/{folder}/securityHealthAnalyticsSettings`, or
`projects/{project}/securityHealthAnalyticsSettings`
*/
public java.lang.String getParent() {
return parent;
}
/**
* Required. Name of parent to list custom modules. Its format is
* `organizations/{organization}/securityHealthAnalyticsSettings`,
* `folders/{folder}/securityHealthAnalyticsSettings`, or
* `projects/{project}/securityHealthAnalyticsSettings`
*/
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 " +
"^folders/[^/]+/securityHealthAnalyticsSettings$");
}
this.parent = parent;
return this;
}
/**
* The maximum number of results to return in a single response. Default is 10, minimum is
* 1, maximum is 1000.
*/
@com.google.api.client.util.Key
private java.lang.Integer pageSize;
/** The maximum number of results to return in a single response. Default is 10, minimum is 1, maximum
is 1000.
*/
public java.lang.Integer getPageSize() {
return pageSize;
}
/**
* The maximum number of results to return in a single response. Default is 10, minimum is
* 1, maximum is 1000.
*/
public List setPageSize(java.lang.Integer pageSize) {
this.pageSize = pageSize;
return this;
}
/** The value returned by the last call indicating a continuation */
@com.google.api.client.util.Key
private java.lang.String pageToken;
/** The value returned by the last call indicating a continuation
*/
public java.lang.String getPageToken() {
return pageToken;
}
/** The value returned by the last call indicating a continuation */
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);
}
}
/**
* Returns a list of all resident SecurityHealthAnalyticsCustomModules under the given CRM parent
* and all of the parent’s CRM descendants.
*
* Create a request for the method "customModules.listDescendant".
*
* This request holds the parameters needed by the securitycenter server. After setting any
* optional parameters, call the {@link ListDescendant#execute()} method to invoke the remote
* operation.
*
* @param parent Required. Name of parent to list descendant custom modules. Its format is
* `organizations/{organization}/securityHealthAnalyticsSettings`,
* `folders/{folder}/securityHealthAnalyticsSettings`, or
* `projects/{project}/securityHealthAnalyticsSettings`
* @return the request
*/
public ListDescendant listDescendant(java.lang.String parent) throws java.io.IOException {
ListDescendant result = new ListDescendant(parent);
initialize(result);
return result;
}
public class ListDescendant extends SecurityCommandCenterRequest {
private static final String REST_PATH = "v1/{+parent}/customModules:listDescendant";
private final java.util.regex.Pattern PARENT_PATTERN =
java.util.regex.Pattern.compile("^folders/[^/]+/securityHealthAnalyticsSettings$");
/**
* Returns a list of all resident SecurityHealthAnalyticsCustomModules under the given CRM parent
* and all of the parent’s CRM descendants.
*
* Create a request for the method "customModules.listDescendant".
*
* This request holds the parameters needed by the the securitycenter server. After setting any
* optional parameters, call the {@link ListDescendant#execute()} method to invoke the remote
* operation. {@link ListDescendant#initialize(com.google.api.client.googleapis.services.Abstr
* actGoogleClientRequest)} must be called to initialize this instance immediately after invoking
* the constructor.
*
* @param parent Required. Name of parent to list descendant custom modules. Its format is
* `organizations/{organization}/securityHealthAnalyticsSettings`,
* `folders/{folder}/securityHealthAnalyticsSettings`, or
* `projects/{project}/securityHealthAnalyticsSettings`
* @since 1.13
*/
protected ListDescendant(java.lang.String parent) {
super(SecurityCommandCenter.this, "GET", REST_PATH, null, com.google.api.services.securitycenter.v1.model.ListDescendantSecurityHealthAnalyticsCustomModulesResponse.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 " +
"^folders/[^/]+/securityHealthAnalyticsSettings$");
}
}
@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 ListDescendant set$Xgafv(java.lang.String $Xgafv) {
return (ListDescendant) super.set$Xgafv($Xgafv);
}
@Override
public ListDescendant setAccessToken(java.lang.String accessToken) {
return (ListDescendant) super.setAccessToken(accessToken);
}
@Override
public ListDescendant setAlt(java.lang.String alt) {
return (ListDescendant) super.setAlt(alt);
}
@Override
public ListDescendant setCallback(java.lang.String callback) {
return (ListDescendant) super.setCallback(callback);
}
@Override
public ListDescendant setFields(java.lang.String fields) {
return (ListDescendant) super.setFields(fields);
}
@Override
public ListDescendant setKey(java.lang.String key) {
return (ListDescendant) super.setKey(key);
}
@Override
public ListDescendant setOauthToken(java.lang.String oauthToken) {
return (ListDescendant) super.setOauthToken(oauthToken);
}
@Override
public ListDescendant setPrettyPrint(java.lang.Boolean prettyPrint) {
return (ListDescendant) super.setPrettyPrint(prettyPrint);
}
@Override
public ListDescendant setQuotaUser(java.lang.String quotaUser) {
return (ListDescendant) super.setQuotaUser(quotaUser);
}
@Override
public ListDescendant setUploadType(java.lang.String uploadType) {
return (ListDescendant) super.setUploadType(uploadType);
}
@Override
public ListDescendant setUploadProtocol(java.lang.String uploadProtocol) {
return (ListDescendant) super.setUploadProtocol(uploadProtocol);
}
/**
* Required. Name of parent to list descendant custom modules. Its format is
* `organizations/{organization}/securityHealthAnalyticsSettings`,
* `folders/{folder}/securityHealthAnalyticsSettings`, or
* `projects/{project}/securityHealthAnalyticsSettings`
*/
@com.google.api.client.util.Key
private java.lang.String parent;
/** Required. Name of parent to list descendant custom modules. Its format is
`organizations/{organization}/securityHealthAnalyticsSettings`,
`folders/{folder}/securityHealthAnalyticsSettings`, or
`projects/{project}/securityHealthAnalyticsSettings`
*/
public java.lang.String getParent() {
return parent;
}
/**
* Required. Name of parent to list descendant custom modules. Its format is
* `organizations/{organization}/securityHealthAnalyticsSettings`,
* `folders/{folder}/securityHealthAnalyticsSettings`, or
* `projects/{project}/securityHealthAnalyticsSettings`
*/
public ListDescendant 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 " +
"^folders/[^/]+/securityHealthAnalyticsSettings$");
}
this.parent = parent;
return this;
}
/**
* The maximum number of results to return in a single response. Default is 10, minimum is
* 1, maximum is 1000.
*/
@com.google.api.client.util.Key
private java.lang.Integer pageSize;
/** The maximum number of results to return in a single response. Default is 10, minimum is 1, maximum
is 1000.
*/
public java.lang.Integer getPageSize() {
return pageSize;
}
/**
* The maximum number of results to return in a single response. Default is 10, minimum is
* 1, maximum is 1000.
*/
public ListDescendant setPageSize(java.lang.Integer pageSize) {
this.pageSize = pageSize;
return this;
}
/** The value returned by the last call indicating a continuation */
@com.google.api.client.util.Key
private java.lang.String pageToken;
/** The value returned by the last call indicating a continuation
*/
public java.lang.String getPageToken() {
return pageToken;
}
/** The value returned by the last call indicating a continuation */
public ListDescendant setPageToken(java.lang.String pageToken) {
this.pageToken = pageToken;
return this;
}
@Override
public ListDescendant set(String parameterName, Object value) {
return (ListDescendant) super.set(parameterName, value);
}
}
/**
* Updates the SecurityHealthAnalyticsCustomModule under the given name based on the given update
* mask. Updating the enablement state is supported on both resident and inherited modules (though
* resident modules cannot have an enablement state of "inherited"). Updating the display name and
* custom config of a module is supported on resident modules only.
*
* Create a request for the method "customModules.patch".
*
* This request holds the parameters needed by the securitycenter server. After setting any
* optional parameters, call the {@link Patch#execute()} method to invoke the remote operation.
*
* @param name Immutable. The resource name of the custom module. Its format is
* "organizations/{organization}/securityHealthAnalyticsSettings/customModules/{customModule}
* ", or "folders/{folder}/securityHealthAnalyticsSettings/customModules/{customModule}", or
* "projects/{project}/securityHealthAnalyticsSettings/customModules/{customModule}" The id
* {customModule} is server-generated and is not user settable. It will be a numeric id
* containing 1-20 digits.
* @param content the {@link com.google.api.services.securitycenter.v1.model.GoogleCloudSecuritycenterV1SecurityHealthAnalyticsCustomModule}
* @return the request
*/
public Patch patch(java.lang.String name, com.google.api.services.securitycenter.v1.model.GoogleCloudSecuritycenterV1SecurityHealthAnalyticsCustomModule content) throws java.io.IOException {
Patch result = new Patch(name, content);
initialize(result);
return result;
}
public class Patch extends SecurityCommandCenterRequest {
private static final String REST_PATH = "v1/{+name}";
private final java.util.regex.Pattern NAME_PATTERN =
java.util.regex.Pattern.compile("^folders/[^/]+/securityHealthAnalyticsSettings/customModules/[^/]+$");
/**
* Updates the SecurityHealthAnalyticsCustomModule under the given name based on the given update
* mask. Updating the enablement state is supported on both resident and inherited modules (though
* resident modules cannot have an enablement state of "inherited"). Updating the display name and
* custom config of a module is supported on resident modules only.
*
* Create a request for the method "customModules.patch".
*
* This request holds the parameters needed by the the securitycenter server. After setting any
* optional parameters, call the {@link Patch#execute()} method to invoke the remote operation.
* {@link
* Patch#initialize(com.google.api.client.googleapis.services.AbstractGoogleClientRequest)} must
* be called to initialize this instance immediately after invoking the constructor.
*
* @param name Immutable. The resource name of the custom module. Its format is
* "organizations/{organization}/securityHealthAnalyticsSettings/customModules/{customModule}
* ", or "folders/{folder}/securityHealthAnalyticsSettings/customModules/{customModule}", or
* "projects/{project}/securityHealthAnalyticsSettings/customModules/{customModule}" The id
* {customModule} is server-generated and is not user settable. It will be a numeric id
* containing 1-20 digits.
* @param content the {@link com.google.api.services.securitycenter.v1.model.GoogleCloudSecuritycenterV1SecurityHealthAnalyticsCustomModule}
* @since 1.13
*/
protected Patch(java.lang.String name, com.google.api.services.securitycenter.v1.model.GoogleCloudSecuritycenterV1SecurityHealthAnalyticsCustomModule content) {
super(SecurityCommandCenter.this, "PATCH", REST_PATH, content, com.google.api.services.securitycenter.v1.model.GoogleCloudSecuritycenterV1SecurityHealthAnalyticsCustomModule.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 " +
"^folders/[^/]+/securityHealthAnalyticsSettings/customModules/[^/]+$");
}
}
@Override
public Patch set$Xgafv(java.lang.String $Xgafv) {
return (Patch) super.set$Xgafv($Xgafv);
}
@Override
public Patch setAccessToken(java.lang.String accessToken) {
return (Patch) super.setAccessToken(accessToken);
}
@Override
public Patch setAlt(java.lang.String alt) {
return (Patch) super.setAlt(alt);
}
@Override
public Patch setCallback(java.lang.String callback) {
return (Patch) super.setCallback(callback);
}
@Override
public Patch setFields(java.lang.String fields) {
return (Patch) super.setFields(fields);
}
@Override
public Patch setKey(java.lang.String key) {
return (Patch) super.setKey(key);
}
@Override
public Patch setOauthToken(java.lang.String oauthToken) {
return (Patch) super.setOauthToken(oauthToken);
}
@Override
public Patch setPrettyPrint(java.lang.Boolean prettyPrint) {
return (Patch) super.setPrettyPrint(prettyPrint);
}
@Override
public Patch setQuotaUser(java.lang.String quotaUser) {
return (Patch) super.setQuotaUser(quotaUser);
}
@Override
public Patch setUploadType(java.lang.String uploadType) {
return (Patch) super.setUploadType(uploadType);
}
@Override
public Patch setUploadProtocol(java.lang.String uploadProtocol) {
return (Patch) super.setUploadProtocol(uploadProtocol);
}
/**
* Immutable. The resource name of the custom module. Its format is "organizations/{organi
* zation}/securityHealthAnalyticsSettings/customModules/{customModule}", or
* "folders/{folder}/securityHealthAnalyticsSettings/customModules/{customModule}", or
* "projects/{project}/securityHealthAnalyticsSettings/customModules/{customModule}" The
* id {customModule} is server-generated and is not user settable. It will be a numeric id
* containing 1-20 digits.
*/
@com.google.api.client.util.Key
private java.lang.String name;
/** Immutable. The resource name of the custom module. Its format is
"organizations/{organization}/securityHealthAnalyticsSettings/customModules/{customModule}", or
"folders/{folder}/securityHealthAnalyticsSettings/customModules/{customModule}", or
"projects/{project}/securityHealthAnalyticsSettings/customModules/{customModule}" The id
{customModule} is server-generated and is not user settable. It will be a numeric id containing
1-20 digits.
*/
public java.lang.String getName() {
return name;
}
/**
* Immutable. The resource name of the custom module. Its format is "organizations/{organi
* zation}/securityHealthAnalyticsSettings/customModules/{customModule}", or
* "folders/{folder}/securityHealthAnalyticsSettings/customModules/{customModule}", or
* "projects/{project}/securityHealthAnalyticsSettings/customModules/{customModule}" The
* id {customModule} is server-generated and is not user settable. It will be a numeric id
* containing 1-20 digits.
*/
public Patch setName(java.lang.String name) {
if (!getSuppressPatternChecks()) {
com.google.api.client.util.Preconditions.checkArgument(NAME_PATTERN.matcher(name).matches(),
"Parameter name must conform to the pattern " +
"^folders/[^/]+/securityHealthAnalyticsSettings/customModules/[^/]+$");
}
this.name = name;
return this;
}
/**
* The list of fields to be updated. The only fields that can be updated are
* `enablement_state` and `custom_config`. If empty or set to the wildcard value `*`, both
* `enablement_state` and `custom_config` are updated.
*/
@com.google.api.client.util.Key
private String updateMask;
/** The list of fields to be updated. The only fields that can be updated are `enablement_state` and
`custom_config`. If empty or set to the wildcard value `*`, both `enablement_state` and
`custom_config` are updated.
*/
public String getUpdateMask() {
return updateMask;
}
/**
* The list of fields to be updated. The only fields that can be updated are
* `enablement_state` and `custom_config`. If empty or set to the wildcard value `*`, both
* `enablement_state` and `custom_config` are updated.
*/
public Patch setUpdateMask(String updateMask) {
this.updateMask = updateMask;
return this;
}
@Override
public Patch set(String parameterName, Object value) {
return (Patch) super.set(parameterName, value);
}
}
/**
* Simulates a given SecurityHealthAnalyticsCustomModule and Resource.
*
* Create a request for the method "customModules.simulate".
*
* This request holds the parameters needed by the securitycenter server. After setting any
* optional parameters, call the {@link Simulate#execute()} method to invoke the remote operation.
*
* @param parent Required. The relative resource name of the organization, project, or folder. For more information
* about relative resource names, see [Relative Resource
* Name](https://cloud.google.com/apis/design/resource_names#relative_resource_name) Example:
* `organizations/{organization_id}`
* @param content the {@link com.google.api.services.securitycenter.v1.model.SimulateSecurityHealthAnalyticsCustomModuleRequest}
* @return the request
*/
public Simulate simulate(java.lang.String parent, com.google.api.services.securitycenter.v1.model.SimulateSecurityHealthAnalyticsCustomModuleRequest content) throws java.io.IOException {
Simulate result = new Simulate(parent, content);
initialize(result);
return result;
}
public class Simulate extends SecurityCommandCenterRequest {
private static final String REST_PATH = "v1/{+parent}/customModules:simulate";
private final java.util.regex.Pattern PARENT_PATTERN =
java.util.regex.Pattern.compile("^folders/[^/]+/securityHealthAnalyticsSettings$");
/**
* Simulates a given SecurityHealthAnalyticsCustomModule and Resource.
*
* Create a request for the method "customModules.simulate".
*
* This request holds the parameters needed by the the securitycenter server. After setting any
* optional parameters, call the {@link Simulate#execute()} method to invoke the remote operation.
* {@link
* Simulate#initialize(com.google.api.client.googleapis.services.AbstractGoogleClientRequest)}
* must be called to initialize this instance immediately after invoking the constructor.
*
* @param parent Required. The relative resource name of the organization, project, or folder. For more information
* about relative resource names, see [Relative Resource
* Name](https://cloud.google.com/apis/design/resource_names#relative_resource_name) Example:
* `organizations/{organization_id}`
* @param content the {@link com.google.api.services.securitycenter.v1.model.SimulateSecurityHealthAnalyticsCustomModuleRequest}
* @since 1.13
*/
protected Simulate(java.lang.String parent, com.google.api.services.securitycenter.v1.model.SimulateSecurityHealthAnalyticsCustomModuleRequest content) {
super(SecurityCommandCenter.this, "POST", REST_PATH, content, com.google.api.services.securitycenter.v1.model.SimulateSecurityHealthAnalyticsCustomModuleResponse.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 " +
"^folders/[^/]+/securityHealthAnalyticsSettings$");
}
}
@Override
public Simulate set$Xgafv(java.lang.String $Xgafv) {
return (Simulate) super.set$Xgafv($Xgafv);
}
@Override
public Simulate setAccessToken(java.lang.String accessToken) {
return (Simulate) super.setAccessToken(accessToken);
}
@Override
public Simulate setAlt(java.lang.String alt) {
return (Simulate) super.setAlt(alt);
}
@Override
public Simulate setCallback(java.lang.String callback) {
return (Simulate) super.setCallback(callback);
}
@Override
public Simulate setFields(java.lang.String fields) {
return (Simulate) super.setFields(fields);
}
@Override
public Simulate setKey(java.lang.String key) {
return (Simulate) super.setKey(key);
}
@Override
public Simulate setOauthToken(java.lang.String oauthToken) {
return (Simulate) super.setOauthToken(oauthToken);
}
@Override
public Simulate setPrettyPrint(java.lang.Boolean prettyPrint) {
return (Simulate) super.setPrettyPrint(prettyPrint);
}
@Override
public Simulate setQuotaUser(java.lang.String quotaUser) {
return (Simulate) super.setQuotaUser(quotaUser);
}
@Override
public Simulate setUploadType(java.lang.String uploadType) {
return (Simulate) super.setUploadType(uploadType);
}
@Override
public Simulate setUploadProtocol(java.lang.String uploadProtocol) {
return (Simulate) super.setUploadProtocol(uploadProtocol);
}
/**
* Required. The relative resource name of the organization, project, or folder. For more
* information about relative resource names, see [Relative Resource
* Name](https://cloud.google.com/apis/design/resource_names#relative_resource_name)
* Example: `organizations/{organization_id}`
*/
@com.google.api.client.util.Key
private java.lang.String parent;
/** Required. The relative resource name of the organization, project, or folder. For more information
about relative resource names, see [Relative Resource
Name](https://cloud.google.com/apis/design/resource_names#relative_resource_name) Example:
`organizations/{organization_id}`
*/
public java.lang.String getParent() {
return parent;
}
/**
* Required. The relative resource name of the organization, project, or folder. For more
* information about relative resource names, see [Relative Resource
* Name](https://cloud.google.com/apis/design/resource_names#relative_resource_name)
* Example: `organizations/{organization_id}`
*/
public Simulate 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 " +
"^folders/[^/]+/securityHealthAnalyticsSettings$");
}
this.parent = parent;
return this;
}
@Override
public Simulate set(String parameterName, Object value) {
return (Simulate) super.set(parameterName, value);
}
}
}
/**
* An accessor for creating requests from the EffectiveCustomModules collection.
*
* The typical use is:
*
* {@code SecurityCommandCenter securitycenter = new SecurityCommandCenter(...);}
* {@code SecurityCommandCenter.EffectiveCustomModules.List request = securitycenter.effectiveCustomModules().list(parameters ...)}
*
*
* @return the resource collection
*/
public EffectiveCustomModules effectiveCustomModules() {
return new EffectiveCustomModules();
}
/**
* The "effectiveCustomModules" collection of methods.
*/
public class EffectiveCustomModules {
/**
* Retrieves an EffectiveSecurityHealthAnalyticsCustomModule.
*
* Create a request for the method "effectiveCustomModules.get".
*
* This request holds the parameters needed by the securitycenter server. After setting any
* optional parameters, call the {@link Get#execute()} method to invoke the remote operation.
*
* @param name Required. Name of the effective custom module to get. Its format is `organizations/{organization}/se
* curityHealthAnalyticsSettings/effectiveCustomModules/{customModule}`,
* `folders/{folder}/securityHealthAnalyticsSettings/effectiveCustomModules/{customModule}`,
* or
* `projects/{project}/securityHealthAnalyticsSettings/effectiveCustomModules/{customModule}`
* @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 SecurityCommandCenterRequest {
private static final String REST_PATH = "v1/{+name}";
private final java.util.regex.Pattern NAME_PATTERN =
java.util.regex.Pattern.compile("^folders/[^/]+/securityHealthAnalyticsSettings/effectiveCustomModules/[^/]+$");
/**
* Retrieves an EffectiveSecurityHealthAnalyticsCustomModule.
*
* Create a request for the method "effectiveCustomModules.get".
*
* This request holds the parameters needed by the the securitycenter 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. Name of the effective custom module to get. Its format is `organizations/{organization}/se
* curityHealthAnalyticsSettings/effectiveCustomModules/{customModule}`,
* `folders/{folder}/securityHealthAnalyticsSettings/effectiveCustomModules/{customModule}`,
* or
* `projects/{project}/securityHealthAnalyticsSettings/effectiveCustomModules/{customModule}`
* @since 1.13
*/
protected Get(java.lang.String name) {
super(SecurityCommandCenter.this, "GET", REST_PATH, null, com.google.api.services.securitycenter.v1.model.GoogleCloudSecuritycenterV1EffectiveSecurityHealthAnalyticsCustomModule.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 " +
"^folders/[^/]+/securityHealthAnalyticsSettings/effectiveCustomModules/[^/]+$");
}
}
@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. Name of the effective custom module to get. Its format is `organizations/{org
* anization}/securityHealthAnalyticsSettings/effectiveCustomModules/{customModule}`, `fol
* ders/{folder}/securityHealthAnalyticsSettings/effectiveCustomModules/{customModule}`,
* or `projects/{project}/securityHealthAnalyticsSettings/effectiveCustomModules/{customMo
* dule}`
*/
@com.google.api.client.util.Key
private java.lang.String name;
/** Required. Name of the effective custom module to get. Its format is `organizations/{organization}/s
ecurityHealthAnalyticsSettings/effectiveCustomModules/{customModule}`,
`folders/{folder}/securityHealthAnalyticsSettings/effectiveCustomModules/{customModule}`, or
`projects/{project}/securityHealthAnalyticsSettings/effectiveCustomModules/{customModule}`
*/
public java.lang.String getName() {
return name;
}
/**
* Required. Name of the effective custom module to get. Its format is `organizations/{org
* anization}/securityHealthAnalyticsSettings/effectiveCustomModules/{customModule}`, `fol
* ders/{folder}/securityHealthAnalyticsSettings/effectiveCustomModules/{customModule}`,
* or `projects/{project}/securityHealthAnalyticsSettings/effectiveCustomModules/{customMo
* dule}`
*/
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 " +
"^folders/[^/]+/securityHealthAnalyticsSettings/effectiveCustomModules/[^/]+$");
}
this.name = name;
return this;
}
@Override
public Get set(String parameterName, Object value) {
return (Get) super.set(parameterName, value);
}
}
/**
* Returns a list of all EffectiveSecurityHealthAnalyticsCustomModules for the given parent. This
* includes resident modules defined at the scope of the parent, and inherited modules, inherited
* from CRM ancestors.
*
* Create a request for the method "effectiveCustomModules.list".
*
* This request holds the parameters needed by the securitycenter server. After setting any
* optional parameters, call the {@link List#execute()} method to invoke the remote operation.
*
* @param parent Required. Name of parent to list effective custom modules. Its format is
* `organizations/{organization}/securityHealthAnalyticsSettings`,
* `folders/{folder}/securityHealthAnalyticsSettings`, or
* `projects/{project}/securityHealthAnalyticsSettings`
* @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 SecurityCommandCenterRequest {
private static final String REST_PATH = "v1/{+parent}/effectiveCustomModules";
private final java.util.regex.Pattern PARENT_PATTERN =
java.util.regex.Pattern.compile("^folders/[^/]+/securityHealthAnalyticsSettings$");
/**
* Returns a list of all EffectiveSecurityHealthAnalyticsCustomModules for the given parent. This
* includes resident modules defined at the scope of the parent, and inherited modules, inherited
* from CRM ancestors.
*
* Create a request for the method "effectiveCustomModules.list".
*
* This request holds the parameters needed by the the securitycenter 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. Name of parent to list effective custom modules. Its format is
* `organizations/{organization}/securityHealthAnalyticsSettings`,
* `folders/{folder}/securityHealthAnalyticsSettings`, or
* `projects/{project}/securityHealthAnalyticsSettings`
* @since 1.13
*/
protected List(java.lang.String parent) {
super(SecurityCommandCenter.this, "GET", REST_PATH, null, com.google.api.services.securitycenter.v1.model.ListEffectiveSecurityHealthAnalyticsCustomModulesResponse.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 " +
"^folders/[^/]+/securityHealthAnalyticsSettings$");
}
}
@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. Name of parent to list effective custom modules. Its format is
* `organizations/{organization}/securityHealthAnalyticsSettings`,
* `folders/{folder}/securityHealthAnalyticsSettings`, or
* `projects/{project}/securityHealthAnalyticsSettings`
*/
@com.google.api.client.util.Key
private java.lang.String parent;
/** Required. Name of parent to list effective custom modules. Its format is
`organizations/{organization}/securityHealthAnalyticsSettings`,
`folders/{folder}/securityHealthAnalyticsSettings`, or
`projects/{project}/securityHealthAnalyticsSettings`
*/
public java.lang.String getParent() {
return parent;
}
/**
* Required. Name of parent to list effective custom modules. Its format is
* `organizations/{organization}/securityHealthAnalyticsSettings`,
* `folders/{folder}/securityHealthAnalyticsSettings`, or
* `projects/{project}/securityHealthAnalyticsSettings`
*/
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 " +
"^folders/[^/]+/securityHealthAnalyticsSettings$");
}
this.parent = parent;
return this;
}
/**
* The maximum number of results to return in a single response. Default is 10, minimum is
* 1, maximum is 1000.
*/
@com.google.api.client.util.Key
private java.lang.Integer pageSize;
/** The maximum number of results to return in a single response. Default is 10, minimum is 1, maximum
is 1000.
*/
public java.lang.Integer getPageSize() {
return pageSize;
}
/**
* The maximum number of results to return in a single response. Default is 10, minimum is
* 1, maximum is 1000.
*/
public List setPageSize(java.lang.Integer pageSize) {
this.pageSize = pageSize;
return this;
}
/** The value returned by the last call indicating a continuation */
@com.google.api.client.util.Key
private java.lang.String pageToken;
/** The value returned by the last call indicating a continuation
*/
public java.lang.String getPageToken() {
return pageToken;
}
/** The value returned by the last call indicating a continuation */
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 Sources collection.
*
* The typical use is:
*
* {@code SecurityCommandCenter securitycenter = new SecurityCommandCenter(...);}
* {@code SecurityCommandCenter.Sources.List request = securitycenter.sources().list(parameters ...)}
*
*
* @return the resource collection
*/
public Sources sources() {
return new Sources();
}
/**
* The "sources" collection of methods.
*/
public class Sources {
/**
* Lists all sources belonging to an organization.
*
* Create a request for the method "sources.list".
*
* This request holds the parameters needed by the securitycenter server. After setting any
* optional parameters, call the {@link List#execute()} method to invoke the remote operation.
*
* @param parent Required. Resource name of the parent of sources to list. Its format should be
* `organizations/[organization_id]`, `folders/[folder_id]`, or `projects/[project_id]`.
* @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 SecurityCommandCenterRequest {
private static final String REST_PATH = "v1/{+parent}/sources";
private final java.util.regex.Pattern PARENT_PATTERN =
java.util.regex.Pattern.compile("^folders/[^/]+$");
/**
* Lists all sources belonging to an organization.
*
* Create a request for the method "sources.list".
*
* This request holds the parameters needed by the the securitycenter 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. Resource name of the parent of sources to list. Its format should be
* `organizations/[organization_id]`, `folders/[folder_id]`, or `projects/[project_id]`.
* @since 1.13
*/
protected List(java.lang.String parent) {
super(SecurityCommandCenter.this, "GET", REST_PATH, null, com.google.api.services.securitycenter.v1.model.ListSourcesResponse.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 " +
"^folders/[^/]+$");
}
}
@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. Resource name of the parent of sources to list. Its format should be
* `organizations/[organization_id]`, `folders/[folder_id]`, or `projects/[project_id]`.
*/
@com.google.api.client.util.Key
private java.lang.String parent;
/** Required. Resource name of the parent of sources to list. Its format should be
`organizations/[organization_id]`, `folders/[folder_id]`, or `projects/[project_id]`.
*/
public java.lang.String getParent() {
return parent;
}
/**
* Required. Resource name of the parent of sources to list. Its format should be
* `organizations/[organization_id]`, `folders/[folder_id]`, or `projects/[project_id]`.
*/
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 " +
"^folders/[^/]+$");
}
this.parent = parent;
return this;
}
/**
* The maximum number of results to return in a single response. Default is 10, minimum is
* 1, maximum is 1000.
*/
@com.google.api.client.util.Key
private java.lang.Integer pageSize;
/** The maximum number of results to return in a single response. Default is 10, minimum is 1, maximum
is 1000.
*/
public java.lang.Integer getPageSize() {
return pageSize;
}
/**
* The maximum number of results to return in a single response. Default is 10, minimum is
* 1, maximum is 1000.
*/
public List setPageSize(java.lang.Integer pageSize) {
this.pageSize = pageSize;
return this;
}
/**
* The value returned by the last `ListSourcesResponse`; indicates that this is a
* continuation of a prior `ListSources` call, and that the system should return the next
* page of data.
*/
@com.google.api.client.util.Key
private java.lang.String pageToken;
/** The value returned by the last `ListSourcesResponse`; indicates that this is a continuation of a
prior `ListSources` call, and that the system should return the next page of data.
*/
public java.lang.String getPageToken() {
return pageToken;
}
/**
* The value returned by the last `ListSourcesResponse`; indicates that this is a
* continuation of a prior `ListSources` call, and that the system should return the next
* page of data.
*/
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 Findings collection.
*
* The typical use is:
*
* {@code SecurityCommandCenter securitycenter = new SecurityCommandCenter(...);}
* {@code SecurityCommandCenter.Findings.List request = securitycenter.findings().list(parameters ...)}
*
*
* @return the resource collection
*/
public Findings findings() {
return new Findings();
}
/**
* The "findings" collection of methods.
*/
public class Findings {
/**
* Filters an organization or source's findings and groups them by their specified properties. To
* group across all sources provide a `-` as the source id. Example:
* /v1/organizations/{organization_id}/sources/-/findings,
* /v1/folders/{folder_id}/sources/-/findings, /v1/projects/{project_id}/sources/-/findings
*
* Create a request for the method "findings.group".
*
* This request holds the parameters needed by the securitycenter server. After setting any
* optional parameters, call the {@link Group#execute()} method to invoke the remote operation.
*
* @param parent Required. Name of the source to groupBy. Its format is
* `organizations/[organization_id]/sources/[source_id]`,
* `folders/[folder_id]/sources/[source_id]`, or `projects/[project_id]/sources/[source_id]`.
* To groupBy across all sources provide a source_id of `-`. For example:
* `organizations/{organization_id}/sources/-, folders/{folder_id}/sources/-`, or
* `projects/{project_id}/sources/-`
* @param content the {@link com.google.api.services.securitycenter.v1.model.GroupFindingsRequest}
* @return the request
*/
public Group group(java.lang.String parent, com.google.api.services.securitycenter.v1.model.GroupFindingsRequest content) throws java.io.IOException {
Group result = new Group(parent, content);
initialize(result);
return result;
}
public class Group extends SecurityCommandCenterRequest {
private static final String REST_PATH = "v1/{+parent}/findings:group";
private final java.util.regex.Pattern PARENT_PATTERN =
java.util.regex.Pattern.compile("^folders/[^/]+/sources/[^/]+$");
/**
* Filters an organization or source's findings and groups them by their specified properties. To
* group across all sources provide a `-` as the source id. Example:
* /v1/organizations/{organization_id}/sources/-/findings,
* /v1/folders/{folder_id}/sources/-/findings, /v1/projects/{project_id}/sources/-/findings
*
* Create a request for the method "findings.group".
*
* This request holds the parameters needed by the the securitycenter server. After setting any
* optional parameters, call the {@link Group#execute()} method to invoke the remote operation.
* {@link
* Group#initialize(com.google.api.client.googleapis.services.AbstractGoogleClientRequest)} must
* be called to initialize this instance immediately after invoking the constructor.
*
* @param parent Required. Name of the source to groupBy. Its format is
* `organizations/[organization_id]/sources/[source_id]`,
* `folders/[folder_id]/sources/[source_id]`, or `projects/[project_id]/sources/[source_id]`.
* To groupBy across all sources provide a source_id of `-`. For example:
* `organizations/{organization_id}/sources/-, folders/{folder_id}/sources/-`, or
* `projects/{project_id}/sources/-`
* @param content the {@link com.google.api.services.securitycenter.v1.model.GroupFindingsRequest}
* @since 1.13
*/
protected Group(java.lang.String parent, com.google.api.services.securitycenter.v1.model.GroupFindingsRequest content) {
super(SecurityCommandCenter.this, "POST", REST_PATH, content, com.google.api.services.securitycenter.v1.model.GroupFindingsResponse.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 " +
"^folders/[^/]+/sources/[^/]+$");
}
}
@Override
public Group set$Xgafv(java.lang.String $Xgafv) {
return (Group) super.set$Xgafv($Xgafv);
}
@Override
public Group setAccessToken(java.lang.String accessToken) {
return (Group) super.setAccessToken(accessToken);
}
@Override
public Group setAlt(java.lang.String alt) {
return (Group) super.setAlt(alt);
}
@Override
public Group setCallback(java.lang.String callback) {
return (Group) super.setCallback(callback);
}
@Override
public Group setFields(java.lang.String fields) {
return (Group) super.setFields(fields);
}
@Override
public Group setKey(java.lang.String key) {
return (Group) super.setKey(key);
}
@Override
public Group setOauthToken(java.lang.String oauthToken) {
return (Group) super.setOauthToken(oauthToken);
}
@Override
public Group setPrettyPrint(java.lang.Boolean prettyPrint) {
return (Group) super.setPrettyPrint(prettyPrint);
}
@Override
public Group setQuotaUser(java.lang.String quotaUser) {
return (Group) super.setQuotaUser(quotaUser);
}
@Override
public Group setUploadType(java.lang.String uploadType) {
return (Group) super.setUploadType(uploadType);
}
@Override
public Group setUploadProtocol(java.lang.String uploadProtocol) {
return (Group) super.setUploadProtocol(uploadProtocol);
}
/**
* Required. Name of the source to groupBy. Its format is
* `organizations/[organization_id]/sources/[source_id]`,
* `folders/[folder_id]/sources/[source_id]`, or
* `projects/[project_id]/sources/[source_id]`. To groupBy across all sources provide a
* source_id of `-`. For example: `organizations/{organization_id}/sources/-,
* folders/{folder_id}/sources/-`, or `projects/{project_id}/sources/-`
*/
@com.google.api.client.util.Key
private java.lang.String parent;
/** Required. Name of the source to groupBy. Its format is
`organizations/[organization_id]/sources/[source_id]`, `folders/[folder_id]/sources/[source_id]`,
or `projects/[project_id]/sources/[source_id]`. To groupBy across all sources provide a source_id
of `-`. For example: `organizations/{organization_id}/sources/-, folders/{folder_id}/sources/-`, or
`projects/{project_id}/sources/-`
*/
public java.lang.String getParent() {
return parent;
}
/**
* Required. Name of the source to groupBy. Its format is
* `organizations/[organization_id]/sources/[source_id]`,
* `folders/[folder_id]/sources/[source_id]`, or
* `projects/[project_id]/sources/[source_id]`. To groupBy across all sources provide a
* source_id of `-`. For example: `organizations/{organization_id}/sources/-,
* folders/{folder_id}/sources/-`, or `projects/{project_id}/sources/-`
*/
public Group 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 " +
"^folders/[^/]+/sources/[^/]+$");
}
this.parent = parent;
return this;
}
@Override
public Group set(String parameterName, Object value) {
return (Group) super.set(parameterName, value);
}
}
/**
* Lists an organization or source's findings. To list across all sources provide a `-` as the
* source id. Example: /v1/organizations/{organization_id}/sources/-/findings
*
* Create a request for the method "findings.list".
*
* This request holds the parameters needed by the securitycenter server. After setting any
* optional parameters, call the {@link List#execute()} method to invoke the remote operation.
*
* @param parent Required. Name of the source the findings belong to. Its format is
* `organizations/[organization_id]/sources/[source_id]`,
* `folders/[folder_id]/sources/[source_id]`, or `projects/[project_id]/sources/[source_id]`.
* To list across all sources provide a source_id of `-`. For example:
* `organizations/{organization_id}/sources/-`, `folders/{folder_id}/sources/-` or
* `projects/{projects_id}/sources/-`
* @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 SecurityCommandCenterRequest {
private static final String REST_PATH = "v1/{+parent}/findings";
private final java.util.regex.Pattern PARENT_PATTERN =
java.util.regex.Pattern.compile("^folders/[^/]+/sources/[^/]+$");
/**
* Lists an organization or source's findings. To list across all sources provide a `-` as the
* source id. Example: /v1/organizations/{organization_id}/sources/-/findings
*
* Create a request for the method "findings.list".
*
* This request holds the parameters needed by the the securitycenter 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. Name of the source the findings belong to. Its format is
* `organizations/[organization_id]/sources/[source_id]`,
* `folders/[folder_id]/sources/[source_id]`, or `projects/[project_id]/sources/[source_id]`.
* To list across all sources provide a source_id of `-`. For example:
* `organizations/{organization_id}/sources/-`, `folders/{folder_id}/sources/-` or
* `projects/{projects_id}/sources/-`
* @since 1.13
*/
protected List(java.lang.String parent) {
super(SecurityCommandCenter.this, "GET", REST_PATH, null, com.google.api.services.securitycenter.v1.model.ListFindingsResponse.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 " +
"^folders/[^/]+/sources/[^/]+$");
}
}
@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. Name of the source the findings belong to. Its format is
* `organizations/[organization_id]/sources/[source_id]`,
* `folders/[folder_id]/sources/[source_id]`, or
* `projects/[project_id]/sources/[source_id]`. To list across all sources provide a
* source_id of `-`. For example: `organizations/{organization_id}/sources/-`,
* `folders/{folder_id}/sources/-` or `projects/{projects_id}/sources/-`
*/
@com.google.api.client.util.Key
private java.lang.String parent;
/** Required. Name of the source the findings belong to. Its format is
`organizations/[organization_id]/sources/[source_id]`, `folders/[folder_id]/sources/[source_id]`,
or `projects/[project_id]/sources/[source_id]`. To list across all sources provide a source_id of
`-`. For example: `organizations/{organization_id}/sources/-`, `folders/{folder_id}/sources/-` or
`projects/{projects_id}/sources/-`
*/
public java.lang.String getParent() {
return parent;
}
/**
* Required. Name of the source the findings belong to. Its format is
* `organizations/[organization_id]/sources/[source_id]`,
* `folders/[folder_id]/sources/[source_id]`, or
* `projects/[project_id]/sources/[source_id]`. To list across all sources provide a
* source_id of `-`. For example: `organizations/{organization_id}/sources/-`,
* `folders/{folder_id}/sources/-` or `projects/{projects_id}/sources/-`
*/
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 " +
"^folders/[^/]+/sources/[^/]+$");
}
this.parent = parent;
return this;
}
/**
* When compare_duration is set, the ListFindingsResult's "state_change" attribute is
* updated to indicate whether the finding had its state changed, the finding's state
* remained unchanged, or if the finding was added in any state during the
* compare_duration period of time that precedes the read_time. This is the time between
* (read_time - compare_duration) and read_time. The state_change value is derived based
* on the presence and state of the finding at the two points in time. Intermediate state
* changes between the two times don't affect the result. For example, the results aren't
* affected if the finding is made inactive and then active again. Possible "state_change"
* values when compare_duration is specified: * "CHANGED": indicates that the finding was
* present and matched the given filter at the start of compare_duration, but changed its
* state at read_time. * "UNCHANGED": indicates that the finding was present and matched
* the given filter at the start of compare_duration and did not change state at
* read_time. * "ADDED": indicates that the finding did not match the given filter or was
* not present at the start of compare_duration, but was present at read_time. *
* "REMOVED": indicates that the finding was present and matched the filter at the start
* of compare_duration, but did not match the filter at read_time. If compare_duration is
* not specified, then the only possible state_change is "UNUSED", which will be the
* state_change set for all findings present at read_time.
*/
@com.google.api.client.util.Key
private String compareDuration;
/** When compare_duration is set, the ListFindingsResult's "state_change" attribute is updated to
indicate whether the finding had its state changed, the finding's state remained unchanged, or if
the finding was added in any state during the compare_duration period of time that precedes the
read_time. This is the time between (read_time - compare_duration) and read_time. The state_change
value is derived based on the presence and state of the finding at the two points in time.
Intermediate state changes between the two times don't affect the result. For example, the results
aren't affected if the finding is made inactive and then active again. Possible "state_change"
values when compare_duration is specified: * "CHANGED": indicates that the finding was present and
matched the given filter at the start of compare_duration, but changed its state at read_time. *
"UNCHANGED": indicates that the finding was present and matched the given filter at the start of
compare_duration and did not change state at read_time. * "ADDED": indicates that the finding did
not match the given filter or was not present at the start of compare_duration, but was present at
read_time. * "REMOVED": indicates that the finding was present and matched the filter at the start
of compare_duration, but did not match the filter at read_time. If compare_duration is not
specified, then the only possible state_change is "UNUSED", which will be the state_change set for
all findings present at read_time.
*/
public String getCompareDuration() {
return compareDuration;
}
/**
* When compare_duration is set, the ListFindingsResult's "state_change" attribute is
* updated to indicate whether the finding had its state changed, the finding's state
* remained unchanged, or if the finding was added in any state during the
* compare_duration period of time that precedes the read_time. This is the time between
* (read_time - compare_duration) and read_time. The state_change value is derived based
* on the presence and state of the finding at the two points in time. Intermediate state
* changes between the two times don't affect the result. For example, the results aren't
* affected if the finding is made inactive and then active again. Possible "state_change"
* values when compare_duration is specified: * "CHANGED": indicates that the finding was
* present and matched the given filter at the start of compare_duration, but changed its
* state at read_time. * "UNCHANGED": indicates that the finding was present and matched
* the given filter at the start of compare_duration and did not change state at
* read_time. * "ADDED": indicates that the finding did not match the given filter or was
* not present at the start of compare_duration, but was present at read_time. *
* "REMOVED": indicates that the finding was present and matched the filter at the start
* of compare_duration, but did not match the filter at read_time. If compare_duration is
* not specified, then the only possible state_change is "UNUSED", which will be the
* state_change set for all findings present at read_time.
*/
public List setCompareDuration(String compareDuration) {
this.compareDuration = compareDuration;
return this;
}
/**
* A field mask to specify the Finding fields to be listed in the response. An empty field
* mask will list all fields.
*/
@com.google.api.client.util.Key
private String fieldMask;
/** A field mask to specify the Finding fields to be listed in the response. An empty field mask will
list all fields.
*/
public String getFieldMask() {
return fieldMask;
}
/**
* A field mask to specify the Finding fields to be listed in the response. An empty field
* mask will list all fields.
*/
public List setFieldMask(String fieldMask) {
this.fieldMask = fieldMask;
return this;
}
/**
* Expression that defines the filter to apply across findings. The expression is a list
* of one or more restrictions combined via logical operators `AND` and `OR`. Parentheses
* are supported, and `OR` has higher precedence than `AND`. Restrictions have the form `
* ` and may have a `-` character in front of them to indicate negation. Examples include:
* * name * source_properties.a_property * security_marks.marks.marka The supported
* operators are: * `=` for all value types. * `>`, `<`, `>=`, `<=` for integer values. *
* `:`, meaning substring matching, for strings. The supported value types are: * string
* literals in quotes. * integer literals without quotes. * boolean literals `true` and
* `false` without quotes. The following field and operator combinations are supported: *
* name: `=` * parent: `=`, `:` * resource_name: `=`, `:` * state: `=`, `:` * category:
* `=`, `:` * external_uri: `=`, `:` * event_time: `=`, `>`, `<`, `>=`, `<=` Usage: This
* should be milliseconds since epoch or an RFC3339 string. Examples: `event_time =
* "2019-06-10T16:07:18-07:00"` `event_time = 1560208038000` * severity: `=`, `:` *
* workflow_state: `=`, `:` * security_marks.marks: `=`, `:` * source_properties: `=`,
* `:`, `>`, `<`, `>=`, `<=` For example, `source_properties.size = 100` is a valid filter
* string. Use a partial match on the empty string to filter based on a property existing:
* `source_properties.my_property : ""` Use a negated partial match on the empty string to
* filter based on a property not existing: `-source_properties.my_property : ""` *
* resource: * resource.name: `=`, `:` * resource.parent_name: `=`, `:` *
* resource.parent_display_name: `=`, `:` * resource.project_name: `=`, `:` *
* resource.project_display_name: `=`, `:` * resource.type: `=`, `:` *
* resource.folders.resource_folder: `=`, `:` * resource.display_name: `=`, `:`
*/
@com.google.api.client.util.Key
private java.lang.String filter;
/** Expression that defines the filter to apply across findings. The expression is a list of one or
more restrictions combined via logical operators `AND` and `OR`. Parentheses are supported, and
`OR` has higher precedence than `AND`. Restrictions have the form ` ` and may have a `-` character
in front of them to indicate negation. Examples include: * name * source_properties.a_property *
security_marks.marks.marka The supported operators are: * `=` for all value types. * `>`, `<`,
`>=`, `<=` for integer values. * `:`, meaning substring matching, for strings. The supported value
types are: * string literals in quotes. * integer literals without quotes. * boolean literals
`true` and `false` without quotes. The following field and operator combinations are supported: *
name: `=` * parent: `=`, `:` * resource_name: `=`, `:` * state: `=`, `:` * category: `=`, `:` *
external_uri: `=`, `:` * event_time: `=`, `>`, `<`, `>=`, `<=` Usage: This should be milliseconds
since epoch or an RFC3339 string. Examples: `event_time = "2019-06-10T16:07:18-07:00"` `event_time
= 1560208038000` * severity: `=`, `:` * workflow_state: `=`, `:` * security_marks.marks: `=`, `:` *
source_properties: `=`, `:`, `>`, `<`, `>=`, `<=` For example, `source_properties.size = 100` is a
valid filter string. Use a partial match on the empty string to filter based on a property
existing: `source_properties.my_property : ""` Use a negated partial match on the empty string to
filter based on a property not existing: `-source_properties.my_property : ""` * resource: *
resource.name: `=`, `:` * resource.parent_name: `=`, `:` * resource.parent_display_name: `=`, `:` *
resource.project_name: `=`, `:` * resource.project_display_name: `=`, `:` * resource.type: `=`, `:`
* resource.folders.resource_folder: `=`, `:` * resource.display_name: `=`, `:`
*/
public java.lang.String getFilter() {
return filter;
}
/**
* Expression that defines the filter to apply across findings. The expression is a list
* of one or more restrictions combined via logical operators `AND` and `OR`. Parentheses
* are supported, and `OR` has higher precedence than `AND`. Restrictions have the form `
* ` and may have a `-` character in front of them to indicate negation. Examples include:
* * name * source_properties.a_property * security_marks.marks.marka The supported
* operators are: * `=` for all value types. * `>`, `<`, `>=`, `<=` for integer values. *
* `:`, meaning substring matching, for strings. The supported value types are: * string
* literals in quotes. * integer literals without quotes. * boolean literals `true` and
* `false` without quotes. The following field and operator combinations are supported: *
* name: `=` * parent: `=`, `:` * resource_name: `=`, `:` * state: `=`, `:` * category:
* `=`, `:` * external_uri: `=`, `:` * event_time: `=`, `>`, `<`, `>=`, `<=` Usage: This
* should be milliseconds since epoch or an RFC3339 string. Examples: `event_time =
* "2019-06-10T16:07:18-07:00"` `event_time = 1560208038000` * severity: `=`, `:` *
* workflow_state: `=`, `:` * security_marks.marks: `=`, `:` * source_properties: `=`,
* `:`, `>`, `<`, `>=`, `<=` For example, `source_properties.size = 100` is a valid filter
* string. Use a partial match on the empty string to filter based on a property existing:
* `source_properties.my_property : ""` Use a negated partial match on the empty string to
* filter based on a property not existing: `-source_properties.my_property : ""` *
* resource: * resource.name: `=`, `:` * resource.parent_name: `=`, `:` *
* resource.parent_display_name: `=`, `:` * resource.project_name: `=`, `:` *
* resource.project_display_name: `=`, `:` * resource.type: `=`, `:` *
* resource.folders.resource_folder: `=`, `:` * resource.display_name: `=`, `:`
*/
public List setFilter(java.lang.String filter) {
this.filter = filter;
return this;
}
/**
* Expression that defines what fields and order to use for sorting. The string value
* should follow SQL syntax: comma separated list of fields. For example:
* "name,resource_properties.a_property". The default sorting order is ascending. To
* specify descending order for a field, a suffix " desc" should be appended to the field
* name. For example: "name desc,source_properties.a_property". Redundant space characters
* in the syntax are insignificant. "name desc,source_properties.a_property" and " name
* desc , source_properties.a_property " are equivalent. The following fields are
* supported: name parent state category resource_name event_time source_properties
* security_marks.marks
*/
@com.google.api.client.util.Key
private java.lang.String orderBy;
/** Expression that defines what fields and order to use for sorting. The string value should follow
SQL syntax: comma separated list of fields. For example: "name,resource_properties.a_property". The
default sorting order is ascending. To specify descending order for a field, a suffix " desc"
should be appended to the field name. For example: "name desc,source_properties.a_property".
Redundant space characters in the syntax are insignificant. "name
desc,source_properties.a_property" and " name desc , source_properties.a_property " are equivalent.
The following fields are supported: name parent state category resource_name event_time
source_properties security_marks.marks
*/
public java.lang.String getOrderBy() {
return orderBy;
}
/**
* Expression that defines what fields and order to use for sorting. The string value
* should follow SQL syntax: comma separated list of fields. For example:
* "name,resource_properties.a_property". The default sorting order is ascending. To
* specify descending order for a field, a suffix " desc" should be appended to the field
* name. For example: "name desc,source_properties.a_property". Redundant space characters
* in the syntax are insignificant. "name desc,source_properties.a_property" and " name
* desc , source_properties.a_property " are equivalent. The following fields are
* supported: name parent state category resource_name event_time source_properties
* security_marks.marks
*/
public List setOrderBy(java.lang.String orderBy) {
this.orderBy = orderBy;
return this;
}
/**
* The maximum number of results to return in a single response. Default is 10, minimum is
* 1, maximum is 1000.
*/
@com.google.api.client.util.Key
private java.lang.Integer pageSize;
/** The maximum number of results to return in a single response. Default is 10, minimum is 1, maximum
is 1000.
*/
public java.lang.Integer getPageSize() {
return pageSize;
}
/**
* The maximum number of results to return in a single response. Default is 10, minimum is
* 1, maximum is 1000.
*/
public List setPageSize(java.lang.Integer pageSize) {
this.pageSize = pageSize;
return this;
}
/**
* The value returned by the last `ListFindingsResponse`; indicates that this is a
* continuation of a prior `ListFindings` call, and that the system should return the next
* page of data.
*/
@com.google.api.client.util.Key
private java.lang.String pageToken;
/** The value returned by the last `ListFindingsResponse`; indicates that this is a continuation of a
prior `ListFindings` call, and that the system should return the next page of data.
*/
public java.lang.String getPageToken() {
return pageToken;
}
/**
* The value returned by the last `ListFindingsResponse`; indicates that this is a
* continuation of a prior `ListFindings` call, and that the system should return the next
* page of data.
*/
public List setPageToken(java.lang.String pageToken) {
this.pageToken = pageToken;
return this;
}
/**
* Time used as a reference point when filtering findings. The filter is limited to
* findings existing at the supplied time and their values are those at that specific
* time. Absence of this field will default to the API's version of NOW.
*/
@com.google.api.client.util.Key
private String readTime;
/** Time used as a reference point when filtering findings. The filter is limited to findings existing
at the supplied time and their values are those at that specific time. Absence of this field will
default to the API's version of NOW.
*/
public String getReadTime() {
return readTime;
}
/**
* Time used as a reference point when filtering findings. The filter is limited to
* findings existing at the supplied time and their values are those at that specific
* time. Absence of this field will default to the API's version of NOW.
*/
public List setReadTime(String readTime) {
this.readTime = readTime;
return this;
}
@Override
public List set(String parameterName, Object value) {
return (List) super.set(parameterName, value);
}
}
/**
* Creates or updates a finding. The corresponding source must exist for a finding creation to
* succeed.
*
* Create a request for the method "findings.patch".
*
* This request holds the parameters needed by the securitycenter server. After setting any
* optional parameters, call the {@link Patch#execute()} method to invoke the remote operation.
*
* @param name The [relative resource
* name](https://cloud.google.com/apis/design/resource_names#relative_resource_name) of the
* finding. Example:
* "organizations/{organization_id}/sources/{source_id}/findings/{finding_id}",
* "folders/{folder_id}/sources/{source_id}/findings/{finding_id}",
* "projects/{project_id}/sources/{source_id}/findings/{finding_id}".
* @param content the {@link com.google.api.services.securitycenter.v1.model.Finding}
* @return the request
*/
public Patch patch(java.lang.String name, com.google.api.services.securitycenter.v1.model.Finding content) throws java.io.IOException {
Patch result = new Patch(name, content);
initialize(result);
return result;
}
public class Patch extends SecurityCommandCenterRequest {
private static final String REST_PATH = "v1/{+name}";
private final java.util.regex.Pattern NAME_PATTERN =
java.util.regex.Pattern.compile("^folders/[^/]+/sources/[^/]+/findings/[^/]+$");
/**
* Creates or updates a finding. The corresponding source must exist for a finding creation to
* succeed.
*
* Create a request for the method "findings.patch".
*
* This request holds the parameters needed by the the securitycenter server. After setting any
* optional parameters, call the {@link Patch#execute()} method to invoke the remote operation.
* {@link
* Patch#initialize(com.google.api.client.googleapis.services.AbstractGoogleClientRequest)} must
* be called to initialize this instance immediately after invoking the constructor.
*
* @param name The [relative resource
* name](https://cloud.google.com/apis/design/resource_names#relative_resource_name) of the
* finding. Example:
* "organizations/{organization_id}/sources/{source_id}/findings/{finding_id}",
* "folders/{folder_id}/sources/{source_id}/findings/{finding_id}",
* "projects/{project_id}/sources/{source_id}/findings/{finding_id}".
* @param content the {@link com.google.api.services.securitycenter.v1.model.Finding}
* @since 1.13
*/
protected Patch(java.lang.String name, com.google.api.services.securitycenter.v1.model.Finding content) {
super(SecurityCommandCenter.this, "PATCH", REST_PATH, content, com.google.api.services.securitycenter.v1.model.Finding.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 " +
"^folders/[^/]+/sources/[^/]+/findings/[^/]+$");
}
}
@Override
public Patch set$Xgafv(java.lang.String $Xgafv) {
return (Patch) super.set$Xgafv($Xgafv);
}
@Override
public Patch setAccessToken(java.lang.String accessToken) {
return (Patch) super.setAccessToken(accessToken);
}
@Override
public Patch setAlt(java.lang.String alt) {
return (Patch) super.setAlt(alt);
}
@Override
public Patch setCallback(java.lang.String callback) {
return (Patch) super.setCallback(callback);
}
@Override
public Patch setFields(java.lang.String fields) {
return (Patch) super.setFields(fields);
}
@Override
public Patch setKey(java.lang.String key) {
return (Patch) super.setKey(key);
}
@Override
public Patch setOauthToken(java.lang.String oauthToken) {
return (Patch) super.setOauthToken(oauthToken);
}
@Override
public Patch setPrettyPrint(java.lang.Boolean prettyPrint) {
return (Patch) super.setPrettyPrint(prettyPrint);
}
@Override
public Patch setQuotaUser(java.lang.String quotaUser) {
return (Patch) super.setQuotaUser(quotaUser);
}
@Override
public Patch setUploadType(java.lang.String uploadType) {
return (Patch) super.setUploadType(uploadType);
}
@Override
public Patch setUploadProtocol(java.lang.String uploadProtocol) {
return (Patch) super.setUploadProtocol(uploadProtocol);
}
/**
* The [relative resource
* name](https://cloud.google.com/apis/design/resource_names#relative_resource_name) of
* the finding. Example:
* "organizations/{organization_id}/sources/{source_id}/findings/{finding_id}",
* "folders/{folder_id}/sources/{source_id}/findings/{finding_id}",
* "projects/{project_id}/sources/{source_id}/findings/{finding_id}".
*/
@com.google.api.client.util.Key
private java.lang.String name;
/** The [relative resource
name](https://cloud.google.com/apis/design/resource_names#relative_resource_name) of the finding.
Example: "organizations/{organization_id}/sources/{source_id}/findings/{finding_id}",
"folders/{folder_id}/sources/{source_id}/findings/{finding_id}",
"projects/{project_id}/sources/{source_id}/findings/{finding_id}".
*/
public java.lang.String getName() {
return name;
}
/**
* The [relative resource
* name](https://cloud.google.com/apis/design/resource_names#relative_resource_name) of
* the finding. Example:
* "organizations/{organization_id}/sources/{source_id}/findings/{finding_id}",
* "folders/{folder_id}/sources/{source_id}/findings/{finding_id}",
* "projects/{project_id}/sources/{source_id}/findings/{finding_id}".
*/
public Patch setName(java.lang.String name) {
if (!getSuppressPatternChecks()) {
com.google.api.client.util.Preconditions.checkArgument(NAME_PATTERN.matcher(name).matches(),
"Parameter name must conform to the pattern " +
"^folders/[^/]+/sources/[^/]+/findings/[^/]+$");
}
this.name = name;
return this;
}
/**
* The FieldMask to use when updating the finding resource. This field should not be
* specified when creating a finding. When updating a finding, an empty mask is treated as
* updating all mutable fields and replacing source_properties. Individual
* source_properties can be added/updated by using "source_properties." in the field mask.
*/
@com.google.api.client.util.Key
private String updateMask;
/** The FieldMask to use when updating the finding resource. This field should not be specified when
creating a finding. When updating a finding, an empty mask is treated as updating all mutable
fields and replacing source_properties. Individual source_properties can be added/updated by using
"source_properties." in the field mask.
*/
public String getUpdateMask() {
return updateMask;
}
/**
* The FieldMask to use when updating the finding resource. This field should not be
* specified when creating a finding. When updating a finding, an empty mask is treated as
* updating all mutable fields and replacing source_properties. Individual
* source_properties can be added/updated by using "source_properties." in the field mask.
*/
public Patch setUpdateMask(String updateMask) {
this.updateMask = updateMask;
return this;
}
@Override
public Patch set(String parameterName, Object value) {
return (Patch) super.set(parameterName, value);
}
}
/**
* Updates the mute state of a finding.
*
* Create a request for the method "findings.setMute".
*
* This request holds the parameters needed by the securitycenter server. After setting any
* optional parameters, call the {@link SetMute#execute()} method to invoke the remote operation.
*
* @param name Required. The [relative resource
* name](https://cloud.google.com/apis/design/resource_names#relative_resource_name) of the
* finding. Example:
* `organizations/{organization_id}/sources/{source_id}/findings/{finding_id}`,
* `folders/{folder_id}/sources/{source_id}/findings/{finding_id}`,
* `projects/{project_id}/sources/{source_id}/findings/{finding_id}`.
* @param content the {@link com.google.api.services.securitycenter.v1.model.SetMuteRequest}
* @return the request
*/
public SetMute setMute(java.lang.String name, com.google.api.services.securitycenter.v1.model.SetMuteRequest content) throws java.io.IOException {
SetMute result = new SetMute(name, content);
initialize(result);
return result;
}
public class SetMute extends SecurityCommandCenterRequest {
private static final String REST_PATH = "v1/{+name}:setMute";
private final java.util.regex.Pattern NAME_PATTERN =
java.util.regex.Pattern.compile("^folders/[^/]+/sources/[^/]+/findings/[^/]+$");
/**
* Updates the mute state of a finding.
*
* Create a request for the method "findings.setMute".
*
* This request holds the parameters needed by the the securitycenter server. After setting any
* optional parameters, call the {@link SetMute#execute()} method to invoke the remote operation.
* {@link
* SetMute#initialize(com.google.api.client.googleapis.services.AbstractGoogleClientRequest)} must
* be called to initialize this instance immediately after invoking the constructor.
*
* @param name Required. The [relative resource
* name](https://cloud.google.com/apis/design/resource_names#relative_resource_name) of the
* finding. Example:
* `organizations/{organization_id}/sources/{source_id}/findings/{finding_id}`,
* `folders/{folder_id}/sources/{source_id}/findings/{finding_id}`,
* `projects/{project_id}/sources/{source_id}/findings/{finding_id}`.
* @param content the {@link com.google.api.services.securitycenter.v1.model.SetMuteRequest}
* @since 1.13
*/
protected SetMute(java.lang.String name, com.google.api.services.securitycenter.v1.model.SetMuteRequest content) {
super(SecurityCommandCenter.this, "POST", REST_PATH, content, com.google.api.services.securitycenter.v1.model.Finding.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 " +
"^folders/[^/]+/sources/[^/]+/findings/[^/]+$");
}
}
@Override
public SetMute set$Xgafv(java.lang.String $Xgafv) {
return (SetMute) super.set$Xgafv($Xgafv);
}
@Override
public SetMute setAccessToken(java.lang.String accessToken) {
return (SetMute) super.setAccessToken(accessToken);
}
@Override
public SetMute setAlt(java.lang.String alt) {
return (SetMute) super.setAlt(alt);
}
@Override
public SetMute setCallback(java.lang.String callback) {
return (SetMute) super.setCallback(callback);
}
@Override
public SetMute setFields(java.lang.String fields) {
return (SetMute) super.setFields(fields);
}
@Override
public SetMute setKey(java.lang.String key) {
return (SetMute) super.setKey(key);
}
@Override
public SetMute setOauthToken(java.lang.String oauthToken) {
return (SetMute) super.setOauthToken(oauthToken);
}
@Override
public SetMute setPrettyPrint(java.lang.Boolean prettyPrint) {
return (SetMute) super.setPrettyPrint(prettyPrint);
}
@Override
public SetMute setQuotaUser(java.lang.String quotaUser) {
return (SetMute) super.setQuotaUser(quotaUser);
}
@Override
public SetMute setUploadType(java.lang.String uploadType) {
return (SetMute) super.setUploadType(uploadType);
}
@Override
public SetMute setUploadProtocol(java.lang.String uploadProtocol) {
return (SetMute) super.setUploadProtocol(uploadProtocol);
}
/**
* Required. The [relative resource
* name](https://cloud.google.com/apis/design/resource_names#relative_resource_name) of
* the finding. Example:
* `organizations/{organization_id}/sources/{source_id}/findings/{finding_id}`,
* `folders/{folder_id}/sources/{source_id}/findings/{finding_id}`,
* `projects/{project_id}/sources/{source_id}/findings/{finding_id}`.
*/
@com.google.api.client.util.Key
private java.lang.String name;
/** Required. The [relative resource
name](https://cloud.google.com/apis/design/resource_names#relative_resource_name) of the finding.
Example: `organizations/{organization_id}/sources/{source_id}/findings/{finding_id}`,
`folders/{folder_id}/sources/{source_id}/findings/{finding_id}`,
`projects/{project_id}/sources/{source_id}/findings/{finding_id}`.
*/
public java.lang.String getName() {
return name;
}
/**
* Required. The [relative resource
* name](https://cloud.google.com/apis/design/resource_names#relative_resource_name) of
* the finding. Example:
* `organizations/{organization_id}/sources/{source_id}/findings/{finding_id}`,
* `folders/{folder_id}/sources/{source_id}/findings/{finding_id}`,
* `projects/{project_id}/sources/{source_id}/findings/{finding_id}`.
*/
public SetMute 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 " +
"^folders/[^/]+/sources/[^/]+/findings/[^/]+$");
}
this.name = name;
return this;
}
@Override
public SetMute set(String parameterName, Object value) {
return (SetMute) super.set(parameterName, value);
}
}
/**
* Updates the state of a finding.
*
* Create a request for the method "findings.setState".
*
* This request holds the parameters needed by the securitycenter server. After setting any
* optional parameters, call the {@link SetState#execute()} method to invoke the remote operation.
*
* @param name Required. The [relative resource
* name](https://cloud.google.com/apis/design/resource_names#relative_resource_name) of the
* finding. Example:
* `organizations/{organization_id}/sources/{source_id}/findings/{finding_id}`,
* `folders/{folder_id}/sources/{source_id}/findings/{finding_id}`,
* `projects/{project_id}/sources/{source_id}/findings/{finding_id}`.
* @param content the {@link com.google.api.services.securitycenter.v1.model.SetFindingStateRequest}
* @return the request
*/
public SetState setState(java.lang.String name, com.google.api.services.securitycenter.v1.model.SetFindingStateRequest content) throws java.io.IOException {
SetState result = new SetState(name, content);
initialize(result);
return result;
}
public class SetState extends SecurityCommandCenterRequest {
private static final String REST_PATH = "v1/{+name}:setState";
private final java.util.regex.Pattern NAME_PATTERN =
java.util.regex.Pattern.compile("^folders/[^/]+/sources/[^/]+/findings/[^/]+$");
/**
* Updates the state of a finding.
*
* Create a request for the method "findings.setState".
*
* This request holds the parameters needed by the the securitycenter server. After setting any
* optional parameters, call the {@link SetState#execute()} method to invoke the remote operation.
* {@link
* SetState#initialize(com.google.api.client.googleapis.services.AbstractGoogleClientRequest)}
* must be called to initialize this instance immediately after invoking the constructor.
*
* @param name Required. The [relative resource
* name](https://cloud.google.com/apis/design/resource_names#relative_resource_name) of the
* finding. Example:
* `organizations/{organization_id}/sources/{source_id}/findings/{finding_id}`,
* `folders/{folder_id}/sources/{source_id}/findings/{finding_id}`,
* `projects/{project_id}/sources/{source_id}/findings/{finding_id}`.
* @param content the {@link com.google.api.services.securitycenter.v1.model.SetFindingStateRequest}
* @since 1.13
*/
protected SetState(java.lang.String name, com.google.api.services.securitycenter.v1.model.SetFindingStateRequest content) {
super(SecurityCommandCenter.this, "POST", REST_PATH, content, com.google.api.services.securitycenter.v1.model.Finding.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 " +
"^folders/[^/]+/sources/[^/]+/findings/[^/]+$");
}
}
@Override
public SetState set$Xgafv(java.lang.String $Xgafv) {
return (SetState) super.set$Xgafv($Xgafv);
}
@Override
public SetState setAccessToken(java.lang.String accessToken) {
return (SetState) super.setAccessToken(accessToken);
}
@Override
public SetState setAlt(java.lang.String alt) {
return (SetState) super.setAlt(alt);
}
@Override
public SetState setCallback(java.lang.String callback) {
return (SetState) super.setCallback(callback);
}
@Override
public SetState setFields(java.lang.String fields) {
return (SetState) super.setFields(fields);
}
@Override
public SetState setKey(java.lang.String key) {
return (SetState) super.setKey(key);
}
@Override
public SetState setOauthToken(java.lang.String oauthToken) {
return (SetState) super.setOauthToken(oauthToken);
}
@Override
public SetState setPrettyPrint(java.lang.Boolean prettyPrint) {
return (SetState) super.setPrettyPrint(prettyPrint);
}
@Override
public SetState setQuotaUser(java.lang.String quotaUser) {
return (SetState) super.setQuotaUser(quotaUser);
}
@Override
public SetState setUploadType(java.lang.String uploadType) {
return (SetState) super.setUploadType(uploadType);
}
@Override
public SetState setUploadProtocol(java.lang.String uploadProtocol) {
return (SetState) super.setUploadProtocol(uploadProtocol);
}
/**
* Required. The [relative resource
* name](https://cloud.google.com/apis/design/resource_names#relative_resource_name) of
* the finding. Example:
* `organizations/{organization_id}/sources/{source_id}/findings/{finding_id}`,
* `folders/{folder_id}/sources/{source_id}/findings/{finding_id}`,
* `projects/{project_id}/sources/{source_id}/findings/{finding_id}`.
*/
@com.google.api.client.util.Key
private java.lang.String name;
/** Required. The [relative resource
name](https://cloud.google.com/apis/design/resource_names#relative_resource_name) of the finding.
Example: `organizations/{organization_id}/sources/{source_id}/findings/{finding_id}`,
`folders/{folder_id}/sources/{source_id}/findings/{finding_id}`,
`projects/{project_id}/sources/{source_id}/findings/{finding_id}`.
*/
public java.lang.String getName() {
return name;
}
/**
* Required. The [relative resource
* name](https://cloud.google.com/apis/design/resource_names#relative_resource_name) of
* the finding. Example:
* `organizations/{organization_id}/sources/{source_id}/findings/{finding_id}`,
* `folders/{folder_id}/sources/{source_id}/findings/{finding_id}`,
* `projects/{project_id}/sources/{source_id}/findings/{finding_id}`.
*/
public SetState 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 " +
"^folders/[^/]+/sources/[^/]+/findings/[^/]+$");
}
this.name = name;
return this;
}
@Override
public SetState set(String parameterName, Object value) {
return (SetState) super.set(parameterName, value);
}
}
/**
* Updates security marks.
*
* Create a request for the method "findings.updateSecurityMarks".
*
* This request holds the parameters needed by the securitycenter server. After setting any
* optional parameters, call the {@link UpdateSecurityMarks#execute()} method to invoke the remote
* operation.
*
* @param name The relative resource name of the SecurityMarks. See:
* https://cloud.google.com/apis/design/resource_names#relative_resource_name Examples:
* "organizations/{organization_id}/assets/{asset_id}/securityMarks"
* "organizations/{organization_id}/sources/{source_id}/findings/{finding_id}/securityMarks".
* @param content the {@link com.google.api.services.securitycenter.v1.model.SecurityMarks}
* @return the request
*/
public UpdateSecurityMarks updateSecurityMarks(java.lang.String name, com.google.api.services.securitycenter.v1.model.SecurityMarks content) throws java.io.IOException {
UpdateSecurityMarks result = new UpdateSecurityMarks(name, content);
initialize(result);
return result;
}
public class UpdateSecurityMarks extends SecurityCommandCenterRequest {
private static final String REST_PATH = "v1/{+name}";
private final java.util.regex.Pattern NAME_PATTERN =
java.util.regex.Pattern.compile("^folders/[^/]+/sources/[^/]+/findings/[^/]+/securityMarks$");
/**
* Updates security marks.
*
* Create a request for the method "findings.updateSecurityMarks".
*
* This request holds the parameters needed by the the securitycenter server. After setting any
* optional parameters, call the {@link UpdateSecurityMarks#execute()} method to invoke the remote
* operation. {@link UpdateSecurityMarks#initialize(com.google.api.client.googleapis.services.
* AbstractGoogleClientRequest)} must be called to initialize this instance immediately after
* invoking the constructor.
*
* @param name The relative resource name of the SecurityMarks. See:
* https://cloud.google.com/apis/design/resource_names#relative_resource_name Examples:
* "organizations/{organization_id}/assets/{asset_id}/securityMarks"
* "organizations/{organization_id}/sources/{source_id}/findings/{finding_id}/securityMarks".
* @param content the {@link com.google.api.services.securitycenter.v1.model.SecurityMarks}
* @since 1.13
*/
protected UpdateSecurityMarks(java.lang.String name, com.google.api.services.securitycenter.v1.model.SecurityMarks content) {
super(SecurityCommandCenter.this, "PATCH", REST_PATH, content, com.google.api.services.securitycenter.v1.model.SecurityMarks.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 " +
"^folders/[^/]+/sources/[^/]+/findings/[^/]+/securityMarks$");
}
}
@Override
public UpdateSecurityMarks set$Xgafv(java.lang.String $Xgafv) {
return (UpdateSecurityMarks) super.set$Xgafv($Xgafv);
}
@Override
public UpdateSecurityMarks setAccessToken(java.lang.String accessToken) {
return (UpdateSecurityMarks) super.setAccessToken(accessToken);
}
@Override
public UpdateSecurityMarks setAlt(java.lang.String alt) {
return (UpdateSecurityMarks) super.setAlt(alt);
}
@Override
public UpdateSecurityMarks setCallback(java.lang.String callback) {
return (UpdateSecurityMarks) super.setCallback(callback);
}
@Override
public UpdateSecurityMarks setFields(java.lang.String fields) {
return (UpdateSecurityMarks) super.setFields(fields);
}
@Override
public UpdateSecurityMarks setKey(java.lang.String key) {
return (UpdateSecurityMarks) super.setKey(key);
}
@Override
public UpdateSecurityMarks setOauthToken(java.lang.String oauthToken) {
return (UpdateSecurityMarks) super.setOauthToken(oauthToken);
}
@Override
public UpdateSecurityMarks setPrettyPrint(java.lang.Boolean prettyPrint) {
return (UpdateSecurityMarks) super.setPrettyPrint(prettyPrint);
}
@Override
public UpdateSecurityMarks setQuotaUser(java.lang.String quotaUser) {
return (UpdateSecurityMarks) super.setQuotaUser(quotaUser);
}
@Override
public UpdateSecurityMarks setUploadType(java.lang.String uploadType) {
return (UpdateSecurityMarks) super.setUploadType(uploadType);
}
@Override
public UpdateSecurityMarks setUploadProtocol(java.lang.String uploadProtocol) {
return (UpdateSecurityMarks) super.setUploadProtocol(uploadProtocol);
}
/**
* The relative resource name of the SecurityMarks. See:
* https://cloud.google.com/apis/design/resource_names#relative_resource_name Examples:
* "organizations/{organization_id}/assets/{asset_id}/securityMarks" "organizations/{organ
* ization_id}/sources/{source_id}/findings/{finding_id}/securityMarks".
*/
@com.google.api.client.util.Key
private java.lang.String name;
/** The relative resource name of the SecurityMarks. See:
https://cloud.google.com/apis/design/resource_names#relative_resource_name Examples:
"organizations/{organization_id}/assets/{asset_id}/securityMarks"
"organizations/{organization_id}/sources/{source_id}/findings/{finding_id}/securityMarks".
*/
public java.lang.String getName() {
return name;
}
/**
* The relative resource name of the SecurityMarks. See:
* https://cloud.google.com/apis/design/resource_names#relative_resource_name Examples:
* "organizations/{organization_id}/assets/{asset_id}/securityMarks" "organizations/{organ
* ization_id}/sources/{source_id}/findings/{finding_id}/securityMarks".
*/
public UpdateSecurityMarks 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 " +
"^folders/[^/]+/sources/[^/]+/findings/[^/]+/securityMarks$");
}
this.name = name;
return this;
}
/**
* The time at which the updated SecurityMarks take effect. If not set uses current server
* time. Updates will be applied to the SecurityMarks that are active immediately
* preceding this time. Must be earlier or equal to the server time.
*/
@com.google.api.client.util.Key
private String startTime;
/** The time at which the updated SecurityMarks take effect. If not set uses current server time.
Updates will be applied to the SecurityMarks that are active immediately preceding this time. Must
be earlier or equal to the server time.
*/
public String getStartTime() {
return startTime;
}
/**
* The time at which the updated SecurityMarks take effect. If not set uses current server
* time. Updates will be applied to the SecurityMarks that are active immediately
* preceding this time. Must be earlier or equal to the server time.
*/
public UpdateSecurityMarks setStartTime(String startTime) {
this.startTime = startTime;
return this;
}
/**
* The FieldMask to use when updating the security marks resource. The field mask must not
* contain duplicate fields. If empty or set to "marks", all marks will be replaced.
* Individual marks can be updated using "marks.".
*/
@com.google.api.client.util.Key
private String updateMask;
/** The FieldMask to use when updating the security marks resource. The field mask must not contain
duplicate fields. If empty or set to "marks", all marks will be replaced. Individual marks can be
updated using "marks.".
*/
public String getUpdateMask() {
return updateMask;
}
/**
* The FieldMask to use when updating the security marks resource. The field mask must not
* contain duplicate fields. If empty or set to "marks", all marks will be replaced.
* Individual marks can be updated using "marks.".
*/
public UpdateSecurityMarks setUpdateMask(String updateMask) {
this.updateMask = updateMask;
return this;
}
@Override
public UpdateSecurityMarks set(String parameterName, Object value) {
return (UpdateSecurityMarks) super.set(parameterName, value);
}
}
/**
* An accessor for creating requests from the ExternalSystems collection.
*
* The typical use is:
*
* {@code SecurityCommandCenter securitycenter = new SecurityCommandCenter(...);}
* {@code SecurityCommandCenter.ExternalSystems.List request = securitycenter.externalSystems().list(parameters ...)}
*
*
* @return the resource collection
*/
public ExternalSystems externalSystems() {
return new ExternalSystems();
}
/**
* The "externalSystems" collection of methods.
*/
public class ExternalSystems {
/**
* Updates external system. This is for a given finding.
*
* Create a request for the method "externalSystems.patch".
*
* This request holds the parameters needed by the securitycenter server. After setting any
* optional parameters, call the {@link Patch#execute()} method to invoke the remote operation.
*
* @param name Full resource name of the external system, for example:
* "organizations/1234/sources/5678/findings/123456/externalSystems/jira",
* "folders/1234/sources/5678/findings/123456/externalSystems/jira",
* "projects/1234/sources/5678/findings/123456/externalSystems/jira"
* @param content the {@link com.google.api.services.securitycenter.v1.model.GoogleCloudSecuritycenterV1ExternalSystem}
* @return the request
*/
public Patch patch(java.lang.String name, com.google.api.services.securitycenter.v1.model.GoogleCloudSecuritycenterV1ExternalSystem content) throws java.io.IOException {
Patch result = new Patch(name, content);
initialize(result);
return result;
}
public class Patch extends SecurityCommandCenterRequest {
private static final String REST_PATH = "v1/{+name}";
private final java.util.regex.Pattern NAME_PATTERN =
java.util.regex.Pattern.compile("^folders/[^/]+/sources/[^/]+/findings/[^/]+/externalSystems/[^/]+$");
/**
* Updates external system. This is for a given finding.
*
* Create a request for the method "externalSystems.patch".
*
* This request holds the parameters needed by the the securitycenter server. After setting any
* optional parameters, call the {@link Patch#execute()} method to invoke the remote operation.
* {@link
* Patch#initialize(com.google.api.client.googleapis.services.AbstractGoogleClientRequest)} must
* be called to initialize this instance immediately after invoking the constructor.
*
* @param name Full resource name of the external system, for example:
* "organizations/1234/sources/5678/findings/123456/externalSystems/jira",
* "folders/1234/sources/5678/findings/123456/externalSystems/jira",
* "projects/1234/sources/5678/findings/123456/externalSystems/jira"
* @param content the {@link com.google.api.services.securitycenter.v1.model.GoogleCloudSecuritycenterV1ExternalSystem}
* @since 1.13
*/
protected Patch(java.lang.String name, com.google.api.services.securitycenter.v1.model.GoogleCloudSecuritycenterV1ExternalSystem content) {
super(SecurityCommandCenter.this, "PATCH", REST_PATH, content, com.google.api.services.securitycenter.v1.model.GoogleCloudSecuritycenterV1ExternalSystem.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 " +
"^folders/[^/]+/sources/[^/]+/findings/[^/]+/externalSystems/[^/]+$");
}
}
@Override
public Patch set$Xgafv(java.lang.String $Xgafv) {
return (Patch) super.set$Xgafv($Xgafv);
}
@Override
public Patch setAccessToken(java.lang.String accessToken) {
return (Patch) super.setAccessToken(accessToken);
}
@Override
public Patch setAlt(java.lang.String alt) {
return (Patch) super.setAlt(alt);
}
@Override
public Patch setCallback(java.lang.String callback) {
return (Patch) super.setCallback(callback);
}
@Override
public Patch setFields(java.lang.String fields) {
return (Patch) super.setFields(fields);
}
@Override
public Patch setKey(java.lang.String key) {
return (Patch) super.setKey(key);
}
@Override
public Patch setOauthToken(java.lang.String oauthToken) {
return (Patch) super.setOauthToken(oauthToken);
}
@Override
public Patch setPrettyPrint(java.lang.Boolean prettyPrint) {
return (Patch) super.setPrettyPrint(prettyPrint);
}
@Override
public Patch setQuotaUser(java.lang.String quotaUser) {
return (Patch) super.setQuotaUser(quotaUser);
}
@Override
public Patch setUploadType(java.lang.String uploadType) {
return (Patch) super.setUploadType(uploadType);
}
@Override
public Patch setUploadProtocol(java.lang.String uploadProtocol) {
return (Patch) super.setUploadProtocol(uploadProtocol);
}
/**
* Full resource name of the external system, for example:
* "organizations/1234/sources/5678/findings/123456/externalSystems/jira",
* "folders/1234/sources/5678/findings/123456/externalSystems/jira",
* "projects/1234/sources/5678/findings/123456/externalSystems/jira"
*/
@com.google.api.client.util.Key
private java.lang.String name;
/** Full resource name of the external system, for example:
"organizations/1234/sources/5678/findings/123456/externalSystems/jira",
"folders/1234/sources/5678/findings/123456/externalSystems/jira",
"projects/1234/sources/5678/findings/123456/externalSystems/jira"
*/
public java.lang.String getName() {
return name;
}
/**
* Full resource name of the external system, for example:
* "organizations/1234/sources/5678/findings/123456/externalSystems/jira",
* "folders/1234/sources/5678/findings/123456/externalSystems/jira",
* "projects/1234/sources/5678/findings/123456/externalSystems/jira"
*/
public Patch setName(java.lang.String name) {
if (!getSuppressPatternChecks()) {
com.google.api.client.util.Preconditions.checkArgument(NAME_PATTERN.matcher(name).matches(),
"Parameter name must conform to the pattern " +
"^folders/[^/]+/sources/[^/]+/findings/[^/]+/externalSystems/[^/]+$");
}
this.name = name;
return this;
}
/**
* The FieldMask to use when updating the external system resource. If empty all mutable
* fields will be updated.
*/
@com.google.api.client.util.Key
private String updateMask;
/** The FieldMask to use when updating the external system resource. If empty all mutable fields will
be updated.
*/
public String getUpdateMask() {
return updateMask;
}
/**
* The FieldMask to use when updating the external system resource. If empty all mutable
* fields will be updated.
*/
public Patch setUpdateMask(String updateMask) {
this.updateMask = updateMask;
return this;
}
@Override
public Patch set(String parameterName, Object value) {
return (Patch) super.set(parameterName, value);
}
}
}
}
}
}
/**
* An accessor for creating requests from the Organizations collection.
*
* The typical use is:
*
* {@code SecurityCommandCenter securitycenter = new SecurityCommandCenter(...);}
* {@code SecurityCommandCenter.Organizations.List request = securitycenter.organizations().list(parameters ...)}
*
*
* @return the resource collection
*/
public Organizations organizations() {
return new Organizations();
}
/**
* The "organizations" collection of methods.
*/
public class Organizations {
/**
* Gets the settings for an organization.
*
* Create a request for the method "organizations.getOrganizationSettings".
*
* This request holds the parameters needed by the securitycenter server. After setting any
* optional parameters, call the {@link GetOrganizationSettings#execute()} method to invoke the
* remote operation.
*
* @param name Required. Name of the organization to get organization settings for. Its format is
* `organizations/[organization_id]/organizationSettings`.
* @return the request
*/
public GetOrganizationSettings getOrganizationSettings(java.lang.String name) throws java.io.IOException {
GetOrganizationSettings result = new GetOrganizationSettings(name);
initialize(result);
return result;
}
public class GetOrganizationSettings extends SecurityCommandCenterRequest {
private static final String REST_PATH = "v1/{+name}";
private final java.util.regex.Pattern NAME_PATTERN =
java.util.regex.Pattern.compile("^organizations/[^/]+/organizationSettings$");
/**
* Gets the settings for an organization.
*
* Create a request for the method "organizations.getOrganizationSettings".
*
* This request holds the parameters needed by the the securitycenter server. After setting any
* optional parameters, call the {@link GetOrganizationSettings#execute()} method to invoke the
* remote operation. {@link GetOrganizationSettings#initialize(com.google.api.client.googleapi
* s.services.AbstractGoogleClientRequest)} must be called to initialize this instance immediately
* after invoking the constructor.
*
* @param name Required. Name of the organization to get organization settings for. Its format is
* `organizations/[organization_id]/organizationSettings`.
* @since 1.13
*/
protected GetOrganizationSettings(java.lang.String name) {
super(SecurityCommandCenter.this, "GET", REST_PATH, null, com.google.api.services.securitycenter.v1.model.OrganizationSettings.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/[^/]+/organizationSettings$");
}
}
@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 GetOrganizationSettings set$Xgafv(java.lang.String $Xgafv) {
return (GetOrganizationSettings) super.set$Xgafv($Xgafv);
}
@Override
public GetOrganizationSettings setAccessToken(java.lang.String accessToken) {
return (GetOrganizationSettings) super.setAccessToken(accessToken);
}
@Override
public GetOrganizationSettings setAlt(java.lang.String alt) {
return (GetOrganizationSettings) super.setAlt(alt);
}
@Override
public GetOrganizationSettings setCallback(java.lang.String callback) {
return (GetOrganizationSettings) super.setCallback(callback);
}
@Override
public GetOrganizationSettings setFields(java.lang.String fields) {
return (GetOrganizationSettings) super.setFields(fields);
}
@Override
public GetOrganizationSettings setKey(java.lang.String key) {
return (GetOrganizationSettings) super.setKey(key);
}
@Override
public GetOrganizationSettings setOauthToken(java.lang.String oauthToken) {
return (GetOrganizationSettings) super.setOauthToken(oauthToken);
}
@Override
public GetOrganizationSettings setPrettyPrint(java.lang.Boolean prettyPrint) {
return (GetOrganizationSettings) super.setPrettyPrint(prettyPrint);
}
@Override
public GetOrganizationSettings setQuotaUser(java.lang.String quotaUser) {
return (GetOrganizationSettings) super.setQuotaUser(quotaUser);
}
@Override
public GetOrganizationSettings setUploadType(java.lang.String uploadType) {
return (GetOrganizationSettings) super.setUploadType(uploadType);
}
@Override
public GetOrganizationSettings setUploadProtocol(java.lang.String uploadProtocol) {
return (GetOrganizationSettings) super.setUploadProtocol(uploadProtocol);
}
/**
* Required. Name of the organization to get organization settings for. Its format is
* `organizations/[organization_id]/organizationSettings`.
*/
@com.google.api.client.util.Key
private java.lang.String name;
/** Required. Name of the organization to get organization settings for. Its format is
`organizations/[organization_id]/organizationSettings`.
*/
public java.lang.String getName() {
return name;
}
/**
* Required. Name of the organization to get organization settings for. Its format is
* `organizations/[organization_id]/organizationSettings`.
*/
public GetOrganizationSettings 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/[^/]+/organizationSettings$");
}
this.name = name;
return this;
}
@Override
public GetOrganizationSettings set(String parameterName, Object value) {
return (GetOrganizationSettings) super.set(parameterName, value);
}
}
/**
* Updates an organization's settings.
*
* Create a request for the method "organizations.updateOrganizationSettings".
*
* This request holds the parameters needed by the securitycenter server. After setting any
* optional parameters, call the {@link UpdateOrganizationSettings#execute()} method to invoke the
* remote operation.
*
* @param name The relative resource name of the settings. See:
* https://cloud.google.com/apis/design/resource_names#relative_resource_name Example:
* "organizations/{organization_id}/organizationSettings".
* @param content the {@link com.google.api.services.securitycenter.v1.model.OrganizationSettings}
* @return the request
*/
public UpdateOrganizationSettings updateOrganizationSettings(java.lang.String name, com.google.api.services.securitycenter.v1.model.OrganizationSettings content) throws java.io.IOException {
UpdateOrganizationSettings result = new UpdateOrganizationSettings(name, content);
initialize(result);
return result;
}
public class UpdateOrganizationSettings extends SecurityCommandCenterRequest {
private static final String REST_PATH = "v1/{+name}";
private final java.util.regex.Pattern NAME_PATTERN =
java.util.regex.Pattern.compile("^organizations/[^/]+/organizationSettings$");
/**
* Updates an organization's settings.
*
* Create a request for the method "organizations.updateOrganizationSettings".
*
* This request holds the parameters needed by the the securitycenter server. After setting any
* optional parameters, call the {@link UpdateOrganizationSettings#execute()} method to invoke the
* remote operation. {@link UpdateOrganizationSettings#initialize(com.google.api.client.google
* apis.services.AbstractGoogleClientRequest)} must be called to initialize this instance
* immediately after invoking the constructor.
*
* @param name The relative resource name of the settings. See:
* https://cloud.google.com/apis/design/resource_names#relative_resource_name Example:
* "organizations/{organization_id}/organizationSettings".
* @param content the {@link com.google.api.services.securitycenter.v1.model.OrganizationSettings}
* @since 1.13
*/
protected UpdateOrganizationSettings(java.lang.String name, com.google.api.services.securitycenter.v1.model.OrganizationSettings content) {
super(SecurityCommandCenter.this, "PATCH", REST_PATH, content, com.google.api.services.securitycenter.v1.model.OrganizationSettings.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/[^/]+/organizationSettings$");
}
}
@Override
public UpdateOrganizationSettings set$Xgafv(java.lang.String $Xgafv) {
return (UpdateOrganizationSettings) super.set$Xgafv($Xgafv);
}
@Override
public UpdateOrganizationSettings setAccessToken(java.lang.String accessToken) {
return (UpdateOrganizationSettings) super.setAccessToken(accessToken);
}
@Override
public UpdateOrganizationSettings setAlt(java.lang.String alt) {
return (UpdateOrganizationSettings) super.setAlt(alt);
}
@Override
public UpdateOrganizationSettings setCallback(java.lang.String callback) {
return (UpdateOrganizationSettings) super.setCallback(callback);
}
@Override
public UpdateOrganizationSettings setFields(java.lang.String fields) {
return (UpdateOrganizationSettings) super.setFields(fields);
}
@Override
public UpdateOrganizationSettings setKey(java.lang.String key) {
return (UpdateOrganizationSettings) super.setKey(key);
}
@Override
public UpdateOrganizationSettings setOauthToken(java.lang.String oauthToken) {
return (UpdateOrganizationSettings) super.setOauthToken(oauthToken);
}
@Override
public UpdateOrganizationSettings setPrettyPrint(java.lang.Boolean prettyPrint) {
return (UpdateOrganizationSettings) super.setPrettyPrint(prettyPrint);
}
@Override
public UpdateOrganizationSettings setQuotaUser(java.lang.String quotaUser) {
return (UpdateOrganizationSettings) super.setQuotaUser(quotaUser);
}
@Override
public UpdateOrganizationSettings setUploadType(java.lang.String uploadType) {
return (UpdateOrganizationSettings) super.setUploadType(uploadType);
}
@Override
public UpdateOrganizationSettings setUploadProtocol(java.lang.String uploadProtocol) {
return (UpdateOrganizationSettings) super.setUploadProtocol(uploadProtocol);
}
/**
* The relative resource name of the settings. See:
* https://cloud.google.com/apis/design/resource_names#relative_resource_name Example:
* "organizations/{organization_id}/organizationSettings".
*/
@com.google.api.client.util.Key
private java.lang.String name;
/** The relative resource name of the settings. See:
https://cloud.google.com/apis/design/resource_names#relative_resource_name Example:
"organizations/{organization_id}/organizationSettings".
*/
public java.lang.String getName() {
return name;
}
/**
* The relative resource name of the settings. See:
* https://cloud.google.com/apis/design/resource_names#relative_resource_name Example:
* "organizations/{organization_id}/organizationSettings".
*/
public UpdateOrganizationSettings 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/[^/]+/organizationSettings$");
}
this.name = name;
return this;
}
/**
* The FieldMask to use when updating the settings resource. If empty all mutable fields will
* be updated.
*/
@com.google.api.client.util.Key
private String updateMask;
/** The FieldMask to use when updating the settings resource. If empty all mutable fields will be
updated.
*/
public String getUpdateMask() {
return updateMask;
}
/**
* The FieldMask to use when updating the settings resource. If empty all mutable fields will
* be updated.
*/
public UpdateOrganizationSettings setUpdateMask(String updateMask) {
this.updateMask = updateMask;
return this;
}
@Override
public UpdateOrganizationSettings set(String parameterName, Object value) {
return (UpdateOrganizationSettings) super.set(parameterName, value);
}
}
/**
* An accessor for creating requests from the Assets collection.
*
* The typical use is:
*
* {@code SecurityCommandCenter securitycenter = new SecurityCommandCenter(...);}
* {@code SecurityCommandCenter.Assets.List request = securitycenter.assets().list(parameters ...)}
*
*
* @return the resource collection
*/
public Assets assets() {
return new Assets();
}
/**
* The "assets" collection of methods.
*/
public class Assets {
/**
* Filters an organization's assets and groups them by their specified properties.
*
* Create a request for the method "assets.group".
*
* This request holds the parameters needed by the securitycenter server. After setting any
* optional parameters, call the {@link Group#execute()} method to invoke the remote operation.
*
* @param parent Required. The name of the parent to group the assets by. Its format is
* `organizations/[organization_id]`, `folders/[folder_id]`, or `projects/[project_id]`.
* @param content the {@link com.google.api.services.securitycenter.v1.model.GroupAssetsRequest}
* @return the request
*/
public Group group(java.lang.String parent, com.google.api.services.securitycenter.v1.model.GroupAssetsRequest content) throws java.io.IOException {
Group result = new Group(parent, content);
initialize(result);
return result;
}
public class Group extends SecurityCommandCenterRequest {
private static final String REST_PATH = "v1/{+parent}/assets:group";
private final java.util.regex.Pattern PARENT_PATTERN =
java.util.regex.Pattern.compile("^organizations/[^/]+$");
/**
* Filters an organization's assets and groups them by their specified properties.
*
* Create a request for the method "assets.group".
*
* This request holds the parameters needed by the the securitycenter server. After setting any
* optional parameters, call the {@link Group#execute()} method to invoke the remote operation.
* {@link
* Group#initialize(com.google.api.client.googleapis.services.AbstractGoogleClientRequest)} must
* be called to initialize this instance immediately after invoking the constructor.
*
* @param parent Required. The name of the parent to group the assets by. Its format is
* `organizations/[organization_id]`, `folders/[folder_id]`, or `projects/[project_id]`.
* @param content the {@link com.google.api.services.securitycenter.v1.model.GroupAssetsRequest}
* @since 1.13
*/
protected Group(java.lang.String parent, com.google.api.services.securitycenter.v1.model.GroupAssetsRequest content) {
super(SecurityCommandCenter.this, "POST", REST_PATH, content, com.google.api.services.securitycenter.v1.model.GroupAssetsResponse.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/[^/]+$");
}
}
@Override
public Group set$Xgafv(java.lang.String $Xgafv) {
return (Group) super.set$Xgafv($Xgafv);
}
@Override
public Group setAccessToken(java.lang.String accessToken) {
return (Group) super.setAccessToken(accessToken);
}
@Override
public Group setAlt(java.lang.String alt) {
return (Group) super.setAlt(alt);
}
@Override
public Group setCallback(java.lang.String callback) {
return (Group) super.setCallback(callback);
}
@Override
public Group setFields(java.lang.String fields) {
return (Group) super.setFields(fields);
}
@Override
public Group setKey(java.lang.String key) {
return (Group) super.setKey(key);
}
@Override
public Group setOauthToken(java.lang.String oauthToken) {
return (Group) super.setOauthToken(oauthToken);
}
@Override
public Group setPrettyPrint(java.lang.Boolean prettyPrint) {
return (Group) super.setPrettyPrint(prettyPrint);
}
@Override
public Group setQuotaUser(java.lang.String quotaUser) {
return (Group) super.setQuotaUser(quotaUser);
}
@Override
public Group setUploadType(java.lang.String uploadType) {
return (Group) super.setUploadType(uploadType);
}
@Override
public Group setUploadProtocol(java.lang.String uploadProtocol) {
return (Group) super.setUploadProtocol(uploadProtocol);
}
/**
* Required. The name of the parent to group the assets by. Its format is
* `organizations/[organization_id]`, `folders/[folder_id]`, or `projects/[project_id]`.
*/
@com.google.api.client.util.Key
private java.lang.String parent;
/** Required. The name of the parent to group the assets by. Its format is
`organizations/[organization_id]`, `folders/[folder_id]`, or `projects/[project_id]`.
*/
public java.lang.String getParent() {
return parent;
}
/**
* Required. The name of the parent to group the assets by. Its format is
* `organizations/[organization_id]`, `folders/[folder_id]`, or `projects/[project_id]`.
*/
public Group 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/[^/]+$");
}
this.parent = parent;
return this;
}
@Override
public Group set(String parameterName, Object value) {
return (Group) super.set(parameterName, value);
}
}
/**
* Lists an organization's assets.
*
* Create a request for the method "assets.list".
*
* This request holds the parameters needed by the securitycenter server. After setting any
* optional parameters, call the {@link List#execute()} method to invoke the remote operation.
*
* @param parent Required. The name of the parent resource that contains the assets. The value that you can specify
* on parent depends on the method in which you specify parent. You can specify one of the
* following values: `organizations/[organization_id]`, `folders/[folder_id]`, or
* `projects/[project_id]`.
* @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 SecurityCommandCenterRequest {
private static final String REST_PATH = "v1/{+parent}/assets";
private final java.util.regex.Pattern PARENT_PATTERN =
java.util.regex.Pattern.compile("^organizations/[^/]+$");
/**
* Lists an organization's assets.
*
* Create a request for the method "assets.list".
*
* This request holds the parameters needed by the the securitycenter server. After setting any
* optional parameters, call the {@link List#execute()} method to invoke the remote operation.
* {@link List#initialize(com.google.api.client.googleapis.services.AbstractGoogleClientRequest)}
* must be called to initialize this instance immediately after invoking the constructor.
*
* @param parent Required. The name of the parent resource that contains the assets. The value that you can specify
* on parent depends on the method in which you specify parent. You can specify one of the
* following values: `organizations/[organization_id]`, `folders/[folder_id]`, or
* `projects/[project_id]`.
* @since 1.13
*/
protected List(java.lang.String parent) {
super(SecurityCommandCenter.this, "GET", REST_PATH, null, com.google.api.services.securitycenter.v1.model.ListAssetsResponse.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/[^/]+$");
}
}
@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 parent resource that contains the assets. The value that you
* can specify on parent depends on the method in which you specify parent. You can specify
* one of the following values: `organizations/[organization_id]`, `folders/[folder_id]`, or
* `projects/[project_id]`.
*/
@com.google.api.client.util.Key
private java.lang.String parent;
/** Required. The name of the parent resource that contains the assets. The value that you can specify
on parent depends on the method in which you specify parent. You can specify one of the following
values: `organizations/[organization_id]`, `folders/[folder_id]`, or `projects/[project_id]`.
*/
public java.lang.String getParent() {
return parent;
}
/**
* Required. The name of the parent resource that contains the assets. The value that you
* can specify on parent depends on the method in which you specify parent. You can specify
* one of the following values: `organizations/[organization_id]`, `folders/[folder_id]`, or
* `projects/[project_id]`.
*/
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/[^/]+$");
}
this.parent = parent;
return this;
}
/**
* When compare_duration is set, the ListAssetsResult's "state_change" attribute is updated
* to indicate whether the asset was added, removed, or remained present during the
* compare_duration period of time that precedes the read_time. This is the time between
* (read_time - compare_duration) and read_time. The state_change value is derived based on
* the presence of the asset at the two points in time. Intermediate state changes between
* the two times don't affect the result. For example, the results aren't affected if the
* asset is removed and re-created again. Possible "state_change" values when
* compare_duration is specified: * "ADDED": indicates that the asset was not present at the
* start of compare_duration, but present at read_time. * "REMOVED": indicates that the
* asset was present at the start of compare_duration, but not present at read_time. *
* "ACTIVE": indicates that the asset was present at both the start and the end of the time
* period defined by compare_duration and read_time. If compare_duration is not specified,
* then the only possible state_change is "UNUSED", which will be the state_change set for
* all assets present at read_time.
*/
@com.google.api.client.util.Key
private String compareDuration;
/** When compare_duration is set, the ListAssetsResult's "state_change" attribute is updated to
indicate whether the asset was added, removed, or remained present during the compare_duration
period of time that precedes the read_time. This is the time between (read_time - compare_duration)
and read_time. The state_change value is derived based on the presence of the asset at the two
points in time. Intermediate state changes between the two times don't affect the result. For
example, the results aren't affected if the asset is removed and re-created again. Possible
"state_change" values when compare_duration is specified: * "ADDED": indicates that the asset was
not present at the start of compare_duration, but present at read_time. * "REMOVED": indicates that
the asset was present at the start of compare_duration, but not present at read_time. * "ACTIVE":
indicates that the asset was present at both the start and the end of the time period defined by
compare_duration and read_time. If compare_duration is not specified, then the only possible
state_change is "UNUSED", which will be the state_change set for all assets present at read_time.
*/
public String getCompareDuration() {
return compareDuration;
}
/**
* When compare_duration is set, the ListAssetsResult's "state_change" attribute is updated
* to indicate whether the asset was added, removed, or remained present during the
* compare_duration period of time that precedes the read_time. This is the time between
* (read_time - compare_duration) and read_time. The state_change value is derived based on
* the presence of the asset at the two points in time. Intermediate state changes between
* the two times don't affect the result. For example, the results aren't affected if the
* asset is removed and re-created again. Possible "state_change" values when
* compare_duration is specified: * "ADDED": indicates that the asset was not present at the
* start of compare_duration, but present at read_time. * "REMOVED": indicates that the
* asset was present at the start of compare_duration, but not present at read_time. *
* "ACTIVE": indicates that the asset was present at both the start and the end of the time
* period defined by compare_duration and read_time. If compare_duration is not specified,
* then the only possible state_change is "UNUSED", which will be the state_change set for
* all assets present at read_time.
*/
public List setCompareDuration(String compareDuration) {
this.compareDuration = compareDuration;
return this;
}
/**
* A field mask to specify the ListAssetsResult fields to be listed in the response. An
* empty field mask will list all fields.
*/
@com.google.api.client.util.Key
private String fieldMask;
/** A field mask to specify the ListAssetsResult fields to be listed in the response. An empty field
mask will list all fields.
*/
public String getFieldMask() {
return fieldMask;
}
/**
* A field mask to specify the ListAssetsResult fields to be listed in the response. An
* empty field mask will list all fields.
*/
public List setFieldMask(String fieldMask) {
this.fieldMask = fieldMask;
return this;
}
/**
* Expression that defines the filter to apply across assets. The expression is a list of
* zero or more restrictions combined via logical operators `AND` and `OR`. Parentheses are
* supported, and `OR` has higher precedence than `AND`. Restrictions have the form ` ` and
* may have a `-` character in front of them to indicate negation. The fields map to those
* defined in the Asset resource. Examples include: * name *
* security_center_properties.resource_name * resource_properties.a_property *
* security_marks.marks.marka The supported operators are: * `=` for all value types. * `>`,
* `<`, `>=`, `<=` for integer values. * `:`, meaning substring matching, for strings. The
* supported value types are: * string literals in quotes. * integer literals without
* quotes. * boolean literals `true` and `false` without quotes. The following are the
* allowed field and operator combinations: * name: `=` * update_time: `=`, `>`, `<`, `>=`,
* `<=` Usage: This should be milliseconds since epoch or an RFC3339 string. Examples:
* `update_time = "2019-06-10T16:07:18-07:00"` `update_time = 1560208038000` * create_time:
* `=`, `>`, `<`, `>=`, `<=` Usage: This should be milliseconds since epoch or an RFC3339
* string. Examples: `create_time = "2019-06-10T16:07:18-07:00"` `create_time =
* 1560208038000` * iam_policy.policy_blob: `=`, `:` * resource_properties: `=`, `:`, `>`,
* `<`, `>=`, `<=` * security_marks.marks: `=`, `:` *
* security_center_properties.resource_name: `=`, `:` *
* security_center_properties.resource_display_name: `=`, `:` *
* security_center_properties.resource_type: `=`, `:` *
* security_center_properties.resource_parent: `=`, `:` *
* security_center_properties.resource_parent_display_name: `=`, `:` *
* security_center_properties.resource_project: `=`, `:` *
* security_center_properties.resource_project_display_name: `=`, `:` *
* security_center_properties.resource_owners: `=`, `:` For example,
* `resource_properties.size = 100` is a valid filter string. Use a partial match on the
* empty string to filter based on a property existing: `resource_properties.my_property :
* ""` Use a negated partial match on the empty string to filter based on a property not
* existing: `-resource_properties.my_property : ""`
*/
@com.google.api.client.util.Key
private java.lang.String filter;
/** Expression that defines the filter to apply across assets. The expression is a list of zero or more
restrictions combined via logical operators `AND` and `OR`. Parentheses are supported, and `OR` has
higher precedence than `AND`. Restrictions have the form ` ` and may have a `-` character in front
of them to indicate negation. The fields map to those defined in the Asset resource. Examples
include: * name * security_center_properties.resource_name * resource_properties.a_property *
security_marks.marks.marka The supported operators are: * `=` for all value types. * `>`, `<`,
`>=`, `<=` for integer values. * `:`, meaning substring matching, for strings. The supported value
types are: * string literals in quotes. * integer literals without quotes. * boolean literals
`true` and `false` without quotes. The following are the allowed field and operator combinations: *
name: `=` * update_time: `=`, `>`, `<`, `>=`, `<=` Usage: This should be milliseconds since epoch
or an RFC3339 string. Examples: `update_time = "2019-06-10T16:07:18-07:00"` `update_time =
1560208038000` * create_time: `=`, `>`, `<`, `>=`, `<=` Usage: This should be milliseconds since
epoch or an RFC3339 string. Examples: `create_time = "2019-06-10T16:07:18-07:00"` `create_time =
1560208038000` * iam_policy.policy_blob: `=`, `:` * resource_properties: `=`, `:`, `>`, `<`, `>=`,
`<=` * security_marks.marks: `=`, `:` * security_center_properties.resource_name: `=`, `:` *
security_center_properties.resource_display_name: `=`, `:` *
security_center_properties.resource_type: `=`, `:` * security_center_properties.resource_parent:
`=`, `:` * security_center_properties.resource_parent_display_name: `=`, `:` *
security_center_properties.resource_project: `=`, `:` *
security_center_properties.resource_project_display_name: `=`, `:` *
security_center_properties.resource_owners: `=`, `:` For example, `resource_properties.size = 100`
is a valid filter string. Use a partial match on the empty string to filter based on a property
existing: `resource_properties.my_property : ""` Use a negated partial match on the empty string to
filter based on a property not existing: `-resource_properties.my_property : ""`
*/
public java.lang.String getFilter() {
return filter;
}
/**
* Expression that defines the filter to apply across assets. The expression is a list of
* zero or more restrictions combined via logical operators `AND` and `OR`. Parentheses are
* supported, and `OR` has higher precedence than `AND`. Restrictions have the form ` ` and
* may have a `-` character in front of them to indicate negation. The fields map to those
* defined in the Asset resource. Examples include: * name *
* security_center_properties.resource_name * resource_properties.a_property *
* security_marks.marks.marka The supported operators are: * `=` for all value types. * `>`,
* `<`, `>=`, `<=` for integer values. * `:`, meaning substring matching, for strings. The
* supported value types are: * string literals in quotes. * integer literals without
* quotes. * boolean literals `true` and `false` without quotes. The following are the
* allowed field and operator combinations: * name: `=` * update_time: `=`, `>`, `<`, `>=`,
* `<=` Usage: This should be milliseconds since epoch or an RFC3339 string. Examples:
* `update_time = "2019-06-10T16:07:18-07:00"` `update_time = 1560208038000` * create_time:
* `=`, `>`, `<`, `>=`, `<=` Usage: This should be milliseconds since epoch or an RFC3339
* string. Examples: `create_time = "2019-06-10T16:07:18-07:00"` `create_time =
* 1560208038000` * iam_policy.policy_blob: `=`, `:` * resource_properties: `=`, `:`, `>`,
* `<`, `>=`, `<=` * security_marks.marks: `=`, `:` *
* security_center_properties.resource_name: `=`, `:` *
* security_center_properties.resource_display_name: `=`, `:` *
* security_center_properties.resource_type: `=`, `:` *
* security_center_properties.resource_parent: `=`, `:` *
* security_center_properties.resource_parent_display_name: `=`, `:` *
* security_center_properties.resource_project: `=`, `:` *
* security_center_properties.resource_project_display_name: `=`, `:` *
* security_center_properties.resource_owners: `=`, `:` For example,
* `resource_properties.size = 100` is a valid filter string. Use a partial match on the
* empty string to filter based on a property existing: `resource_properties.my_property :
* ""` Use a negated partial match on the empty string to filter based on a property not
* existing: `-resource_properties.my_property : ""`
*/
public List setFilter(java.lang.String filter) {
this.filter = filter;
return this;
}
/**
* Expression that defines what fields and order to use for sorting. The string value should
* follow SQL syntax: comma separated list of fields. For example:
* "name,resource_properties.a_property". The default sorting order is ascending. To specify
* descending order for a field, a suffix " desc" should be appended to the field name. For
* example: "name desc,resource_properties.a_property". Redundant space characters in the
* syntax are insignificant. "name desc,resource_properties.a_property" and " name desc ,
* resource_properties.a_property " are equivalent. The following fields are supported: name
* update_time resource_properties security_marks.marks
* security_center_properties.resource_name security_center_properties.resource_display_name
* security_center_properties.resource_parent
* security_center_properties.resource_parent_display_name
* security_center_properties.resource_project
* security_center_properties.resource_project_display_name
* security_center_properties.resource_type
*/
@com.google.api.client.util.Key
private java.lang.String orderBy;
/** Expression that defines what fields and order to use for sorting. The string value should follow
SQL syntax: comma separated list of fields. For example: "name,resource_properties.a_property". The
default sorting order is ascending. To specify descending order for a field, a suffix " desc"
should be appended to the field name. For example: "name desc,resource_properties.a_property".
Redundant space characters in the syntax are insignificant. "name
desc,resource_properties.a_property" and " name desc , resource_properties.a_property " are
equivalent. The following fields are supported: name update_time resource_properties
security_marks.marks security_center_properties.resource_name
security_center_properties.resource_display_name security_center_properties.resource_parent
security_center_properties.resource_parent_display_name security_center_properties.resource_project
security_center_properties.resource_project_display_name security_center_properties.resource_type
*/
public java.lang.String getOrderBy() {
return orderBy;
}
/**
* Expression that defines what fields and order to use for sorting. The string value should
* follow SQL syntax: comma separated list of fields. For example:
* "name,resource_properties.a_property". The default sorting order is ascending. To specify
* descending order for a field, a suffix " desc" should be appended to the field name. For
* example: "name desc,resource_properties.a_property". Redundant space characters in the
* syntax are insignificant. "name desc,resource_properties.a_property" and " name desc ,
* resource_properties.a_property " are equivalent. The following fields are supported: name
* update_time resource_properties security_marks.marks
* security_center_properties.resource_name security_center_properties.resource_display_name
* security_center_properties.resource_parent
* security_center_properties.resource_parent_display_name
* security_center_properties.resource_project
* security_center_properties.resource_project_display_name
* security_center_properties.resource_type
*/
public List setOrderBy(java.lang.String orderBy) {
this.orderBy = orderBy;
return this;
}
/**
* The maximum number of results to return in a single response. Default is 10, minimum is
* 1, maximum is 1000.
*/
@com.google.api.client.util.Key
private java.lang.Integer pageSize;
/** The maximum number of results to return in a single response. Default is 10, minimum is 1, maximum
is 1000.
*/
public java.lang.Integer getPageSize() {
return pageSize;
}
/**
* The maximum number of results to return in a single response. Default is 10, minimum is
* 1, maximum is 1000.
*/
public List setPageSize(java.lang.Integer pageSize) {
this.pageSize = pageSize;
return this;
}
/**
* The value returned by the last `ListAssetsResponse`; indicates that this is a
* continuation of a prior `ListAssets` call, and that the system should return the next
* page of data.
*/
@com.google.api.client.util.Key
private java.lang.String pageToken;
/** The value returned by the last `ListAssetsResponse`; indicates that this is a continuation of a
prior `ListAssets` call, and that the system should return the next page of data.
*/
public java.lang.String getPageToken() {
return pageToken;
}
/**
* The value returned by the last `ListAssetsResponse`; indicates that this is a
* continuation of a prior `ListAssets` call, and that the system should return the next
* page of data.
*/
public List setPageToken(java.lang.String pageToken) {
this.pageToken = pageToken;
return this;
}
/**
* Time used as a reference point when filtering assets. The filter is limited to assets
* existing at the supplied time and their values are those at that specific time. Absence
* of this field will default to the API's version of NOW.
*/
@com.google.api.client.util.Key
private String readTime;
/** Time used as a reference point when filtering assets. The filter is limited to assets existing at
the supplied time and their values are those at that specific time. Absence of this field will
default to the API's version of NOW.
*/
public String getReadTime() {
return readTime;
}
/**
* Time used as a reference point when filtering assets. The filter is limited to assets
* existing at the supplied time and their values are those at that specific time. Absence
* of this field will default to the API's version of NOW.
*/
public List setReadTime(String readTime) {
this.readTime = readTime;
return this;
}
@Override
public List set(String parameterName, Object value) {
return (List) super.set(parameterName, value);
}
}
/**
* Runs asset discovery. The discovery is tracked with a long-running operation. This API can only
* be called with limited frequency for an organization. If it is called too frequently the caller
* will receive a TOO_MANY_REQUESTS error.
*
* Create a request for the method "assets.runDiscovery".
*
* This request holds the parameters needed by the securitycenter server. After setting any
* optional parameters, call the {@link RunDiscovery#execute()} method to invoke the remote
* operation.
*
* @param parent Required. Name of the organization to run asset discovery for. Its format is
* `organizations/[organization_id]`.
* @param content the {@link com.google.api.services.securitycenter.v1.model.RunAssetDiscoveryRequest}
* @return the request
*/
public RunDiscovery runDiscovery(java.lang.String parent, com.google.api.services.securitycenter.v1.model.RunAssetDiscoveryRequest content) throws java.io.IOException {
RunDiscovery result = new RunDiscovery(parent, content);
initialize(result);
return result;
}
public class RunDiscovery extends SecurityCommandCenterRequest {
private static final String REST_PATH = "v1/{+parent}/assets:runDiscovery";
private final java.util.regex.Pattern PARENT_PATTERN =
java.util.regex.Pattern.compile("^organizations/[^/]+$");
/**
* Runs asset discovery. The discovery is tracked with a long-running operation. This API can only
* be called with limited frequency for an organization. If it is called too frequently the caller
* will receive a TOO_MANY_REQUESTS error.
*
* Create a request for the method "assets.runDiscovery".
*
* This request holds the parameters needed by the the securitycenter server. After setting any
* optional parameters, call the {@link RunDiscovery#execute()} method to invoke the remote
* operation. {@link
* RunDiscovery#initialize(com.google.api.client.googleapis.services.AbstractGoogleClientRequest)}
* must be called to initialize this instance immediately after invoking the constructor.
*
* @param parent Required. Name of the organization to run asset discovery for. Its format is
* `organizations/[organization_id]`.
* @param content the {@link com.google.api.services.securitycenter.v1.model.RunAssetDiscoveryRequest}
* @since 1.13
*/
protected RunDiscovery(java.lang.String parent, com.google.api.services.securitycenter.v1.model.RunAssetDiscoveryRequest content) {
super(SecurityCommandCenter.this, "POST", REST_PATH, content, com.google.api.services.securitycenter.v1.model.Operation.class);
this.parent = com.google.api.client.util.Preconditions.checkNotNull(parent, "Required parameter parent must be specified.");
if (!getSuppressPatternChecks()) {
com.google.api.client.util.Preconditions.checkArgument(PARENT_PATTERN.matcher(parent).matches(),
"Parameter parent must conform to the pattern " +
"^organizations/[^/]+$");
}
}
@Override
public RunDiscovery set$Xgafv(java.lang.String $Xgafv) {
return (RunDiscovery) super.set$Xgafv($Xgafv);
}
@Override
public RunDiscovery setAccessToken(java.lang.String accessToken) {
return (RunDiscovery) super.setAccessToken(accessToken);
}
@Override
public RunDiscovery setAlt(java.lang.String alt) {
return (RunDiscovery) super.setAlt(alt);
}
@Override
public RunDiscovery setCallback(java.lang.String callback) {
return (RunDiscovery) super.setCallback(callback);
}
@Override
public RunDiscovery setFields(java.lang.String fields) {
return (RunDiscovery) super.setFields(fields);
}
@Override
public RunDiscovery setKey(java.lang.String key) {
return (RunDiscovery) super.setKey(key);
}
@Override
public RunDiscovery setOauthToken(java.lang.String oauthToken) {
return (RunDiscovery) super.setOauthToken(oauthToken);
}
@Override
public RunDiscovery setPrettyPrint(java.lang.Boolean prettyPrint) {
return (RunDiscovery) super.setPrettyPrint(prettyPrint);
}
@Override
public RunDiscovery setQuotaUser(java.lang.String quotaUser) {
return (RunDiscovery) super.setQuotaUser(quotaUser);
}
@Override
public RunDiscovery setUploadType(java.lang.String uploadType) {
return (RunDiscovery) super.setUploadType(uploadType);
}
@Override
public RunDiscovery setUploadProtocol(java.lang.String uploadProtocol) {
return (RunDiscovery) super.setUploadProtocol(uploadProtocol);
}
/**
* Required. Name of the organization to run asset discovery for. Its format is
* `organizations/[organization_id]`.
*/
@com.google.api.client.util.Key
private java.lang.String parent;
/** Required. Name of the organization to run asset discovery for. Its format is
`organizations/[organization_id]`.
*/
public java.lang.String getParent() {
return parent;
}
/**
* Required. Name of the organization to run asset discovery for. Its format is
* `organizations/[organization_id]`.
*/
public RunDiscovery 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/[^/]+$");
}
this.parent = parent;
return this;
}
@Override
public RunDiscovery set(String parameterName, Object value) {
return (RunDiscovery) super.set(parameterName, value);
}
}
/**
* Updates security marks.
*
* Create a request for the method "assets.updateSecurityMarks".
*
* This request holds the parameters needed by the securitycenter server. After setting any
* optional parameters, call the {@link UpdateSecurityMarks#execute()} method to invoke the remote
* operation.
*
* @param name The relative resource name of the SecurityMarks. See:
* https://cloud.google.com/apis/design/resource_names#relative_resource_name Examples:
* "organizations/{organization_id}/assets/{asset_id}/securityMarks"
* "organizations/{organization_id}/sources/{source_id}/findings/{finding_id}/securityMarks".
* @param content the {@link com.google.api.services.securitycenter.v1.model.SecurityMarks}
* @return the request
*/
public UpdateSecurityMarks updateSecurityMarks(java.lang.String name, com.google.api.services.securitycenter.v1.model.SecurityMarks content) throws java.io.IOException {
UpdateSecurityMarks result = new UpdateSecurityMarks(name, content);
initialize(result);
return result;
}
public class UpdateSecurityMarks extends SecurityCommandCenterRequest {
private static final String REST_PATH = "v1/{+name}";
private final java.util.regex.Pattern NAME_PATTERN =
java.util.regex.Pattern.compile("^organizations/[^/]+/assets/[^/]+/securityMarks$");
/**
* Updates security marks.
*
* Create a request for the method "assets.updateSecurityMarks".
*
* This request holds the parameters needed by the the securitycenter server. After setting any
* optional parameters, call the {@link UpdateSecurityMarks#execute()} method to invoke the remote
* operation. {@link UpdateSecurityMarks#initialize(com.google.api.client.googleapis.services.
* AbstractGoogleClientRequest)} must be called to initialize this instance immediately after
* invoking the constructor.
*
* @param name The relative resource name of the SecurityMarks. See:
* https://cloud.google.com/apis/design/resource_names#relative_resource_name Examples:
* "organizations/{organization_id}/assets/{asset_id}/securityMarks"
* "organizations/{organization_id}/sources/{source_id}/findings/{finding_id}/securityMarks".
* @param content the {@link com.google.api.services.securitycenter.v1.model.SecurityMarks}
* @since 1.13
*/
protected UpdateSecurityMarks(java.lang.String name, com.google.api.services.securitycenter.v1.model.SecurityMarks content) {
super(SecurityCommandCenter.this, "PATCH", REST_PATH, content, com.google.api.services.securitycenter.v1.model.SecurityMarks.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/[^/]+/assets/[^/]+/securityMarks$");
}
}
@Override
public UpdateSecurityMarks set$Xgafv(java.lang.String $Xgafv) {
return (UpdateSecurityMarks) super.set$Xgafv($Xgafv);
}
@Override
public UpdateSecurityMarks setAccessToken(java.lang.String accessToken) {
return (UpdateSecurityMarks) super.setAccessToken(accessToken);
}
@Override
public UpdateSecurityMarks setAlt(java.lang.String alt) {
return (UpdateSecurityMarks) super.setAlt(alt);
}
@Override
public UpdateSecurityMarks setCallback(java.lang.String callback) {
return (UpdateSecurityMarks) super.setCallback(callback);
}
@Override
public UpdateSecurityMarks setFields(java.lang.String fields) {
return (UpdateSecurityMarks) super.setFields(fields);
}
@Override
public UpdateSecurityMarks setKey(java.lang.String key) {
return (UpdateSecurityMarks) super.setKey(key);
}
@Override
public UpdateSecurityMarks setOauthToken(java.lang.String oauthToken) {
return (UpdateSecurityMarks) super.setOauthToken(oauthToken);
}
@Override
public UpdateSecurityMarks setPrettyPrint(java.lang.Boolean prettyPrint) {
return (UpdateSecurityMarks) super.setPrettyPrint(prettyPrint);
}
@Override
public UpdateSecurityMarks setQuotaUser(java.lang.String quotaUser) {
return (UpdateSecurityMarks) super.setQuotaUser(quotaUser);
}
@Override
public UpdateSecurityMarks setUploadType(java.lang.String uploadType) {
return (UpdateSecurityMarks) super.setUploadType(uploadType);
}
@Override
public UpdateSecurityMarks setUploadProtocol(java.lang.String uploadProtocol) {
return (UpdateSecurityMarks) super.setUploadProtocol(uploadProtocol);
}
/**
* The relative resource name of the SecurityMarks. See:
* https://cloud.google.com/apis/design/resource_names#relative_resource_name Examples:
* "organizations/{organization_id}/assets/{asset_id}/securityMarks" "organizations/{organiz
* ation_id}/sources/{source_id}/findings/{finding_id}/securityMarks".
*/
@com.google.api.client.util.Key
private java.lang.String name;
/** The relative resource name of the SecurityMarks. See:
https://cloud.google.com/apis/design/resource_names#relative_resource_name Examples:
"organizations/{organization_id}/assets/{asset_id}/securityMarks"
"organizations/{organization_id}/sources/{source_id}/findings/{finding_id}/securityMarks".
*/
public java.lang.String getName() {
return name;
}
/**
* The relative resource name of the SecurityMarks. See:
* https://cloud.google.com/apis/design/resource_names#relative_resource_name Examples:
* "organizations/{organization_id}/assets/{asset_id}/securityMarks" "organizations/{organiz
* ation_id}/sources/{source_id}/findings/{finding_id}/securityMarks".
*/
public UpdateSecurityMarks 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/[^/]+/assets/[^/]+/securityMarks$");
}
this.name = name;
return this;
}
/**
* The time at which the updated SecurityMarks take effect. If not set uses current server
* time. Updates will be applied to the SecurityMarks that are active immediately preceding
* this time. Must be earlier or equal to the server time.
*/
@com.google.api.client.util.Key
private String startTime;
/** The time at which the updated SecurityMarks take effect. If not set uses current server time.
Updates will be applied to the SecurityMarks that are active immediately preceding this time. Must
be earlier or equal to the server time.
*/
public String getStartTime() {
return startTime;
}
/**
* The time at which the updated SecurityMarks take effect. If not set uses current server
* time. Updates will be applied to the SecurityMarks that are active immediately preceding
* this time. Must be earlier or equal to the server time.
*/
public UpdateSecurityMarks setStartTime(String startTime) {
this.startTime = startTime;
return this;
}
/**
* The FieldMask to use when updating the security marks resource. The field mask must not
* contain duplicate fields. If empty or set to "marks", all marks will be replaced.
* Individual marks can be updated using "marks.".
*/
@com.google.api.client.util.Key
private String updateMask;
/** The FieldMask to use when updating the security marks resource. The field mask must not contain
duplicate fields. If empty or set to "marks", all marks will be replaced. Individual marks can be
updated using "marks.".
*/
public String getUpdateMask() {
return updateMask;
}
/**
* The FieldMask to use when updating the security marks resource. The field mask must not
* contain duplicate fields. If empty or set to "marks", all marks will be replaced.
* Individual marks can be updated using "marks.".
*/
public UpdateSecurityMarks setUpdateMask(String updateMask) {
this.updateMask = updateMask;
return this;
}
@Override
public UpdateSecurityMarks set(String parameterName, Object value) {
return (UpdateSecurityMarks) super.set(parameterName, value);
}
}
}
/**
* An accessor for creating requests from the BigQueryExports collection.
*
* The typical use is:
*
* {@code SecurityCommandCenter securitycenter = new SecurityCommandCenter(...);}
* {@code SecurityCommandCenter.BigQueryExports.List request = securitycenter.bigQueryExports().list(parameters ...)}
*
*
* @return the resource collection
*/
public BigQueryExports bigQueryExports() {
return new BigQueryExports();
}
/**
* The "bigQueryExports" collection of methods.
*/
public class BigQueryExports {
/**
* Creates a BigQuery export.
*
* Create a request for the method "bigQueryExports.create".
*
* This request holds the parameters needed by the securitycenter server. After setting any
* optional parameters, call the {@link Create#execute()} method to invoke the remote operation.
*
* @param parent Required. The name of the parent resource of the new BigQuery export. Its format is
* `organizations/[organization_id]`, `folders/[folder_id]`, or `projects/[project_id]`.
* @param content the {@link com.google.api.services.securitycenter.v1.model.GoogleCloudSecuritycenterV1BigQueryExport}
* @return the request
*/
public Create create(java.lang.String parent, com.google.api.services.securitycenter.v1.model.GoogleCloudSecuritycenterV1BigQueryExport content) throws java.io.IOException {
Create result = new Create(parent, content);
initialize(result);
return result;
}
public class Create extends SecurityCommandCenterRequest {
private static final String REST_PATH = "v1/{+parent}/bigQueryExports";
private final java.util.regex.Pattern PARENT_PATTERN =
java.util.regex.Pattern.compile("^organizations/[^/]+$");
/**
* Creates a BigQuery export.
*
* Create a request for the method "bigQueryExports.create".
*
* This request holds the parameters needed by the the securitycenter server. After setting any
* optional parameters, call the {@link Create#execute()} method to invoke the remote operation.
* {@link
* Create#initialize(com.google.api.client.googleapis.services.AbstractGoogleClientRequest)} must
* be called to initialize this instance immediately after invoking the constructor.
*
* @param parent Required. The name of the parent resource of the new BigQuery export. Its format is
* `organizations/[organization_id]`, `folders/[folder_id]`, or `projects/[project_id]`.
* @param content the {@link com.google.api.services.securitycenter.v1.model.GoogleCloudSecuritycenterV1BigQueryExport}
* @since 1.13
*/
protected Create(java.lang.String parent, com.google.api.services.securitycenter.v1.model.GoogleCloudSecuritycenterV1BigQueryExport content) {
super(SecurityCommandCenter.this, "POST", REST_PATH, content, com.google.api.services.securitycenter.v1.model.GoogleCloudSecuritycenterV1BigQueryExport.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/[^/]+$");
}
}
@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 parent resource of the new BigQuery export. Its format is
* `organizations/[organization_id]`, `folders/[folder_id]`, or `projects/[project_id]`.
*/
@com.google.api.client.util.Key
private java.lang.String parent;
/** Required. The name of the parent resource of the new BigQuery export. Its format is
`organizations/[organization_id]`, `folders/[folder_id]`, or `projects/[project_id]`.
*/
public java.lang.String getParent() {
return parent;
}
/**
* Required. The name of the parent resource of the new BigQuery export. Its format is
* `organizations/[organization_id]`, `folders/[folder_id]`, or `projects/[project_id]`.
*/
public Create setParent(java.lang.String parent) {
if (!getSuppressPatternChecks()) {
com.google.api.client.util.Preconditions.checkArgument(PARENT_PATTERN.matcher(parent).matches(),
"Parameter parent must conform to the pattern " +
"^organizations/[^/]+$");
}
this.parent = parent;
return this;
}
/**
* Required. Unique identifier provided by the client within the parent scope. It must
* consist of only lowercase letters, numbers, and hyphens, must start with a letter, must
* end with either a letter or a number, and must be 63 characters or less.
*/
@com.google.api.client.util.Key
private java.lang.String bigQueryExportId;
/** Required. Unique identifier provided by the client within the parent scope. It must consist of only
lowercase letters, numbers, and hyphens, must start with a letter, must end with either a letter or
a number, and must be 63 characters or less.
*/
public java.lang.String getBigQueryExportId() {
return bigQueryExportId;
}
/**
* Required. Unique identifier provided by the client within the parent scope. It must
* consist of only lowercase letters, numbers, and hyphens, must start with a letter, must
* end with either a letter or a number, and must be 63 characters or less.
*/
public Create setBigQueryExportId(java.lang.String bigQueryExportId) {
this.bigQueryExportId = bigQueryExportId;
return this;
}
@Override
public Create set(String parameterName, Object value) {
return (Create) super.set(parameterName, value);
}
}
/**
* Deletes an existing BigQuery export.
*
* Create a request for the method "bigQueryExports.delete".
*
* This request holds the parameters needed by the securitycenter server. After setting any
* optional parameters, call the {@link Delete#execute()} method to invoke the remote operation.
*
* @param name Required. The name of the BigQuery export to delete. Its format is
* `organizations/{organization}/bigQueryExports/{export_id}`,
* `folders/{folder}/bigQueryExports/{export_id}`, or
* `projects/{project}/bigQueryExports/{export_id}`
* @return the request
*/
public Delete delete(java.lang.String name) throws java.io.IOException {
Delete result = new Delete(name);
initialize(result);
return result;
}
public class Delete extends SecurityCommandCenterRequest {
private static final String REST_PATH = "v1/{+name}";
private final java.util.regex.Pattern NAME_PATTERN =
java.util.regex.Pattern.compile("^organizations/[^/]+/bigQueryExports/[^/]+$");
/**
* Deletes an existing BigQuery export.
*
* Create a request for the method "bigQueryExports.delete".
*
* This request holds the parameters needed by the the securitycenter server. After setting any
* optional parameters, call the {@link Delete#execute()} method to invoke the remote operation.
* {@link
* Delete#initialize(com.google.api.client.googleapis.services.AbstractGoogleClientRequest)} must
* be called to initialize this instance immediately after invoking the constructor.
*
* @param name Required. The name of the BigQuery export to delete. Its format is
* `organizations/{organization}/bigQueryExports/{export_id}`,
* `folders/{folder}/bigQueryExports/{export_id}`, or
* `projects/{project}/bigQueryExports/{export_id}`
* @since 1.13
*/
protected Delete(java.lang.String name) {
super(SecurityCommandCenter.this, "DELETE", REST_PATH, null, com.google.api.services.securitycenter.v1.model.Empty.class);
this.name = com.google.api.client.util.Preconditions.checkNotNull(name, "Required parameter name must be specified.");
if (!getSuppressPatternChecks()) {
com.google.api.client.util.Preconditions.checkArgument(NAME_PATTERN.matcher(name).matches(),
"Parameter name must conform to the pattern " +
"^organizations/[^/]+/bigQueryExports/[^/]+$");
}
}
@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 BigQuery export to delete. Its format is
* `organizations/{organization}/bigQueryExports/{export_id}`,
* `folders/{folder}/bigQueryExports/{export_id}`, or
* `projects/{project}/bigQueryExports/{export_id}`
*/
@com.google.api.client.util.Key
private java.lang.String name;
/** Required. The name of the BigQuery export to delete. Its format is
`organizations/{organization}/bigQueryExports/{export_id}`,
`folders/{folder}/bigQueryExports/{export_id}`, or `projects/{project}/bigQueryExports/{export_id}`
*/
public java.lang.String getName() {
return name;
}
/**
* Required. The name of the BigQuery export to delete. Its format is
* `organizations/{organization}/bigQueryExports/{export_id}`,
* `folders/{folder}/bigQueryExports/{export_id}`, or
* `projects/{project}/bigQueryExports/{export_id}`
*/
public Delete setName(java.lang.String name) {
if (!getSuppressPatternChecks()) {
com.google.api.client.util.Preconditions.checkArgument(NAME_PATTERN.matcher(name).matches(),
"Parameter name must conform to the pattern " +
"^organizations/[^/]+/bigQueryExports/[^/]+$");
}
this.name = name;
return this;
}
@Override
public Delete set(String parameterName, Object value) {
return (Delete) super.set(parameterName, value);
}
}
/**
* Gets a BigQuery export.
*
* Create a request for the method "bigQueryExports.get".
*
* This request holds the parameters needed by the securitycenter server. After setting any
* optional parameters, call the {@link Get#execute()} method to invoke the remote operation.
*
* @param name Required. Name of the BigQuery export to retrieve. Its format is
* `organizations/{organization}/bigQueryExports/{export_id}`,
* `folders/{folder}/bigQueryExports/{export_id}`, or
* `projects/{project}/bigQueryExports/{export_id}`
* @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 SecurityCommandCenterRequest {
private static final String REST_PATH = "v1/{+name}";
private final java.util.regex.Pattern NAME_PATTERN =
java.util.regex.Pattern.compile("^organizations/[^/]+/bigQueryExports/[^/]+$");
/**
* Gets a BigQuery export.
*
* Create a request for the method "bigQueryExports.get".
*
* This request holds the parameters needed by the the securitycenter 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. Name of the BigQuery export to retrieve. Its format is
* `organizations/{organization}/bigQueryExports/{export_id}`,
* `folders/{folder}/bigQueryExports/{export_id}`, or
* `projects/{project}/bigQueryExports/{export_id}`
* @since 1.13
*/
protected Get(java.lang.String name) {
super(SecurityCommandCenter.this, "GET", REST_PATH, null, com.google.api.services.securitycenter.v1.model.GoogleCloudSecuritycenterV1BigQueryExport.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/[^/]+/bigQueryExports/[^/]+$");
}
}
@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. Name of the BigQuery export to retrieve. Its format is
* `organizations/{organization}/bigQueryExports/{export_id}`,
* `folders/{folder}/bigQueryExports/{export_id}`, or
* `projects/{project}/bigQueryExports/{export_id}`
*/
@com.google.api.client.util.Key
private java.lang.String name;
/** Required. Name of the BigQuery export to retrieve. Its format is
`organizations/{organization}/bigQueryExports/{export_id}`,
`folders/{folder}/bigQueryExports/{export_id}`, or `projects/{project}/bigQueryExports/{export_id}`
*/
public java.lang.String getName() {
return name;
}
/**
* Required. Name of the BigQuery export to retrieve. Its format is
* `organizations/{organization}/bigQueryExports/{export_id}`,
* `folders/{folder}/bigQueryExports/{export_id}`, or
* `projects/{project}/bigQueryExports/{export_id}`
*/
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/[^/]+/bigQueryExports/[^/]+$");
}
this.name = name;
return this;
}
@Override
public Get set(String parameterName, Object value) {
return (Get) super.set(parameterName, value);
}
}
/**
* Lists BigQuery exports. Note that when requesting BigQuery exports at a given level all exports
* under that level are also returned e.g. if requesting BigQuery exports under a folder, then all
* BigQuery exports immediately under the folder plus the ones created under the projects within the
* folder are returned.
*
* Create a request for the method "bigQueryExports.list".
*
* This request holds the parameters needed by the securitycenter server. After setting any
* optional parameters, call the {@link List#execute()} method to invoke the remote operation.
*
* @param parent Required. The parent, which owns the collection of BigQuery exports. Its format is
* `organizations/[organization_id]`, `folders/[folder_id]`, `projects/[project_id]`.
* @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 SecurityCommandCenterRequest {
private static final String REST_PATH = "v1/{+parent}/bigQueryExports";
private final java.util.regex.Pattern PARENT_PATTERN =
java.util.regex.Pattern.compile("^organizations/[^/]+$");
/**
* Lists BigQuery exports. Note that when requesting BigQuery exports at a given level all exports
* under that level are also returned e.g. if requesting BigQuery exports under a folder, then all
* BigQuery exports immediately under the folder plus the ones created under the projects within
* the folder are returned.
*
* Create a request for the method "bigQueryExports.list".
*
* This request holds the parameters needed by the the securitycenter server. After setting any
* optional parameters, call the {@link List#execute()} method to invoke the remote operation.
* {@link List#initialize(com.google.api.client.googleapis.services.AbstractGoogleClientRequest)}
* must be called to initialize this instance immediately after invoking the constructor.
*
* @param parent Required. The parent, which owns the collection of BigQuery exports. Its format is
* `organizations/[organization_id]`, `folders/[folder_id]`, `projects/[project_id]`.
* @since 1.13
*/
protected List(java.lang.String parent) {
super(SecurityCommandCenter.this, "GET", REST_PATH, null, com.google.api.services.securitycenter.v1.model.ListBigQueryExportsResponse.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/[^/]+$");
}
}
@Override
public com.google.api.client.http.HttpResponse executeUsingHead() throws java.io.IOException {
return super.executeUsingHead();
}
@Override
public com.google.api.client.http.HttpRequest buildHttpRequestUsingHead() throws java.io.IOException {
return super.buildHttpRequestUsingHead();
}
@Override
public List set$Xgafv(java.lang.String $Xgafv) {
return (List) super.set$Xgafv($Xgafv);
}
@Override
public List setAccessToken(java.lang.String accessToken) {
return (List) super.setAccessToken(accessToken);
}
@Override
public List setAlt(java.lang.String alt) {
return (List) super.setAlt(alt);
}
@Override
public List setCallback(java.lang.String callback) {
return (List) super.setCallback(callback);
}
@Override
public List setFields(java.lang.String fields) {
return (List) super.setFields(fields);
}
@Override
public List setKey(java.lang.String key) {
return (List) super.setKey(key);
}
@Override
public List setOauthToken(java.lang.String oauthToken) {
return (List) super.setOauthToken(oauthToken);
}
@Override
public List setPrettyPrint(java.lang.Boolean prettyPrint) {
return (List) super.setPrettyPrint(prettyPrint);
}
@Override
public List setQuotaUser(java.lang.String quotaUser) {
return (List) super.setQuotaUser(quotaUser);
}
@Override
public List setUploadType(java.lang.String uploadType) {
return (List) super.setUploadType(uploadType);
}
@Override
public List setUploadProtocol(java.lang.String uploadProtocol) {
return (List) super.setUploadProtocol(uploadProtocol);
}
/**
* Required. The parent, which owns the collection of BigQuery exports. Its format is
* `organizations/[organization_id]`, `folders/[folder_id]`, `projects/[project_id]`.
*/
@com.google.api.client.util.Key
private java.lang.String parent;
/** Required. The parent, which owns the collection of BigQuery exports. Its format is
`organizations/[organization_id]`, `folders/[folder_id]`, `projects/[project_id]`.
*/
public java.lang.String getParent() {
return parent;
}
/**
* Required. The parent, which owns the collection of BigQuery exports. Its format is
* `organizations/[organization_id]`, `folders/[folder_id]`, `projects/[project_id]`.
*/
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/[^/]+$");
}
this.parent = parent;
return this;
}
/**
* The maximum number of configs to return. The service may return fewer than this value. If
* unspecified, at most 10 configs will be returned. The maximum value is 1000; values above
* 1000 will be coerced to 1000.
*/
@com.google.api.client.util.Key
private java.lang.Integer pageSize;
/** The maximum number of configs to return. The service may return fewer than this value. If
unspecified, at most 10 configs will be returned. The maximum value is 1000; values above 1000 will
be coerced to 1000.
*/
public java.lang.Integer getPageSize() {
return pageSize;
}
/**
* The maximum number of configs to return. The service may return fewer than this value. If
* unspecified, at most 10 configs will be returned. The maximum value is 1000; values above
* 1000 will be coerced to 1000.
*/
public List setPageSize(java.lang.Integer pageSize) {
this.pageSize = pageSize;
return this;
}
/**
* A page token, received from a previous `ListBigQueryExports` call. Provide this to
* retrieve the subsequent page. When paginating, all other parameters provided to
* `ListBigQueryExports` must match the call that provided the page token.
*/
@com.google.api.client.util.Key
private java.lang.String pageToken;
/** A page token, received from a previous `ListBigQueryExports` call. Provide this to retrieve the
subsequent page. When paginating, all other parameters provided to `ListBigQueryExports` must match
the call that provided the page token.
*/
public java.lang.String getPageToken() {
return pageToken;
}
/**
* A page token, received from a previous `ListBigQueryExports` call. Provide this to
* retrieve the subsequent page. When paginating, all other parameters provided to
* `ListBigQueryExports` must match the call that provided the 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);
}
}
/**
* Updates a BigQuery export.
*
* Create a request for the method "bigQueryExports.patch".
*
* This request holds the parameters needed by the securitycenter server. After setting any
* optional parameters, call the {@link Patch#execute()} method to invoke the remote operation.
*
* @param name The relative resource name of this export. See:
* https://cloud.google.com/apis/design/resource_names#relative_resource_name. Example
* format: "organizations/{organization_id}/bigQueryExports/{export_id}" Example format:
* "folders/{folder_id}/bigQueryExports/{export_id}" Example format:
* "projects/{project_id}/bigQueryExports/{export_id}" This field is provided in responses,
* and is ignored when provided in create requests.
* @param content the {@link com.google.api.services.securitycenter.v1.model.GoogleCloudSecuritycenterV1BigQueryExport}
* @return the request
*/
public Patch patch(java.lang.String name, com.google.api.services.securitycenter.v1.model.GoogleCloudSecuritycenterV1BigQueryExport content) throws java.io.IOException {
Patch result = new Patch(name, content);
initialize(result);
return result;
}
public class Patch extends SecurityCommandCenterRequest {
private static final String REST_PATH = "v1/{+name}";
private final java.util.regex.Pattern NAME_PATTERN =
java.util.regex.Pattern.compile("^organizations/[^/]+/bigQueryExports/[^/]+$");
/**
* Updates a BigQuery export.
*
* Create a request for the method "bigQueryExports.patch".
*
* This request holds the parameters needed by the the securitycenter server. After setting any
* optional parameters, call the {@link Patch#execute()} method to invoke the remote operation.
* {@link
* Patch#initialize(com.google.api.client.googleapis.services.AbstractGoogleClientRequest)} must
* be called to initialize this instance immediately after invoking the constructor.
*
* @param name The relative resource name of this export. See:
* https://cloud.google.com/apis/design/resource_names#relative_resource_name. Example
* format: "organizations/{organization_id}/bigQueryExports/{export_id}" Example format:
* "folders/{folder_id}/bigQueryExports/{export_id}" Example format:
* "projects/{project_id}/bigQueryExports/{export_id}" This field is provided in responses,
* and is ignored when provided in create requests.
* @param content the {@link com.google.api.services.securitycenter.v1.model.GoogleCloudSecuritycenterV1BigQueryExport}
* @since 1.13
*/
protected Patch(java.lang.String name, com.google.api.services.securitycenter.v1.model.GoogleCloudSecuritycenterV1BigQueryExport content) {
super(SecurityCommandCenter.this, "PATCH", REST_PATH, content, com.google.api.services.securitycenter.v1.model.GoogleCloudSecuritycenterV1BigQueryExport.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/[^/]+/bigQueryExports/[^/]+$");
}
}
@Override
public Patch set$Xgafv(java.lang.String $Xgafv) {
return (Patch) super.set$Xgafv($Xgafv);
}
@Override
public Patch setAccessToken(java.lang.String accessToken) {
return (Patch) super.setAccessToken(accessToken);
}
@Override
public Patch setAlt(java.lang.String alt) {
return (Patch) super.setAlt(alt);
}
@Override
public Patch setCallback(java.lang.String callback) {
return (Patch) super.setCallback(callback);
}
@Override
public Patch setFields(java.lang.String fields) {
return (Patch) super.setFields(fields);
}
@Override
public Patch setKey(java.lang.String key) {
return (Patch) super.setKey(key);
}
@Override
public Patch setOauthToken(java.lang.String oauthToken) {
return (Patch) super.setOauthToken(oauthToken);
}
@Override
public Patch setPrettyPrint(java.lang.Boolean prettyPrint) {
return (Patch) super.setPrettyPrint(prettyPrint);
}
@Override
public Patch setQuotaUser(java.lang.String quotaUser) {
return (Patch) super.setQuotaUser(quotaUser);
}
@Override
public Patch setUploadType(java.lang.String uploadType) {
return (Patch) super.setUploadType(uploadType);
}
@Override
public Patch setUploadProtocol(java.lang.String uploadProtocol) {
return (Patch) super.setUploadProtocol(uploadProtocol);
}
/**
* The relative resource name of this export. See:
* https://cloud.google.com/apis/design/resource_names#relative_resource_name. Example
* format: "organizations/{organization_id}/bigQueryExports/{export_id}" Example format:
* "folders/{folder_id}/bigQueryExports/{export_id}" Example format:
* "projects/{project_id}/bigQueryExports/{export_id}" This field is provided in responses,
* and is ignored when provided in create requests.
*/
@com.google.api.client.util.Key
private java.lang.String name;
/** The relative resource name of this export. See:
https://cloud.google.com/apis/design/resource_names#relative_resource_name. Example format:
"organizations/{organization_id}/bigQueryExports/{export_id}" Example format:
"folders/{folder_id}/bigQueryExports/{export_id}" Example format:
"projects/{project_id}/bigQueryExports/{export_id}" This field is provided in responses, and is
ignored when provided in create requests.
*/
public java.lang.String getName() {
return name;
}
/**
* The relative resource name of this export. See:
* https://cloud.google.com/apis/design/resource_names#relative_resource_name. Example
* format: "organizations/{organization_id}/bigQueryExports/{export_id}" Example format:
* "folders/{folder_id}/bigQueryExports/{export_id}" Example format:
* "projects/{project_id}/bigQueryExports/{export_id}" This field is provided in responses,
* and is ignored when provided in create requests.
*/
public Patch setName(java.lang.String name) {
if (!getSuppressPatternChecks()) {
com.google.api.client.util.Preconditions.checkArgument(NAME_PATTERN.matcher(name).matches(),
"Parameter name must conform to the pattern " +
"^organizations/[^/]+/bigQueryExports/[^/]+$");
}
this.name = name;
return this;
}
/** The list of fields to be updated. If empty all mutable fields will be updated. */
@com.google.api.client.util.Key
private String updateMask;
/** The list of fields to be updated. If empty all mutable fields will be updated.
*/
public String getUpdateMask() {
return updateMask;
}
/** The list of fields to be updated. If empty all mutable fields will be updated. */
public Patch setUpdateMask(String updateMask) {
this.updateMask = updateMask;
return this;
}
@Override
public Patch set(String parameterName, Object value) {
return (Patch) super.set(parameterName, value);
}
}
}
/**
* An accessor for creating requests from the EventThreatDetectionSettings collection.
*
* The typical use is:
*
* {@code SecurityCommandCenter securitycenter = new SecurityCommandCenter(...);}
* {@code SecurityCommandCenter.EventThreatDetectionSettings.List request = securitycenter.eventThreatDetectionSettings().list(parameters ...)}
*
*
* @return the resource collection
*/
public EventThreatDetectionSettings eventThreatDetectionSettings() {
return new EventThreatDetectionSettings();
}
/**
* The "eventThreatDetectionSettings" collection of methods.
*/
public class EventThreatDetectionSettings {
/**
* Validates the given Event Threat Detection custom module.
*
* Create a request for the method "eventThreatDetectionSettings.validateCustomModule".
*
* This request holds the parameters needed by the securitycenter server. After setting any
* optional parameters, call the {@link ValidateCustomModule#execute()} method to invoke the remote
* operation.
*
* @param parent Required. Resource name of the parent to validate the Custom Module under. Its format is: *
* `organizations/{organization}/eventThreatDetectionSettings`. *
* `folders/{folder}/eventThreatDetectionSettings`. *
* `projects/{project}/eventThreatDetectionSettings`.
* @param content the {@link com.google.api.services.securitycenter.v1.model.ValidateEventThreatDetectionCustomModuleRequest}
* @return the request
*/
public ValidateCustomModule validateCustomModule(java.lang.String parent, com.google.api.services.securitycenter.v1.model.ValidateEventThreatDetectionCustomModuleRequest content) throws java.io.IOException {
ValidateCustomModule result = new ValidateCustomModule(parent, content);
initialize(result);
return result;
}
public class ValidateCustomModule extends SecurityCommandCenterRequest {
private static final String REST_PATH = "v1/{+parent}:validateCustomModule";
private final java.util.regex.Pattern PARENT_PATTERN =
java.util.regex.Pattern.compile("^organizations/[^/]+/eventThreatDetectionSettings$");
/**
* Validates the given Event Threat Detection custom module.
*
* Create a request for the method "eventThreatDetectionSettings.validateCustomModule".
*
* This request holds the parameters needed by the the securitycenter server. After setting any
* optional parameters, call the {@link ValidateCustomModule#execute()} method to invoke the
* remote operation. {@link ValidateCustomModule#initialize(com.google.api.client.googleapis.s
* ervices.AbstractGoogleClientRequest)} must be called to initialize this instance immediately
* after invoking the constructor.
*
* @param parent Required. Resource name of the parent to validate the Custom Module under. Its format is: *
* `organizations/{organization}/eventThreatDetectionSettings`. *
* `folders/{folder}/eventThreatDetectionSettings`. *
* `projects/{project}/eventThreatDetectionSettings`.
* @param content the {@link com.google.api.services.securitycenter.v1.model.ValidateEventThreatDetectionCustomModuleRequest}
* @since 1.13
*/
protected ValidateCustomModule(java.lang.String parent, com.google.api.services.securitycenter.v1.model.ValidateEventThreatDetectionCustomModuleRequest content) {
super(SecurityCommandCenter.this, "POST", REST_PATH, content, com.google.api.services.securitycenter.v1.model.ValidateEventThreatDetectionCustomModuleResponse.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/[^/]+/eventThreatDetectionSettings$");
}
}
@Override
public ValidateCustomModule set$Xgafv(java.lang.String $Xgafv) {
return (ValidateCustomModule) super.set$Xgafv($Xgafv);
}
@Override
public ValidateCustomModule setAccessToken(java.lang.String accessToken) {
return (ValidateCustomModule) super.setAccessToken(accessToken);
}
@Override
public ValidateCustomModule setAlt(java.lang.String alt) {
return (ValidateCustomModule) super.setAlt(alt);
}
@Override
public ValidateCustomModule setCallback(java.lang.String callback) {
return (ValidateCustomModule) super.setCallback(callback);
}
@Override
public ValidateCustomModule setFields(java.lang.String fields) {
return (ValidateCustomModule) super.setFields(fields);
}
@Override
public ValidateCustomModule setKey(java.lang.String key) {
return (ValidateCustomModule) super.setKey(key);
}
@Override
public ValidateCustomModule setOauthToken(java.lang.String oauthToken) {
return (ValidateCustomModule) super.setOauthToken(oauthToken);
}
@Override
public ValidateCustomModule setPrettyPrint(java.lang.Boolean prettyPrint) {
return (ValidateCustomModule) super.setPrettyPrint(prettyPrint);
}
@Override
public ValidateCustomModule setQuotaUser(java.lang.String quotaUser) {
return (ValidateCustomModule) super.setQuotaUser(quotaUser);
}
@Override
public ValidateCustomModule setUploadType(java.lang.String uploadType) {
return (ValidateCustomModule) super.setUploadType(uploadType);
}
@Override
public ValidateCustomModule setUploadProtocol(java.lang.String uploadProtocol) {
return (ValidateCustomModule) super.setUploadProtocol(uploadProtocol);
}
/**
* Required. Resource name of the parent to validate the Custom Module under. Its format is:
* * `organizations/{organization}/eventThreatDetectionSettings`. *
* `folders/{folder}/eventThreatDetectionSettings`. *
* `projects/{project}/eventThreatDetectionSettings`.
*/
@com.google.api.client.util.Key
private java.lang.String parent;
/** Required. Resource name of the parent to validate the Custom Module under. Its format is: *
`organizations/{organization}/eventThreatDetectionSettings`. *
`folders/{folder}/eventThreatDetectionSettings`. *
`projects/{project}/eventThreatDetectionSettings`.
*/
public java.lang.String getParent() {
return parent;
}
/**
* Required. Resource name of the parent to validate the Custom Module under. Its format is:
* * `organizations/{organization}/eventThreatDetectionSettings`. *
* `folders/{folder}/eventThreatDetectionSettings`. *
* `projects/{project}/eventThreatDetectionSettings`.
*/
public ValidateCustomModule 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/[^/]+/eventThreatDetectionSettings$");
}
this.parent = parent;
return this;
}
@Override
public ValidateCustomModule set(String parameterName, Object value) {
return (ValidateCustomModule) super.set(parameterName, value);
}
}
/**
* An accessor for creating requests from the CustomModules collection.
*
* The typical use is:
*
* {@code SecurityCommandCenter securitycenter = new SecurityCommandCenter(...);}
* {@code SecurityCommandCenter.CustomModules.List request = securitycenter.customModules().list(parameters ...)}
*
*
* @return the resource collection
*/
public CustomModules customModules() {
return new CustomModules();
}
/**
* The "customModules" collection of methods.
*/
public class CustomModules {
/**
* Creates a resident Event Threat Detection custom module at the scope of the given Resource
* Manager parent, and also creates inherited custom modules for all descendants of the given
* parent. These modules are enabled by default.
*
* Create a request for the method "customModules.create".
*
* This request holds the parameters needed by the securitycenter server. After setting any
* optional parameters, call the {@link Create#execute()} method to invoke the remote operation.
*
* @param parent Required. The new custom module's parent. Its format is: *
* `organizations/{organization}/eventThreatDetectionSettings`. *
* `folders/{folder}/eventThreatDetectionSettings`. *
* `projects/{project}/eventThreatDetectionSettings`.
* @param content the {@link com.google.api.services.securitycenter.v1.model.EventThreatDetectionCustomModule}
* @return the request
*/
public Create create(java.lang.String parent, com.google.api.services.securitycenter.v1.model.EventThreatDetectionCustomModule content) throws java.io.IOException {
Create result = new Create(parent, content);
initialize(result);
return result;
}
public class Create extends SecurityCommandCenterRequest {
private static final String REST_PATH = "v1/{+parent}/customModules";
private final java.util.regex.Pattern PARENT_PATTERN =
java.util.regex.Pattern.compile("^organizations/[^/]+/eventThreatDetectionSettings$");
/**
* Creates a resident Event Threat Detection custom module at the scope of the given Resource
* Manager parent, and also creates inherited custom modules for all descendants of the given
* parent. These modules are enabled by default.
*
* Create a request for the method "customModules.create".
*
* This request holds the parameters needed by the the securitycenter server. After setting any
* optional parameters, call the {@link Create#execute()} method to invoke the remote operation.
* {@link
* Create#initialize(com.google.api.client.googleapis.services.AbstractGoogleClientRequest)} must
* be called to initialize this instance immediately after invoking the constructor.
*
* @param parent Required. The new custom module's parent. Its format is: *
* `organizations/{organization}/eventThreatDetectionSettings`. *
* `folders/{folder}/eventThreatDetectionSettings`. *
* `projects/{project}/eventThreatDetectionSettings`.
* @param content the {@link com.google.api.services.securitycenter.v1.model.EventThreatDetectionCustomModule}
* @since 1.13
*/
protected Create(java.lang.String parent, com.google.api.services.securitycenter.v1.model.EventThreatDetectionCustomModule content) {
super(SecurityCommandCenter.this, "POST", REST_PATH, content, com.google.api.services.securitycenter.v1.model.EventThreatDetectionCustomModule.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/[^/]+/eventThreatDetectionSettings$");
}
}
@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 new custom module's parent. Its format is: *
* `organizations/{organization}/eventThreatDetectionSettings`. *
* `folders/{folder}/eventThreatDetectionSettings`. *
* `projects/{project}/eventThreatDetectionSettings`.
*/
@com.google.api.client.util.Key
private java.lang.String parent;
/** Required. The new custom module's parent. Its format is: *
`organizations/{organization}/eventThreatDetectionSettings`. *
`folders/{folder}/eventThreatDetectionSettings`. *
`projects/{project}/eventThreatDetectionSettings`.
*/
public java.lang.String getParent() {
return parent;
}
/**
* Required. The new custom module's parent. Its format is: *
* `organizations/{organization}/eventThreatDetectionSettings`. *
* `folders/{folder}/eventThreatDetectionSettings`. *
* `projects/{project}/eventThreatDetectionSettings`.
*/
public Create setParent(java.lang.String parent) {
if (!getSuppressPatternChecks()) {
com.google.api.client.util.Preconditions.checkArgument(PARENT_PATTERN.matcher(parent).matches(),
"Parameter parent must conform to the pattern " +
"^organizations/[^/]+/eventThreatDetectionSettings$");
}
this.parent = parent;
return this;
}
@Override
public Create set(String parameterName, Object value) {
return (Create) super.set(parameterName, value);
}
}
/**
* Deletes the specified Event Threat Detection custom module and all of its descendants in the
* Resource Manager hierarchy. This method is only supported for resident custom modules.
*
* Create a request for the method "customModules.delete".
*
* This request holds the parameters needed by the securitycenter server. After setting any
* optional parameters, call the {@link Delete#execute()} method to invoke the remote operation.
*
* @param name Required. Name of the custom module to delete. Its format is: *
* `organizations/{organization}/eventThreatDetectionSettings/customModules/{module}`. *
* `folders/{folder}/eventThreatDetectionSettings/customModules/{module}`. *
* `projects/{project}/eventThreatDetectionSettings/customModules/{module}`.
* @return the request
*/
public Delete delete(java.lang.String name) throws java.io.IOException {
Delete result = new Delete(name);
initialize(result);
return result;
}
public class Delete extends SecurityCommandCenterRequest {
private static final String REST_PATH = "v1/{+name}";
private final java.util.regex.Pattern NAME_PATTERN =
java.util.regex.Pattern.compile("^organizations/[^/]+/eventThreatDetectionSettings/customModules/[^/]+$");
/**
* Deletes the specified Event Threat Detection custom module and all of its descendants in the
* Resource Manager hierarchy. This method is only supported for resident custom modules.
*
* Create a request for the method "customModules.delete".
*
* This request holds the parameters needed by the the securitycenter server. After setting any
* optional parameters, call the {@link Delete#execute()} method to invoke the remote operation.
* {@link
* Delete#initialize(com.google.api.client.googleapis.services.AbstractGoogleClientRequest)} must
* be called to initialize this instance immediately after invoking the constructor.
*
* @param name Required. Name of the custom module to delete. Its format is: *
* `organizations/{organization}/eventThreatDetectionSettings/customModules/{module}`. *
* `folders/{folder}/eventThreatDetectionSettings/customModules/{module}`. *
* `projects/{project}/eventThreatDetectionSettings/customModules/{module}`.
* @since 1.13
*/
protected Delete(java.lang.String name) {
super(SecurityCommandCenter.this, "DELETE", REST_PATH, null, com.google.api.services.securitycenter.v1.model.Empty.class);
this.name = com.google.api.client.util.Preconditions.checkNotNull(name, "Required parameter name must be specified.");
if (!getSuppressPatternChecks()) {
com.google.api.client.util.Preconditions.checkArgument(NAME_PATTERN.matcher(name).matches(),
"Parameter name must conform to the pattern " +
"^organizations/[^/]+/eventThreatDetectionSettings/customModules/[^/]+$");
}
}
@Override
public Delete set$Xgafv(java.lang.String $Xgafv) {
return (Delete) super.set$Xgafv($Xgafv);
}
@Override
public Delete setAccessToken(java.lang.String accessToken) {
return (Delete) super.setAccessToken(accessToken);
}
@Override
public Delete setAlt(java.lang.String alt) {
return (Delete) super.setAlt(alt);
}
@Override
public Delete setCallback(java.lang.String callback) {
return (Delete) super.setCallback(callback);
}
@Override
public Delete setFields(java.lang.String fields) {
return (Delete) super.setFields(fields);
}
@Override
public Delete setKey(java.lang.String key) {
return (Delete) super.setKey(key);
}
@Override
public Delete setOauthToken(java.lang.String oauthToken) {
return (Delete) super.setOauthToken(oauthToken);
}
@Override
public Delete setPrettyPrint(java.lang.Boolean prettyPrint) {
return (Delete) super.setPrettyPrint(prettyPrint);
}
@Override
public Delete setQuotaUser(java.lang.String quotaUser) {
return (Delete) super.setQuotaUser(quotaUser);
}
@Override
public Delete setUploadType(java.lang.String uploadType) {
return (Delete) super.setUploadType(uploadType);
}
@Override
public Delete setUploadProtocol(java.lang.String uploadProtocol) {
return (Delete) super.setUploadProtocol(uploadProtocol);
}
/**
* Required. Name of the custom module to delete. Its format is: *
* `organizations/{organization}/eventThreatDetectionSettings/customModules/{module}`. *
* `folders/{folder}/eventThreatDetectionSettings/customModules/{module}`. *
* `projects/{project}/eventThreatDetectionSettings/customModules/{module}`.
*/
@com.google.api.client.util.Key
private java.lang.String name;
/** Required. Name of the custom module to delete. Its format is: *
`organizations/{organization}/eventThreatDetectionSettings/customModules/{module}`. *
`folders/{folder}/eventThreatDetectionSettings/customModules/{module}`. *
`projects/{project}/eventThreatDetectionSettings/customModules/{module}`.
*/
public java.lang.String getName() {
return name;
}
/**
* Required. Name of the custom module to delete. Its format is: *
* `organizations/{organization}/eventThreatDetectionSettings/customModules/{module}`. *
* `folders/{folder}/eventThreatDetectionSettings/customModules/{module}`. *
* `projects/{project}/eventThreatDetectionSettings/customModules/{module}`.
*/
public Delete setName(java.lang.String name) {
if (!getSuppressPatternChecks()) {
com.google.api.client.util.Preconditions.checkArgument(NAME_PATTERN.matcher(name).matches(),
"Parameter name must conform to the pattern " +
"^organizations/[^/]+/eventThreatDetectionSettings/customModules/[^/]+$");
}
this.name = name;
return this;
}
@Override
public Delete set(String parameterName, Object value) {
return (Delete) super.set(parameterName, value);
}
}
/**
* Gets an Event Threat Detection custom module.
*
* Create a request for the method "customModules.get".
*
* This request holds the parameters needed by the securitycenter server. After setting any
* optional parameters, call the {@link Get#execute()} method to invoke the remote operation.
*
* @param name Required. Name of the custom module to get. Its format is: *
* `organizations/{organization}/eventThreatDetectionSettings/customModules/{module}`. *
* `folders/{folder}/eventThreatDetectionSettings/customModules/{module}`. *
* `projects/{project}/eventThreatDetectionSettings/customModules/{module}`.
* @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 SecurityCommandCenterRequest {
private static final String REST_PATH = "v1/{+name}";
private final java.util.regex.Pattern NAME_PATTERN =
java.util.regex.Pattern.compile("^organizations/[^/]+/eventThreatDetectionSettings/customModules/[^/]+$");
/**
* Gets an Event Threat Detection custom module.
*
* Create a request for the method "customModules.get".
*
* This request holds the parameters needed by the the securitycenter 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. Name of the custom module to get. Its format is: *
* `organizations/{organization}/eventThreatDetectionSettings/customModules/{module}`. *
* `folders/{folder}/eventThreatDetectionSettings/customModules/{module}`. *
* `projects/{project}/eventThreatDetectionSettings/customModules/{module}`.
* @since 1.13
*/
protected Get(java.lang.String name) {
super(SecurityCommandCenter.this, "GET", REST_PATH, null, com.google.api.services.securitycenter.v1.model.EventThreatDetectionCustomModule.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/[^/]+/eventThreatDetectionSettings/customModules/[^/]+$");
}
}
@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. Name of the custom module to get. Its format is: *
* `organizations/{organization}/eventThreatDetectionSettings/customModules/{module}`. *
* `folders/{folder}/eventThreatDetectionSettings/customModules/{module}`. *
* `projects/{project}/eventThreatDetectionSettings/customModules/{module}`.
*/
@com.google.api.client.util.Key
private java.lang.String name;
/** Required. Name of the custom module to get. Its format is: *
`organizations/{organization}/eventThreatDetectionSettings/customModules/{module}`. *
`folders/{folder}/eventThreatDetectionSettings/customModules/{module}`. *
`projects/{project}/eventThreatDetectionSettings/customModules/{module}`.
*/
public java.lang.String getName() {
return name;
}
/**
* Required. Name of the custom module to get. Its format is: *
* `organizations/{organization}/eventThreatDetectionSettings/customModules/{module}`. *
* `folders/{folder}/eventThreatDetectionSettings/customModules/{module}`. *
* `projects/{project}/eventThreatDetectionSettings/customModules/{module}`.
*/
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/[^/]+/eventThreatDetectionSettings/customModules/[^/]+$");
}
this.name = name;
return this;
}
@Override
public Get set(String parameterName, Object value) {
return (Get) super.set(parameterName, value);
}
}
/**
* Lists all Event Threat Detection custom modules for the given Resource Manager parent. This
* includes resident modules defined at the scope of the parent along with modules inherited from
* ancestors.
*
* Create a request for the method "customModules.list".
*
* This request holds the parameters needed by the securitycenter server. After setting any
* optional parameters, call the {@link List#execute()} method to invoke the remote operation.
*
* @param parent Required. Name of the parent to list custom modules under. Its format is: *
* `organizations/{organization}/eventThreatDetectionSettings`. *
* `folders/{folder}/eventThreatDetectionSettings`. *
* `projects/{project}/eventThreatDetectionSettings`.
* @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 SecurityCommandCenterRequest {
private static final String REST_PATH = "v1/{+parent}/customModules";
private final java.util.regex.Pattern PARENT_PATTERN =
java.util.regex.Pattern.compile("^organizations/[^/]+/eventThreatDetectionSettings$");
/**
* Lists all Event Threat Detection custom modules for the given Resource Manager parent. This
* includes resident modules defined at the scope of the parent along with modules inherited from
* ancestors.
*
* Create a request for the method "customModules.list".
*
* This request holds the parameters needed by the the securitycenter 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. Name of the parent to list custom modules under. Its format is: *
* `organizations/{organization}/eventThreatDetectionSettings`. *
* `folders/{folder}/eventThreatDetectionSettings`. *
* `projects/{project}/eventThreatDetectionSettings`.
* @since 1.13
*/
protected List(java.lang.String parent) {
super(SecurityCommandCenter.this, "GET", REST_PATH, null, com.google.api.services.securitycenter.v1.model.ListEventThreatDetectionCustomModulesResponse.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/[^/]+/eventThreatDetectionSettings$");
}
}
@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. Name of the parent to list custom modules under. Its format is: *
* `organizations/{organization}/eventThreatDetectionSettings`. *
* `folders/{folder}/eventThreatDetectionSettings`. *
* `projects/{project}/eventThreatDetectionSettings`.
*/
@com.google.api.client.util.Key
private java.lang.String parent;
/** Required. Name of the parent to list custom modules under. Its format is: *
`organizations/{organization}/eventThreatDetectionSettings`. *
`folders/{folder}/eventThreatDetectionSettings`. *
`projects/{project}/eventThreatDetectionSettings`.
*/
public java.lang.String getParent() {
return parent;
}
/**
* Required. Name of the parent to list custom modules under. Its format is: *
* `organizations/{organization}/eventThreatDetectionSettings`. *
* `folders/{folder}/eventThreatDetectionSettings`. *
* `projects/{project}/eventThreatDetectionSettings`.
*/
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/[^/]+/eventThreatDetectionSettings$");
}
this.parent = parent;
return this;
}
/**
* The maximum number of modules to return. The service may return fewer than this value.
* If unspecified, at most 10 configs will be returned. The maximum value is 1000; values
* above 1000 will be coerced to 1000.
*/
@com.google.api.client.util.Key
private java.lang.Integer pageSize;
/** The maximum number of modules to return. The service may return fewer than this value. If
unspecified, at most 10 configs will be returned. The maximum value is 1000; values above 1000 will
be coerced to 1000.
*/
public java.lang.Integer getPageSize() {
return pageSize;
}
/**
* The maximum number of modules to return. The service may return fewer than this value.
* If unspecified, at most 10 configs will be returned. The maximum value is 1000; values
* above 1000 will be coerced to 1000.
*/
public List setPageSize(java.lang.Integer pageSize) {
this.pageSize = pageSize;
return this;
}
/**
* A page token, received from a previous `ListEventThreatDetectionCustomModules` call.
* Provide this to retrieve the subsequent page. When paginating, all other parameters
* provided to `ListEventThreatDetectionCustomModules` must match the call that provided
* the page token.
*/
@com.google.api.client.util.Key
private java.lang.String pageToken;
/** A page token, received from a previous `ListEventThreatDetectionCustomModules` call. Provide this
to retrieve the subsequent page. When paginating, all other parameters provided to
`ListEventThreatDetectionCustomModules` must match the call that provided the page token.
*/
public java.lang.String getPageToken() {
return pageToken;
}
/**
* A page token, received from a previous `ListEventThreatDetectionCustomModules` call.
* Provide this to retrieve the subsequent page. When paginating, all other parameters
* provided to `ListEventThreatDetectionCustomModules` must match the call that provided
* the 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);
}
}
/**
* Lists all resident Event Threat Detection custom modules under the given Resource Manager parent
* and its descendants.
*
* Create a request for the method "customModules.listDescendant".
*
* This request holds the parameters needed by the securitycenter server. After setting any
* optional parameters, call the {@link ListDescendant#execute()} method to invoke the remote
* operation.
*
* @param parent Required. Name of the parent to list custom modules under. Its format is: *
* `organizations/{organization}/eventThreatDetectionSettings`. *
* `folders/{folder}/eventThreatDetectionSettings`. *
* `projects/{project}/eventThreatDetectionSettings`.
* @return the request
*/
public ListDescendant listDescendant(java.lang.String parent) throws java.io.IOException {
ListDescendant result = new ListDescendant(parent);
initialize(result);
return result;
}
public class ListDescendant extends SecurityCommandCenterRequest {
private static final String REST_PATH = "v1/{+parent}/customModules:listDescendant";
private final java.util.regex.Pattern PARENT_PATTERN =
java.util.regex.Pattern.compile("^organizations/[^/]+/eventThreatDetectionSettings$");
/**
* Lists all resident Event Threat Detection custom modules under the given Resource Manager
* parent and its descendants.
*
* Create a request for the method "customModules.listDescendant".
*
* This request holds the parameters needed by the the securitycenter server. After setting any
* optional parameters, call the {@link ListDescendant#execute()} method to invoke the remote
* operation. {@link ListDescendant#initialize(com.google.api.client.googleapis.services.Abstr
* actGoogleClientRequest)} must be called to initialize this instance immediately after invoking
* the constructor.
*
* @param parent Required. Name of the parent to list custom modules under. Its format is: *
* `organizations/{organization}/eventThreatDetectionSettings`. *
* `folders/{folder}/eventThreatDetectionSettings`. *
* `projects/{project}/eventThreatDetectionSettings`.
* @since 1.13
*/
protected ListDescendant(java.lang.String parent) {
super(SecurityCommandCenter.this, "GET", REST_PATH, null, com.google.api.services.securitycenter.v1.model.ListDescendantEventThreatDetectionCustomModulesResponse.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/[^/]+/eventThreatDetectionSettings$");
}
}
@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 ListDescendant set$Xgafv(java.lang.String $Xgafv) {
return (ListDescendant) super.set$Xgafv($Xgafv);
}
@Override
public ListDescendant setAccessToken(java.lang.String accessToken) {
return (ListDescendant) super.setAccessToken(accessToken);
}
@Override
public ListDescendant setAlt(java.lang.String alt) {
return (ListDescendant) super.setAlt(alt);
}
@Override
public ListDescendant setCallback(java.lang.String callback) {
return (ListDescendant) super.setCallback(callback);
}
@Override
public ListDescendant setFields(java.lang.String fields) {
return (ListDescendant) super.setFields(fields);
}
@Override
public ListDescendant setKey(java.lang.String key) {
return (ListDescendant) super.setKey(key);
}
@Override
public ListDescendant setOauthToken(java.lang.String oauthToken) {
return (ListDescendant) super.setOauthToken(oauthToken);
}
@Override
public ListDescendant setPrettyPrint(java.lang.Boolean prettyPrint) {
return (ListDescendant) super.setPrettyPrint(prettyPrint);
}
@Override
public ListDescendant setQuotaUser(java.lang.String quotaUser) {
return (ListDescendant) super.setQuotaUser(quotaUser);
}
@Override
public ListDescendant setUploadType(java.lang.String uploadType) {
return (ListDescendant) super.setUploadType(uploadType);
}
@Override
public ListDescendant setUploadProtocol(java.lang.String uploadProtocol) {
return (ListDescendant) super.setUploadProtocol(uploadProtocol);
}
/**
* Required. Name of the parent to list custom modules under. Its format is: *
* `organizations/{organization}/eventThreatDetectionSettings`. *
* `folders/{folder}/eventThreatDetectionSettings`. *
* `projects/{project}/eventThreatDetectionSettings`.
*/
@com.google.api.client.util.Key
private java.lang.String parent;
/** Required. Name of the parent to list custom modules under. Its format is: *
`organizations/{organization}/eventThreatDetectionSettings`. *
`folders/{folder}/eventThreatDetectionSettings`. *
`projects/{project}/eventThreatDetectionSettings`.
*/
public java.lang.String getParent() {
return parent;
}
/**
* Required. Name of the parent to list custom modules under. Its format is: *
* `organizations/{organization}/eventThreatDetectionSettings`. *
* `folders/{folder}/eventThreatDetectionSettings`. *
* `projects/{project}/eventThreatDetectionSettings`.
*/
public ListDescendant 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/[^/]+/eventThreatDetectionSettings$");
}
this.parent = parent;
return this;
}
/**
* The maximum number of modules to return. The service may return fewer than this value.
* If unspecified, at most 10 configs will be returned. The maximum value is 1000; values
* above 1000 will be coerced to 1000.
*/
@com.google.api.client.util.Key
private java.lang.Integer pageSize;
/** The maximum number of modules to return. The service may return fewer than this value. If
unspecified, at most 10 configs will be returned. The maximum value is 1000; values above 1000 will
be coerced to 1000.
*/
public java.lang.Integer getPageSize() {
return pageSize;
}
/**
* The maximum number of modules to return. The service may return fewer than this value.
* If unspecified, at most 10 configs will be returned. The maximum value is 1000; values
* above 1000 will be coerced to 1000.
*/
public ListDescendant setPageSize(java.lang.Integer pageSize) {
this.pageSize = pageSize;
return this;
}
/**
* A page token, received from a previous
* `ListDescendantEventThreatDetectionCustomModules` call. Provide this to retrieve the
* subsequent page. When paginating, all other parameters provided to
* `ListDescendantEventThreatDetectionCustomModules` must match the call that provided the
* page token.
*/
@com.google.api.client.util.Key
private java.lang.String pageToken;
/** A page token, received from a previous `ListDescendantEventThreatDetectionCustomModules` call.
Provide this to retrieve the subsequent page. When paginating, all other parameters provided to
`ListDescendantEventThreatDetectionCustomModules` must match the call that provided the page token.
*/
public java.lang.String getPageToken() {
return pageToken;
}
/**
* A page token, received from a previous
* `ListDescendantEventThreatDetectionCustomModules` call. Provide this to retrieve the
* subsequent page. When paginating, all other parameters provided to
* `ListDescendantEventThreatDetectionCustomModules` must match the call that provided the
* page token.
*/
public ListDescendant setPageToken(java.lang.String pageToken) {
this.pageToken = pageToken;
return this;
}
@Override
public ListDescendant set(String parameterName, Object value) {
return (ListDescendant) super.set(parameterName, value);
}
}
/**
* Updates the Event Threat Detection custom module with the given name based on the given update
* mask. Updating the enablement state is supported for both resident and inherited modules (though
* resident modules cannot have an enablement state of "inherited"). Updating the display name or
* configuration of a module is supported for resident modules only. The type of a module cannot be
* changed.
*
* Create a request for the method "customModules.patch".
*
* This request holds the parameters needed by the securitycenter server. After setting any
* optional parameters, call the {@link Patch#execute()} method to invoke the remote operation.
*
* @param name Immutable. The resource name of the Event Threat Detection custom module. Its format is: *
* `organizations/{organization}/eventThreatDetectionSettings/customModules/{module}`. *
* `folders/{folder}/eventThreatDetectionSettings/customModules/{module}`. *
* `projects/{project}/eventThreatDetectionSettings/customModules/{module}`.
* @param content the {@link com.google.api.services.securitycenter.v1.model.EventThreatDetectionCustomModule}
* @return the request
*/
public Patch patch(java.lang.String name, com.google.api.services.securitycenter.v1.model.EventThreatDetectionCustomModule content) throws java.io.IOException {
Patch result = new Patch(name, content);
initialize(result);
return result;
}
public class Patch extends SecurityCommandCenterRequest {
private static final String REST_PATH = "v1/{+name}";
private final java.util.regex.Pattern NAME_PATTERN =
java.util.regex.Pattern.compile("^organizations/[^/]+/eventThreatDetectionSettings/customModules/[^/]+$");
/**
* Updates the Event Threat Detection custom module with the given name based on the given update
* mask. Updating the enablement state is supported for both resident and inherited modules
* (though resident modules cannot have an enablement state of "inherited"). Updating the display
* name or configuration of a module is supported for resident modules only. The type of a module
* cannot be changed.
*
* Create a request for the method "customModules.patch".
*
* This request holds the parameters needed by the the securitycenter server. After setting any
* optional parameters, call the {@link Patch#execute()} method to invoke the remote operation.
* {@link
* Patch#initialize(com.google.api.client.googleapis.services.AbstractGoogleClientRequest)} must
* be called to initialize this instance immediately after invoking the constructor.
*
* @param name Immutable. The resource name of the Event Threat Detection custom module. Its format is: *
* `organizations/{organization}/eventThreatDetectionSettings/customModules/{module}`. *
* `folders/{folder}/eventThreatDetectionSettings/customModules/{module}`. *
* `projects/{project}/eventThreatDetectionSettings/customModules/{module}`.
* @param content the {@link com.google.api.services.securitycenter.v1.model.EventThreatDetectionCustomModule}
* @since 1.13
*/
protected Patch(java.lang.String name, com.google.api.services.securitycenter.v1.model.EventThreatDetectionCustomModule content) {
super(SecurityCommandCenter.this, "PATCH", REST_PATH, content, com.google.api.services.securitycenter.v1.model.EventThreatDetectionCustomModule.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/[^/]+/eventThreatDetectionSettings/customModules/[^/]+$");
}
}
@Override
public Patch set$Xgafv(java.lang.String $Xgafv) {
return (Patch) super.set$Xgafv($Xgafv);
}
@Override
public Patch setAccessToken(java.lang.String accessToken) {
return (Patch) super.setAccessToken(accessToken);
}
@Override
public Patch setAlt(java.lang.String alt) {
return (Patch) super.setAlt(alt);
}
@Override
public Patch setCallback(java.lang.String callback) {
return (Patch) super.setCallback(callback);
}
@Override
public Patch setFields(java.lang.String fields) {
return (Patch) super.setFields(fields);
}
@Override
public Patch setKey(java.lang.String key) {
return (Patch) super.setKey(key);
}
@Override
public Patch setOauthToken(java.lang.String oauthToken) {
return (Patch) super.setOauthToken(oauthToken);
}
@Override
public Patch setPrettyPrint(java.lang.Boolean prettyPrint) {
return (Patch) super.setPrettyPrint(prettyPrint);
}
@Override
public Patch setQuotaUser(java.lang.String quotaUser) {
return (Patch) super.setQuotaUser(quotaUser);
}
@Override
public Patch setUploadType(java.lang.String uploadType) {
return (Patch) super.setUploadType(uploadType);
}
@Override
public Patch setUploadProtocol(java.lang.String uploadProtocol) {
return (Patch) super.setUploadProtocol(uploadProtocol);
}
/**
* Immutable. The resource name of the Event Threat Detection custom module. Its format
* is: *
* `organizations/{organization}/eventThreatDetectionSettings/customModules/{module}`. *
* `folders/{folder}/eventThreatDetectionSettings/customModules/{module}`. *
* `projects/{project}/eventThreatDetectionSettings/customModules/{module}`.
*/
@com.google.api.client.util.Key
private java.lang.String name;
/** Immutable. The resource name of the Event Threat Detection custom module. Its format is: *
`organizations/{organization}/eventThreatDetectionSettings/customModules/{module}`. *
`folders/{folder}/eventThreatDetectionSettings/customModules/{module}`. *
`projects/{project}/eventThreatDetectionSettings/customModules/{module}`.
*/
public java.lang.String getName() {
return name;
}
/**
* Immutable. The resource name of the Event Threat Detection custom module. Its format
* is: *
* `organizations/{organization}/eventThreatDetectionSettings/customModules/{module}`. *
* `folders/{folder}/eventThreatDetectionSettings/customModules/{module}`. *
* `projects/{project}/eventThreatDetectionSettings/customModules/{module}`.
*/
public Patch setName(java.lang.String name) {
if (!getSuppressPatternChecks()) {
com.google.api.client.util.Preconditions.checkArgument(NAME_PATTERN.matcher(name).matches(),
"Parameter name must conform to the pattern " +
"^organizations/[^/]+/eventThreatDetectionSettings/customModules/[^/]+$");
}
this.name = name;
return this;
}
/** The list of fields to be updated. If empty all mutable fields will be updated. */
@com.google.api.client.util.Key
private String updateMask;
/** The list of fields to be updated. If empty all mutable fields will be updated.
*/
public String getUpdateMask() {
return updateMask;
}
/** The list of fields to be updated. If empty all mutable fields will be updated. */
public Patch setUpdateMask(String updateMask) {
this.updateMask = updateMask;
return this;
}
@Override
public Patch set(String parameterName, Object value) {
return (Patch) super.set(parameterName, value);
}
}
}
/**
* An accessor for creating requests from the EffectiveCustomModules collection.
*
* The typical use is:
*
* {@code SecurityCommandCenter securitycenter = new SecurityCommandCenter(...);}
* {@code SecurityCommandCenter.EffectiveCustomModules.List request = securitycenter.effectiveCustomModules().list(parameters ...)}
*
*
* @return the resource collection
*/
public EffectiveCustomModules effectiveCustomModules() {
return new EffectiveCustomModules();
}
/**
* The "effectiveCustomModules" collection of methods.
*/
public class EffectiveCustomModules {
/**
* Gets an effective Event Threat Detection custom module at the given level.
*
* Create a request for the method "effectiveCustomModules.get".
*
* This request holds the parameters needed by the securitycenter server. After setting any
* optional parameters, call the {@link Get#execute()} method to invoke the remote operation.
*
* @param name Required. The resource name of the effective Event Threat Detection custom module. Its format is: *
* `organizations/{organization}/eventThreatDetectionSettings/effectiveCustomModules/{module}
* `. * `folders/{folder}/eventThreatDetectionSettings/effectiveCustomModules/{module}`. *
* `projects/{project}/eventThreatDetectionSettings/effectiveCustomModules/{module}`.
* @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 SecurityCommandCenterRequest {
private static final String REST_PATH = "v1/{+name}";
private final java.util.regex.Pattern NAME_PATTERN =
java.util.regex.Pattern.compile("^organizations/[^/]+/eventThreatDetectionSettings/effectiveCustomModules/[^/]+$");
/**
* Gets an effective Event Threat Detection custom module at the given level.
*
* Create a request for the method "effectiveCustomModules.get".
*
* This request holds the parameters needed by the the securitycenter server. After setting any
* optional parameters, call the {@link Get#execute()} method to invoke the remote operation.
* {@link Get#initialize(com.google.api.client.googleapis.services.AbstractGoogleClientRequest)}
* must be called to initialize this instance immediately after invoking the constructor.
*
* @param name Required. The resource name of the effective Event Threat Detection custom module. Its format is: *
* `organizations/{organization}/eventThreatDetectionSettings/effectiveCustomModules/{module}
* `. * `folders/{folder}/eventThreatDetectionSettings/effectiveCustomModules/{module}`. *
* `projects/{project}/eventThreatDetectionSettings/effectiveCustomModules/{module}`.
* @since 1.13
*/
protected Get(java.lang.String name) {
super(SecurityCommandCenter.this, "GET", REST_PATH, null, com.google.api.services.securitycenter.v1.model.EffectiveEventThreatDetectionCustomModule.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/[^/]+/eventThreatDetectionSettings/effectiveCustomModules/[^/]+$");
}
}
@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 resource name of the effective Event Threat Detection custom module. Its
* format is: * `organizations/{organization}/eventThreatDetectionSettings/effectiveCustom
* Modules/{module}`. *
* `folders/{folder}/eventThreatDetectionSettings/effectiveCustomModules/{module}`. *
* `projects/{project}/eventThreatDetectionSettings/effectiveCustomModules/{module}`.
*/
@com.google.api.client.util.Key
private java.lang.String name;
/** Required. The resource name of the effective Event Threat Detection custom module. Its format is: *
`organizations/{organization}/eventThreatDetectionSettings/effectiveCustomModules/{module}`. *
`folders/{folder}/eventThreatDetectionSettings/effectiveCustomModules/{module}`. *
`projects/{project}/eventThreatDetectionSettings/effectiveCustomModules/{module}`.
*/
public java.lang.String getName() {
return name;
}
/**
* Required. The resource name of the effective Event Threat Detection custom module. Its
* format is: * `organizations/{organization}/eventThreatDetectionSettings/effectiveCustom
* Modules/{module}`. *
* `folders/{folder}/eventThreatDetectionSettings/effectiveCustomModules/{module}`. *
* `projects/{project}/eventThreatDetectionSettings/effectiveCustomModules/{module}`.
*/
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/[^/]+/eventThreatDetectionSettings/effectiveCustomModules/[^/]+$");
}
this.name = name;
return this;
}
@Override
public Get set(String parameterName, Object value) {
return (Get) super.set(parameterName, value);
}
}
/**
* Lists all effective Event Threat Detection custom modules for the given parent. This includes
* resident modules defined at the scope of the parent along with modules inherited from its
* ancestors.
*
* Create a request for the method "effectiveCustomModules.list".
*
* This request holds the parameters needed by the securitycenter server. After setting any
* optional parameters, call the {@link List#execute()} method to invoke the remote operation.
*
* @param parent Required. Name of the parent to list custom modules for. Its format is: *
* `organizations/{organization}/eventThreatDetectionSettings`. *
* `folders/{folder}/eventThreatDetectionSettings`. *
* `projects/{project}/eventThreatDetectionSettings`.
* @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 SecurityCommandCenterRequest {
private static final String REST_PATH = "v1/{+parent}/effectiveCustomModules";
private final java.util.regex.Pattern PARENT_PATTERN =
java.util.regex.Pattern.compile("^organizations/[^/]+/eventThreatDetectionSettings$");
/**
* Lists all effective Event Threat Detection custom modules for the given parent. This includes
* resident modules defined at the scope of the parent along with modules inherited from its
* ancestors.
*
* Create a request for the method "effectiveCustomModules.list".
*
* This request holds the parameters needed by the the securitycenter 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. Name of the parent to list custom modules for. Its format is: *
* `organizations/{organization}/eventThreatDetectionSettings`. *
* `folders/{folder}/eventThreatDetectionSettings`. *
* `projects/{project}/eventThreatDetectionSettings`.
* @since 1.13
*/
protected List(java.lang.String parent) {
super(SecurityCommandCenter.this, "GET", REST_PATH, null, com.google.api.services.securitycenter.v1.model.ListEffectiveEventThreatDetectionCustomModulesResponse.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/[^/]+/eventThreatDetectionSettings$");
}
}
@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. Name of the parent to list custom modules for. Its format is: *
* `organizations/{organization}/eventThreatDetectionSettings`. *
* `folders/{folder}/eventThreatDetectionSettings`. *
* `projects/{project}/eventThreatDetectionSettings`.
*/
@com.google.api.client.util.Key
private java.lang.String parent;
/** Required. Name of the parent to list custom modules for. Its format is: *
`organizations/{organization}/eventThreatDetectionSettings`. *
`folders/{folder}/eventThreatDetectionSettings`. *
`projects/{project}/eventThreatDetectionSettings`.
*/
public java.lang.String getParent() {
return parent;
}
/**
* Required. Name of the parent to list custom modules for. Its format is: *
* `organizations/{organization}/eventThreatDetectionSettings`. *
* `folders/{folder}/eventThreatDetectionSettings`. *
* `projects/{project}/eventThreatDetectionSettings`.
*/
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/[^/]+/eventThreatDetectionSettings$");
}
this.parent = parent;
return this;
}
/**
* The maximum number of modules to return. The service may return fewer than this value.
* If unspecified, at most 10 configs will be returned. The maximum value is 1000; values
* above 1000 will be coerced to 1000.
*/
@com.google.api.client.util.Key
private java.lang.Integer pageSize;
/** The maximum number of modules to return. The service may return fewer than this value. If
unspecified, at most 10 configs will be returned. The maximum value is 1000; values above 1000 will
be coerced to 1000.
*/
public java.lang.Integer getPageSize() {
return pageSize;
}
/**
* The maximum number of modules to return. The service may return fewer than this value.
* If unspecified, at most 10 configs will be returned. The maximum value is 1000; values
* above 1000 will be coerced to 1000.
*/
public List setPageSize(java.lang.Integer pageSize) {
this.pageSize = pageSize;
return this;
}
/**
* A page token, received from a previous `ListEffectiveEventThreatDetectionCustomModules`
* call. Provide this to retrieve the subsequent page. When paginating, all other
* parameters provided to `ListEffectiveEventThreatDetectionCustomModules` must match the
* call that provided the page token.
*/
@com.google.api.client.util.Key
private java.lang.String pageToken;
/** A page token, received from a previous `ListEffectiveEventThreatDetectionCustomModules` call.
Provide this to retrieve the subsequent page. When paginating, all other parameters provided to
`ListEffectiveEventThreatDetectionCustomModules` must match the call that provided the page token.
*/
public java.lang.String getPageToken() {
return pageToken;
}
/**
* A page token, received from a previous `ListEffectiveEventThreatDetectionCustomModules`
* call. Provide this to retrieve the subsequent page. When paginating, all other
* parameters provided to `ListEffectiveEventThreatDetectionCustomModules` must match the
* call that provided the 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 Findings collection.
*
* The typical use is:
*
* {@code SecurityCommandCenter securitycenter = new SecurityCommandCenter(...);}
* {@code SecurityCommandCenter.Findings.List request = securitycenter.findings().list(parameters ...)}
*
*
* @return the resource collection
*/
public Findings findings() {
return new Findings();
}
/**
* The "findings" collection of methods.
*/
public class Findings {
/**
* Kicks off an LRO to bulk mute findings for a parent based on a filter. The parent can be either
* an organization, folder or project. The findings matched by the filter will be muted after the
* LRO is done.
*
* Create a request for the method "findings.bulkMute".
*
* This request holds the parameters needed by the securitycenter server. After setting any
* optional parameters, call the {@link BulkMute#execute()} method to invoke the remote operation.
*
* @param parent Required. The parent, at which bulk action needs to be applied. Its format is
* `organizations/[organization_id]`, `folders/[folder_id]`, `projects/[project_id]`.
* @param content the {@link com.google.api.services.securitycenter.v1.model.BulkMuteFindingsRequest}
* @return the request
*/
public BulkMute bulkMute(java.lang.String parent, com.google.api.services.securitycenter.v1.model.BulkMuteFindingsRequest content) throws java.io.IOException {
BulkMute result = new BulkMute(parent, content);
initialize(result);
return result;
}
public class BulkMute extends SecurityCommandCenterRequest {
private static final String REST_PATH = "v1/{+parent}/findings:bulkMute";
private final java.util.regex.Pattern PARENT_PATTERN =
java.util.regex.Pattern.compile("^organizations/[^/]+$");
/**
* Kicks off an LRO to bulk mute findings for a parent based on a filter. The parent can be either
* an organization, folder or project. The findings matched by the filter will be muted after the
* LRO is done.
*
* Create a request for the method "findings.bulkMute".
*
* This request holds the parameters needed by the the securitycenter server. After setting any
* optional parameters, call the {@link BulkMute#execute()} method to invoke the remote operation.
* {@link
* BulkMute#initialize(com.google.api.client.googleapis.services.AbstractGoogleClientRequest)}
* must be called to initialize this instance immediately after invoking the constructor.
*
* @param parent Required. The parent, at which bulk action needs to be applied. Its format is
* `organizations/[organization_id]`, `folders/[folder_id]`, `projects/[project_id]`.
* @param content the {@link com.google.api.services.securitycenter.v1.model.BulkMuteFindingsRequest}
* @since 1.13
*/
protected BulkMute(java.lang.String parent, com.google.api.services.securitycenter.v1.model.BulkMuteFindingsRequest content) {
super(SecurityCommandCenter.this, "POST", REST_PATH, content, com.google.api.services.securitycenter.v1.model.Operation.class);
this.parent = com.google.api.client.util.Preconditions.checkNotNull(parent, "Required parameter parent must be specified.");
if (!getSuppressPatternChecks()) {
com.google.api.client.util.Preconditions.checkArgument(PARENT_PATTERN.matcher(parent).matches(),
"Parameter parent must conform to the pattern " +
"^organizations/[^/]+$");
}
}
@Override
public BulkMute set$Xgafv(java.lang.String $Xgafv) {
return (BulkMute) super.set$Xgafv($Xgafv);
}
@Override
public BulkMute setAccessToken(java.lang.String accessToken) {
return (BulkMute) super.setAccessToken(accessToken);
}
@Override
public BulkMute setAlt(java.lang.String alt) {
return (BulkMute) super.setAlt(alt);
}
@Override
public BulkMute setCallback(java.lang.String callback) {
return (BulkMute) super.setCallback(callback);
}
@Override
public BulkMute setFields(java.lang.String fields) {
return (BulkMute) super.setFields(fields);
}
@Override
public BulkMute setKey(java.lang.String key) {
return (BulkMute) super.setKey(key);
}
@Override
public BulkMute setOauthToken(java.lang.String oauthToken) {
return (BulkMute) super.setOauthToken(oauthToken);
}
@Override
public BulkMute setPrettyPrint(java.lang.Boolean prettyPrint) {
return (BulkMute) super.setPrettyPrint(prettyPrint);
}
@Override
public BulkMute setQuotaUser(java.lang.String quotaUser) {
return (BulkMute) super.setQuotaUser(quotaUser);
}
@Override
public BulkMute setUploadType(java.lang.String uploadType) {
return (BulkMute) super.setUploadType(uploadType);
}
@Override
public BulkMute setUploadProtocol(java.lang.String uploadProtocol) {
return (BulkMute) super.setUploadProtocol(uploadProtocol);
}
/**
* Required. The parent, at which bulk action needs to be applied. Its format is
* `organizations/[organization_id]`, `folders/[folder_id]`, `projects/[project_id]`.
*/
@com.google.api.client.util.Key
private java.lang.String parent;
/** Required. The parent, at which bulk action needs to be applied. Its format is
`organizations/[organization_id]`, `folders/[folder_id]`, `projects/[project_id]`.
*/
public java.lang.String getParent() {
return parent;
}
/**
* Required. The parent, at which bulk action needs to be applied. Its format is
* `organizations/[organization_id]`, `folders/[folder_id]`, `projects/[project_id]`.
*/
public BulkMute 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/[^/]+$");
}
this.parent = parent;
return this;
}
@Override
public BulkMute set(String parameterName, Object value) {
return (BulkMute) super.set(parameterName, value);
}
}
}
/**
* An accessor for creating requests from the Locations collection.
*
* The typical use is:
*
* {@code SecurityCommandCenter securitycenter = new SecurityCommandCenter(...);}
* {@code SecurityCommandCenter.Locations.List request = securitycenter.locations().list(parameters ...)}
*
*
* @return the resource collection
*/
public Locations locations() {
return new Locations();
}
/**
* The "locations" collection of methods.
*/
public class Locations {
/**
* An accessor for creating requests from the MuteConfigs collection.
*
* The typical use is:
*
* {@code SecurityCommandCenter securitycenter = new SecurityCommandCenter(...);}
* {@code SecurityCommandCenter.MuteConfigs.List request = securitycenter.muteConfigs().list(parameters ...)}
*
*
* @return the resource collection
*/
public MuteConfigs muteConfigs() {
return new MuteConfigs();
}
/**
* The "muteConfigs" collection of methods.
*/
public class MuteConfigs {
/**
* Deletes an existing mute config.
*
* Create a request for the method "muteConfigs.delete".
*
* This request holds the parameters needed by the securitycenter server. After setting any
* optional parameters, call the {@link Delete#execute()} method to invoke the remote operation.
*
* @param name Required. Name of the mute config to delete. Its format is
* `organizations/{organization}/muteConfigs/{config_id}`,
* `folders/{folder}/muteConfigs/{config_id}`, `projects/{project}/muteConfigs/{config_id}`,
* `organizations/{organization}/locations/global/muteConfigs/{config_id}`,
* `folders/{folder}/locations/global/muteConfigs/{config_id}`, or
* `projects/{project}/locations/global/muteConfigs/{config_id}`.
* @return the request
*/
public Delete delete(java.lang.String name) throws java.io.IOException {
Delete result = new Delete(name);
initialize(result);
return result;
}
public class Delete extends SecurityCommandCenterRequest {
private static final String REST_PATH = "v1/{+name}";
private final java.util.regex.Pattern NAME_PATTERN =
java.util.regex.Pattern.compile("^organizations/[^/]+/locations/[^/]+/muteConfigs/[^/]+$");
/**
* Deletes an existing mute config.
*
* Create a request for the method "muteConfigs.delete".
*
* This request holds the parameters needed by the the securitycenter server. After setting any
* optional parameters, call the {@link Delete#execute()} method to invoke the remote operation.
* {@link
* Delete#initialize(com.google.api.client.googleapis.services.AbstractGoogleClientRequest)} must
* be called to initialize this instance immediately after invoking the constructor.
*
* @param name Required. Name of the mute config to delete. Its format is
* `organizations/{organization}/muteConfigs/{config_id}`,
* `folders/{folder}/muteConfigs/{config_id}`, `projects/{project}/muteConfigs/{config_id}`,
* `organizations/{organization}/locations/global/muteConfigs/{config_id}`,
* `folders/{folder}/locations/global/muteConfigs/{config_id}`, or
* `projects/{project}/locations/global/muteConfigs/{config_id}`.
* @since 1.13
*/
protected Delete(java.lang.String name) {
super(SecurityCommandCenter.this, "DELETE", REST_PATH, null, com.google.api.services.securitycenter.v1.model.Empty.class);
this.name = com.google.api.client.util.Preconditions.checkNotNull(name, "Required parameter name must be specified.");
if (!getSuppressPatternChecks()) {
com.google.api.client.util.Preconditions.checkArgument(NAME_PATTERN.matcher(name).matches(),
"Parameter name must conform to the pattern " +
"^organizations/[^/]+/locations/[^/]+/muteConfigs/[^/]+$");
}
}
@Override
public Delete set$Xgafv(java.lang.String $Xgafv) {
return (Delete) super.set$Xgafv($Xgafv);
}
@Override
public Delete setAccessToken(java.lang.String accessToken) {
return (Delete) super.setAccessToken(accessToken);
}
@Override
public Delete setAlt(java.lang.String alt) {
return (Delete) super.setAlt(alt);
}
@Override
public Delete setCallback(java.lang.String callback) {
return (Delete) super.setCallback(callback);
}
@Override
public Delete setFields(java.lang.String fields) {
return (Delete) super.setFields(fields);
}
@Override
public Delete setKey(java.lang.String key) {
return (Delete) super.setKey(key);
}
@Override
public Delete setOauthToken(java.lang.String oauthToken) {
return (Delete) super.setOauthToken(oauthToken);
}
@Override
public Delete setPrettyPrint(java.lang.Boolean prettyPrint) {
return (Delete) super.setPrettyPrint(prettyPrint);
}
@Override
public Delete setQuotaUser(java.lang.String quotaUser) {
return (Delete) super.setQuotaUser(quotaUser);
}
@Override
public Delete setUploadType(java.lang.String uploadType) {
return (Delete) super.setUploadType(uploadType);
}
@Override
public Delete setUploadProtocol(java.lang.String uploadProtocol) {
return (Delete) super.setUploadProtocol(uploadProtocol);
}
/**
* Required. Name of the mute config to delete. Its format is
* `organizations/{organization}/muteConfigs/{config_id}`,
* `folders/{folder}/muteConfigs/{config_id}`,
* `projects/{project}/muteConfigs/{config_id}`,
* `organizations/{organization}/locations/global/muteConfigs/{config_id}`,
* `folders/{folder}/locations/global/muteConfigs/{config_id}`, or
* `projects/{project}/locations/global/muteConfigs/{config_id}`.
*/
@com.google.api.client.util.Key
private java.lang.String name;
/** Required. Name of the mute config to delete. Its format is
`organizations/{organization}/muteConfigs/{config_id}`, `folders/{folder}/muteConfigs/{config_id}`,
`projects/{project}/muteConfigs/{config_id}`,
`organizations/{organization}/locations/global/muteConfigs/{config_id}`,
`folders/{folder}/locations/global/muteConfigs/{config_id}`, or
`projects/{project}/locations/global/muteConfigs/{config_id}`.
*/
public java.lang.String getName() {
return name;
}
/**
* Required. Name of the mute config to delete. Its format is
* `organizations/{organization}/muteConfigs/{config_id}`,
* `folders/{folder}/muteConfigs/{config_id}`,
* `projects/{project}/muteConfigs/{config_id}`,
* `organizations/{organization}/locations/global/muteConfigs/{config_id}`,
* `folders/{folder}/locations/global/muteConfigs/{config_id}`, or
* `projects/{project}/locations/global/muteConfigs/{config_id}`.
*/
public Delete setName(java.lang.String name) {
if (!getSuppressPatternChecks()) {
com.google.api.client.util.Preconditions.checkArgument(NAME_PATTERN.matcher(name).matches(),
"Parameter name must conform to the pattern " +
"^organizations/[^/]+/locations/[^/]+/muteConfigs/[^/]+$");
}
this.name = name;
return this;
}
@Override
public Delete set(String parameterName, Object value) {
return (Delete) super.set(parameterName, value);
}
}
/**
* Gets a mute config.
*
* Create a request for the method "muteConfigs.get".
*
* This request holds the parameters needed by the securitycenter server. After setting any
* optional parameters, call the {@link Get#execute()} method to invoke the remote operation.
*
* @param name Required. Name of the mute config to retrieve. Its format is
* `organizations/{organization}/muteConfigs/{config_id}`,
* `folders/{folder}/muteConfigs/{config_id}`, `projects/{project}/muteConfigs/{config_id}`,
* `organizations/{organization}/locations/global/muteConfigs/{config_id}`,
* `folders/{folder}/locations/global/muteConfigs/{config_id}`, or
* `projects/{project}/locations/global/muteConfigs/{config_id}`.
* @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 SecurityCommandCenterRequest {
private static final String REST_PATH = "v1/{+name}";
private final java.util.regex.Pattern NAME_PATTERN =
java.util.regex.Pattern.compile("^organizations/[^/]+/locations/[^/]+/muteConfigs/[^/]+$");
/**
* Gets a mute config.
*
* Create a request for the method "muteConfigs.get".
*
* This request holds the parameters needed by the the securitycenter 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. Name of the mute config to retrieve. Its format is
* `organizations/{organization}/muteConfigs/{config_id}`,
* `folders/{folder}/muteConfigs/{config_id}`, `projects/{project}/muteConfigs/{config_id}`,
* `organizations/{organization}/locations/global/muteConfigs/{config_id}`,
* `folders/{folder}/locations/global/muteConfigs/{config_id}`, or
* `projects/{project}/locations/global/muteConfigs/{config_id}`.
* @since 1.13
*/
protected Get(java.lang.String name) {
super(SecurityCommandCenter.this, "GET", REST_PATH, null, com.google.api.services.securitycenter.v1.model.GoogleCloudSecuritycenterV1MuteConfig.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/[^/]+/muteConfigs/[^/]+$");
}
}
@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. Name of the mute config to retrieve. Its format is
* `organizations/{organization}/muteConfigs/{config_id}`,
* `folders/{folder}/muteConfigs/{config_id}`,
* `projects/{project}/muteConfigs/{config_id}`,
* `organizations/{organization}/locations/global/muteConfigs/{config_id}`,
* `folders/{folder}/locations/global/muteConfigs/{config_id}`, or
* `projects/{project}/locations/global/muteConfigs/{config_id}`.
*/
@com.google.api.client.util.Key
private java.lang.String name;
/** Required. Name of the mute config to retrieve. Its format is
`organizations/{organization}/muteConfigs/{config_id}`, `folders/{folder}/muteConfigs/{config_id}`,
`projects/{project}/muteConfigs/{config_id}`,
`organizations/{organization}/locations/global/muteConfigs/{config_id}`,
`folders/{folder}/locations/global/muteConfigs/{config_id}`, or
`projects/{project}/locations/global/muteConfigs/{config_id}`.
*/
public java.lang.String getName() {
return name;
}
/**
* Required. Name of the mute config to retrieve. Its format is
* `organizations/{organization}/muteConfigs/{config_id}`,
* `folders/{folder}/muteConfigs/{config_id}`,
* `projects/{project}/muteConfigs/{config_id}`,
* `organizations/{organization}/locations/global/muteConfigs/{config_id}`,
* `folders/{folder}/locations/global/muteConfigs/{config_id}`, or
* `projects/{project}/locations/global/muteConfigs/{config_id}`.
*/
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/[^/]+/muteConfigs/[^/]+$");
}
this.name = name;
return this;
}
@Override
public Get set(String parameterName, Object value) {
return (Get) super.set(parameterName, value);
}
}
/**
* Updates a mute config.
*
* Create a request for the method "muteConfigs.patch".
*
* This request holds the parameters needed by the securitycenter server. After setting any
* optional parameters, call the {@link Patch#execute()} method to invoke the remote operation.
*
* @param name This field will be ignored if provided on config creation. Format
* `organizations/{organization}/muteConfigs/{mute_config}`
* `folders/{folder}/muteConfigs/{mute_config}`
* `projects/{project}/muteConfigs/{mute_config}`
* `organizations/{organization}/locations/global/muteConfigs/{mute_config}`
* `folders/{folder}/locations/global/muteConfigs/{mute_config}`
* `projects/{project}/locations/global/muteConfigs/{mute_config}`
* @param content the {@link com.google.api.services.securitycenter.v1.model.GoogleCloudSecuritycenterV1MuteConfig}
* @return the request
*/
public Patch patch(java.lang.String name, com.google.api.services.securitycenter.v1.model.GoogleCloudSecuritycenterV1MuteConfig content) throws java.io.IOException {
Patch result = new Patch(name, content);
initialize(result);
return result;
}
public class Patch extends SecurityCommandCenterRequest {
private static final String REST_PATH = "v1/{+name}";
private final java.util.regex.Pattern NAME_PATTERN =
java.util.regex.Pattern.compile("^organizations/[^/]+/locations/[^/]+/muteConfigs/[^/]+$");
/**
* Updates a mute config.
*
* Create a request for the method "muteConfigs.patch".
*
* This request holds the parameters needed by the the securitycenter server. After setting any
* optional parameters, call the {@link Patch#execute()} method to invoke the remote operation.
* {@link
* Patch#initialize(com.google.api.client.googleapis.services.AbstractGoogleClientRequest)} must
* be called to initialize this instance immediately after invoking the constructor.
*
* @param name This field will be ignored if provided on config creation. Format
* `organizations/{organization}/muteConfigs/{mute_config}`
* `folders/{folder}/muteConfigs/{mute_config}`
* `projects/{project}/muteConfigs/{mute_config}`
* `organizations/{organization}/locations/global/muteConfigs/{mute_config}`
* `folders/{folder}/locations/global/muteConfigs/{mute_config}`
* `projects/{project}/locations/global/muteConfigs/{mute_config}`
* @param content the {@link com.google.api.services.securitycenter.v1.model.GoogleCloudSecuritycenterV1MuteConfig}
* @since 1.13
*/
protected Patch(java.lang.String name, com.google.api.services.securitycenter.v1.model.GoogleCloudSecuritycenterV1MuteConfig content) {
super(SecurityCommandCenter.this, "PATCH", REST_PATH, content, com.google.api.services.securitycenter.v1.model.GoogleCloudSecuritycenterV1MuteConfig.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/[^/]+/muteConfigs/[^/]+$");
}
}
@Override
public Patch set$Xgafv(java.lang.String $Xgafv) {
return (Patch) super.set$Xgafv($Xgafv);
}
@Override
public Patch setAccessToken(java.lang.String accessToken) {
return (Patch) super.setAccessToken(accessToken);
}
@Override
public Patch setAlt(java.lang.String alt) {
return (Patch) super.setAlt(alt);
}
@Override
public Patch setCallback(java.lang.String callback) {
return (Patch) super.setCallback(callback);
}
@Override
public Patch setFields(java.lang.String fields) {
return (Patch) super.setFields(fields);
}
@Override
public Patch setKey(java.lang.String key) {
return (Patch) super.setKey(key);
}
@Override
public Patch setOauthToken(java.lang.String oauthToken) {
return (Patch) super.setOauthToken(oauthToken);
}
@Override
public Patch setPrettyPrint(java.lang.Boolean prettyPrint) {
return (Patch) super.setPrettyPrint(prettyPrint);
}
@Override
public Patch setQuotaUser(java.lang.String quotaUser) {
return (Patch) super.setQuotaUser(quotaUser);
}
@Override
public Patch setUploadType(java.lang.String uploadType) {
return (Patch) super.setUploadType(uploadType);
}
@Override
public Patch setUploadProtocol(java.lang.String uploadProtocol) {
return (Patch) super.setUploadProtocol(uploadProtocol);
}
/**
* This field will be ignored if provided on config creation. Format
* `organizations/{organization}/muteConfigs/{mute_config}`
* `folders/{folder}/muteConfigs/{mute_config}`
* `projects/{project}/muteConfigs/{mute_config}`
* `organizations/{organization}/locations/global/muteConfigs/{mute_config}`
* `folders/{folder}/locations/global/muteConfigs/{mute_config}`
* `projects/{project}/locations/global/muteConfigs/{mute_config}`
*/
@com.google.api.client.util.Key
private java.lang.String name;
/** This field will be ignored if provided on config creation. Format
`organizations/{organization}/muteConfigs/{mute_config}`
`folders/{folder}/muteConfigs/{mute_config}` `projects/{project}/muteConfigs/{mute_config}`
`organizations/{organization}/locations/global/muteConfigs/{mute_config}`
`folders/{folder}/locations/global/muteConfigs/{mute_config}`
`projects/{project}/locations/global/muteConfigs/{mute_config}`
*/
public java.lang.String getName() {
return name;
}
/**
* This field will be ignored if provided on config creation. Format
* `organizations/{organization}/muteConfigs/{mute_config}`
* `folders/{folder}/muteConfigs/{mute_config}`
* `projects/{project}/muteConfigs/{mute_config}`
* `organizations/{organization}/locations/global/muteConfigs/{mute_config}`
* `folders/{folder}/locations/global/muteConfigs/{mute_config}`
* `projects/{project}/locations/global/muteConfigs/{mute_config}`
*/
public Patch setName(java.lang.String name) {
if (!getSuppressPatternChecks()) {
com.google.api.client.util.Preconditions.checkArgument(NAME_PATTERN.matcher(name).matches(),
"Parameter name must conform to the pattern " +
"^organizations/[^/]+/locations/[^/]+/muteConfigs/[^/]+$");
}
this.name = name;
return this;
}
/** The list of fields to be updated. If empty all mutable fields will be updated. */
@com.google.api.client.util.Key
private String updateMask;
/** The list of fields to be updated. If empty all mutable fields will be updated.
*/
public String getUpdateMask() {
return updateMask;
}
/** The list of fields to be updated. If empty all mutable fields will be updated. */
public Patch setUpdateMask(String updateMask) {
this.updateMask = updateMask;
return this;
}
@Override
public Patch set(String parameterName, Object value) {
return (Patch) super.set(parameterName, value);
}
}
}
}
/**
* An accessor for creating requests from the MuteConfigs collection.
*
* The typical use is:
*
* {@code SecurityCommandCenter securitycenter = new SecurityCommandCenter(...);}
* {@code SecurityCommandCenter.MuteConfigs.List request = securitycenter.muteConfigs().list(parameters ...)}
*
*
* @return the resource collection
*/
public MuteConfigs muteConfigs() {
return new MuteConfigs();
}
/**
* The "muteConfigs" collection of methods.
*/
public class MuteConfigs {
/**
* Creates a mute config.
*
* Create a request for the method "muteConfigs.create".
*
* This request holds the parameters needed by the securitycenter server. After setting any
* optional parameters, call the {@link Create#execute()} method to invoke the remote operation.
*
* @param parent Required. Resource name of the new mute configs's parent. Its format is
* `organizations/[organization_id]`, `folders/[folder_id]`, or `projects/[project_id]`.
* @param content the {@link com.google.api.services.securitycenter.v1.model.GoogleCloudSecuritycenterV1MuteConfig}
* @return the request
*/
public Create create(java.lang.String parent, com.google.api.services.securitycenter.v1.model.GoogleCloudSecuritycenterV1MuteConfig content) throws java.io.IOException {
Create result = new Create(parent, content);
initialize(result);
return result;
}
public class Create extends SecurityCommandCenterRequest {
private static final String REST_PATH = "v1/{+parent}/muteConfigs";
private final java.util.regex.Pattern PARENT_PATTERN =
java.util.regex.Pattern.compile("^organizations/[^/]+$");
/**
* Creates a mute config.
*
* Create a request for the method "muteConfigs.create".
*
* This request holds the parameters needed by the the securitycenter server. After setting any
* optional parameters, call the {@link Create#execute()} method to invoke the remote operation.
* {@link
* Create#initialize(com.google.api.client.googleapis.services.AbstractGoogleClientRequest)} must
* be called to initialize this instance immediately after invoking the constructor.
*
* @param parent Required. Resource name of the new mute configs's parent. Its format is
* `organizations/[organization_id]`, `folders/[folder_id]`, or `projects/[project_id]`.
* @param content the {@link com.google.api.services.securitycenter.v1.model.GoogleCloudSecuritycenterV1MuteConfig}
* @since 1.13
*/
protected Create(java.lang.String parent, com.google.api.services.securitycenter.v1.model.GoogleCloudSecuritycenterV1MuteConfig content) {
super(SecurityCommandCenter.this, "POST", REST_PATH, content, com.google.api.services.securitycenter.v1.model.GoogleCloudSecuritycenterV1MuteConfig.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/[^/]+$");
}
}
@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. Resource name of the new mute configs's parent. Its format is
* `organizations/[organization_id]`, `folders/[folder_id]`, or `projects/[project_id]`.
*/
@com.google.api.client.util.Key
private java.lang.String parent;
/** Required. Resource name of the new mute configs's parent. Its format is
`organizations/[organization_id]`, `folders/[folder_id]`, or `projects/[project_id]`.
*/
public java.lang.String getParent() {
return parent;
}
/**
* Required. Resource name of the new mute configs's parent. Its format is
* `organizations/[organization_id]`, `folders/[folder_id]`, or `projects/[project_id]`.
*/
public Create setParent(java.lang.String parent) {
if (!getSuppressPatternChecks()) {
com.google.api.client.util.Preconditions.checkArgument(PARENT_PATTERN.matcher(parent).matches(),
"Parameter parent must conform to the pattern " +
"^organizations/[^/]+$");
}
this.parent = parent;
return this;
}
/**
* Required. Unique identifier provided by the client within the parent scope. It must
* consist of only lowercase letters, numbers, and hyphens, must start with a letter, must
* end with either a letter or a number, and must be 63 characters or less.
*/
@com.google.api.client.util.Key
private java.lang.String muteConfigId;
/** Required. Unique identifier provided by the client within the parent scope. It must consist of only
lowercase letters, numbers, and hyphens, must start with a letter, must end with either a letter or
a number, and must be 63 characters or less.
*/
public java.lang.String getMuteConfigId() {
return muteConfigId;
}
/**
* Required. Unique identifier provided by the client within the parent scope. It must
* consist of only lowercase letters, numbers, and hyphens, must start with a letter, must
* end with either a letter or a number, and must be 63 characters or less.
*/
public Create setMuteConfigId(java.lang.String muteConfigId) {
this.muteConfigId = muteConfigId;
return this;
}
@Override
public Create set(String parameterName, Object value) {
return (Create) super.set(parameterName, value);
}
}
/**
* Deletes an existing mute config.
*
* Create a request for the method "muteConfigs.delete".
*
* This request holds the parameters needed by the securitycenter server. After setting any
* optional parameters, call the {@link Delete#execute()} method to invoke the remote operation.
*
* @param name Required. Name of the mute config to delete. Its format is
* `organizations/{organization}/muteConfigs/{config_id}`,
* `folders/{folder}/muteConfigs/{config_id}`, `projects/{project}/muteConfigs/{config_id}`,
* `organizations/{organization}/locations/global/muteConfigs/{config_id}`,
* `folders/{folder}/locations/global/muteConfigs/{config_id}`, or
* `projects/{project}/locations/global/muteConfigs/{config_id}`.
* @return the request
*/
public Delete delete(java.lang.String name) throws java.io.IOException {
Delete result = new Delete(name);
initialize(result);
return result;
}
public class Delete extends SecurityCommandCenterRequest {
private static final String REST_PATH = "v1/{+name}";
private final java.util.regex.Pattern NAME_PATTERN =
java.util.regex.Pattern.compile("^organizations/[^/]+/muteConfigs/[^/]+$");
/**
* Deletes an existing mute config.
*
* Create a request for the method "muteConfigs.delete".
*
* This request holds the parameters needed by the the securitycenter server. After setting any
* optional parameters, call the {@link Delete#execute()} method to invoke the remote operation.
* {@link
* Delete#initialize(com.google.api.client.googleapis.services.AbstractGoogleClientRequest)} must
* be called to initialize this instance immediately after invoking the constructor.
*
* @param name Required. Name of the mute config to delete. Its format is
* `organizations/{organization}/muteConfigs/{config_id}`,
* `folders/{folder}/muteConfigs/{config_id}`, `projects/{project}/muteConfigs/{config_id}`,
* `organizations/{organization}/locations/global/muteConfigs/{config_id}`,
* `folders/{folder}/locations/global/muteConfigs/{config_id}`, or
* `projects/{project}/locations/global/muteConfigs/{config_id}`.
* @since 1.13
*/
protected Delete(java.lang.String name) {
super(SecurityCommandCenter.this, "DELETE", REST_PATH, null, com.google.api.services.securitycenter.v1.model.Empty.class);
this.name = com.google.api.client.util.Preconditions.checkNotNull(name, "Required parameter name must be specified.");
if (!getSuppressPatternChecks()) {
com.google.api.client.util.Preconditions.checkArgument(NAME_PATTERN.matcher(name).matches(),
"Parameter name must conform to the pattern " +
"^organizations/[^/]+/muteConfigs/[^/]+$");
}
}
@Override
public Delete set$Xgafv(java.lang.String $Xgafv) {
return (Delete) super.set$Xgafv($Xgafv);
}
@Override
public Delete setAccessToken(java.lang.String accessToken) {
return (Delete) super.setAccessToken(accessToken);
}
@Override
public Delete setAlt(java.lang.String alt) {
return (Delete) super.setAlt(alt);
}
@Override
public Delete setCallback(java.lang.String callback) {
return (Delete) super.setCallback(callback);
}
@Override
public Delete setFields(java.lang.String fields) {
return (Delete) super.setFields(fields);
}
@Override
public Delete setKey(java.lang.String key) {
return (Delete) super.setKey(key);
}
@Override
public Delete setOauthToken(java.lang.String oauthToken) {
return (Delete) super.setOauthToken(oauthToken);
}
@Override
public Delete setPrettyPrint(java.lang.Boolean prettyPrint) {
return (Delete) super.setPrettyPrint(prettyPrint);
}
@Override
public Delete setQuotaUser(java.lang.String quotaUser) {
return (Delete) super.setQuotaUser(quotaUser);
}
@Override
public Delete setUploadType(java.lang.String uploadType) {
return (Delete) super.setUploadType(uploadType);
}
@Override
public Delete setUploadProtocol(java.lang.String uploadProtocol) {
return (Delete) super.setUploadProtocol(uploadProtocol);
}
/**
* Required. Name of the mute config to delete. Its format is
* `organizations/{organization}/muteConfigs/{config_id}`,
* `folders/{folder}/muteConfigs/{config_id}`, `projects/{project}/muteConfigs/{config_id}`,
* `organizations/{organization}/locations/global/muteConfigs/{config_id}`,
* `folders/{folder}/locations/global/muteConfigs/{config_id}`, or
* `projects/{project}/locations/global/muteConfigs/{config_id}`.
*/
@com.google.api.client.util.Key
private java.lang.String name;
/** Required. Name of the mute config to delete. Its format is
`organizations/{organization}/muteConfigs/{config_id}`, `folders/{folder}/muteConfigs/{config_id}`,
`projects/{project}/muteConfigs/{config_id}`,
`organizations/{organization}/locations/global/muteConfigs/{config_id}`,
`folders/{folder}/locations/global/muteConfigs/{config_id}`, or
`projects/{project}/locations/global/muteConfigs/{config_id}`.
*/
public java.lang.String getName() {
return name;
}
/**
* Required. Name of the mute config to delete. Its format is
* `organizations/{organization}/muteConfigs/{config_id}`,
* `folders/{folder}/muteConfigs/{config_id}`, `projects/{project}/muteConfigs/{config_id}`,
* `organizations/{organization}/locations/global/muteConfigs/{config_id}`,
* `folders/{folder}/locations/global/muteConfigs/{config_id}`, or
* `projects/{project}/locations/global/muteConfigs/{config_id}`.
*/
public Delete setName(java.lang.String name) {
if (!getSuppressPatternChecks()) {
com.google.api.client.util.Preconditions.checkArgument(NAME_PATTERN.matcher(name).matches(),
"Parameter name must conform to the pattern " +
"^organizations/[^/]+/muteConfigs/[^/]+$");
}
this.name = name;
return this;
}
@Override
public Delete set(String parameterName, Object value) {
return (Delete) super.set(parameterName, value);
}
}
/**
* Gets a mute config.
*
* Create a request for the method "muteConfigs.get".
*
* This request holds the parameters needed by the securitycenter server. After setting any
* optional parameters, call the {@link Get#execute()} method to invoke the remote operation.
*
* @param name Required. Name of the mute config to retrieve. Its format is
* `organizations/{organization}/muteConfigs/{config_id}`,
* `folders/{folder}/muteConfigs/{config_id}`, `projects/{project}/muteConfigs/{config_id}`,
* `organizations/{organization}/locations/global/muteConfigs/{config_id}`,
* `folders/{folder}/locations/global/muteConfigs/{config_id}`, or
* `projects/{project}/locations/global/muteConfigs/{config_id}`.
* @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 SecurityCommandCenterRequest {
private static final String REST_PATH = "v1/{+name}";
private final java.util.regex.Pattern NAME_PATTERN =
java.util.regex.Pattern.compile("^organizations/[^/]+/muteConfigs/[^/]+$");
/**
* Gets a mute config.
*
* Create a request for the method "muteConfigs.get".
*
* This request holds the parameters needed by the the securitycenter 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. Name of the mute config to retrieve. Its format is
* `organizations/{organization}/muteConfigs/{config_id}`,
* `folders/{folder}/muteConfigs/{config_id}`, `projects/{project}/muteConfigs/{config_id}`,
* `organizations/{organization}/locations/global/muteConfigs/{config_id}`,
* `folders/{folder}/locations/global/muteConfigs/{config_id}`, or
* `projects/{project}/locations/global/muteConfigs/{config_id}`.
* @since 1.13
*/
protected Get(java.lang.String name) {
super(SecurityCommandCenter.this, "GET", REST_PATH, null, com.google.api.services.securitycenter.v1.model.GoogleCloudSecuritycenterV1MuteConfig.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/[^/]+/muteConfigs/[^/]+$");
}
}
@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. Name of the mute config to retrieve. Its format is
* `organizations/{organization}/muteConfigs/{config_id}`,
* `folders/{folder}/muteConfigs/{config_id}`, `projects/{project}/muteConfigs/{config_id}`,
* `organizations/{organization}/locations/global/muteConfigs/{config_id}`,
* `folders/{folder}/locations/global/muteConfigs/{config_id}`, or
* `projects/{project}/locations/global/muteConfigs/{config_id}`.
*/
@com.google.api.client.util.Key
private java.lang.String name;
/** Required. Name of the mute config to retrieve. Its format is
`organizations/{organization}/muteConfigs/{config_id}`, `folders/{folder}/muteConfigs/{config_id}`,
`projects/{project}/muteConfigs/{config_id}`,
`organizations/{organization}/locations/global/muteConfigs/{config_id}`,
`folders/{folder}/locations/global/muteConfigs/{config_id}`, or
`projects/{project}/locations/global/muteConfigs/{config_id}`.
*/
public java.lang.String getName() {
return name;
}
/**
* Required. Name of the mute config to retrieve. Its format is
* `organizations/{organization}/muteConfigs/{config_id}`,
* `folders/{folder}/muteConfigs/{config_id}`, `projects/{project}/muteConfigs/{config_id}`,
* `organizations/{organization}/locations/global/muteConfigs/{config_id}`,
* `folders/{folder}/locations/global/muteConfigs/{config_id}`, or
* `projects/{project}/locations/global/muteConfigs/{config_id}`.
*/
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/[^/]+/muteConfigs/[^/]+$");
}
this.name = name;
return this;
}
@Override
public Get set(String parameterName, Object value) {
return (Get) super.set(parameterName, value);
}
}
/**
* Lists mute configs.
*
* Create a request for the method "muteConfigs.list".
*
* This request holds the parameters needed by the securitycenter server. After setting any
* optional parameters, call the {@link List#execute()} method to invoke the remote operation.
*
* @param parent Required. The parent, which owns the collection of mute configs. Its format is
* `organizations/[organization_id]`, `folders/[folder_id]`, `projects/[project_id]`.
* @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 SecurityCommandCenterRequest {
private static final String REST_PATH = "v1/{+parent}/muteConfigs";
private final java.util.regex.Pattern PARENT_PATTERN =
java.util.regex.Pattern.compile("^organizations/[^/]+$");
/**
* Lists mute configs.
*
* Create a request for the method "muteConfigs.list".
*
* This request holds the parameters needed by the the securitycenter server. After setting any
* optional parameters, call the {@link List#execute()} method to invoke the remote operation.
* {@link List#initialize(com.google.api.client.googleapis.services.AbstractGoogleClientRequest)}
* must be called to initialize this instance immediately after invoking the constructor.
*
* @param parent Required. The parent, which owns the collection of mute configs. Its format is
* `organizations/[organization_id]`, `folders/[folder_id]`, `projects/[project_id]`.
* @since 1.13
*/
protected List(java.lang.String parent) {
super(SecurityCommandCenter.this, "GET", REST_PATH, null, com.google.api.services.securitycenter.v1.model.ListMuteConfigsResponse.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/[^/]+$");
}
}
@Override
public com.google.api.client.http.HttpResponse executeUsingHead() throws java.io.IOException {
return super.executeUsingHead();
}
@Override
public com.google.api.client.http.HttpRequest buildHttpRequestUsingHead() throws java.io.IOException {
return super.buildHttpRequestUsingHead();
}
@Override
public List set$Xgafv(java.lang.String $Xgafv) {
return (List) super.set$Xgafv($Xgafv);
}
@Override
public List setAccessToken(java.lang.String accessToken) {
return (List) super.setAccessToken(accessToken);
}
@Override
public List setAlt(java.lang.String alt) {
return (List) super.setAlt(alt);
}
@Override
public List setCallback(java.lang.String callback) {
return (List) super.setCallback(callback);
}
@Override
public List setFields(java.lang.String fields) {
return (List) super.setFields(fields);
}
@Override
public List setKey(java.lang.String key) {
return (List) super.setKey(key);
}
@Override
public List setOauthToken(java.lang.String oauthToken) {
return (List) super.setOauthToken(oauthToken);
}
@Override
public List setPrettyPrint(java.lang.Boolean prettyPrint) {
return (List) super.setPrettyPrint(prettyPrint);
}
@Override
public List setQuotaUser(java.lang.String quotaUser) {
return (List) super.setQuotaUser(quotaUser);
}
@Override
public List setUploadType(java.lang.String uploadType) {
return (List) super.setUploadType(uploadType);
}
@Override
public List setUploadProtocol(java.lang.String uploadProtocol) {
return (List) super.setUploadProtocol(uploadProtocol);
}
/**
* Required. The parent, which owns the collection of mute configs. Its format is
* `organizations/[organization_id]`, `folders/[folder_id]`, `projects/[project_id]`.
*/
@com.google.api.client.util.Key
private java.lang.String parent;
/** Required. The parent, which owns the collection of mute configs. Its format is
`organizations/[organization_id]`, `folders/[folder_id]`, `projects/[project_id]`.
*/
public java.lang.String getParent() {
return parent;
}
/**
* Required. The parent, which owns the collection of mute configs. Its format is
* `organizations/[organization_id]`, `folders/[folder_id]`, `projects/[project_id]`.
*/
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/[^/]+$");
}
this.parent = parent;
return this;
}
/**
* The maximum number of configs to return. The service may return fewer than this value. If
* unspecified, at most 10 configs will be returned. The maximum value is 1000; values above
* 1000 will be coerced to 1000.
*/
@com.google.api.client.util.Key
private java.lang.Integer pageSize;
/** The maximum number of configs to return. The service may return fewer than this value. If
unspecified, at most 10 configs will be returned. The maximum value is 1000; values above 1000 will
be coerced to 1000.
*/
public java.lang.Integer getPageSize() {
return pageSize;
}
/**
* The maximum number of configs to return. The service may return fewer than this value. If
* unspecified, at most 10 configs will be returned. The maximum value is 1000; values above
* 1000 will be coerced to 1000.
*/
public List setPageSize(java.lang.Integer pageSize) {
this.pageSize = pageSize;
return this;
}
/**
* A page token, received from a previous `ListMuteConfigs` call. Provide this to retrieve
* the subsequent page. When paginating, all other parameters provided to `ListMuteConfigs`
* must match the call that provided the page token.
*/
@com.google.api.client.util.Key
private java.lang.String pageToken;
/** A page token, received from a previous `ListMuteConfigs` call. Provide this to retrieve the
subsequent page. When paginating, all other parameters provided to `ListMuteConfigs` must match the
call that provided the page token.
*/
public java.lang.String getPageToken() {
return pageToken;
}
/**
* A page token, received from a previous `ListMuteConfigs` call. Provide this to retrieve
* the subsequent page. When paginating, all other parameters provided to `ListMuteConfigs`
* must match the call that provided the 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);
}
}
/**
* Updates a mute config.
*
* Create a request for the method "muteConfigs.patch".
*
* This request holds the parameters needed by the securitycenter server. After setting any
* optional parameters, call the {@link Patch#execute()} method to invoke the remote operation.
*
* @param name This field will be ignored if provided on config creation. Format
* `organizations/{organization}/muteConfigs/{mute_config}`
* `folders/{folder}/muteConfigs/{mute_config}`
* `projects/{project}/muteConfigs/{mute_config}`
* `organizations/{organization}/locations/global/muteConfigs/{mute_config}`
* `folders/{folder}/locations/global/muteConfigs/{mute_config}`
* `projects/{project}/locations/global/muteConfigs/{mute_config}`
* @param content the {@link com.google.api.services.securitycenter.v1.model.GoogleCloudSecuritycenterV1MuteConfig}
* @return the request
*/
public Patch patch(java.lang.String name, com.google.api.services.securitycenter.v1.model.GoogleCloudSecuritycenterV1MuteConfig content) throws java.io.IOException {
Patch result = new Patch(name, content);
initialize(result);
return result;
}
public class Patch extends SecurityCommandCenterRequest {
private static final String REST_PATH = "v1/{+name}";
private final java.util.regex.Pattern NAME_PATTERN =
java.util.regex.Pattern.compile("^organizations/[^/]+/muteConfigs/[^/]+$");
/**
* Updates a mute config.
*
* Create a request for the method "muteConfigs.patch".
*
* This request holds the parameters needed by the the securitycenter server. After setting any
* optional parameters, call the {@link Patch#execute()} method to invoke the remote operation.
* {@link
* Patch#initialize(com.google.api.client.googleapis.services.AbstractGoogleClientRequest)} must
* be called to initialize this instance immediately after invoking the constructor.
*
* @param name This field will be ignored if provided on config creation. Format
* `organizations/{organization}/muteConfigs/{mute_config}`
* `folders/{folder}/muteConfigs/{mute_config}`
* `projects/{project}/muteConfigs/{mute_config}`
* `organizations/{organization}/locations/global/muteConfigs/{mute_config}`
* `folders/{folder}/locations/global/muteConfigs/{mute_config}`
* `projects/{project}/locations/global/muteConfigs/{mute_config}`
* @param content the {@link com.google.api.services.securitycenter.v1.model.GoogleCloudSecuritycenterV1MuteConfig}
* @since 1.13
*/
protected Patch(java.lang.String name, com.google.api.services.securitycenter.v1.model.GoogleCloudSecuritycenterV1MuteConfig content) {
super(SecurityCommandCenter.this, "PATCH", REST_PATH, content, com.google.api.services.securitycenter.v1.model.GoogleCloudSecuritycenterV1MuteConfig.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/[^/]+/muteConfigs/[^/]+$");
}
}
@Override
public Patch set$Xgafv(java.lang.String $Xgafv) {
return (Patch) super.set$Xgafv($Xgafv);
}
@Override
public Patch setAccessToken(java.lang.String accessToken) {
return (Patch) super.setAccessToken(accessToken);
}
@Override
public Patch setAlt(java.lang.String alt) {
return (Patch) super.setAlt(alt);
}
@Override
public Patch setCallback(java.lang.String callback) {
return (Patch) super.setCallback(callback);
}
@Override
public Patch setFields(java.lang.String fields) {
return (Patch) super.setFields(fields);
}
@Override
public Patch setKey(java.lang.String key) {
return (Patch) super.setKey(key);
}
@Override
public Patch setOauthToken(java.lang.String oauthToken) {
return (Patch) super.setOauthToken(oauthToken);
}
@Override
public Patch setPrettyPrint(java.lang.Boolean prettyPrint) {
return (Patch) super.setPrettyPrint(prettyPrint);
}
@Override
public Patch setQuotaUser(java.lang.String quotaUser) {
return (Patch) super.setQuotaUser(quotaUser);
}
@Override
public Patch setUploadType(java.lang.String uploadType) {
return (Patch) super.setUploadType(uploadType);
}
@Override
public Patch setUploadProtocol(java.lang.String uploadProtocol) {
return (Patch) super.setUploadProtocol(uploadProtocol);
}
/**
* This field will be ignored if provided on config creation. Format
* `organizations/{organization}/muteConfigs/{mute_config}`
* `folders/{folder}/muteConfigs/{mute_config}`
* `projects/{project}/muteConfigs/{mute_config}`
* `organizations/{organization}/locations/global/muteConfigs/{mute_config}`
* `folders/{folder}/locations/global/muteConfigs/{mute_config}`
* `projects/{project}/locations/global/muteConfigs/{mute_config}`
*/
@com.google.api.client.util.Key
private java.lang.String name;
/** This field will be ignored if provided on config creation. Format
`organizations/{organization}/muteConfigs/{mute_config}`
`folders/{folder}/muteConfigs/{mute_config}` `projects/{project}/muteConfigs/{mute_config}`
`organizations/{organization}/locations/global/muteConfigs/{mute_config}`
`folders/{folder}/locations/global/muteConfigs/{mute_config}`
`projects/{project}/locations/global/muteConfigs/{mute_config}`
*/
public java.lang.String getName() {
return name;
}
/**
* This field will be ignored if provided on config creation. Format
* `organizations/{organization}/muteConfigs/{mute_config}`
* `folders/{folder}/muteConfigs/{mute_config}`
* `projects/{project}/muteConfigs/{mute_config}`
* `organizations/{organization}/locations/global/muteConfigs/{mute_config}`
* `folders/{folder}/locations/global/muteConfigs/{mute_config}`
* `projects/{project}/locations/global/muteConfigs/{mute_config}`
*/
public Patch setName(java.lang.String name) {
if (!getSuppressPatternChecks()) {
com.google.api.client.util.Preconditions.checkArgument(NAME_PATTERN.matcher(name).matches(),
"Parameter name must conform to the pattern " +
"^organizations/[^/]+/muteConfigs/[^/]+$");
}
this.name = name;
return this;
}
/** The list of fields to be updated. If empty all mutable fields will be updated. */
@com.google.api.client.util.Key
private String updateMask;
/** The list of fields to be updated. If empty all mutable fields will be updated.
*/
public String getUpdateMask() {
return updateMask;
}
/** The list of fields to be updated. If empty all mutable fields will be updated. */
public Patch setUpdateMask(String updateMask) {
this.updateMask = updateMask;
return this;
}
@Override
public Patch set(String parameterName, Object value) {
return (Patch) super.set(parameterName, value);
}
}
}
/**
* An accessor for creating requests from the NotificationConfigs collection.
*
* The typical use is:
*
* {@code SecurityCommandCenter securitycenter = new SecurityCommandCenter(...);}
* {@code SecurityCommandCenter.NotificationConfigs.List request = securitycenter.notificationConfigs().list(parameters ...)}
*
*
* @return the resource collection
*/
public NotificationConfigs notificationConfigs() {
return new NotificationConfigs();
}
/**
* The "notificationConfigs" collection of methods.
*/
public class NotificationConfigs {
/**
* Creates a notification config.
*
* Create a request for the method "notificationConfigs.create".
*
* This request holds the parameters needed by the securitycenter server. After setting any
* optional parameters, call the {@link Create#execute()} method to invoke the remote operation.
*
* @param parent Required. Resource name of the new notification config's parent. Its format is
* `organizations/[organization_id]`, `folders/[folder_id]`, or `projects/[project_id]`.
* @param content the {@link com.google.api.services.securitycenter.v1.model.NotificationConfig}
* @return the request
*/
public Create create(java.lang.String parent, com.google.api.services.securitycenter.v1.model.NotificationConfig content) throws java.io.IOException {
Create result = new Create(parent, content);
initialize(result);
return result;
}
public class Create extends SecurityCommandCenterRequest {
private static final String REST_PATH = "v1/{+parent}/notificationConfigs";
private final java.util.regex.Pattern PARENT_PATTERN =
java.util.regex.Pattern.compile("^organizations/[^/]+$");
/**
* Creates a notification config.
*
* Create a request for the method "notificationConfigs.create".
*
* This request holds the parameters needed by the the securitycenter server. After setting any
* optional parameters, call the {@link Create#execute()} method to invoke the remote operation.
* {@link
* Create#initialize(com.google.api.client.googleapis.services.AbstractGoogleClientRequest)} must
* be called to initialize this instance immediately after invoking the constructor.
*
* @param parent Required. Resource name of the new notification config's parent. Its format is
* `organizations/[organization_id]`, `folders/[folder_id]`, or `projects/[project_id]`.
* @param content the {@link com.google.api.services.securitycenter.v1.model.NotificationConfig}
* @since 1.13
*/
protected Create(java.lang.String parent, com.google.api.services.securitycenter.v1.model.NotificationConfig content) {
super(SecurityCommandCenter.this, "POST", REST_PATH, content, com.google.api.services.securitycenter.v1.model.NotificationConfig.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/[^/]+$");
}
}
@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. Resource name of the new notification config's parent. Its format is
* `organizations/[organization_id]`, `folders/[folder_id]`, or `projects/[project_id]`.
*/
@com.google.api.client.util.Key
private java.lang.String parent;
/** Required. Resource name of the new notification config's parent. Its format is
`organizations/[organization_id]`, `folders/[folder_id]`, or `projects/[project_id]`.
*/
public java.lang.String getParent() {
return parent;
}
/**
* Required. Resource name of the new notification config's parent. Its format is
* `organizations/[organization_id]`, `folders/[folder_id]`, or `projects/[project_id]`.
*/
public Create setParent(java.lang.String parent) {
if (!getSuppressPatternChecks()) {
com.google.api.client.util.Preconditions.checkArgument(PARENT_PATTERN.matcher(parent).matches(),
"Parameter parent must conform to the pattern " +
"^organizations/[^/]+$");
}
this.parent = parent;
return this;
}
/**
* Required. Unique identifier provided by the client within the parent scope. It must be
* between 1 and 128 characters and contain alphanumeric characters, underscores, or hyphens
* only.
*/
@com.google.api.client.util.Key
private java.lang.String configId;
/** Required. Unique identifier provided by the client within the parent scope. It must be between 1
and 128 characters and contain alphanumeric characters, underscores, or hyphens only.
*/
public java.lang.String getConfigId() {
return configId;
}
/**
* Required. Unique identifier provided by the client within the parent scope. It must be
* between 1 and 128 characters and contain alphanumeric characters, underscores, or hyphens
* only.
*/
public Create setConfigId(java.lang.String configId) {
this.configId = configId;
return this;
}
@Override
public Create set(String parameterName, Object value) {
return (Create) super.set(parameterName, value);
}
}
/**
* Deletes a notification config.
*
* Create a request for the method "notificationConfigs.delete".
*
* This request holds the parameters needed by the securitycenter server. After setting any
* optional parameters, call the {@link Delete#execute()} method to invoke the remote operation.
*
* @param name Required. Name of the notification config to delete. Its format is
* `organizations/[organization_id]/notificationConfigs/[config_id]`,
* `folders/[folder_id]/notificationConfigs/[config_id]`, or
* `projects/[project_id]/notificationConfigs/[config_id]`.
* @return the request
*/
public Delete delete(java.lang.String name) throws java.io.IOException {
Delete result = new Delete(name);
initialize(result);
return result;
}
public class Delete extends SecurityCommandCenterRequest {
private static final String REST_PATH = "v1/{+name}";
private final java.util.regex.Pattern NAME_PATTERN =
java.util.regex.Pattern.compile("^organizations/[^/]+/notificationConfigs/[^/]+$");
/**
* Deletes a notification config.
*
* Create a request for the method "notificationConfigs.delete".
*
* This request holds the parameters needed by the the securitycenter server. After setting any
* optional parameters, call the {@link Delete#execute()} method to invoke the remote operation.
* {@link
* Delete#initialize(com.google.api.client.googleapis.services.AbstractGoogleClientRequest)} must
* be called to initialize this instance immediately after invoking the constructor.
*
* @param name Required. Name of the notification config to delete. Its format is
* `organizations/[organization_id]/notificationConfigs/[config_id]`,
* `folders/[folder_id]/notificationConfigs/[config_id]`, or
* `projects/[project_id]/notificationConfigs/[config_id]`.
* @since 1.13
*/
protected Delete(java.lang.String name) {
super(SecurityCommandCenter.this, "DELETE", REST_PATH, null, com.google.api.services.securitycenter.v1.model.Empty.class);
this.name = com.google.api.client.util.Preconditions.checkNotNull(name, "Required parameter name must be specified.");
if (!getSuppressPatternChecks()) {
com.google.api.client.util.Preconditions.checkArgument(NAME_PATTERN.matcher(name).matches(),
"Parameter name must conform to the pattern " +
"^organizations/[^/]+/notificationConfigs/[^/]+$");
}
}
@Override
public Delete set$Xgafv(java.lang.String $Xgafv) {
return (Delete) super.set$Xgafv($Xgafv);
}
@Override
public Delete setAccessToken(java.lang.String accessToken) {
return (Delete) super.setAccessToken(accessToken);
}
@Override
public Delete setAlt(java.lang.String alt) {
return (Delete) super.setAlt(alt);
}
@Override
public Delete setCallback(java.lang.String callback) {
return (Delete) super.setCallback(callback);
}
@Override
public Delete setFields(java.lang.String fields) {
return (Delete) super.setFields(fields);
}
@Override
public Delete setKey(java.lang.String key) {
return (Delete) super.setKey(key);
}
@Override
public Delete setOauthToken(java.lang.String oauthToken) {
return (Delete) super.setOauthToken(oauthToken);
}
@Override
public Delete setPrettyPrint(java.lang.Boolean prettyPrint) {
return (Delete) super.setPrettyPrint(prettyPrint);
}
@Override
public Delete setQuotaUser(java.lang.String quotaUser) {
return (Delete) super.setQuotaUser(quotaUser);
}
@Override
public Delete setUploadType(java.lang.String uploadType) {
return (Delete) super.setUploadType(uploadType);
}
@Override
public Delete setUploadProtocol(java.lang.String uploadProtocol) {
return (Delete) super.setUploadProtocol(uploadProtocol);
}
/**
* Required. Name of the notification config to delete. Its format is
* `organizations/[organization_id]/notificationConfigs/[config_id]`,
* `folders/[folder_id]/notificationConfigs/[config_id]`, or
* `projects/[project_id]/notificationConfigs/[config_id]`.
*/
@com.google.api.client.util.Key
private java.lang.String name;
/** Required. Name of the notification config to delete. Its format is
`organizations/[organization_id]/notificationConfigs/[config_id]`,
`folders/[folder_id]/notificationConfigs/[config_id]`, or
`projects/[project_id]/notificationConfigs/[config_id]`.
*/
public java.lang.String getName() {
return name;
}
/**
* Required. Name of the notification config to delete. Its format is
* `organizations/[organization_id]/notificationConfigs/[config_id]`,
* `folders/[folder_id]/notificationConfigs/[config_id]`, or
* `projects/[project_id]/notificationConfigs/[config_id]`.
*/
public Delete setName(java.lang.String name) {
if (!getSuppressPatternChecks()) {
com.google.api.client.util.Preconditions.checkArgument(NAME_PATTERN.matcher(name).matches(),
"Parameter name must conform to the pattern " +
"^organizations/[^/]+/notificationConfigs/[^/]+$");
}
this.name = name;
return this;
}
@Override
public Delete set(String parameterName, Object value) {
return (Delete) super.set(parameterName, value);
}
}
/**
* Gets a notification config.
*
* Create a request for the method "notificationConfigs.get".
*
* This request holds the parameters needed by the securitycenter server. After setting any
* optional parameters, call the {@link Get#execute()} method to invoke the remote operation.
*
* @param name Required. Name of the notification config to get. Its format is
* `organizations/[organization_id]/notificationConfigs/[config_id]`,
* `folders/[folder_id]/notificationConfigs/[config_id]`, or
* `projects/[project_id]/notificationConfigs/[config_id]`.
* @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 SecurityCommandCenterRequest {
private static final String REST_PATH = "v1/{+name}";
private final java.util.regex.Pattern NAME_PATTERN =
java.util.regex.Pattern.compile("^organizations/[^/]+/notificationConfigs/[^/]+$");
/**
* Gets a notification config.
*
* Create a request for the method "notificationConfigs.get".
*
* This request holds the parameters needed by the the securitycenter 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. Name of the notification config to get. Its format is
* `organizations/[organization_id]/notificationConfigs/[config_id]`,
* `folders/[folder_id]/notificationConfigs/[config_id]`, or
* `projects/[project_id]/notificationConfigs/[config_id]`.
* @since 1.13
*/
protected Get(java.lang.String name) {
super(SecurityCommandCenter.this, "GET", REST_PATH, null, com.google.api.services.securitycenter.v1.model.NotificationConfig.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/[^/]+/notificationConfigs/[^/]+$");
}
}
@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. Name of the notification config to get. Its format is
* `organizations/[organization_id]/notificationConfigs/[config_id]`,
* `folders/[folder_id]/notificationConfigs/[config_id]`, or
* `projects/[project_id]/notificationConfigs/[config_id]`.
*/
@com.google.api.client.util.Key
private java.lang.String name;
/** Required. Name of the notification config to get. Its format is
`organizations/[organization_id]/notificationConfigs/[config_id]`,
`folders/[folder_id]/notificationConfigs/[config_id]`, or
`projects/[project_id]/notificationConfigs/[config_id]`.
*/
public java.lang.String getName() {
return name;
}
/**
* Required. Name of the notification config to get. Its format is
* `organizations/[organization_id]/notificationConfigs/[config_id]`,
* `folders/[folder_id]/notificationConfigs/[config_id]`, or
* `projects/[project_id]/notificationConfigs/[config_id]`.
*/
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/[^/]+/notificationConfigs/[^/]+$");
}
this.name = name;
return this;
}
@Override
public Get set(String parameterName, Object value) {
return (Get) super.set(parameterName, value);
}
}
/**
* Lists notification configs.
*
* Create a request for the method "notificationConfigs.list".
*
* This request holds the parameters needed by the securitycenter server. After setting any
* optional parameters, call the {@link List#execute()} method to invoke the remote operation.
*
* @param parent Required. The name of the parent in which to list the notification configurations. Its format is
* "organizations/[organization_id]", "folders/[folder_id]", or "projects/[project_id]".
* @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 SecurityCommandCenterRequest {
private static final String REST_PATH = "v1/{+parent}/notificationConfigs";
private final java.util.regex.Pattern PARENT_PATTERN =
java.util.regex.Pattern.compile("^organizations/[^/]+$");
/**
* Lists notification configs.
*
* Create a request for the method "notificationConfigs.list".
*
* This request holds the parameters needed by the the securitycenter server. After setting any
* optional parameters, call the {@link List#execute()} method to invoke the remote operation.
* {@link List#initialize(com.google.api.client.googleapis.services.AbstractGoogleClientRequest)}
* must be called to initialize this instance immediately after invoking the constructor.
*
* @param parent Required. The name of the parent in which to list the notification configurations. Its format is
* "organizations/[organization_id]", "folders/[folder_id]", or "projects/[project_id]".
* @since 1.13
*/
protected List(java.lang.String parent) {
super(SecurityCommandCenter.this, "GET", REST_PATH, null, com.google.api.services.securitycenter.v1.model.ListNotificationConfigsResponse.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/[^/]+$");
}
}
@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 parent in which to list the notification configurations. Its
* format is "organizations/[organization_id]", "folders/[folder_id]", or
* "projects/[project_id]".
*/
@com.google.api.client.util.Key
private java.lang.String parent;
/** Required. The name of the parent in which to list the notification configurations. Its format is
"organizations/[organization_id]", "folders/[folder_id]", or "projects/[project_id]".
*/
public java.lang.String getParent() {
return parent;
}
/**
* Required. The name of the parent in which to list the notification configurations. Its
* format is "organizations/[organization_id]", "folders/[folder_id]", or
* "projects/[project_id]".
*/
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/[^/]+$");
}
this.parent = parent;
return this;
}
/**
* The maximum number of results to return in a single response. Default is 10, minimum is
* 1, maximum is 1000.
*/
@com.google.api.client.util.Key
private java.lang.Integer pageSize;
/** The maximum number of results to return in a single response. Default is 10, minimum is 1, maximum
is 1000.
*/
public java.lang.Integer getPageSize() {
return pageSize;
}
/**
* The maximum number of results to return in a single response. Default is 10, minimum is
* 1, maximum is 1000.
*/
public List setPageSize(java.lang.Integer pageSize) {
this.pageSize = pageSize;
return this;
}
/**
* The value returned by the last `ListNotificationConfigsResponse`; indicates that this is
* a continuation of a prior `ListNotificationConfigs` call, and that the system should
* return the next page of data.
*/
@com.google.api.client.util.Key
private java.lang.String pageToken;
/** The value returned by the last `ListNotificationConfigsResponse`; indicates that this is a
continuation of a prior `ListNotificationConfigs` call, and that the system should return the next
page of data.
*/
public java.lang.String getPageToken() {
return pageToken;
}
/**
* The value returned by the last `ListNotificationConfigsResponse`; indicates that this is
* a continuation of a prior `ListNotificationConfigs` call, and that the system should
* return the next page of data.
*/
public List setPageToken(java.lang.String pageToken) {
this.pageToken = pageToken;
return this;
}
@Override
public List set(String parameterName, Object value) {
return (List) super.set(parameterName, value);
}
}
/**
* Updates a notification config. The following update fields are allowed: description,
* pubsub_topic, streaming_config.filter
*
* Create a request for the method "notificationConfigs.patch".
*
* This request holds the parameters needed by the securitycenter server. After setting any
* optional parameters, call the {@link Patch#execute()} method to invoke the remote operation.
*
* @param name The relative resource name of this notification config. See:
* https://cloud.google.com/apis/design/resource_names#relative_resource_name Example:
* "organizations/{organization_id}/notificationConfigs/notify_public_bucket",
* "folders/{folder_id}/notificationConfigs/notify_public_bucket", or
* "projects/{project_id}/notificationConfigs/notify_public_bucket".
* @param content the {@link com.google.api.services.securitycenter.v1.model.NotificationConfig}
* @return the request
*/
public Patch patch(java.lang.String name, com.google.api.services.securitycenter.v1.model.NotificationConfig content) throws java.io.IOException {
Patch result = new Patch(name, content);
initialize(result);
return result;
}
public class Patch extends SecurityCommandCenterRequest {
private static final String REST_PATH = "v1/{+name}";
private final java.util.regex.Pattern NAME_PATTERN =
java.util.regex.Pattern.compile("^organizations/[^/]+/notificationConfigs/[^/]+$");
/**
* Updates a notification config. The following update fields are allowed: description,
* pubsub_topic, streaming_config.filter
*
* Create a request for the method "notificationConfigs.patch".
*
* This request holds the parameters needed by the the securitycenter server. After setting any
* optional parameters, call the {@link Patch#execute()} method to invoke the remote operation.
* {@link
* Patch#initialize(com.google.api.client.googleapis.services.AbstractGoogleClientRequest)} must
* be called to initialize this instance immediately after invoking the constructor.
*
* @param name The relative resource name of this notification config. See:
* https://cloud.google.com/apis/design/resource_names#relative_resource_name Example:
* "organizations/{organization_id}/notificationConfigs/notify_public_bucket",
* "folders/{folder_id}/notificationConfigs/notify_public_bucket", or
* "projects/{project_id}/notificationConfigs/notify_public_bucket".
* @param content the {@link com.google.api.services.securitycenter.v1.model.NotificationConfig}
* @since 1.13
*/
protected Patch(java.lang.String name, com.google.api.services.securitycenter.v1.model.NotificationConfig content) {
super(SecurityCommandCenter.this, "PATCH", REST_PATH, content, com.google.api.services.securitycenter.v1.model.NotificationConfig.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/[^/]+/notificationConfigs/[^/]+$");
}
}
@Override
public Patch set$Xgafv(java.lang.String $Xgafv) {
return (Patch) super.set$Xgafv($Xgafv);
}
@Override
public Patch setAccessToken(java.lang.String accessToken) {
return (Patch) super.setAccessToken(accessToken);
}
@Override
public Patch setAlt(java.lang.String alt) {
return (Patch) super.setAlt(alt);
}
@Override
public Patch setCallback(java.lang.String callback) {
return (Patch) super.setCallback(callback);
}
@Override
public Patch setFields(java.lang.String fields) {
return (Patch) super.setFields(fields);
}
@Override
public Patch setKey(java.lang.String key) {
return (Patch) super.setKey(key);
}
@Override
public Patch setOauthToken(java.lang.String oauthToken) {
return (Patch) super.setOauthToken(oauthToken);
}
@Override
public Patch setPrettyPrint(java.lang.Boolean prettyPrint) {
return (Patch) super.setPrettyPrint(prettyPrint);
}
@Override
public Patch setQuotaUser(java.lang.String quotaUser) {
return (Patch) super.setQuotaUser(quotaUser);
}
@Override
public Patch setUploadType(java.lang.String uploadType) {
return (Patch) super.setUploadType(uploadType);
}
@Override
public Patch setUploadProtocol(java.lang.String uploadProtocol) {
return (Patch) super.setUploadProtocol(uploadProtocol);
}
/**
* The relative resource name of this notification config. See:
* https://cloud.google.com/apis/design/resource_names#relative_resource_name Example:
* "organizations/{organization_id}/notificationConfigs/notify_public_bucket",
* "folders/{folder_id}/notificationConfigs/notify_public_bucket", or
* "projects/{project_id}/notificationConfigs/notify_public_bucket".
*/
@com.google.api.client.util.Key
private java.lang.String name;
/** The relative resource name of this notification config. See:
https://cloud.google.com/apis/design/resource_names#relative_resource_name Example:
"organizations/{organization_id}/notificationConfigs/notify_public_bucket",
"folders/{folder_id}/notificationConfigs/notify_public_bucket", or
"projects/{project_id}/notificationConfigs/notify_public_bucket".
*/
public java.lang.String getName() {
return name;
}
/**
* The relative resource name of this notification config. See:
* https://cloud.google.com/apis/design/resource_names#relative_resource_name Example:
* "organizations/{organization_id}/notificationConfigs/notify_public_bucket",
* "folders/{folder_id}/notificationConfigs/notify_public_bucket", or
* "projects/{project_id}/notificationConfigs/notify_public_bucket".
*/
public Patch setName(java.lang.String name) {
if (!getSuppressPatternChecks()) {
com.google.api.client.util.Preconditions.checkArgument(NAME_PATTERN.matcher(name).matches(),
"Parameter name must conform to the pattern " +
"^organizations/[^/]+/notificationConfigs/[^/]+$");
}
this.name = name;
return this;
}
/**
* The FieldMask to use when updating the notification config. If empty all mutable fields
* will be updated.
*/
@com.google.api.client.util.Key
private String updateMask;
/** The FieldMask to use when updating the notification config. If empty all mutable fields will be
updated.
*/
public String getUpdateMask() {
return updateMask;
}
/**
* The FieldMask to use when updating the notification config. If empty all mutable fields
* will be updated.
*/
public Patch setUpdateMask(String updateMask) {
this.updateMask = updateMask;
return this;
}
@Override
public Patch set(String parameterName, Object value) {
return (Patch) super.set(parameterName, value);
}
}
}
/**
* An accessor for creating requests from the Operations collection.
*
* The typical use is:
*
* {@code SecurityCommandCenter securitycenter = new SecurityCommandCenter(...);}
* {@code SecurityCommandCenter.Operations.List request = securitycenter.operations().list(parameters ...)}
*
*
* @return the resource collection
*/
public Operations operations() {
return new Operations();
}
/**
* The "operations" collection of methods.
*/
public class Operations {
/**
* Starts asynchronous cancellation on a long-running operation. The server makes a best effort to
* cancel the operation, but success is not guaranteed. If the server doesn't support this method,
* it returns `google.rpc.Code.UNIMPLEMENTED`. Clients can use Operations.GetOperation or other
* methods to check whether the cancellation succeeded or whether the operation completed despite
* cancellation. On successful cancellation, the operation is not deleted; instead, it becomes an
* operation with an Operation.error value with a google.rpc.Status.code of 1, corresponding to
* `Code.CANCELLED`.
*
* Create a request for the method "operations.cancel".
*
* This request holds the parameters needed by the securitycenter server. After setting any
* optional parameters, call the {@link Cancel#execute()} method to invoke the remote operation.
*
* @param name The name of the operation resource to be cancelled.
* @return the request
*/
public Cancel cancel(java.lang.String name) throws java.io.IOException {
Cancel result = new Cancel(name);
initialize(result);
return result;
}
public class Cancel extends SecurityCommandCenterRequest {
private static final String REST_PATH = "v1/{+name}:cancel";
private final java.util.regex.Pattern NAME_PATTERN =
java.util.regex.Pattern.compile("^organizations/[^/]+/operations/[^/]+$");
/**
* Starts asynchronous cancellation on a long-running operation. The server makes a best effort to
* cancel the operation, but success is not guaranteed. If the server doesn't support this method,
* it returns `google.rpc.Code.UNIMPLEMENTED`. Clients can use Operations.GetOperation or other
* methods to check whether the cancellation succeeded or whether the operation completed despite
* cancellation. On successful cancellation, the operation is not deleted; instead, it becomes an
* operation with an Operation.error value with a google.rpc.Status.code of 1, corresponding to
* `Code.CANCELLED`.
*
* Create a request for the method "operations.cancel".
*
* This request holds the parameters needed by the the securitycenter server. After setting any
* optional parameters, call the {@link Cancel#execute()} method to invoke the remote operation.
* {@link
* Cancel#initialize(com.google.api.client.googleapis.services.AbstractGoogleClientRequest)} must
* be called to initialize this instance immediately after invoking the constructor.
*
* @param name The name of the operation resource to be cancelled.
* @since 1.13
*/
protected Cancel(java.lang.String name) {
super(SecurityCommandCenter.this, "POST", REST_PATH, null, com.google.api.services.securitycenter.v1.model.Empty.class);
this.name = com.google.api.client.util.Preconditions.checkNotNull(name, "Required parameter name must be specified.");
if (!getSuppressPatternChecks()) {
com.google.api.client.util.Preconditions.checkArgument(NAME_PATTERN.matcher(name).matches(),
"Parameter name must conform to the pattern " +
"^organizations/[^/]+/operations/[^/]+$");
}
}
@Override
public Cancel set$Xgafv(java.lang.String $Xgafv) {
return (Cancel) super.set$Xgafv($Xgafv);
}
@Override
public Cancel setAccessToken(java.lang.String accessToken) {
return (Cancel) super.setAccessToken(accessToken);
}
@Override
public Cancel setAlt(java.lang.String alt) {
return (Cancel) super.setAlt(alt);
}
@Override
public Cancel setCallback(java.lang.String callback) {
return (Cancel) super.setCallback(callback);
}
@Override
public Cancel setFields(java.lang.String fields) {
return (Cancel) super.setFields(fields);
}
@Override
public Cancel setKey(java.lang.String key) {
return (Cancel) super.setKey(key);
}
@Override
public Cancel setOauthToken(java.lang.String oauthToken) {
return (Cancel) super.setOauthToken(oauthToken);
}
@Override
public Cancel setPrettyPrint(java.lang.Boolean prettyPrint) {
return (Cancel) super.setPrettyPrint(prettyPrint);
}
@Override
public Cancel setQuotaUser(java.lang.String quotaUser) {
return (Cancel) super.setQuotaUser(quotaUser);
}
@Override
public Cancel setUploadType(java.lang.String uploadType) {
return (Cancel) super.setUploadType(uploadType);
}
@Override
public Cancel setUploadProtocol(java.lang.String uploadProtocol) {
return (Cancel) super.setUploadProtocol(uploadProtocol);
}
/** The name of the operation resource to be cancelled. */
@com.google.api.client.util.Key
private java.lang.String name;
/** The name of the operation resource to be cancelled.
*/
public java.lang.String getName() {
return name;
}
/** The name of the operation resource to be cancelled. */
public Cancel setName(java.lang.String name) {
if (!getSuppressPatternChecks()) {
com.google.api.client.util.Preconditions.checkArgument(NAME_PATTERN.matcher(name).matches(),
"Parameter name must conform to the pattern " +
"^organizations/[^/]+/operations/[^/]+$");
}
this.name = name;
return this;
}
@Override
public Cancel set(String parameterName, Object value) {
return (Cancel) super.set(parameterName, value);
}
}
/**
* Deletes a long-running operation. This method indicates that the client is no longer interested
* in the operation result. It does not cancel the operation. If the server doesn't support this
* method, it returns `google.rpc.Code.UNIMPLEMENTED`.
*
* Create a request for the method "operations.delete".
*
* This request holds the parameters needed by the securitycenter server. After setting any
* optional parameters, call the {@link Delete#execute()} method to invoke the remote operation.
*
* @param name The name of the operation resource to be deleted.
* @return the request
*/
public Delete delete(java.lang.String name) throws java.io.IOException {
Delete result = new Delete(name);
initialize(result);
return result;
}
public class Delete extends SecurityCommandCenterRequest {
private static final String REST_PATH = "v1/{+name}";
private final java.util.regex.Pattern NAME_PATTERN =
java.util.regex.Pattern.compile("^organizations/[^/]+/operations/[^/]+$");
/**
* Deletes a long-running operation. This method indicates that the client is no longer interested
* in the operation result. It does not cancel the operation. If the server doesn't support this
* method, it returns `google.rpc.Code.UNIMPLEMENTED`.
*
* Create a request for the method "operations.delete".
*
* This request holds the parameters needed by the the securitycenter server. After setting any
* optional parameters, call the {@link Delete#execute()} method to invoke the remote operation.
* {@link
* Delete#initialize(com.google.api.client.googleapis.services.AbstractGoogleClientRequest)} must
* be called to initialize this instance immediately after invoking the constructor.
*
* @param name The name of the operation resource to be deleted.
* @since 1.13
*/
protected Delete(java.lang.String name) {
super(SecurityCommandCenter.this, "DELETE", REST_PATH, null, com.google.api.services.securitycenter.v1.model.Empty.class);
this.name = com.google.api.client.util.Preconditions.checkNotNull(name, "Required parameter name must be specified.");
if (!getSuppressPatternChecks()) {
com.google.api.client.util.Preconditions.checkArgument(NAME_PATTERN.matcher(name).matches(),
"Parameter name must conform to the pattern " +
"^organizations/[^/]+/operations/[^/]+$");
}
}
@Override
public Delete set$Xgafv(java.lang.String $Xgafv) {
return (Delete) super.set$Xgafv($Xgafv);
}
@Override
public Delete setAccessToken(java.lang.String accessToken) {
return (Delete) super.setAccessToken(accessToken);
}
@Override
public Delete setAlt(java.lang.String alt) {
return (Delete) super.setAlt(alt);
}
@Override
public Delete setCallback(java.lang.String callback) {
return (Delete) super.setCallback(callback);
}
@Override
public Delete setFields(java.lang.String fields) {
return (Delete) super.setFields(fields);
}
@Override
public Delete setKey(java.lang.String key) {
return (Delete) super.setKey(key);
}
@Override
public Delete setOauthToken(java.lang.String oauthToken) {
return (Delete) super.setOauthToken(oauthToken);
}
@Override
public Delete setPrettyPrint(java.lang.Boolean prettyPrint) {
return (Delete) super.setPrettyPrint(prettyPrint);
}
@Override
public Delete setQuotaUser(java.lang.String quotaUser) {
return (Delete) super.setQuotaUser(quotaUser);
}
@Override
public Delete setUploadType(java.lang.String uploadType) {
return (Delete) super.setUploadType(uploadType);
}
@Override
public Delete setUploadProtocol(java.lang.String uploadProtocol) {
return (Delete) super.setUploadProtocol(uploadProtocol);
}
/** The name of the operation resource to be deleted. */
@com.google.api.client.util.Key
private java.lang.String name;
/** The name of the operation resource to be deleted.
*/
public java.lang.String getName() {
return name;
}
/** The name of the operation resource to be deleted. */
public Delete setName(java.lang.String name) {
if (!getSuppressPatternChecks()) {
com.google.api.client.util.Preconditions.checkArgument(NAME_PATTERN.matcher(name).matches(),
"Parameter name must conform to the pattern " +
"^organizations/[^/]+/operations/[^/]+$");
}
this.name = name;
return this;
}
@Override
public Delete set(String parameterName, Object value) {
return (Delete) super.set(parameterName, value);
}
}
/**
* Gets the latest state of a long-running operation. Clients can use this method to poll the
* operation result at intervals as recommended by the API service.
*
* Create a request for the method "operations.get".
*
* This request holds the parameters needed by the securitycenter 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 SecurityCommandCenterRequest {
private static final String REST_PATH = "v1/{+name}";
private final java.util.regex.Pattern NAME_PATTERN =
java.util.regex.Pattern.compile("^organizations/[^/]+/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 securitycenter 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(SecurityCommandCenter.this, "GET", REST_PATH, null, com.google.api.services.securitycenter.v1.model.Operation.class);
this.name = com.google.api.client.util.Preconditions.checkNotNull(name, "Required parameter name must be specified.");
if (!getSuppressPatternChecks()) {
com.google.api.client.util.Preconditions.checkArgument(NAME_PATTERN.matcher(name).matches(),
"Parameter name must conform to the pattern " +
"^organizations/[^/]+/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 " +
"^organizations/[^/]+/operations/[^/]+$");
}
this.name = name;
return this;
}
@Override
public Get set(String parameterName, Object value) {
return (Get) super.set(parameterName, value);
}
}
/**
* Lists operations that match the specified filter in the request. If the server doesn't support
* this method, it returns `UNIMPLEMENTED`.
*
* Create a request for the method "operations.list".
*
* This request holds the parameters needed by the securitycenter server. After setting any
* optional parameters, call the {@link List#execute()} method to invoke the remote operation.
*
* @param name The name of the operation's parent resource.
* @return the request
*/
public List list(java.lang.String name) throws java.io.IOException {
List result = new List(name);
initialize(result);
return result;
}
public class List extends SecurityCommandCenterRequest {
private static final String REST_PATH = "v1/{+name}";
private final java.util.regex.Pattern NAME_PATTERN =
java.util.regex.Pattern.compile("^organizations/[^/]+/operations$");
/**
* Lists operations that match the specified filter in the request. If the server doesn't support
* this method, it returns `UNIMPLEMENTED`.
*
* Create a request for the method "operations.list".
*
* This request holds the parameters needed by the the securitycenter server. After setting any
* optional parameters, call the {@link List#execute()} method to invoke the remote operation.
* {@link List#initialize(com.google.api.client.googleapis.services.AbstractGoogleClientRequest)}
* must be called to initialize this instance immediately after invoking the constructor.
*
* @param name The name of the operation's parent resource.
* @since 1.13
*/
protected List(java.lang.String name) {
super(SecurityCommandCenter.this, "GET", REST_PATH, null, com.google.api.services.securitycenter.v1.model.ListOperationsResponse.class);
this.name = com.google.api.client.util.Preconditions.checkNotNull(name, "Required parameter name must be specified.");
if (!getSuppressPatternChecks()) {
com.google.api.client.util.Preconditions.checkArgument(NAME_PATTERN.matcher(name).matches(),
"Parameter name must conform to the pattern " +
"^organizations/[^/]+/operations$");
}
}
@Override
public com.google.api.client.http.HttpResponse executeUsingHead() throws java.io.IOException {
return super.executeUsingHead();
}
@Override
public com.google.api.client.http.HttpRequest buildHttpRequestUsingHead() throws java.io.IOException {
return super.buildHttpRequestUsingHead();
}
@Override
public List set$Xgafv(java.lang.String $Xgafv) {
return (List) super.set$Xgafv($Xgafv);
}
@Override
public List setAccessToken(java.lang.String accessToken) {
return (List) super.setAccessToken(accessToken);
}
@Override
public List setAlt(java.lang.String alt) {
return (List) super.setAlt(alt);
}
@Override
public List setCallback(java.lang.String callback) {
return (List) super.setCallback(callback);
}
@Override
public List setFields(java.lang.String fields) {
return (List) super.setFields(fields);
}
@Override
public List setKey(java.lang.String key) {
return (List) super.setKey(key);
}
@Override
public List setOauthToken(java.lang.String oauthToken) {
return (List) super.setOauthToken(oauthToken);
}
@Override
public List setPrettyPrint(java.lang.Boolean prettyPrint) {
return (List) super.setPrettyPrint(prettyPrint);
}
@Override
public List setQuotaUser(java.lang.String quotaUser) {
return (List) super.setQuotaUser(quotaUser);
}
@Override
public List setUploadType(java.lang.String uploadType) {
return (List) super.setUploadType(uploadType);
}
@Override
public List setUploadProtocol(java.lang.String uploadProtocol) {
return (List) super.setUploadProtocol(uploadProtocol);
}
/** The name of the operation's parent resource. */
@com.google.api.client.util.Key
private java.lang.String name;
/** The name of the operation's parent resource.
*/
public java.lang.String getName() {
return name;
}
/** The name of the operation's parent resource. */
public List setName(java.lang.String name) {
if (!getSuppressPatternChecks()) {
com.google.api.client.util.Preconditions.checkArgument(NAME_PATTERN.matcher(name).matches(),
"Parameter name must conform to the pattern " +
"^organizations/[^/]+/operations$");
}
this.name = name;
return this;
}
/** The standard list filter. */
@com.google.api.client.util.Key
private java.lang.String filter;
/** The standard list filter.
*/
public java.lang.String getFilter() {
return filter;
}
/** The standard list filter. */
public List setFilter(java.lang.String filter) {
this.filter = filter;
return this;
}
/** The standard list page size. */
@com.google.api.client.util.Key
private java.lang.Integer pageSize;
/** The standard list page size.
*/
public java.lang.Integer getPageSize() {
return pageSize;
}
/** The standard list page size. */
public List setPageSize(java.lang.Integer pageSize) {
this.pageSize = pageSize;
return this;
}
/** The standard list page token. */
@com.google.api.client.util.Key
private java.lang.String pageToken;
/** The standard list page token.
*/
public java.lang.String getPageToken() {
return pageToken;
}
/** The standard list page token. */
public List setPageToken(java.lang.String pageToken) {
this.pageToken = pageToken;
return this;
}
@Override
public List set(String parameterName, Object value) {
return (List) super.set(parameterName, value);
}
}
}
/**
* An accessor for creating requests from the ResourceValueConfigs collection.
*
* The typical use is:
*
* {@code SecurityCommandCenter securitycenter = new SecurityCommandCenter(...);}
* {@code SecurityCommandCenter.ResourceValueConfigs.List request = securitycenter.resourceValueConfigs().list(parameters ...)}
*
*
* @return the resource collection
*/
public ResourceValueConfigs resourceValueConfigs() {
return new ResourceValueConfigs();
}
/**
* The "resourceValueConfigs" collection of methods.
*/
public class ResourceValueConfigs {
/**
* Creates a ResourceValueConfig for an organization. Maps user's tags to difference resource values
* for use by the attack path simulation.
*
* Create a request for the method "resourceValueConfigs.batchCreate".
*
* This request holds the parameters needed by the securitycenter server. After setting any
* optional parameters, call the {@link BatchCreate#execute()} method to invoke the remote
* operation.
*
* @param parent Required. Resource name of the new ResourceValueConfig's parent. The parent field in the
* CreateResourceValueConfigRequest messages must either be empty or match this field.
* @param content the {@link com.google.api.services.securitycenter.v1.model.BatchCreateResourceValueConfigsRequest}
* @return the request
*/
public BatchCreate batchCreate(java.lang.String parent, com.google.api.services.securitycenter.v1.model.BatchCreateResourceValueConfigsRequest content) throws java.io.IOException {
BatchCreate result = new BatchCreate(parent, content);
initialize(result);
return result;
}
public class BatchCreate extends SecurityCommandCenterRequest {
private static final String REST_PATH = "v1/{+parent}/resourceValueConfigs:batchCreate";
private final java.util.regex.Pattern PARENT_PATTERN =
java.util.regex.Pattern.compile("^organizations/[^/]+$");
/**
* Creates a ResourceValueConfig for an organization. Maps user's tags to difference resource
* values for use by the attack path simulation.
*
* Create a request for the method "resourceValueConfigs.batchCreate".
*
* This request holds the parameters needed by the the securitycenter server. After setting any
* optional parameters, call the {@link BatchCreate#execute()} method to invoke the remote
* operation. {@link
* BatchCreate#initialize(com.google.api.client.googleapis.services.AbstractGoogleClientRequest)}
* must be called to initialize this instance immediately after invoking the constructor.
*
* @param parent Required. Resource name of the new ResourceValueConfig's parent. The parent field in the
* CreateResourceValueConfigRequest messages must either be empty or match this field.
* @param content the {@link com.google.api.services.securitycenter.v1.model.BatchCreateResourceValueConfigsRequest}
* @since 1.13
*/
protected BatchCreate(java.lang.String parent, com.google.api.services.securitycenter.v1.model.BatchCreateResourceValueConfigsRequest content) {
super(SecurityCommandCenter.this, "POST", REST_PATH, content, com.google.api.services.securitycenter.v1.model.BatchCreateResourceValueConfigsResponse.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/[^/]+$");
}
}
@Override
public BatchCreate set$Xgafv(java.lang.String $Xgafv) {
return (BatchCreate) super.set$Xgafv($Xgafv);
}
@Override
public BatchCreate setAccessToken(java.lang.String accessToken) {
return (BatchCreate) super.setAccessToken(accessToken);
}
@Override
public BatchCreate setAlt(java.lang.String alt) {
return (BatchCreate) super.setAlt(alt);
}
@Override
public BatchCreate setCallback(java.lang.String callback) {
return (BatchCreate) super.setCallback(callback);
}
@Override
public BatchCreate setFields(java.lang.String fields) {
return (BatchCreate) super.setFields(fields);
}
@Override
public BatchCreate setKey(java.lang.String key) {
return (BatchCreate) super.setKey(key);
}
@Override
public BatchCreate setOauthToken(java.lang.String oauthToken) {
return (BatchCreate) super.setOauthToken(oauthToken);
}
@Override
public BatchCreate setPrettyPrint(java.lang.Boolean prettyPrint) {
return (BatchCreate) super.setPrettyPrint(prettyPrint);
}
@Override
public BatchCreate setQuotaUser(java.lang.String quotaUser) {
return (BatchCreate) super.setQuotaUser(quotaUser);
}
@Override
public BatchCreate setUploadType(java.lang.String uploadType) {
return (BatchCreate) super.setUploadType(uploadType);
}
@Override
public BatchCreate setUploadProtocol(java.lang.String uploadProtocol) {
return (BatchCreate) super.setUploadProtocol(uploadProtocol);
}
/**
* Required. Resource name of the new ResourceValueConfig's parent. The parent field in the
* CreateResourceValueConfigRequest messages must either be empty or match this field.
*/
@com.google.api.client.util.Key
private java.lang.String parent;
/** Required. Resource name of the new ResourceValueConfig's parent. The parent field in the
CreateResourceValueConfigRequest messages must either be empty or match this field.
*/
public java.lang.String getParent() {
return parent;
}
/**
* Required. Resource name of the new ResourceValueConfig's parent. The parent field in the
* CreateResourceValueConfigRequest messages must either be empty or match this field.
*/
public BatchCreate setParent(java.lang.String parent) {
if (!getSuppressPatternChecks()) {
com.google.api.client.util.Preconditions.checkArgument(PARENT_PATTERN.matcher(parent).matches(),
"Parameter parent must conform to the pattern " +
"^organizations/[^/]+$");
}
this.parent = parent;
return this;
}
@Override
public BatchCreate set(String parameterName, Object value) {
return (BatchCreate) super.set(parameterName, value);
}
}
/**
* Deletes a ResourceValueConfig.
*
* Create a request for the method "resourceValueConfigs.delete".
*
* This request holds the parameters needed by the securitycenter server. After setting any
* optional parameters, call the {@link Delete#execute()} method to invoke the remote operation.
*
* @param name Required. Name of the ResourceValueConfig to delete
* @return the request
*/
public Delete delete(java.lang.String name) throws java.io.IOException {
Delete result = new Delete(name);
initialize(result);
return result;
}
public class Delete extends SecurityCommandCenterRequest {
private static final String REST_PATH = "v1/{+name}";
private final java.util.regex.Pattern NAME_PATTERN =
java.util.regex.Pattern.compile("^organizations/[^/]+/resourceValueConfigs/[^/]+$");
/**
* Deletes a ResourceValueConfig.
*
* Create a request for the method "resourceValueConfigs.delete".
*
* This request holds the parameters needed by the the securitycenter server. After setting any
* optional parameters, call the {@link Delete#execute()} method to invoke the remote operation.
* {@link
* Delete#initialize(com.google.api.client.googleapis.services.AbstractGoogleClientRequest)} must
* be called to initialize this instance immediately after invoking the constructor.
*
* @param name Required. Name of the ResourceValueConfig to delete
* @since 1.13
*/
protected Delete(java.lang.String name) {
super(SecurityCommandCenter.this, "DELETE", REST_PATH, null, com.google.api.services.securitycenter.v1.model.Empty.class);
this.name = com.google.api.client.util.Preconditions.checkNotNull(name, "Required parameter name must be specified.");
if (!getSuppressPatternChecks()) {
com.google.api.client.util.Preconditions.checkArgument(NAME_PATTERN.matcher(name).matches(),
"Parameter name must conform to the pattern " +
"^organizations/[^/]+/resourceValueConfigs/[^/]+$");
}
}
@Override
public Delete set$Xgafv(java.lang.String $Xgafv) {
return (Delete) super.set$Xgafv($Xgafv);
}
@Override
public Delete setAccessToken(java.lang.String accessToken) {
return (Delete) super.setAccessToken(accessToken);
}
@Override
public Delete setAlt(java.lang.String alt) {
return (Delete) super.setAlt(alt);
}
@Override
public Delete setCallback(java.lang.String callback) {
return (Delete) super.setCallback(callback);
}
@Override
public Delete setFields(java.lang.String fields) {
return (Delete) super.setFields(fields);
}
@Override
public Delete setKey(java.lang.String key) {
return (Delete) super.setKey(key);
}
@Override
public Delete setOauthToken(java.lang.String oauthToken) {
return (Delete) super.setOauthToken(oauthToken);
}
@Override
public Delete setPrettyPrint(java.lang.Boolean prettyPrint) {
return (Delete) super.setPrettyPrint(prettyPrint);
}
@Override
public Delete setQuotaUser(java.lang.String quotaUser) {
return (Delete) super.setQuotaUser(quotaUser);
}
@Override
public Delete setUploadType(java.lang.String uploadType) {
return (Delete) super.setUploadType(uploadType);
}
@Override
public Delete setUploadProtocol(java.lang.String uploadProtocol) {
return (Delete) super.setUploadProtocol(uploadProtocol);
}
/** Required. Name of the ResourceValueConfig to delete */
@com.google.api.client.util.Key
private java.lang.String name;
/** Required. Name of the ResourceValueConfig to delete
*/
public java.lang.String getName() {
return name;
}
/** Required. Name of the ResourceValueConfig to delete */
public Delete setName(java.lang.String name) {
if (!getSuppressPatternChecks()) {
com.google.api.client.util.Preconditions.checkArgument(NAME_PATTERN.matcher(name).matches(),
"Parameter name must conform to the pattern " +
"^organizations/[^/]+/resourceValueConfigs/[^/]+$");
}
this.name = name;
return this;
}
@Override
public Delete set(String parameterName, Object value) {
return (Delete) super.set(parameterName, value);
}
}
/**
* Gets a ResourceValueConfig.
*
* Create a request for the method "resourceValueConfigs.get".
*
* This request holds the parameters needed by the securitycenter server. After setting any
* optional parameters, call the {@link Get#execute()} method to invoke the remote operation.
*
* @param name Required. Name of the resource value config to retrieve. Its format is
* `organizations/{organization}/resourceValueConfigs/{config_id}`.
* @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 SecurityCommandCenterRequest {
private static final String REST_PATH = "v1/{+name}";
private final java.util.regex.Pattern NAME_PATTERN =
java.util.regex.Pattern.compile("^organizations/[^/]+/resourceValueConfigs/[^/]+$");
/**
* Gets a ResourceValueConfig.
*
* Create a request for the method "resourceValueConfigs.get".
*
* This request holds the parameters needed by the the securitycenter 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. Name of the resource value config to retrieve. Its format is
* `organizations/{organization}/resourceValueConfigs/{config_id}`.
* @since 1.13
*/
protected Get(java.lang.String name) {
super(SecurityCommandCenter.this, "GET", REST_PATH, null, com.google.api.services.securitycenter.v1.model.GoogleCloudSecuritycenterV1ResourceValueConfig.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/[^/]+/resourceValueConfigs/[^/]+$");
}
}
@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. Name of the resource value config to retrieve. Its format is
* `organizations/{organization}/resourceValueConfigs/{config_id}`.
*/
@com.google.api.client.util.Key
private java.lang.String name;
/** Required. Name of the resource value config to retrieve. Its format is
`organizations/{organization}/resourceValueConfigs/{config_id}`.
*/
public java.lang.String getName() {
return name;
}
/**
* Required. Name of the resource value config to retrieve. Its format is
* `organizations/{organization}/resourceValueConfigs/{config_id}`.
*/
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/[^/]+/resourceValueConfigs/[^/]+$");
}
this.name = name;
return this;
}
@Override
public Get set(String parameterName, Object value) {
return (Get) super.set(parameterName, value);
}
}
/**
* Lists all ResourceValueConfigs.
*
* Create a request for the method "resourceValueConfigs.list".
*
* This request holds the parameters needed by the securitycenter server. After setting any
* optional parameters, call the {@link List#execute()} method to invoke the remote operation.
*
* @param parent Required. The parent, which owns the collection of resource value configs. Its format is
* `organizations/[organization_id]`
* @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 SecurityCommandCenterRequest {
private static final String REST_PATH = "v1/{+parent}/resourceValueConfigs";
private final java.util.regex.Pattern PARENT_PATTERN =
java.util.regex.Pattern.compile("^organizations/[^/]+$");
/**
* Lists all ResourceValueConfigs.
*
* Create a request for the method "resourceValueConfigs.list".
*
* This request holds the parameters needed by the the securitycenter server. After setting any
* optional parameters, call the {@link List#execute()} method to invoke the remote operation.
* {@link List#initialize(com.google.api.client.googleapis.services.AbstractGoogleClientRequest)}
* must be called to initialize this instance immediately after invoking the constructor.
*
* @param parent Required. The parent, which owns the collection of resource value configs. Its format is
* `organizations/[organization_id]`
* @since 1.13
*/
protected List(java.lang.String parent) {
super(SecurityCommandCenter.this, "GET", REST_PATH, null, com.google.api.services.securitycenter.v1.model.ListResourceValueConfigsResponse.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/[^/]+$");
}
}
@Override
public com.google.api.client.http.HttpResponse executeUsingHead() throws java.io.IOException {
return super.executeUsingHead();
}
@Override
public com.google.api.client.http.HttpRequest buildHttpRequestUsingHead() throws java.io.IOException {
return super.buildHttpRequestUsingHead();
}
@Override
public List set$Xgafv(java.lang.String $Xgafv) {
return (List) super.set$Xgafv($Xgafv);
}
@Override
public List setAccessToken(java.lang.String accessToken) {
return (List) super.setAccessToken(accessToken);
}
@Override
public List setAlt(java.lang.String alt) {
return (List) super.setAlt(alt);
}
@Override
public List setCallback(java.lang.String callback) {
return (List) super.setCallback(callback);
}
@Override
public List setFields(java.lang.String fields) {
return (List) super.setFields(fields);
}
@Override
public List setKey(java.lang.String key) {
return (List) super.setKey(key);
}
@Override
public List setOauthToken(java.lang.String oauthToken) {
return (List) super.setOauthToken(oauthToken);
}
@Override
public List setPrettyPrint(java.lang.Boolean prettyPrint) {
return (List) super.setPrettyPrint(prettyPrint);
}
@Override
public List setQuotaUser(java.lang.String quotaUser) {
return (List) super.setQuotaUser(quotaUser);
}
@Override
public List setUploadType(java.lang.String uploadType) {
return (List) super.setUploadType(uploadType);
}
@Override
public List setUploadProtocol(java.lang.String uploadProtocol) {
return (List) super.setUploadProtocol(uploadProtocol);
}
/**
* Required. The parent, which owns the collection of resource value configs. Its format is
* `organizations/[organization_id]`
*/
@com.google.api.client.util.Key
private java.lang.String parent;
/** Required. The parent, which owns the collection of resource value configs. Its format is
`organizations/[organization_id]`
*/
public java.lang.String getParent() {
return parent;
}
/**
* Required. The parent, which owns the collection of resource value configs. Its format is
* `organizations/[organization_id]`
*/
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/[^/]+$");
}
this.parent = parent;
return this;
}
/**
* The number of results to return. The service may return fewer than this value. If
* unspecified, at most 10 configs will be returned. The maximum value is 1000; values above
* 1000 will be coerced to 1000.
*/
@com.google.api.client.util.Key
private java.lang.Integer pageSize;
/** The number of results to return. The service may return fewer than this value. If unspecified, at
most 10 configs will be returned. The maximum value is 1000; values above 1000 will be coerced to
1000.
*/
public java.lang.Integer getPageSize() {
return pageSize;
}
/**
* The number of results to return. The service may return fewer than this value. If
* unspecified, at most 10 configs will be returned. The maximum value is 1000; values above
* 1000 will be coerced to 1000.
*/
public List setPageSize(java.lang.Integer pageSize) {
this.pageSize = pageSize;
return this;
}
/**
* A page token, received from a previous `ListResourceValueConfigs` call. Provide this to
* retrieve the subsequent page. When paginating, all other parameters provided to
* `ListResourceValueConfigs` must match the call that provided the page token. page_size
* can be specified, and the new page_size will be used.
*/
@com.google.api.client.util.Key
private java.lang.String pageToken;
/** A page token, received from a previous `ListResourceValueConfigs` call. Provide this to retrieve
the subsequent page. When paginating, all other parameters provided to `ListResourceValueConfigs`
must match the call that provided the page token. page_size can be specified, and the new page_size
will be used.
*/
public java.lang.String getPageToken() {
return pageToken;
}
/**
* A page token, received from a previous `ListResourceValueConfigs` call. Provide this to
* retrieve the subsequent page. When paginating, all other parameters provided to
* `ListResourceValueConfigs` must match the call that provided the page token. page_size
* can be specified, and the new page_size will be used.
*/
public List setPageToken(java.lang.String pageToken) {
this.pageToken = pageToken;
return this;
}
@Override
public List set(String parameterName, Object value) {
return (List) super.set(parameterName, value);
}
}
/**
* Updates an existing ResourceValueConfigs with new rules.
*
* Create a request for the method "resourceValueConfigs.patch".
*
* This request holds the parameters needed by the securitycenter server. After setting any
* optional parameters, call the {@link Patch#execute()} method to invoke the remote operation.
*
* @param name Name for the resource value configuration
* @param content the {@link com.google.api.services.securitycenter.v1.model.GoogleCloudSecuritycenterV1ResourceValueConfig}
* @return the request
*/
public Patch patch(java.lang.String name, com.google.api.services.securitycenter.v1.model.GoogleCloudSecuritycenterV1ResourceValueConfig content) throws java.io.IOException {
Patch result = new Patch(name, content);
initialize(result);
return result;
}
public class Patch extends SecurityCommandCenterRequest {
private static final String REST_PATH = "v1/{+name}";
private final java.util.regex.Pattern NAME_PATTERN =
java.util.regex.Pattern.compile("^organizations/[^/]+/resourceValueConfigs/[^/]+$");
/**
* Updates an existing ResourceValueConfigs with new rules.
*
* Create a request for the method "resourceValueConfigs.patch".
*
* This request holds the parameters needed by the the securitycenter server. After setting any
* optional parameters, call the {@link Patch#execute()} method to invoke the remote operation.
* {@link
* Patch#initialize(com.google.api.client.googleapis.services.AbstractGoogleClientRequest)} must
* be called to initialize this instance immediately after invoking the constructor.
*
* @param name Name for the resource value configuration
* @param content the {@link com.google.api.services.securitycenter.v1.model.GoogleCloudSecuritycenterV1ResourceValueConfig}
* @since 1.13
*/
protected Patch(java.lang.String name, com.google.api.services.securitycenter.v1.model.GoogleCloudSecuritycenterV1ResourceValueConfig content) {
super(SecurityCommandCenter.this, "PATCH", REST_PATH, content, com.google.api.services.securitycenter.v1.model.GoogleCloudSecuritycenterV1ResourceValueConfig.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/[^/]+/resourceValueConfigs/[^/]+$");
}
}
@Override
public Patch set$Xgafv(java.lang.String $Xgafv) {
return (Patch) super.set$Xgafv($Xgafv);
}
@Override
public Patch setAccessToken(java.lang.String accessToken) {
return (Patch) super.setAccessToken(accessToken);
}
@Override
public Patch setAlt(java.lang.String alt) {
return (Patch) super.setAlt(alt);
}
@Override
public Patch setCallback(java.lang.String callback) {
return (Patch) super.setCallback(callback);
}
@Override
public Patch setFields(java.lang.String fields) {
return (Patch) super.setFields(fields);
}
@Override
public Patch setKey(java.lang.String key) {
return (Patch) super.setKey(key);
}
@Override
public Patch setOauthToken(java.lang.String oauthToken) {
return (Patch) super.setOauthToken(oauthToken);
}
@Override
public Patch setPrettyPrint(java.lang.Boolean prettyPrint) {
return (Patch) super.setPrettyPrint(prettyPrint);
}
@Override
public Patch setQuotaUser(java.lang.String quotaUser) {
return (Patch) super.setQuotaUser(quotaUser);
}
@Override
public Patch setUploadType(java.lang.String uploadType) {
return (Patch) super.setUploadType(uploadType);
}
@Override
public Patch setUploadProtocol(java.lang.String uploadProtocol) {
return (Patch) super.setUploadProtocol(uploadProtocol);
}
/** Name for the resource value configuration */
@com.google.api.client.util.Key
private java.lang.String name;
/** Name for the resource value configuration
*/
public java.lang.String getName() {
return name;
}
/** Name for the resource value configuration */
public Patch setName(java.lang.String name) {
if (!getSuppressPatternChecks()) {
com.google.api.client.util.Preconditions.checkArgument(NAME_PATTERN.matcher(name).matches(),
"Parameter name must conform to the pattern " +
"^organizations/[^/]+/resourceValueConfigs/[^/]+$");
}
this.name = name;
return this;
}
/** The list of fields to be updated. If empty all mutable fields will be updated. */
@com.google.api.client.util.Key
private String updateMask;
/** The list of fields to be updated. If empty all mutable fields will be updated.
*/
public String getUpdateMask() {
return updateMask;
}
/** The list of fields to be updated. If empty all mutable fields will be updated. */
public Patch setUpdateMask(String updateMask) {
this.updateMask = updateMask;
return this;
}
@Override
public Patch set(String parameterName, Object value) {
return (Patch) super.set(parameterName, value);
}
}
}
/**
* An accessor for creating requests from the SecurityHealthAnalyticsSettings collection.
*
* The typical use is:
*
* {@code SecurityCommandCenter securitycenter = new SecurityCommandCenter(...);}
* {@code SecurityCommandCenter.SecurityHealthAnalyticsSettings.List request = securitycenter.securityHealthAnalyticsSettings().list(parameters ...)}
*
*
* @return the resource collection
*/
public SecurityHealthAnalyticsSettings securityHealthAnalyticsSettings() {
return new SecurityHealthAnalyticsSettings();
}
/**
* The "securityHealthAnalyticsSettings" collection of methods.
*/
public class SecurityHealthAnalyticsSettings {
/**
* An accessor for creating requests from the CustomModules collection.
*
* The typical use is:
*
* {@code SecurityCommandCenter securitycenter = new SecurityCommandCenter(...);}
* {@code SecurityCommandCenter.CustomModules.List request = securitycenter.customModules().list(parameters ...)}
*
*
* @return the resource collection
*/
public CustomModules customModules() {
return new CustomModules();
}
/**
* The "customModules" collection of methods.
*/
public class CustomModules {
/**
* Creates a resident SecurityHealthAnalyticsCustomModule at the scope of the given CRM parent, and
* also creates inherited SecurityHealthAnalyticsCustomModules for all CRM descendants of the given
* parent. These modules are enabled by default.
*
* Create a request for the method "customModules.create".
*
* This request holds the parameters needed by the securitycenter server. After setting any
* optional parameters, call the {@link Create#execute()} method to invoke the remote operation.
*
* @param parent Required. Resource name of the new custom module's parent. Its format is
* `organizations/{organization}/securityHealthAnalyticsSettings`,
* `folders/{folder}/securityHealthAnalyticsSettings`, or
* `projects/{project}/securityHealthAnalyticsSettings`
* @param content the {@link com.google.api.services.securitycenter.v1.model.GoogleCloudSecuritycenterV1SecurityHealthAnalyticsCustomModule}
* @return the request
*/
public Create create(java.lang.String parent, com.google.api.services.securitycenter.v1.model.GoogleCloudSecuritycenterV1SecurityHealthAnalyticsCustomModule content) throws java.io.IOException {
Create result = new Create(parent, content);
initialize(result);
return result;
}
public class Create extends SecurityCommandCenterRequest {
private static final String REST_PATH = "v1/{+parent}/customModules";
private final java.util.regex.Pattern PARENT_PATTERN =
java.util.regex.Pattern.compile("^organizations/[^/]+/securityHealthAnalyticsSettings$");
/**
* Creates a resident SecurityHealthAnalyticsCustomModule at the scope of the given CRM parent,
* and also creates inherited SecurityHealthAnalyticsCustomModules for all CRM descendants of the
* given parent. These modules are enabled by default.
*
* Create a request for the method "customModules.create".
*
* This request holds the parameters needed by the the securitycenter server. After setting any
* optional parameters, call the {@link Create#execute()} method to invoke the remote operation.
* {@link
* Create#initialize(com.google.api.client.googleapis.services.AbstractGoogleClientRequest)} must
* be called to initialize this instance immediately after invoking the constructor.
*
* @param parent Required. Resource name of the new custom module's parent. Its format is
* `organizations/{organization}/securityHealthAnalyticsSettings`,
* `folders/{folder}/securityHealthAnalyticsSettings`, or
* `projects/{project}/securityHealthAnalyticsSettings`
* @param content the {@link com.google.api.services.securitycenter.v1.model.GoogleCloudSecuritycenterV1SecurityHealthAnalyticsCustomModule}
* @since 1.13
*/
protected Create(java.lang.String parent, com.google.api.services.securitycenter.v1.model.GoogleCloudSecuritycenterV1SecurityHealthAnalyticsCustomModule content) {
super(SecurityCommandCenter.this, "POST", REST_PATH, content, com.google.api.services.securitycenter.v1.model.GoogleCloudSecuritycenterV1SecurityHealthAnalyticsCustomModule.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/[^/]+/securityHealthAnalyticsSettings$");
}
}
@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. Resource name of the new custom module's parent. Its format is
* `organizations/{organization}/securityHealthAnalyticsSettings`,
* `folders/{folder}/securityHealthAnalyticsSettings`, or
* `projects/{project}/securityHealthAnalyticsSettings`
*/
@com.google.api.client.util.Key
private java.lang.String parent;
/** Required. Resource name of the new custom module's parent. Its format is
`organizations/{organization}/securityHealthAnalyticsSettings`,
`folders/{folder}/securityHealthAnalyticsSettings`, or
`projects/{project}/securityHealthAnalyticsSettings`
*/
public java.lang.String getParent() {
return parent;
}
/**
* Required. Resource name of the new custom module's parent. Its format is
* `organizations/{organization}/securityHealthAnalyticsSettings`,
* `folders/{folder}/securityHealthAnalyticsSettings`, or
* `projects/{project}/securityHealthAnalyticsSettings`
*/
public Create setParent(java.lang.String parent) {
if (!getSuppressPatternChecks()) {
com.google.api.client.util.Preconditions.checkArgument(PARENT_PATTERN.matcher(parent).matches(),
"Parameter parent must conform to the pattern " +
"^organizations/[^/]+/securityHealthAnalyticsSettings$");
}
this.parent = parent;
return this;
}
@Override
public Create set(String parameterName, Object value) {
return (Create) super.set(parameterName, value);
}
}
/**
* Deletes the specified SecurityHealthAnalyticsCustomModule and all of its descendants in the CRM
* hierarchy. This method is only supported for resident custom modules.
*
* Create a request for the method "customModules.delete".
*
* This request holds the parameters needed by the securitycenter server. After setting any
* optional parameters, call the {@link Delete#execute()} method to invoke the remote operation.
*
* @param name Required. Name of the custom module to delete. Its format is
* `organizations/{organization}/securityHealthAnalyticsSettings/customModules/{customModule}
* `, `folders/{folder}/securityHealthAnalyticsSettings/customModules/{customModule}`, or
* `projects/{project}/securityHealthAnalyticsSettings/customModules/{customModule}`
* @return the request
*/
public Delete delete(java.lang.String name) throws java.io.IOException {
Delete result = new Delete(name);
initialize(result);
return result;
}
public class Delete extends SecurityCommandCenterRequest {
private static final String REST_PATH = "v1/{+name}";
private final java.util.regex.Pattern NAME_PATTERN =
java.util.regex.Pattern.compile("^organizations/[^/]+/securityHealthAnalyticsSettings/customModules/[^/]+$");
/**
* Deletes the specified SecurityHealthAnalyticsCustomModule and all of its descendants in the CRM
* hierarchy. This method is only supported for resident custom modules.
*
* Create a request for the method "customModules.delete".
*
* This request holds the parameters needed by the the securitycenter server. After setting any
* optional parameters, call the {@link Delete#execute()} method to invoke the remote operation.
* {@link
* Delete#initialize(com.google.api.client.googleapis.services.AbstractGoogleClientRequest)} must
* be called to initialize this instance immediately after invoking the constructor.
*
* @param name Required. Name of the custom module to delete. Its format is
* `organizations/{organization}/securityHealthAnalyticsSettings/customModules/{customModule}
* `, `folders/{folder}/securityHealthAnalyticsSettings/customModules/{customModule}`, or
* `projects/{project}/securityHealthAnalyticsSettings/customModules/{customModule}`
* @since 1.13
*/
protected Delete(java.lang.String name) {
super(SecurityCommandCenter.this, "DELETE", REST_PATH, null, com.google.api.services.securitycenter.v1.model.Empty.class);
this.name = com.google.api.client.util.Preconditions.checkNotNull(name, "Required parameter name must be specified.");
if (!getSuppressPatternChecks()) {
com.google.api.client.util.Preconditions.checkArgument(NAME_PATTERN.matcher(name).matches(),
"Parameter name must conform to the pattern " +
"^organizations/[^/]+/securityHealthAnalyticsSettings/customModules/[^/]+$");
}
}
@Override
public Delete set$Xgafv(java.lang.String $Xgafv) {
return (Delete) super.set$Xgafv($Xgafv);
}
@Override
public Delete setAccessToken(java.lang.String accessToken) {
return (Delete) super.setAccessToken(accessToken);
}
@Override
public Delete setAlt(java.lang.String alt) {
return (Delete) super.setAlt(alt);
}
@Override
public Delete setCallback(java.lang.String callback) {
return (Delete) super.setCallback(callback);
}
@Override
public Delete setFields(java.lang.String fields) {
return (Delete) super.setFields(fields);
}
@Override
public Delete setKey(java.lang.String key) {
return (Delete) super.setKey(key);
}
@Override
public Delete setOauthToken(java.lang.String oauthToken) {
return (Delete) super.setOauthToken(oauthToken);
}
@Override
public Delete setPrettyPrint(java.lang.Boolean prettyPrint) {
return (Delete) super.setPrettyPrint(prettyPrint);
}
@Override
public Delete setQuotaUser(java.lang.String quotaUser) {
return (Delete) super.setQuotaUser(quotaUser);
}
@Override
public Delete setUploadType(java.lang.String uploadType) {
return (Delete) super.setUploadType(uploadType);
}
@Override
public Delete setUploadProtocol(java.lang.String uploadProtocol) {
return (Delete) super.setUploadProtocol(uploadProtocol);
}
/**
* Required. Name of the custom module to delete. Its format is `organizations/{organizati
* on}/securityHealthAnalyticsSettings/customModules/{customModule}`,
* `folders/{folder}/securityHealthAnalyticsSettings/customModules/{customModule}`, or
* `projects/{project}/securityHealthAnalyticsSettings/customModules/{customModule}`
*/
@com.google.api.client.util.Key
private java.lang.String name;
/** Required. Name of the custom module to delete. Its format is
`organizations/{organization}/securityHealthAnalyticsSettings/customModules/{customModule}`,
`folders/{folder}/securityHealthAnalyticsSettings/customModules/{customModule}`, or
`projects/{project}/securityHealthAnalyticsSettings/customModules/{customModule}`
*/
public java.lang.String getName() {
return name;
}
/**
* Required. Name of the custom module to delete. Its format is `organizations/{organizati
* on}/securityHealthAnalyticsSettings/customModules/{customModule}`,
* `folders/{folder}/securityHealthAnalyticsSettings/customModules/{customModule}`, or
* `projects/{project}/securityHealthAnalyticsSettings/customModules/{customModule}`
*/
public Delete setName(java.lang.String name) {
if (!getSuppressPatternChecks()) {
com.google.api.client.util.Preconditions.checkArgument(NAME_PATTERN.matcher(name).matches(),
"Parameter name must conform to the pattern " +
"^organizations/[^/]+/securityHealthAnalyticsSettings/customModules/[^/]+$");
}
this.name = name;
return this;
}
@Override
public Delete set(String parameterName, Object value) {
return (Delete) super.set(parameterName, value);
}
}
/**
* Retrieves a SecurityHealthAnalyticsCustomModule.
*
* Create a request for the method "customModules.get".
*
* This request holds the parameters needed by the securitycenter server. After setting any
* optional parameters, call the {@link Get#execute()} method to invoke the remote operation.
*
* @param name Required. Name of the custom module to get. Its format is
* `organizations/{organization}/securityHealthAnalyticsSettings/customModules/{customModule}
* `, `folders/{folder}/securityHealthAnalyticsSettings/customModules/{customModule}`, or
* `projects/{project}/securityHealthAnalyticsSettings/customModules/{customModule}`
* @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 SecurityCommandCenterRequest {
private static final String REST_PATH = "v1/{+name}";
private final java.util.regex.Pattern NAME_PATTERN =
java.util.regex.Pattern.compile("^organizations/[^/]+/securityHealthAnalyticsSettings/customModules/[^/]+$");
/**
* Retrieves a SecurityHealthAnalyticsCustomModule.
*
* Create a request for the method "customModules.get".
*
* This request holds the parameters needed by the the securitycenter 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. Name of the custom module to get. Its format is
* `organizations/{organization}/securityHealthAnalyticsSettings/customModules/{customModule}
* `, `folders/{folder}/securityHealthAnalyticsSettings/customModules/{customModule}`, or
* `projects/{project}/securityHealthAnalyticsSettings/customModules/{customModule}`
* @since 1.13
*/
protected Get(java.lang.String name) {
super(SecurityCommandCenter.this, "GET", REST_PATH, null, com.google.api.services.securitycenter.v1.model.GoogleCloudSecuritycenterV1SecurityHealthAnalyticsCustomModule.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/[^/]+/securityHealthAnalyticsSettings/customModules/[^/]+$");
}
}
@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. Name of the custom module to get. Its format is `organizations/{organization}
* /securityHealthAnalyticsSettings/customModules/{customModule}`,
* `folders/{folder}/securityHealthAnalyticsSettings/customModules/{customModule}`, or
* `projects/{project}/securityHealthAnalyticsSettings/customModules/{customModule}`
*/
@com.google.api.client.util.Key
private java.lang.String name;
/** Required. Name of the custom module to get. Its format is
`organizations/{organization}/securityHealthAnalyticsSettings/customModules/{customModule}`,
`folders/{folder}/securityHealthAnalyticsSettings/customModules/{customModule}`, or
`projects/{project}/securityHealthAnalyticsSettings/customModules/{customModule}`
*/
public java.lang.String getName() {
return name;
}
/**
* Required. Name of the custom module to get. Its format is `organizations/{organization}
* /securityHealthAnalyticsSettings/customModules/{customModule}`,
* `folders/{folder}/securityHealthAnalyticsSettings/customModules/{customModule}`, or
* `projects/{project}/securityHealthAnalyticsSettings/customModules/{customModule}`
*/
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/[^/]+/securityHealthAnalyticsSettings/customModules/[^/]+$");
}
this.name = name;
return this;
}
@Override
public Get set(String parameterName, Object value) {
return (Get) super.set(parameterName, value);
}
}
/**
* Returns a list of all SecurityHealthAnalyticsCustomModules for the given parent. This includes
* resident modules defined at the scope of the parent, and inherited modules, inherited from CRM
* ancestors.
*
* Create a request for the method "customModules.list".
*
* This request holds the parameters needed by the securitycenter server. After setting any
* optional parameters, call the {@link List#execute()} method to invoke the remote operation.
*
* @param parent Required. Name of parent to list custom modules. Its format is
* `organizations/{organization}/securityHealthAnalyticsSettings`,
* `folders/{folder}/securityHealthAnalyticsSettings`, or
* `projects/{project}/securityHealthAnalyticsSettings`
* @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 SecurityCommandCenterRequest {
private static final String REST_PATH = "v1/{+parent}/customModules";
private final java.util.regex.Pattern PARENT_PATTERN =
java.util.regex.Pattern.compile("^organizations/[^/]+/securityHealthAnalyticsSettings$");
/**
* Returns a list of all SecurityHealthAnalyticsCustomModules for the given parent. This includes
* resident modules defined at the scope of the parent, and inherited modules, inherited from CRM
* ancestors.
*
* Create a request for the method "customModules.list".
*
* This request holds the parameters needed by the the securitycenter 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. Name of parent to list custom modules. Its format is
* `organizations/{organization}/securityHealthAnalyticsSettings`,
* `folders/{folder}/securityHealthAnalyticsSettings`, or
* `projects/{project}/securityHealthAnalyticsSettings`
* @since 1.13
*/
protected List(java.lang.String parent) {
super(SecurityCommandCenter.this, "GET", REST_PATH, null, com.google.api.services.securitycenter.v1.model.ListSecurityHealthAnalyticsCustomModulesResponse.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/[^/]+/securityHealthAnalyticsSettings$");
}
}
@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. Name of parent to list custom modules. Its format is
* `organizations/{organization}/securityHealthAnalyticsSettings`,
* `folders/{folder}/securityHealthAnalyticsSettings`, or
* `projects/{project}/securityHealthAnalyticsSettings`
*/
@com.google.api.client.util.Key
private java.lang.String parent;
/** Required. Name of parent to list custom modules. Its format is
`organizations/{organization}/securityHealthAnalyticsSettings`,
`folders/{folder}/securityHealthAnalyticsSettings`, or
`projects/{project}/securityHealthAnalyticsSettings`
*/
public java.lang.String getParent() {
return parent;
}
/**
* Required. Name of parent to list custom modules. Its format is
* `organizations/{organization}/securityHealthAnalyticsSettings`,
* `folders/{folder}/securityHealthAnalyticsSettings`, or
* `projects/{project}/securityHealthAnalyticsSettings`
*/
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/[^/]+/securityHealthAnalyticsSettings$");
}
this.parent = parent;
return this;
}
/**
* The maximum number of results to return in a single response. Default is 10, minimum is
* 1, maximum is 1000.
*/
@com.google.api.client.util.Key
private java.lang.Integer pageSize;
/** The maximum number of results to return in a single response. Default is 10, minimum is 1, maximum
is 1000.
*/
public java.lang.Integer getPageSize() {
return pageSize;
}
/**
* The maximum number of results to return in a single response. Default is 10, minimum is
* 1, maximum is 1000.
*/
public List setPageSize(java.lang.Integer pageSize) {
this.pageSize = pageSize;
return this;
}
/** The value returned by the last call indicating a continuation */
@com.google.api.client.util.Key
private java.lang.String pageToken;
/** The value returned by the last call indicating a continuation
*/
public java.lang.String getPageToken() {
return pageToken;
}
/** The value returned by the last call indicating a continuation */
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);
}
}
/**
* Returns a list of all resident SecurityHealthAnalyticsCustomModules under the given CRM parent
* and all of the parent’s CRM descendants.
*
* Create a request for the method "customModules.listDescendant".
*
* This request holds the parameters needed by the securitycenter server. After setting any
* optional parameters, call the {@link ListDescendant#execute()} method to invoke the remote
* operation.
*
* @param parent Required. Name of parent to list descendant custom modules. Its format is
* `organizations/{organization}/securityHealthAnalyticsSettings`,
* `folders/{folder}/securityHealthAnalyticsSettings`, or
* `projects/{project}/securityHealthAnalyticsSettings`
* @return the request
*/
public ListDescendant listDescendant(java.lang.String parent) throws java.io.IOException {
ListDescendant result = new ListDescendant(parent);
initialize(result);
return result;
}
public class ListDescendant extends SecurityCommandCenterRequest {
private static final String REST_PATH = "v1/{+parent}/customModules:listDescendant";
private final java.util.regex.Pattern PARENT_PATTERN =
java.util.regex.Pattern.compile("^organizations/[^/]+/securityHealthAnalyticsSettings$");
/**
* Returns a list of all resident SecurityHealthAnalyticsCustomModules under the given CRM parent
* and all of the parent’s CRM descendants.
*
* Create a request for the method "customModules.listDescendant".
*
* This request holds the parameters needed by the the securitycenter server. After setting any
* optional parameters, call the {@link ListDescendant#execute()} method to invoke the remote
* operation. {@link ListDescendant#initialize(com.google.api.client.googleapis.services.Abstr
* actGoogleClientRequest)} must be called to initialize this instance immediately after invoking
* the constructor.
*
* @param parent Required. Name of parent to list descendant custom modules. Its format is
* `organizations/{organization}/securityHealthAnalyticsSettings`,
* `folders/{folder}/securityHealthAnalyticsSettings`, or
* `projects/{project}/securityHealthAnalyticsSettings`
* @since 1.13
*/
protected ListDescendant(java.lang.String parent) {
super(SecurityCommandCenter.this, "GET", REST_PATH, null, com.google.api.services.securitycenter.v1.model.ListDescendantSecurityHealthAnalyticsCustomModulesResponse.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/[^/]+/securityHealthAnalyticsSettings$");
}
}
@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 ListDescendant set$Xgafv(java.lang.String $Xgafv) {
return (ListDescendant) super.set$Xgafv($Xgafv);
}
@Override
public ListDescendant setAccessToken(java.lang.String accessToken) {
return (ListDescendant) super.setAccessToken(accessToken);
}
@Override
public ListDescendant setAlt(java.lang.String alt) {
return (ListDescendant) super.setAlt(alt);
}
@Override
public ListDescendant setCallback(java.lang.String callback) {
return (ListDescendant) super.setCallback(callback);
}
@Override
public ListDescendant setFields(java.lang.String fields) {
return (ListDescendant) super.setFields(fields);
}
@Override
public ListDescendant setKey(java.lang.String key) {
return (ListDescendant) super.setKey(key);
}
@Override
public ListDescendant setOauthToken(java.lang.String oauthToken) {
return (ListDescendant) super.setOauthToken(oauthToken);
}
@Override
public ListDescendant setPrettyPrint(java.lang.Boolean prettyPrint) {
return (ListDescendant) super.setPrettyPrint(prettyPrint);
}
@Override
public ListDescendant setQuotaUser(java.lang.String quotaUser) {
return (ListDescendant) super.setQuotaUser(quotaUser);
}
@Override
public ListDescendant setUploadType(java.lang.String uploadType) {
return (ListDescendant) super.setUploadType(uploadType);
}
@Override
public ListDescendant setUploadProtocol(java.lang.String uploadProtocol) {
return (ListDescendant) super.setUploadProtocol(uploadProtocol);
}
/**
* Required. Name of parent to list descendant custom modules. Its format is
* `organizations/{organization}/securityHealthAnalyticsSettings`,
* `folders/{folder}/securityHealthAnalyticsSettings`, or
* `projects/{project}/securityHealthAnalyticsSettings`
*/
@com.google.api.client.util.Key
private java.lang.String parent;
/** Required. Name of parent to list descendant custom modules. Its format is
`organizations/{organization}/securityHealthAnalyticsSettings`,
`folders/{folder}/securityHealthAnalyticsSettings`, or
`projects/{project}/securityHealthAnalyticsSettings`
*/
public java.lang.String getParent() {
return parent;
}
/**
* Required. Name of parent to list descendant custom modules. Its format is
* `organizations/{organization}/securityHealthAnalyticsSettings`,
* `folders/{folder}/securityHealthAnalyticsSettings`, or
* `projects/{project}/securityHealthAnalyticsSettings`
*/
public ListDescendant 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/[^/]+/securityHealthAnalyticsSettings$");
}
this.parent = parent;
return this;
}
/**
* The maximum number of results to return in a single response. Default is 10, minimum is
* 1, maximum is 1000.
*/
@com.google.api.client.util.Key
private java.lang.Integer pageSize;
/** The maximum number of results to return in a single response. Default is 10, minimum is 1, maximum
is 1000.
*/
public java.lang.Integer getPageSize() {
return pageSize;
}
/**
* The maximum number of results to return in a single response. Default is 10, minimum is
* 1, maximum is 1000.
*/
public ListDescendant setPageSize(java.lang.Integer pageSize) {
this.pageSize = pageSize;
return this;
}
/** The value returned by the last call indicating a continuation */
@com.google.api.client.util.Key
private java.lang.String pageToken;
/** The value returned by the last call indicating a continuation
*/
public java.lang.String getPageToken() {
return pageToken;
}
/** The value returned by the last call indicating a continuation */
public ListDescendant setPageToken(java.lang.String pageToken) {
this.pageToken = pageToken;
return this;
}
@Override
public ListDescendant set(String parameterName, Object value) {
return (ListDescendant) super.set(parameterName, value);
}
}
/**
* Updates the SecurityHealthAnalyticsCustomModule under the given name based on the given update
* mask. Updating the enablement state is supported on both resident and inherited modules (though
* resident modules cannot have an enablement state of "inherited"). Updating the display name and
* custom config of a module is supported on resident modules only.
*
* Create a request for the method "customModules.patch".
*
* This request holds the parameters needed by the securitycenter server. After setting any
* optional parameters, call the {@link Patch#execute()} method to invoke the remote operation.
*
* @param name Immutable. The resource name of the custom module. Its format is
* "organizations/{organization}/securityHealthAnalyticsSettings/customModules/{customModule}
* ", or "folders/{folder}/securityHealthAnalyticsSettings/customModules/{customModule}", or
* "projects/{project}/securityHealthAnalyticsSettings/customModules/{customModule}" The id
* {customModule} is server-generated and is not user settable. It will be a numeric id
* containing 1-20 digits.
* @param content the {@link com.google.api.services.securitycenter.v1.model.GoogleCloudSecuritycenterV1SecurityHealthAnalyticsCustomModule}
* @return the request
*/
public Patch patch(java.lang.String name, com.google.api.services.securitycenter.v1.model.GoogleCloudSecuritycenterV1SecurityHealthAnalyticsCustomModule content) throws java.io.IOException {
Patch result = new Patch(name, content);
initialize(result);
return result;
}
public class Patch extends SecurityCommandCenterRequest {
private static final String REST_PATH = "v1/{+name}";
private final java.util.regex.Pattern NAME_PATTERN =
java.util.regex.Pattern.compile("^organizations/[^/]+/securityHealthAnalyticsSettings/customModules/[^/]+$");
/**
* Updates the SecurityHealthAnalyticsCustomModule under the given name based on the given update
* mask. Updating the enablement state is supported on both resident and inherited modules (though
* resident modules cannot have an enablement state of "inherited"). Updating the display name and
* custom config of a module is supported on resident modules only.
*
* Create a request for the method "customModules.patch".
*
* This request holds the parameters needed by the the securitycenter server. After setting any
* optional parameters, call the {@link Patch#execute()} method to invoke the remote operation.
* {@link
* Patch#initialize(com.google.api.client.googleapis.services.AbstractGoogleClientRequest)} must
* be called to initialize this instance immediately after invoking the constructor.
*
* @param name Immutable. The resource name of the custom module. Its format is
* "organizations/{organization}/securityHealthAnalyticsSettings/customModules/{customModule}
* ", or "folders/{folder}/securityHealthAnalyticsSettings/customModules/{customModule}", or
* "projects/{project}/securityHealthAnalyticsSettings/customModules/{customModule}" The id
* {customModule} is server-generated and is not user settable. It will be a numeric id
* containing 1-20 digits.
* @param content the {@link com.google.api.services.securitycenter.v1.model.GoogleCloudSecuritycenterV1SecurityHealthAnalyticsCustomModule}
* @since 1.13
*/
protected Patch(java.lang.String name, com.google.api.services.securitycenter.v1.model.GoogleCloudSecuritycenterV1SecurityHealthAnalyticsCustomModule content) {
super(SecurityCommandCenter.this, "PATCH", REST_PATH, content, com.google.api.services.securitycenter.v1.model.GoogleCloudSecuritycenterV1SecurityHealthAnalyticsCustomModule.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/[^/]+/securityHealthAnalyticsSettings/customModules/[^/]+$");
}
}
@Override
public Patch set$Xgafv(java.lang.String $Xgafv) {
return (Patch) super.set$Xgafv($Xgafv);
}
@Override
public Patch setAccessToken(java.lang.String accessToken) {
return (Patch) super.setAccessToken(accessToken);
}
@Override
public Patch setAlt(java.lang.String alt) {
return (Patch) super.setAlt(alt);
}
@Override
public Patch setCallback(java.lang.String callback) {
return (Patch) super.setCallback(callback);
}
@Override
public Patch setFields(java.lang.String fields) {
return (Patch) super.setFields(fields);
}
@Override
public Patch setKey(java.lang.String key) {
return (Patch) super.setKey(key);
}
@Override
public Patch setOauthToken(java.lang.String oauthToken) {
return (Patch) super.setOauthToken(oauthToken);
}
@Override
public Patch setPrettyPrint(java.lang.Boolean prettyPrint) {
return (Patch) super.setPrettyPrint(prettyPrint);
}
@Override
public Patch setQuotaUser(java.lang.String quotaUser) {
return (Patch) super.setQuotaUser(quotaUser);
}
@Override
public Patch setUploadType(java.lang.String uploadType) {
return (Patch) super.setUploadType(uploadType);
}
@Override
public Patch setUploadProtocol(java.lang.String uploadProtocol) {
return (Patch) super.setUploadProtocol(uploadProtocol);
}
/**
* Immutable. The resource name of the custom module. Its format is "organizations/{organi
* zation}/securityHealthAnalyticsSettings/customModules/{customModule}", or
* "folders/{folder}/securityHealthAnalyticsSettings/customModules/{customModule}", or
* "projects/{project}/securityHealthAnalyticsSettings/customModules/{customModule}" The
* id {customModule} is server-generated and is not user settable. It will be a numeric id
* containing 1-20 digits.
*/
@com.google.api.client.util.Key
private java.lang.String name;
/** Immutable. The resource name of the custom module. Its format is
"organizations/{organization}/securityHealthAnalyticsSettings/customModules/{customModule}", or
"folders/{folder}/securityHealthAnalyticsSettings/customModules/{customModule}", or
"projects/{project}/securityHealthAnalyticsSettings/customModules/{customModule}" The id
{customModule} is server-generated and is not user settable. It will be a numeric id containing
1-20 digits.
*/
public java.lang.String getName() {
return name;
}
/**
* Immutable. The resource name of the custom module. Its format is "organizations/{organi
* zation}/securityHealthAnalyticsSettings/customModules/{customModule}", or
* "folders/{folder}/securityHealthAnalyticsSettings/customModules/{customModule}", or
* "projects/{project}/securityHealthAnalyticsSettings/customModules/{customModule}" The
* id {customModule} is server-generated and is not user settable. It will be a numeric id
* containing 1-20 digits.
*/
public Patch setName(java.lang.String name) {
if (!getSuppressPatternChecks()) {
com.google.api.client.util.Preconditions.checkArgument(NAME_PATTERN.matcher(name).matches(),
"Parameter name must conform to the pattern " +
"^organizations/[^/]+/securityHealthAnalyticsSettings/customModules/[^/]+$");
}
this.name = name;
return this;
}
/**
* The list of fields to be updated. The only fields that can be updated are
* `enablement_state` and `custom_config`. If empty or set to the wildcard value `*`, both
* `enablement_state` and `custom_config` are updated.
*/
@com.google.api.client.util.Key
private String updateMask;
/** The list of fields to be updated. The only fields that can be updated are `enablement_state` and
`custom_config`. If empty or set to the wildcard value `*`, both `enablement_state` and
`custom_config` are updated.
*/
public String getUpdateMask() {
return updateMask;
}
/**
* The list of fields to be updated. The only fields that can be updated are
* `enablement_state` and `custom_config`. If empty or set to the wildcard value `*`, both
* `enablement_state` and `custom_config` are updated.
*/
public Patch setUpdateMask(String updateMask) {
this.updateMask = updateMask;
return this;
}
@Override
public Patch set(String parameterName, Object value) {
return (Patch) super.set(parameterName, value);
}
}
/**
* Simulates a given SecurityHealthAnalyticsCustomModule and Resource.
*
* Create a request for the method "customModules.simulate".
*
* This request holds the parameters needed by the securitycenter server. After setting any
* optional parameters, call the {@link Simulate#execute()} method to invoke the remote operation.
*
* @param parent Required. The relative resource name of the organization, project, or folder. For more information
* about relative resource names, see [Relative Resource
* Name](https://cloud.google.com/apis/design/resource_names#relative_resource_name) Example:
* `organizations/{organization_id}`
* @param content the {@link com.google.api.services.securitycenter.v1.model.SimulateSecurityHealthAnalyticsCustomModuleRequest}
* @return the request
*/
public Simulate simulate(java.lang.String parent, com.google.api.services.securitycenter.v1.model.SimulateSecurityHealthAnalyticsCustomModuleRequest content) throws java.io.IOException {
Simulate result = new Simulate(parent, content);
initialize(result);
return result;
}
public class Simulate extends SecurityCommandCenterRequest {
private static final String REST_PATH = "v1/{+parent}/customModules:simulate";
private final java.util.regex.Pattern PARENT_PATTERN =
java.util.regex.Pattern.compile("^organizations/[^/]+/securityHealthAnalyticsSettings$");
/**
* Simulates a given SecurityHealthAnalyticsCustomModule and Resource.
*
* Create a request for the method "customModules.simulate".
*
* This request holds the parameters needed by the the securitycenter server. After setting any
* optional parameters, call the {@link Simulate#execute()} method to invoke the remote operation.
* {@link
* Simulate#initialize(com.google.api.client.googleapis.services.AbstractGoogleClientRequest)}
* must be called to initialize this instance immediately after invoking the constructor.
*
* @param parent Required. The relative resource name of the organization, project, or folder. For more information
* about relative resource names, see [Relative Resource
* Name](https://cloud.google.com/apis/design/resource_names#relative_resource_name) Example:
* `organizations/{organization_id}`
* @param content the {@link com.google.api.services.securitycenter.v1.model.SimulateSecurityHealthAnalyticsCustomModuleRequest}
* @since 1.13
*/
protected Simulate(java.lang.String parent, com.google.api.services.securitycenter.v1.model.SimulateSecurityHealthAnalyticsCustomModuleRequest content) {
super(SecurityCommandCenter.this, "POST", REST_PATH, content, com.google.api.services.securitycenter.v1.model.SimulateSecurityHealthAnalyticsCustomModuleResponse.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/[^/]+/securityHealthAnalyticsSettings$");
}
}
@Override
public Simulate set$Xgafv(java.lang.String $Xgafv) {
return (Simulate) super.set$Xgafv($Xgafv);
}
@Override
public Simulate setAccessToken(java.lang.String accessToken) {
return (Simulate) super.setAccessToken(accessToken);
}
@Override
public Simulate setAlt(java.lang.String alt) {
return (Simulate) super.setAlt(alt);
}
@Override
public Simulate setCallback(java.lang.String callback) {
return (Simulate) super.setCallback(callback);
}
@Override
public Simulate setFields(java.lang.String fields) {
return (Simulate) super.setFields(fields);
}
@Override
public Simulate setKey(java.lang.String key) {
return (Simulate) super.setKey(key);
}
@Override
public Simulate setOauthToken(java.lang.String oauthToken) {
return (Simulate) super.setOauthToken(oauthToken);
}
@Override
public Simulate setPrettyPrint(java.lang.Boolean prettyPrint) {
return (Simulate) super.setPrettyPrint(prettyPrint);
}
@Override
public Simulate setQuotaUser(java.lang.String quotaUser) {
return (Simulate) super.setQuotaUser(quotaUser);
}
@Override
public Simulate setUploadType(java.lang.String uploadType) {
return (Simulate) super.setUploadType(uploadType);
}
@Override
public Simulate setUploadProtocol(java.lang.String uploadProtocol) {
return (Simulate) super.setUploadProtocol(uploadProtocol);
}
/**
* Required. The relative resource name of the organization, project, or folder. For more
* information about relative resource names, see [Relative Resource
* Name](https://cloud.google.com/apis/design/resource_names#relative_resource_name)
* Example: `organizations/{organization_id}`
*/
@com.google.api.client.util.Key
private java.lang.String parent;
/** Required. The relative resource name of the organization, project, or folder. For more information
about relative resource names, see [Relative Resource
Name](https://cloud.google.com/apis/design/resource_names#relative_resource_name) Example:
`organizations/{organization_id}`
*/
public java.lang.String getParent() {
return parent;
}
/**
* Required. The relative resource name of the organization, project, or folder. For more
* information about relative resource names, see [Relative Resource
* Name](https://cloud.google.com/apis/design/resource_names#relative_resource_name)
* Example: `organizations/{organization_id}`
*/
public Simulate 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/[^/]+/securityHealthAnalyticsSettings$");
}
this.parent = parent;
return this;
}
@Override
public Simulate set(String parameterName, Object value) {
return (Simulate) super.set(parameterName, value);
}
}
}
/**
* An accessor for creating requests from the EffectiveCustomModules collection.
*
* The typical use is:
*
* {@code SecurityCommandCenter securitycenter = new SecurityCommandCenter(...);}
* {@code SecurityCommandCenter.EffectiveCustomModules.List request = securitycenter.effectiveCustomModules().list(parameters ...)}
*
*
* @return the resource collection
*/
public EffectiveCustomModules effectiveCustomModules() {
return new EffectiveCustomModules();
}
/**
* The "effectiveCustomModules" collection of methods.
*/
public class EffectiveCustomModules {
/**
* Retrieves an EffectiveSecurityHealthAnalyticsCustomModule.
*
* Create a request for the method "effectiveCustomModules.get".
*
* This request holds the parameters needed by the securitycenter server. After setting any
* optional parameters, call the {@link Get#execute()} method to invoke the remote operation.
*
* @param name Required. Name of the effective custom module to get. Its format is `organizations/{organization}/se
* curityHealthAnalyticsSettings/effectiveCustomModules/{customModule}`,
* `folders/{folder}/securityHealthAnalyticsSettings/effectiveCustomModules/{customModule}`,
* or
* `projects/{project}/securityHealthAnalyticsSettings/effectiveCustomModules/{customModule}`
* @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 SecurityCommandCenterRequest {
private static final String REST_PATH = "v1/{+name}";
private final java.util.regex.Pattern NAME_PATTERN =
java.util.regex.Pattern.compile("^organizations/[^/]+/securityHealthAnalyticsSettings/effectiveCustomModules/[^/]+$");
/**
* Retrieves an EffectiveSecurityHealthAnalyticsCustomModule.
*
* Create a request for the method "effectiveCustomModules.get".
*
* This request holds the parameters needed by the the securitycenter 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. Name of the effective custom module to get. Its format is `organizations/{organization}/se
* curityHealthAnalyticsSettings/effectiveCustomModules/{customModule}`,
* `folders/{folder}/securityHealthAnalyticsSettings/effectiveCustomModules/{customModule}`,
* or
* `projects/{project}/securityHealthAnalyticsSettings/effectiveCustomModules/{customModule}`
* @since 1.13
*/
protected Get(java.lang.String name) {
super(SecurityCommandCenter.this, "GET", REST_PATH, null, com.google.api.services.securitycenter.v1.model.GoogleCloudSecuritycenterV1EffectiveSecurityHealthAnalyticsCustomModule.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/[^/]+/securityHealthAnalyticsSettings/effectiveCustomModules/[^/]+$");
}
}
@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. Name of the effective custom module to get. Its format is `organizations/{org
* anization}/securityHealthAnalyticsSettings/effectiveCustomModules/{customModule}`, `fol
* ders/{folder}/securityHealthAnalyticsSettings/effectiveCustomModules/{customModule}`,
* or `projects/{project}/securityHealthAnalyticsSettings/effectiveCustomModules/{customMo
* dule}`
*/
@com.google.api.client.util.Key
private java.lang.String name;
/** Required. Name of the effective custom module to get. Its format is `organizations/{organization}/s
ecurityHealthAnalyticsSettings/effectiveCustomModules/{customModule}`,
`folders/{folder}/securityHealthAnalyticsSettings/effectiveCustomModules/{customModule}`, or
`projects/{project}/securityHealthAnalyticsSettings/effectiveCustomModules/{customModule}`
*/
public java.lang.String getName() {
return name;
}
/**
* Required. Name of the effective custom module to get. Its format is `organizations/{org
* anization}/securityHealthAnalyticsSettings/effectiveCustomModules/{customModule}`, `fol
* ders/{folder}/securityHealthAnalyticsSettings/effectiveCustomModules/{customModule}`,
* or `projects/{project}/securityHealthAnalyticsSettings/effectiveCustomModules/{customMo
* dule}`
*/
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/[^/]+/securityHealthAnalyticsSettings/effectiveCustomModules/[^/]+$");
}
this.name = name;
return this;
}
@Override
public Get set(String parameterName, Object value) {
return (Get) super.set(parameterName, value);
}
}
/**
* Returns a list of all EffectiveSecurityHealthAnalyticsCustomModules for the given parent. This
* includes resident modules defined at the scope of the parent, and inherited modules, inherited
* from CRM ancestors.
*
* Create a request for the method "effectiveCustomModules.list".
*
* This request holds the parameters needed by the securitycenter server. After setting any
* optional parameters, call the {@link List#execute()} method to invoke the remote operation.
*
* @param parent Required. Name of parent to list effective custom modules. Its format is
* `organizations/{organization}/securityHealthAnalyticsSettings`,
* `folders/{folder}/securityHealthAnalyticsSettings`, or
* `projects/{project}/securityHealthAnalyticsSettings`
* @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 SecurityCommandCenterRequest {
private static final String REST_PATH = "v1/{+parent}/effectiveCustomModules";
private final java.util.regex.Pattern PARENT_PATTERN =
java.util.regex.Pattern.compile("^organizations/[^/]+/securityHealthAnalyticsSettings$");
/**
* Returns a list of all EffectiveSecurityHealthAnalyticsCustomModules for the given parent. This
* includes resident modules defined at the scope of the parent, and inherited modules, inherited
* from CRM ancestors.
*
* Create a request for the method "effectiveCustomModules.list".
*
* This request holds the parameters needed by the the securitycenter 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. Name of parent to list effective custom modules. Its format is
* `organizations/{organization}/securityHealthAnalyticsSettings`,
* `folders/{folder}/securityHealthAnalyticsSettings`, or
* `projects/{project}/securityHealthAnalyticsSettings`
* @since 1.13
*/
protected List(java.lang.String parent) {
super(SecurityCommandCenter.this, "GET", REST_PATH, null, com.google.api.services.securitycenter.v1.model.ListEffectiveSecurityHealthAnalyticsCustomModulesResponse.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/[^/]+/securityHealthAnalyticsSettings$");
}
}
@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. Name of parent to list effective custom modules. Its format is
* `organizations/{organization}/securityHealthAnalyticsSettings`,
* `folders/{folder}/securityHealthAnalyticsSettings`, or
* `projects/{project}/securityHealthAnalyticsSettings`
*/
@com.google.api.client.util.Key
private java.lang.String parent;
/** Required. Name of parent to list effective custom modules. Its format is
`organizations/{organization}/securityHealthAnalyticsSettings`,
`folders/{folder}/securityHealthAnalyticsSettings`, or
`projects/{project}/securityHealthAnalyticsSettings`
*/
public java.lang.String getParent() {
return parent;
}
/**
* Required. Name of parent to list effective custom modules. Its format is
* `organizations/{organization}/securityHealthAnalyticsSettings`,
* `folders/{folder}/securityHealthAnalyticsSettings`, or
* `projects/{project}/securityHealthAnalyticsSettings`
*/
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/[^/]+/securityHealthAnalyticsSettings$");
}
this.parent = parent;
return this;
}
/**
* The maximum number of results to return in a single response. Default is 10, minimum is
* 1, maximum is 1000.
*/
@com.google.api.client.util.Key
private java.lang.Integer pageSize;
/** The maximum number of results to return in a single response. Default is 10, minimum is 1, maximum
is 1000.
*/
public java.lang.Integer getPageSize() {
return pageSize;
}
/**
* The maximum number of results to return in a single response. Default is 10, minimum is
* 1, maximum is 1000.
*/
public List setPageSize(java.lang.Integer pageSize) {
this.pageSize = pageSize;
return this;
}
/** The value returned by the last call indicating a continuation */
@com.google.api.client.util.Key
private java.lang.String pageToken;
/** The value returned by the last call indicating a continuation
*/
public java.lang.String getPageToken() {
return pageToken;
}
/** The value returned by the last call indicating a continuation */
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 Simulations collection.
*
* The typical use is:
*
* {@code SecurityCommandCenter securitycenter = new SecurityCommandCenter(...);}
* {@code SecurityCommandCenter.Simulations.List request = securitycenter.simulations().list(parameters ...)}
*
*
* @return the resource collection
*/
public Simulations simulations() {
return new Simulations();
}
/**
* The "simulations" collection of methods.
*/
public class Simulations {
/**
* Get the simulation by name or the latest simulation for the given organization.
*
* Create a request for the method "simulations.get".
*
* This request holds the parameters needed by the securitycenter server. After setting any
* optional parameters, call the {@link Get#execute()} method to invoke the remote operation.
*
* @param name Required. The organization name or simulation name of this simulation Valid format:
* `organizations/{organization}/simulations/latest`
* `organizations/{organization}/simulations/{simulation}`
* @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 SecurityCommandCenterRequest {
private static final String REST_PATH = "v1/{+name}";
private final java.util.regex.Pattern NAME_PATTERN =
java.util.regex.Pattern.compile("^organizations/[^/]+/simulations/[^/]+$");
/**
* Get the simulation by name or the latest simulation for the given organization.
*
* Create a request for the method "simulations.get".
*
* This request holds the parameters needed by the the securitycenter server. After setting any
* optional parameters, call the {@link Get#execute()} method to invoke the remote operation.
* {@link Get#initialize(com.google.api.client.googleapis.services.AbstractGoogleClientRequest)}
* must be called to initialize this instance immediately after invoking the constructor.
*
* @param name Required. The organization name or simulation name of this simulation Valid format:
* `organizations/{organization}/simulations/latest`
* `organizations/{organization}/simulations/{simulation}`
* @since 1.13
*/
protected Get(java.lang.String name) {
super(SecurityCommandCenter.this, "GET", REST_PATH, null, com.google.api.services.securitycenter.v1.model.Simulation.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/[^/]+/simulations/[^/]+$");
}
}
@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 organization name or simulation name of this simulation Valid format:
* `organizations/{organization}/simulations/latest`
* `organizations/{organization}/simulations/{simulation}`
*/
@com.google.api.client.util.Key
private java.lang.String name;
/** Required. The organization name or simulation name of this simulation Valid format:
`organizations/{organization}/simulations/latest`
`organizations/{organization}/simulations/{simulation}`
*/
public java.lang.String getName() {
return name;
}
/**
* Required. The organization name or simulation name of this simulation Valid format:
* `organizations/{organization}/simulations/latest`
* `organizations/{organization}/simulations/{simulation}`
*/
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/[^/]+/simulations/[^/]+$");
}
this.name = name;
return this;
}
@Override
public Get set(String parameterName, Object value) {
return (Get) super.set(parameterName, value);
}
}
/**
* An accessor for creating requests from the AttackExposureResults collection.
*
* The typical use is:
*
* {@code SecurityCommandCenter securitycenter = new SecurityCommandCenter(...);}
* {@code SecurityCommandCenter.AttackExposureResults.List request = securitycenter.attackExposureResults().list(parameters ...)}
*
*
* @return the resource collection
*/
public AttackExposureResults attackExposureResults() {
return new AttackExposureResults();
}
/**
* The "attackExposureResults" collection of methods.
*/
public class AttackExposureResults {
/**
* An accessor for creating requests from the AttackPaths collection.
*
* The typical use is:
*
* {@code SecurityCommandCenter securitycenter = new SecurityCommandCenter(...);}
* {@code SecurityCommandCenter.AttackPaths.List request = securitycenter.attackPaths().list(parameters ...)}
*
*
* @return the resource collection
*/
public AttackPaths attackPaths() {
return new AttackPaths();
}
/**
* The "attackPaths" collection of methods.
*/
public class AttackPaths {
/**
* Lists the attack paths for a set of simulation results or valued resources and filter.
*
* Create a request for the method "attackPaths.list".
*
* This request holds the parameters needed by the securitycenter server. After setting any
* optional parameters, call the {@link List#execute()} method to invoke the remote operation.
*
* @param parent Required. Name of parent to list attack paths. Valid formats: `organizations/{organization}`,
* `organizations/{organization}/simulations/{simulation}` `organizations/{organization}/simu
* lations/{simulation}/attackExposureResults/{attack_exposure_result_v2}`
* `organizations/{organization}/simulations/{simulation}/valuedResources/{valued_resource}`
* @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 SecurityCommandCenterRequest {
private static final String REST_PATH = "v1/{+parent}/attackPaths";
private final java.util.regex.Pattern PARENT_PATTERN =
java.util.regex.Pattern.compile("^organizations/[^/]+/simulations/[^/]+/attackExposureResults/[^/]+$");
/**
* Lists the attack paths for a set of simulation results or valued resources and filter.
*
* Create a request for the method "attackPaths.list".
*
* This request holds the parameters needed by the the securitycenter 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. Name of parent to list attack paths. Valid formats: `organizations/{organization}`,
* `organizations/{organization}/simulations/{simulation}` `organizations/{organization}/simu
* lations/{simulation}/attackExposureResults/{attack_exposure_result_v2}`
* `organizations/{organization}/simulations/{simulation}/valuedResources/{valued_resource}`
* @since 1.13
*/
protected List(java.lang.String parent) {
super(SecurityCommandCenter.this, "GET", REST_PATH, null, com.google.api.services.securitycenter.v1.model.ListAttackPathsResponse.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/[^/]+/simulations/[^/]+/attackExposureResults/[^/]+$");
}
}
@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. Name of parent to list attack paths. Valid formats:
* `organizations/{organization}`,
* `organizations/{organization}/simulations/{simulation}` `organizations/{organization}
* /simulations/{simulation}/attackExposureResults/{attack_exposure_result_v2}` `organiz
* ations/{organization}/simulations/{simulation}/valuedResources/{valued_resource}`
*/
@com.google.api.client.util.Key
private java.lang.String parent;
/** Required. Name of parent to list attack paths. Valid formats: `organizations/{organization}`,
`organizations/{organization}/simulations/{simulation}` `organizations/{organization}/simulations/{
simulation}/attackExposureResults/{attack_exposure_result_v2}`
`organizations/{organization}/simulations/{simulation}/valuedResources/{valued_resource}`
*/
public java.lang.String getParent() {
return parent;
}
/**
* Required. Name of parent to list attack paths. Valid formats:
* `organizations/{organization}`,
* `organizations/{organization}/simulations/{simulation}` `organizations/{organization}
* /simulations/{simulation}/attackExposureResults/{attack_exposure_result_v2}` `organiz
* ations/{organization}/simulations/{simulation}/valuedResources/{valued_resource}`
*/
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/[^/]+/simulations/[^/]+/attackExposureResults/[^/]+$");
}
this.parent = parent;
return this;
}
/**
* The filter expression that filters the attack path in the response. Supported fields:
* * `valued_resources` supports =
*/
@com.google.api.client.util.Key
private java.lang.String filter;
/** The filter expression that filters the attack path in the response. Supported fields: *
`valued_resources` supports =
*/
public java.lang.String getFilter() {
return filter;
}
/**
* The filter expression that filters the attack path in the response. Supported fields:
* * `valued_resources` supports =
*/
public List setFilter(java.lang.String filter) {
this.filter = filter;
return this;
}
/**
* The maximum number of results to return in a single response. Default is 10, minimum
* is 1, maximum is 1000.
*/
@com.google.api.client.util.Key
private java.lang.Integer pageSize;
/** The maximum number of results to return in a single response. Default is 10, minimum is 1, maximum
is 1000.
*/
public java.lang.Integer getPageSize() {
return pageSize;
}
/**
* The maximum number of results to return in a single response. Default is 10, minimum
* is 1, maximum is 1000.
*/
public List setPageSize(java.lang.Integer pageSize) {
this.pageSize = pageSize;
return this;
}
/**
* The value returned by the last `ListAttackPathsResponse`; indicates that this is a
* continuation of a prior `ListAttackPaths` call, and that the system should return the
* next page of data.
*/
@com.google.api.client.util.Key
private java.lang.String pageToken;
/** The value returned by the last `ListAttackPathsResponse`; indicates that this is a continuation of
a prior `ListAttackPaths` call, and that the system should return the next page of data.
*/
public java.lang.String getPageToken() {
return pageToken;
}
/**
* The value returned by the last `ListAttackPathsResponse`; indicates that this is a
* continuation of a prior `ListAttackPaths` call, and that the system should return the
* next page of data.
*/
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 ValuedResources collection.
*
* The typical use is:
*
* {@code SecurityCommandCenter securitycenter = new SecurityCommandCenter(...);}
* {@code SecurityCommandCenter.ValuedResources.List request = securitycenter.valuedResources().list(parameters ...)}
*
*
* @return the resource collection
*/
public ValuedResources valuedResources() {
return new ValuedResources();
}
/**
* The "valuedResources" collection of methods.
*/
public class ValuedResources {
/**
* Lists the valued resources for a set of simulation results and filter.
*
* Create a request for the method "valuedResources.list".
*
* This request holds the parameters needed by the securitycenter server. After setting any
* optional parameters, call the {@link List#execute()} method to invoke the remote operation.
*
* @param parent Required. Name of parent to list valued resources. Valid formats: `organizations/{organization}`,
* `organizations/{organization}/simulations/{simulation}` `organizations/{organization}/simu
* lations/{simulation}/attackExposureResults/{attack_exposure_result_v2}`
* @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 SecurityCommandCenterRequest {
private static final String REST_PATH = "v1/{+parent}/valuedResources";
private final java.util.regex.Pattern PARENT_PATTERN =
java.util.regex.Pattern.compile("^organizations/[^/]+/simulations/[^/]+/attackExposureResults/[^/]+$");
/**
* Lists the valued resources for a set of simulation results and filter.
*
* Create a request for the method "valuedResources.list".
*
* This request holds the parameters needed by the the securitycenter 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. Name of parent to list valued resources. Valid formats: `organizations/{organization}`,
* `organizations/{organization}/simulations/{simulation}` `organizations/{organization}/simu
* lations/{simulation}/attackExposureResults/{attack_exposure_result_v2}`
* @since 1.13
*/
protected List(java.lang.String parent) {
super(SecurityCommandCenter.this, "GET", REST_PATH, null, com.google.api.services.securitycenter.v1.model.ListValuedResourcesResponse.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/[^/]+/simulations/[^/]+/attackExposureResults/[^/]+$");
}
}
@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. Name of parent to list valued resources. Valid formats:
* `organizations/{organization}`,
* `organizations/{organization}/simulations/{simulation}` `organizations/{organization}
* /simulations/{simulation}/attackExposureResults/{attack_exposure_result_v2}`
*/
@com.google.api.client.util.Key
private java.lang.String parent;
/** Required. Name of parent to list valued resources. Valid formats: `organizations/{organization}`,
`organizations/{organization}/simulations/{simulation}` `organizations/{organization}/simulations/{
simulation}/attackExposureResults/{attack_exposure_result_v2}`
*/
public java.lang.String getParent() {
return parent;
}
/**
* Required. Name of parent to list valued resources. Valid formats:
* `organizations/{organization}`,
* `organizations/{organization}/simulations/{simulation}` `organizations/{organization}
* /simulations/{simulation}/attackExposureResults/{attack_exposure_result_v2}`
*/
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/[^/]+/simulations/[^/]+/attackExposureResults/[^/]+$");
}
this.parent = parent;
return this;
}
/**
* The filter expression that filters the valued resources in the response. Supported
* fields: * `resource_value` supports = * `resource_type` supports =
*/
@com.google.api.client.util.Key
private java.lang.String filter;
/** The filter expression that filters the valued resources in the response. Supported fields: *
`resource_value` supports = * `resource_type` supports =
*/
public java.lang.String getFilter() {
return filter;
}
/**
* The filter expression that filters the valued resources in the response. Supported
* fields: * `resource_value` supports = * `resource_type` supports =
*/
public List setFilter(java.lang.String filter) {
this.filter = filter;
return this;
}
/**
* Optional. The fields by which to order the valued resources response. Supported
* fields: * `exposed_score` * `resource_value` * `resource_type` * `resource` *
* `display_name` Values should be a comma separated list of fields. For example:
* `exposed_score,resource_value`. The default sorting order is descending. To specify
* ascending or descending order for a field, append a ` ASC` or a ` DESC` suffix,
* respectively; for example: `exposed_score DESC`.
*/
@com.google.api.client.util.Key
private java.lang.String orderBy;
/** Optional. The fields by which to order the valued resources response. Supported fields: *
`exposed_score` * `resource_value` * `resource_type` * `resource` * `display_name` Values should be
a comma separated list of fields. For example: `exposed_score,resource_value`. The default sorting
order is descending. To specify ascending or descending order for a field, append a ` ASC` or a `
DESC` suffix, respectively; for example: `exposed_score DESC`.
*/
public java.lang.String getOrderBy() {
return orderBy;
}
/**
* Optional. The fields by which to order the valued resources response. Supported
* fields: * `exposed_score` * `resource_value` * `resource_type` * `resource` *
* `display_name` Values should be a comma separated list of fields. For example:
* `exposed_score,resource_value`. The default sorting order is descending. To specify
* ascending or descending order for a field, append a ` ASC` or a ` DESC` suffix,
* respectively; for example: `exposed_score DESC`.
*/
public List setOrderBy(java.lang.String orderBy) {
this.orderBy = orderBy;
return this;
}
/**
* The maximum number of results to return in a single response. Default is 10, minimum
* is 1, maximum is 1000.
*/
@com.google.api.client.util.Key
private java.lang.Integer pageSize;
/** The maximum number of results to return in a single response. Default is 10, minimum is 1, maximum
is 1000.
*/
public java.lang.Integer getPageSize() {
return pageSize;
}
/**
* The maximum number of results to return in a single response. Default is 10, minimum
* is 1, maximum is 1000.
*/
public List setPageSize(java.lang.Integer pageSize) {
this.pageSize = pageSize;
return this;
}
/**
* The value returned by the last `ListValuedResourcesResponse`; indicates that this is
* a continuation of a prior `ListValuedResources` call, and that the system should
* return the next page of data.
*/
@com.google.api.client.util.Key
private java.lang.String pageToken;
/** The value returned by the last `ListValuedResourcesResponse`; indicates that this is a continuation
of a prior `ListValuedResources` call, and that the system should return the next page of data.
*/
public java.lang.String getPageToken() {
return pageToken;
}
/**
* The value returned by the last `ListValuedResourcesResponse`; indicates that this is
* a continuation of a prior `ListValuedResources` call, and that the system should
* return the next page of data.
*/
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 AttackPaths collection.
*
* The typical use is:
*
* {@code SecurityCommandCenter securitycenter = new SecurityCommandCenter(...);}
* {@code SecurityCommandCenter.AttackPaths.List request = securitycenter.attackPaths().list(parameters ...)}
*
*
* @return the resource collection
*/
public AttackPaths attackPaths() {
return new AttackPaths();
}
/**
* The "attackPaths" collection of methods.
*/
public class AttackPaths {
/**
* Lists the attack paths for a set of simulation results or valued resources and filter.
*
* Create a request for the method "attackPaths.list".
*
* This request holds the parameters needed by the securitycenter server. After setting any
* optional parameters, call the {@link List#execute()} method to invoke the remote operation.
*
* @param parent Required. Name of parent to list attack paths. Valid formats: `organizations/{organization}`,
* `organizations/{organization}/simulations/{simulation}` `organizations/{organization}/simu
* lations/{simulation}/attackExposureResults/{attack_exposure_result_v2}`
* `organizations/{organization}/simulations/{simulation}/valuedResources/{valued_resource}`
* @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 SecurityCommandCenterRequest {
private static final String REST_PATH = "v1/{+parent}/attackPaths";
private final java.util.regex.Pattern PARENT_PATTERN =
java.util.regex.Pattern.compile("^organizations/[^/]+/simulations/[^/]+$");
/**
* Lists the attack paths for a set of simulation results or valued resources and filter.
*
* Create a request for the method "attackPaths.list".
*
* This request holds the parameters needed by the the securitycenter 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. Name of parent to list attack paths. Valid formats: `organizations/{organization}`,
* `organizations/{organization}/simulations/{simulation}` `organizations/{organization}/simu
* lations/{simulation}/attackExposureResults/{attack_exposure_result_v2}`
* `organizations/{organization}/simulations/{simulation}/valuedResources/{valued_resource}`
* @since 1.13
*/
protected List(java.lang.String parent) {
super(SecurityCommandCenter.this, "GET", REST_PATH, null, com.google.api.services.securitycenter.v1.model.ListAttackPathsResponse.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/[^/]+/simulations/[^/]+$");
}
}
@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. Name of parent to list attack paths. Valid formats:
* `organizations/{organization}`, `organizations/{organization}/simulations/{simulation}`
* `organizations/{organization}/simulations/{simulation}/attackExposureResults/{attack_ex
* posure_result_v2}` `organizations/{organization}/simulations/{simulation}/valuedResourc
* es/{valued_resource}`
*/
@com.google.api.client.util.Key
private java.lang.String parent;
/** Required. Name of parent to list attack paths. Valid formats: `organizations/{organization}`,
`organizations/{organization}/simulations/{simulation}` `organizations/{organization}/simulations/{
simulation}/attackExposureResults/{attack_exposure_result_v2}`
`organizations/{organization}/simulations/{simulation}/valuedResources/{valued_resource}`
*/
public java.lang.String getParent() {
return parent;
}
/**
* Required. Name of parent to list attack paths. Valid formats:
* `organizations/{organization}`, `organizations/{organization}/simulations/{simulation}`
* `organizations/{organization}/simulations/{simulation}/attackExposureResults/{attack_ex
* posure_result_v2}` `organizations/{organization}/simulations/{simulation}/valuedResourc
* es/{valued_resource}`
*/
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/[^/]+/simulations/[^/]+$");
}
this.parent = parent;
return this;
}
/**
* The filter expression that filters the attack path in the response. Supported fields: *
* `valued_resources` supports =
*/
@com.google.api.client.util.Key
private java.lang.String filter;
/** The filter expression that filters the attack path in the response. Supported fields: *
`valued_resources` supports =
*/
public java.lang.String getFilter() {
return filter;
}
/**
* The filter expression that filters the attack path in the response. Supported fields: *
* `valued_resources` supports =
*/
public List setFilter(java.lang.String filter) {
this.filter = filter;
return this;
}
/**
* The maximum number of results to return in a single response. Default is 10, minimum is
* 1, maximum is 1000.
*/
@com.google.api.client.util.Key
private java.lang.Integer pageSize;
/** The maximum number of results to return in a single response. Default is 10, minimum is 1, maximum
is 1000.
*/
public java.lang.Integer getPageSize() {
return pageSize;
}
/**
* The maximum number of results to return in a single response. Default is 10, minimum is
* 1, maximum is 1000.
*/
public List setPageSize(java.lang.Integer pageSize) {
this.pageSize = pageSize;
return this;
}
/**
* The value returned by the last `ListAttackPathsResponse`; indicates that this is a
* continuation of a prior `ListAttackPaths` call, and that the system should return the
* next page of data.
*/
@com.google.api.client.util.Key
private java.lang.String pageToken;
/** The value returned by the last `ListAttackPathsResponse`; indicates that this is a continuation of
a prior `ListAttackPaths` call, and that the system should return the next page of data.
*/
public java.lang.String getPageToken() {
return pageToken;
}
/**
* The value returned by the last `ListAttackPathsResponse`; indicates that this is a
* continuation of a prior `ListAttackPaths` call, and that the system should return the
* next page of data.
*/
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 ValuedResources collection.
*
* The typical use is:
*
* {@code SecurityCommandCenter securitycenter = new SecurityCommandCenter(...);}
* {@code SecurityCommandCenter.ValuedResources.List request = securitycenter.valuedResources().list(parameters ...)}
*
*
* @return the resource collection
*/
public ValuedResources valuedResources() {
return new ValuedResources();
}
/**
* The "valuedResources" collection of methods.
*/
public class ValuedResources {
/**
* Get the valued resource by name
*
* Create a request for the method "valuedResources.get".
*
* This request holds the parameters needed by the securitycenter server. After setting any
* optional parameters, call the {@link Get#execute()} method to invoke the remote operation.
*
* @param name Required. The name of this valued resource Valid format:
* `organizations/{organization}/simulations/{simulation}/valuedResources/{valued_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 SecurityCommandCenterRequest {
private static final String REST_PATH = "v1/{+name}";
private final java.util.regex.Pattern NAME_PATTERN =
java.util.regex.Pattern.compile("^organizations/[^/]+/simulations/[^/]+/valuedResources/[^/]+$");
/**
* Get the valued resource by name
*
* Create a request for the method "valuedResources.get".
*
* This request holds the parameters needed by the the securitycenter server. After setting any
* optional parameters, call the {@link Get#execute()} method to invoke the remote operation.
* {@link Get#initialize(com.google.api.client.googleapis.services.AbstractGoogleClientRequest)}
* must be called to initialize this instance immediately after invoking the constructor.
*
* @param name Required. The name of this valued resource Valid format:
* `organizations/{organization}/simulations/{simulation}/valuedResources/{valued_resource}`
* @since 1.13
*/
protected Get(java.lang.String name) {
super(SecurityCommandCenter.this, "GET", REST_PATH, null, com.google.api.services.securitycenter.v1.model.ValuedResource.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/[^/]+/simulations/[^/]+/valuedResources/[^/]+$");
}
}
@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 this valued resource Valid format: `organizations/{organization}/
* simulations/{simulation}/valuedResources/{valued_resource}`
*/
@com.google.api.client.util.Key
private java.lang.String name;
/** Required. The name of this valued resource Valid format:
`organizations/{organization}/simulations/{simulation}/valuedResources/{valued_resource}`
*/
public java.lang.String getName() {
return name;
}
/**
* Required. The name of this valued resource Valid format: `organizations/{organization}/
* simulations/{simulation}/valuedResources/{valued_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 " +
"^organizations/[^/]+/simulations/[^/]+/valuedResources/[^/]+$");
}
this.name = name;
return this;
}
@Override
public Get set(String parameterName, Object value) {
return (Get) super.set(parameterName, value);
}
}
/**
* Lists the valued resources for a set of simulation results and filter.
*
* Create a request for the method "valuedResources.list".
*
* This request holds the parameters needed by the securitycenter server. After setting any
* optional parameters, call the {@link List#execute()} method to invoke the remote operation.
*
* @param parent Required. Name of parent to list valued resources. Valid formats: `organizations/{organization}`,
* `organizations/{organization}/simulations/{simulation}` `organizations/{organization}/simu
* lations/{simulation}/attackExposureResults/{attack_exposure_result_v2}`
* @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 SecurityCommandCenterRequest {
private static final String REST_PATH = "v1/{+parent}/valuedResources";
private final java.util.regex.Pattern PARENT_PATTERN =
java.util.regex.Pattern.compile("^organizations/[^/]+/simulations/[^/]+$");
/**
* Lists the valued resources for a set of simulation results and filter.
*
* Create a request for the method "valuedResources.list".
*
* This request holds the parameters needed by the the securitycenter 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. Name of parent to list valued resources. Valid formats: `organizations/{organization}`,
* `organizations/{organization}/simulations/{simulation}` `organizations/{organization}/simu
* lations/{simulation}/attackExposureResults/{attack_exposure_result_v2}`
* @since 1.13
*/
protected List(java.lang.String parent) {
super(SecurityCommandCenter.this, "GET", REST_PATH, null, com.google.api.services.securitycenter.v1.model.ListValuedResourcesResponse.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/[^/]+/simulations/[^/]+$");
}
}
@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. Name of parent to list valued resources. Valid formats:
* `organizations/{organization}`, `organizations/{organization}/simulations/{simulation}`
* `organizations/{organization}/simulations/{simulation}/attackExposureResults/{attack_ex
* posure_result_v2}`
*/
@com.google.api.client.util.Key
private java.lang.String parent;
/** Required. Name of parent to list valued resources. Valid formats: `organizations/{organization}`,
`organizations/{organization}/simulations/{simulation}` `organizations/{organization}/simulations/{
simulation}/attackExposureResults/{attack_exposure_result_v2}`
*/
public java.lang.String getParent() {
return parent;
}
/**
* Required. Name of parent to list valued resources. Valid formats:
* `organizations/{organization}`, `organizations/{organization}/simulations/{simulation}`
* `organizations/{organization}/simulations/{simulation}/attackExposureResults/{attack_ex
* posure_result_v2}`
*/
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/[^/]+/simulations/[^/]+$");
}
this.parent = parent;
return this;
}
/**
* The filter expression that filters the valued resources in the response. Supported
* fields: * `resource_value` supports = * `resource_type` supports =
*/
@com.google.api.client.util.Key
private java.lang.String filter;
/** The filter expression that filters the valued resources in the response. Supported fields: *
`resource_value` supports = * `resource_type` supports =
*/
public java.lang.String getFilter() {
return filter;
}
/**
* The filter expression that filters the valued resources in the response. Supported
* fields: * `resource_value` supports = * `resource_type` supports =
*/
public List setFilter(java.lang.String filter) {
this.filter = filter;
return this;
}
/**
* Optional. The fields by which to order the valued resources response. Supported fields:
* * `exposed_score` * `resource_value` * `resource_type` * `resource` * `display_name`
* Values should be a comma separated list of fields. For example:
* `exposed_score,resource_value`. The default sorting order is descending. To specify
* ascending or descending order for a field, append a ` ASC` or a ` DESC` suffix,
* respectively; for example: `exposed_score DESC`.
*/
@com.google.api.client.util.Key
private java.lang.String orderBy;
/** Optional. The fields by which to order the valued resources response. Supported fields: *
`exposed_score` * `resource_value` * `resource_type` * `resource` * `display_name` Values should be
a comma separated list of fields. For example: `exposed_score,resource_value`. The default sorting
order is descending. To specify ascending or descending order for a field, append a ` ASC` or a `
DESC` suffix, respectively; for example: `exposed_score DESC`.
*/
public java.lang.String getOrderBy() {
return orderBy;
}
/**
* Optional. The fields by which to order the valued resources response. Supported fields:
* * `exposed_score` * `resource_value` * `resource_type` * `resource` * `display_name`
* Values should be a comma separated list of fields. For example:
* `exposed_score,resource_value`. The default sorting order is descending. To specify
* ascending or descending order for a field, append a ` ASC` or a ` DESC` suffix,
* respectively; for example: `exposed_score DESC`.
*/
public List setOrderBy(java.lang.String orderBy) {
this.orderBy = orderBy;
return this;
}
/**
* The maximum number of results to return in a single response. Default is 10, minimum is
* 1, maximum is 1000.
*/
@com.google.api.client.util.Key
private java.lang.Integer pageSize;
/** The maximum number of results to return in a single response. Default is 10, minimum is 1, maximum
is 1000.
*/
public java.lang.Integer getPageSize() {
return pageSize;
}
/**
* The maximum number of results to return in a single response. Default is 10, minimum is
* 1, maximum is 1000.
*/
public List setPageSize(java.lang.Integer pageSize) {
this.pageSize = pageSize;
return this;
}
/**
* The value returned by the last `ListValuedResourcesResponse`; indicates that this is a
* continuation of a prior `ListValuedResources` call, and that the system should return
* the next page of data.
*/
@com.google.api.client.util.Key
private java.lang.String pageToken;
/** The value returned by the last `ListValuedResourcesResponse`; indicates that this is a continuation
of a prior `ListValuedResources` call, and that the system should return the next page of data.
*/
public java.lang.String getPageToken() {
return pageToken;
}
/**
* The value returned by the last `ListValuedResourcesResponse`; indicates that this is a
* continuation of a prior `ListValuedResources` call, and that the system should return
* the next page of data.
*/
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 AttackPaths collection.
*
* The typical use is:
*
* {@code SecurityCommandCenter securitycenter = new SecurityCommandCenter(...);}
* {@code SecurityCommandCenter.AttackPaths.List request = securitycenter.attackPaths().list(parameters ...)}
*
*
* @return the resource collection
*/
public AttackPaths attackPaths() {
return new AttackPaths();
}
/**
* The "attackPaths" collection of methods.
*/
public class AttackPaths {
/**
* Lists the attack paths for a set of simulation results or valued resources and filter.
*
* Create a request for the method "attackPaths.list".
*
* This request holds the parameters needed by the securitycenter server. After setting any
* optional parameters, call the {@link List#execute()} method to invoke the remote operation.
*
* @param parent Required. Name of parent to list attack paths. Valid formats: `organizations/{organization}`,
* `organizations/{organization}/simulations/{simulation}` `organizations/{organization}/simu
* lations/{simulation}/attackExposureResults/{attack_exposure_result_v2}`
* `organizations/{organization}/simulations/{simulation}/valuedResources/{valued_resource}`
* @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 SecurityCommandCenterRequest {
private static final String REST_PATH = "v1/{+parent}/attackPaths";
private final java.util.regex.Pattern PARENT_PATTERN =
java.util.regex.Pattern.compile("^organizations/[^/]+/simulations/[^/]+/valuedResources/[^/]+$");
/**
* Lists the attack paths for a set of simulation results or valued resources and filter.
*
* Create a request for the method "attackPaths.list".
*
* This request holds the parameters needed by the the securitycenter 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. Name of parent to list attack paths. Valid formats: `organizations/{organization}`,
* `organizations/{organization}/simulations/{simulation}` `organizations/{organization}/simu
* lations/{simulation}/attackExposureResults/{attack_exposure_result_v2}`
* `organizations/{organization}/simulations/{simulation}/valuedResources/{valued_resource}`
* @since 1.13
*/
protected List(java.lang.String parent) {
super(SecurityCommandCenter.this, "GET", REST_PATH, null, com.google.api.services.securitycenter.v1.model.ListAttackPathsResponse.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/[^/]+/simulations/[^/]+/valuedResources/[^/]+$");
}
}
@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. Name of parent to list attack paths. Valid formats:
* `organizations/{organization}`,
* `organizations/{organization}/simulations/{simulation}` `organizations/{organization}
* /simulations/{simulation}/attackExposureResults/{attack_exposure_result_v2}` `organiz
* ations/{organization}/simulations/{simulation}/valuedResources/{valued_resource}`
*/
@com.google.api.client.util.Key
private java.lang.String parent;
/** Required. Name of parent to list attack paths. Valid formats: `organizations/{organization}`,
`organizations/{organization}/simulations/{simulation}` `organizations/{organization}/simulations/{
simulation}/attackExposureResults/{attack_exposure_result_v2}`
`organizations/{organization}/simulations/{simulation}/valuedResources/{valued_resource}`
*/
public java.lang.String getParent() {
return parent;
}
/**
* Required. Name of parent to list attack paths. Valid formats:
* `organizations/{organization}`,
* `organizations/{organization}/simulations/{simulation}` `organizations/{organization}
* /simulations/{simulation}/attackExposureResults/{attack_exposure_result_v2}` `organiz
* ations/{organization}/simulations/{simulation}/valuedResources/{valued_resource}`
*/
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/[^/]+/simulations/[^/]+/valuedResources/[^/]+$");
}
this.parent = parent;
return this;
}
/**
* The filter expression that filters the attack path in the response. Supported fields:
* * `valued_resources` supports =
*/
@com.google.api.client.util.Key
private java.lang.String filter;
/** The filter expression that filters the attack path in the response. Supported fields: *
`valued_resources` supports =
*/
public java.lang.String getFilter() {
return filter;
}
/**
* The filter expression that filters the attack path in the response. Supported fields:
* * `valued_resources` supports =
*/
public List setFilter(java.lang.String filter) {
this.filter = filter;
return this;
}
/**
* The maximum number of results to return in a single response. Default is 10, minimum
* is 1, maximum is 1000.
*/
@com.google.api.client.util.Key
private java.lang.Integer pageSize;
/** The maximum number of results to return in a single response. Default is 10, minimum is 1, maximum
is 1000.
*/
public java.lang.Integer getPageSize() {
return pageSize;
}
/**
* The maximum number of results to return in a single response. Default is 10, minimum
* is 1, maximum is 1000.
*/
public List setPageSize(java.lang.Integer pageSize) {
this.pageSize = pageSize;
return this;
}
/**
* The value returned by the last `ListAttackPathsResponse`; indicates that this is a
* continuation of a prior `ListAttackPaths` call, and that the system should return the
* next page of data.
*/
@com.google.api.client.util.Key
private java.lang.String pageToken;
/** The value returned by the last `ListAttackPathsResponse`; indicates that this is a continuation of
a prior `ListAttackPaths` call, and that the system should return the next page of data.
*/
public java.lang.String getPageToken() {
return pageToken;
}
/**
* The value returned by the last `ListAttackPathsResponse`; indicates that this is a
* continuation of a prior `ListAttackPaths` call, and that the system should return the
* next page of data.
*/
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 Sources collection.
*
* The typical use is:
*
* {@code SecurityCommandCenter securitycenter = new SecurityCommandCenter(...);}
* {@code SecurityCommandCenter.Sources.List request = securitycenter.sources().list(parameters ...)}
*
*
* @return the resource collection
*/
public Sources sources() {
return new Sources();
}
/**
* The "sources" collection of methods.
*/
public class Sources {
/**
* Creates a source.
*
* Create a request for the method "sources.create".
*
* This request holds the parameters needed by the securitycenter server. After setting any
* optional parameters, call the {@link Create#execute()} method to invoke the remote operation.
*
* @param parent Required. Resource name of the new source's parent. Its format should be
* `organizations/[organization_id]`.
* @param content the {@link com.google.api.services.securitycenter.v1.model.Source}
* @return the request
*/
public Create create(java.lang.String parent, com.google.api.services.securitycenter.v1.model.Source content) throws java.io.IOException {
Create result = new Create(parent, content);
initialize(result);
return result;
}
public class Create extends SecurityCommandCenterRequest {
private static final String REST_PATH = "v1/{+parent}/sources";
private final java.util.regex.Pattern PARENT_PATTERN =
java.util.regex.Pattern.compile("^organizations/[^/]+$");
/**
* Creates a source.
*
* Create a request for the method "sources.create".
*
* This request holds the parameters needed by the the securitycenter server. After setting any
* optional parameters, call the {@link Create#execute()} method to invoke the remote operation.
* {@link
* Create#initialize(com.google.api.client.googleapis.services.AbstractGoogleClientRequest)} must
* be called to initialize this instance immediately after invoking the constructor.
*
* @param parent Required. Resource name of the new source's parent. Its format should be
* `organizations/[organization_id]`.
* @param content the {@link com.google.api.services.securitycenter.v1.model.Source}
* @since 1.13
*/
protected Create(java.lang.String parent, com.google.api.services.securitycenter.v1.model.Source content) {
super(SecurityCommandCenter.this, "POST", REST_PATH, content, com.google.api.services.securitycenter.v1.model.Source.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/[^/]+$");
}
}
@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. Resource name of the new source's parent. Its format should be
* `organizations/[organization_id]`.
*/
@com.google.api.client.util.Key
private java.lang.String parent;
/** Required. Resource name of the new source's parent. Its format should be
`organizations/[organization_id]`.
*/
public java.lang.String getParent() {
return parent;
}
/**
* Required. Resource name of the new source's parent. Its format should be
* `organizations/[organization_id]`.
*/
public Create setParent(java.lang.String parent) {
if (!getSuppressPatternChecks()) {
com.google.api.client.util.Preconditions.checkArgument(PARENT_PATTERN.matcher(parent).matches(),
"Parameter parent must conform to the pattern " +
"^organizations/[^/]+$");
}
this.parent = parent;
return this;
}
@Override
public Create set(String parameterName, Object value) {
return (Create) super.set(parameterName, value);
}
}
/**
* Gets a source.
*
* Create a request for the method "sources.get".
*
* This request holds the parameters needed by the securitycenter server. After setting any
* optional parameters, call the {@link Get#execute()} method to invoke the remote operation.
*
* @param name Required. Relative resource name of the source. Its format is
* `organizations/[organization_id]/source/[source_id]`.
* @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 SecurityCommandCenterRequest {
private static final String REST_PATH = "v1/{+name}";
private final java.util.regex.Pattern NAME_PATTERN =
java.util.regex.Pattern.compile("^organizations/[^/]+/sources/[^/]+$");
/**
* Gets a source.
*
* Create a request for the method "sources.get".
*
* This request holds the parameters needed by the the securitycenter 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. Relative resource name of the source. Its format is
* `organizations/[organization_id]/source/[source_id]`.
* @since 1.13
*/
protected Get(java.lang.String name) {
super(SecurityCommandCenter.this, "GET", REST_PATH, null, com.google.api.services.securitycenter.v1.model.Source.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/[^/]+/sources/[^/]+$");
}
}
@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. Relative resource name of the source. Its format is
* `organizations/[organization_id]/source/[source_id]`.
*/
@com.google.api.client.util.Key
private java.lang.String name;
/** Required. Relative resource name of the source. Its format is
`organizations/[organization_id]/source/[source_id]`.
*/
public java.lang.String getName() {
return name;
}
/**
* Required. Relative resource name of the source. Its format is
* `organizations/[organization_id]/source/[source_id]`.
*/
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/[^/]+/sources/[^/]+$");
}
this.name = name;
return this;
}
@Override
public Get set(String parameterName, Object value) {
return (Get) super.set(parameterName, value);
}
}
/**
* Gets the access control policy on the specified Source.
*
* Create a request for the method "sources.getIamPolicy".
*
* This request holds the parameters needed by the securitycenter 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.securitycenter.v1.model.GetIamPolicyRequest}
* @return the request
*/
public GetIamPolicy getIamPolicy(java.lang.String resource, com.google.api.services.securitycenter.v1.model.GetIamPolicyRequest content) throws java.io.IOException {
GetIamPolicy result = new GetIamPolicy(resource, content);
initialize(result);
return result;
}
public class GetIamPolicy extends SecurityCommandCenterRequest {
private static final String REST_PATH = "v1/{+resource}:getIamPolicy";
private final java.util.regex.Pattern RESOURCE_PATTERN =
java.util.regex.Pattern.compile("^organizations/[^/]+/sources/[^/]+$");
/**
* Gets the access control policy on the specified Source.
*
* Create a request for the method "sources.getIamPolicy".
*
* This request holds the parameters needed by the the securitycenter 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.securitycenter.v1.model.GetIamPolicyRequest}
* @since 1.13
*/
protected GetIamPolicy(java.lang.String resource, com.google.api.services.securitycenter.v1.model.GetIamPolicyRequest content) {
super(SecurityCommandCenter.this, "POST", REST_PATH, content, com.google.api.services.securitycenter.v1.model.Policy.class);
this.resource = com.google.api.client.util.Preconditions.checkNotNull(resource, "Required parameter resource must be specified.");
if (!getSuppressPatternChecks()) {
com.google.api.client.util.Preconditions.checkArgument(RESOURCE_PATTERN.matcher(resource).matches(),
"Parameter resource must conform to the pattern " +
"^organizations/[^/]+/sources/[^/]+$");
}
}
@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 " +
"^organizations/[^/]+/sources/[^/]+$");
}
this.resource = resource;
return this;
}
@Override
public GetIamPolicy set(String parameterName, Object value) {
return (GetIamPolicy) super.set(parameterName, value);
}
}
/**
* Lists all sources belonging to an organization.
*
* Create a request for the method "sources.list".
*
* This request holds the parameters needed by the securitycenter server. After setting any
* optional parameters, call the {@link List#execute()} method to invoke the remote operation.
*
* @param parent Required. Resource name of the parent of sources to list. Its format should be
* `organizations/[organization_id]`, `folders/[folder_id]`, or `projects/[project_id]`.
* @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 SecurityCommandCenterRequest {
private static final String REST_PATH = "v1/{+parent}/sources";
private final java.util.regex.Pattern PARENT_PATTERN =
java.util.regex.Pattern.compile("^organizations/[^/]+$");
/**
* Lists all sources belonging to an organization.
*
* Create a request for the method "sources.list".
*
* This request holds the parameters needed by the the securitycenter 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. Resource name of the parent of sources to list. Its format should be
* `organizations/[organization_id]`, `folders/[folder_id]`, or `projects/[project_id]`.
* @since 1.13
*/
protected List(java.lang.String parent) {
super(SecurityCommandCenter.this, "GET", REST_PATH, null, com.google.api.services.securitycenter.v1.model.ListSourcesResponse.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/[^/]+$");
}
}
@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. Resource name of the parent of sources to list. Its format should be
* `organizations/[organization_id]`, `folders/[folder_id]`, or `projects/[project_id]`.
*/
@com.google.api.client.util.Key
private java.lang.String parent;
/** Required. Resource name of the parent of sources to list. Its format should be
`organizations/[organization_id]`, `folders/[folder_id]`, or `projects/[project_id]`.
*/
public java.lang.String getParent() {
return parent;
}
/**
* Required. Resource name of the parent of sources to list. Its format should be
* `organizations/[organization_id]`, `folders/[folder_id]`, or `projects/[project_id]`.
*/
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/[^/]+$");
}
this.parent = parent;
return this;
}
/**
* The maximum number of results to return in a single response. Default is 10, minimum is
* 1, maximum is 1000.
*/
@com.google.api.client.util.Key
private java.lang.Integer pageSize;
/** The maximum number of results to return in a single response. Default is 10, minimum is 1, maximum
is 1000.
*/
public java.lang.Integer getPageSize() {
return pageSize;
}
/**
* The maximum number of results to return in a single response. Default is 10, minimum is
* 1, maximum is 1000.
*/
public List setPageSize(java.lang.Integer pageSize) {
this.pageSize = pageSize;
return this;
}
/**
* The value returned by the last `ListSourcesResponse`; indicates that this is a
* continuation of a prior `ListSources` call, and that the system should return the next
* page of data.
*/
@com.google.api.client.util.Key
private java.lang.String pageToken;
/** The value returned by the last `ListSourcesResponse`; indicates that this is a continuation of a
prior `ListSources` call, and that the system should return the next page of data.
*/
public java.lang.String getPageToken() {
return pageToken;
}
/**
* The value returned by the last `ListSourcesResponse`; indicates that this is a
* continuation of a prior `ListSources` call, and that the system should return the next
* page of data.
*/
public List setPageToken(java.lang.String pageToken) {
this.pageToken = pageToken;
return this;
}
@Override
public List set(String parameterName, Object value) {
return (List) super.set(parameterName, value);
}
}
/**
* Updates a source.
*
* Create a request for the method "sources.patch".
*
* This request holds the parameters needed by the securitycenter server. After setting any
* optional parameters, call the {@link Patch#execute()} method to invoke the remote operation.
*
* @param name The relative resource name of this source. See:
* https://cloud.google.com/apis/design/resource_names#relative_resource_name Example:
* "organizations/{organization_id}/sources/{source_id}"
* @param content the {@link com.google.api.services.securitycenter.v1.model.Source}
* @return the request
*/
public Patch patch(java.lang.String name, com.google.api.services.securitycenter.v1.model.Source content) throws java.io.IOException {
Patch result = new Patch(name, content);
initialize(result);
return result;
}
public class Patch extends SecurityCommandCenterRequest {
private static final String REST_PATH = "v1/{+name}";
private final java.util.regex.Pattern NAME_PATTERN =
java.util.regex.Pattern.compile("^organizations/[^/]+/sources/[^/]+$");
/**
* Updates a source.
*
* Create a request for the method "sources.patch".
*
* This request holds the parameters needed by the the securitycenter server. After setting any
* optional parameters, call the {@link Patch#execute()} method to invoke the remote operation.
* {@link
* Patch#initialize(com.google.api.client.googleapis.services.AbstractGoogleClientRequest)} must
* be called to initialize this instance immediately after invoking the constructor.
*
* @param name The relative resource name of this source. See:
* https://cloud.google.com/apis/design/resource_names#relative_resource_name Example:
* "organizations/{organization_id}/sources/{source_id}"
* @param content the {@link com.google.api.services.securitycenter.v1.model.Source}
* @since 1.13
*/
protected Patch(java.lang.String name, com.google.api.services.securitycenter.v1.model.Source content) {
super(SecurityCommandCenter.this, "PATCH", REST_PATH, content, com.google.api.services.securitycenter.v1.model.Source.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/[^/]+/sources/[^/]+$");
}
}
@Override
public Patch set$Xgafv(java.lang.String $Xgafv) {
return (Patch) super.set$Xgafv($Xgafv);
}
@Override
public Patch setAccessToken(java.lang.String accessToken) {
return (Patch) super.setAccessToken(accessToken);
}
@Override
public Patch setAlt(java.lang.String alt) {
return (Patch) super.setAlt(alt);
}
@Override
public Patch setCallback(java.lang.String callback) {
return (Patch) super.setCallback(callback);
}
@Override
public Patch setFields(java.lang.String fields) {
return (Patch) super.setFields(fields);
}
@Override
public Patch setKey(java.lang.String key) {
return (Patch) super.setKey(key);
}
@Override
public Patch setOauthToken(java.lang.String oauthToken) {
return (Patch) super.setOauthToken(oauthToken);
}
@Override
public Patch setPrettyPrint(java.lang.Boolean prettyPrint) {
return (Patch) super.setPrettyPrint(prettyPrint);
}
@Override
public Patch setQuotaUser(java.lang.String quotaUser) {
return (Patch) super.setQuotaUser(quotaUser);
}
@Override
public Patch setUploadType(java.lang.String uploadType) {
return (Patch) super.setUploadType(uploadType);
}
@Override
public Patch setUploadProtocol(java.lang.String uploadProtocol) {
return (Patch) super.setUploadProtocol(uploadProtocol);
}
/**
* The relative resource name of this source. See:
* https://cloud.google.com/apis/design/resource_names#relative_resource_name Example:
* "organizations/{organization_id}/sources/{source_id}"
*/
@com.google.api.client.util.Key
private java.lang.String name;
/** The relative resource name of this source. See:
https://cloud.google.com/apis/design/resource_names#relative_resource_name Example:
"organizations/{organization_id}/sources/{source_id}"
*/
public java.lang.String getName() {
return name;
}
/**
* The relative resource name of this source. See:
* https://cloud.google.com/apis/design/resource_names#relative_resource_name Example:
* "organizations/{organization_id}/sources/{source_id}"
*/
public Patch setName(java.lang.String name) {
if (!getSuppressPatternChecks()) {
com.google.api.client.util.Preconditions.checkArgument(NAME_PATTERN.matcher(name).matches(),
"Parameter name must conform to the pattern " +
"^organizations/[^/]+/sources/[^/]+$");
}
this.name = name;
return this;
}
/**
* The FieldMask to use when updating the source resource. If empty all mutable fields will
* be updated.
*/
@com.google.api.client.util.Key
private String updateMask;
/** The FieldMask to use when updating the source resource. If empty all mutable fields will be
updated.
*/
public String getUpdateMask() {
return updateMask;
}
/**
* The FieldMask to use when updating the source resource. If empty all mutable fields will
* be updated.
*/
public Patch setUpdateMask(String updateMask) {
this.updateMask = updateMask;
return this;
}
@Override
public Patch set(String parameterName, Object value) {
return (Patch) super.set(parameterName, value);
}
}
/**
* Sets the access control policy on the specified Source.
*
* Create a request for the method "sources.setIamPolicy".
*
* This request holds the parameters needed by the securitycenter 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.securitycenter.v1.model.SetIamPolicyRequest}
* @return the request
*/
public SetIamPolicy setIamPolicy(java.lang.String resource, com.google.api.services.securitycenter.v1.model.SetIamPolicyRequest content) throws java.io.IOException {
SetIamPolicy result = new SetIamPolicy(resource, content);
initialize(result);
return result;
}
public class SetIamPolicy extends SecurityCommandCenterRequest {
private static final String REST_PATH = "v1/{+resource}:setIamPolicy";
private final java.util.regex.Pattern RESOURCE_PATTERN =
java.util.regex.Pattern.compile("^organizations/[^/]+/sources/[^/]+$");
/**
* Sets the access control policy on the specified Source.
*
* Create a request for the method "sources.setIamPolicy".
*
* This request holds the parameters needed by the the securitycenter 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.securitycenter.v1.model.SetIamPolicyRequest}
* @since 1.13
*/
protected SetIamPolicy(java.lang.String resource, com.google.api.services.securitycenter.v1.model.SetIamPolicyRequest content) {
super(SecurityCommandCenter.this, "POST", REST_PATH, content, com.google.api.services.securitycenter.v1.model.Policy.class);
this.resource = com.google.api.client.util.Preconditions.checkNotNull(resource, "Required parameter resource must be specified.");
if (!getSuppressPatternChecks()) {
com.google.api.client.util.Preconditions.checkArgument(RESOURCE_PATTERN.matcher(resource).matches(),
"Parameter resource must conform to the pattern " +
"^organizations/[^/]+/sources/[^/]+$");
}
}
@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 " +
"^organizations/[^/]+/sources/[^/]+$");
}
this.resource = resource;
return this;
}
@Override
public SetIamPolicy set(String parameterName, Object value) {
return (SetIamPolicy) super.set(parameterName, value);
}
}
/**
* Returns the permissions that a caller has on the specified source.
*
* Create a request for the method "sources.testIamPermissions".
*
* This request holds the parameters needed by the securitycenter 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.securitycenter.v1.model.TestIamPermissionsRequest}
* @return the request
*/
public TestIamPermissions testIamPermissions(java.lang.String resource, com.google.api.services.securitycenter.v1.model.TestIamPermissionsRequest content) throws java.io.IOException {
TestIamPermissions result = new TestIamPermissions(resource, content);
initialize(result);
return result;
}
public class TestIamPermissions extends SecurityCommandCenterRequest {
private static final String REST_PATH = "v1/{+resource}:testIamPermissions";
private final java.util.regex.Pattern RESOURCE_PATTERN =
java.util.regex.Pattern.compile("^organizations/[^/]+/sources/[^/]+$");
/**
* Returns the permissions that a caller has on the specified source.
*
* Create a request for the method "sources.testIamPermissions".
*
* This request holds the parameters needed by the the securitycenter server. After setting any
* optional parameters, call the {@link TestIamPermissions#execute()} method to invoke the remote
* operation. {@link TestIamPermissions#initialize(com.google.api.client.googleapis.services.A
* bstractGoogleClientRequest)} must be called to initialize this instance immediately after
* invoking the constructor.
*
* @param resource REQUIRED: The resource for which the policy detail is being requested. See [Resource
* names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for
* this field.
* @param content the {@link com.google.api.services.securitycenter.v1.model.TestIamPermissionsRequest}
* @since 1.13
*/
protected TestIamPermissions(java.lang.String resource, com.google.api.services.securitycenter.v1.model.TestIamPermissionsRequest content) {
super(SecurityCommandCenter.this, "POST", REST_PATH, content, com.google.api.services.securitycenter.v1.model.TestIamPermissionsResponse.class);
this.resource = com.google.api.client.util.Preconditions.checkNotNull(resource, "Required parameter resource must be specified.");
if (!getSuppressPatternChecks()) {
com.google.api.client.util.Preconditions.checkArgument(RESOURCE_PATTERN.matcher(resource).matches(),
"Parameter resource must conform to the pattern " +
"^organizations/[^/]+/sources/[^/]+$");
}
}
@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 " +
"^organizations/[^/]+/sources/[^/]+$");
}
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 Findings collection.
*
* The typical use is:
*
* {@code SecurityCommandCenter securitycenter = new SecurityCommandCenter(...);}
* {@code SecurityCommandCenter.Findings.List request = securitycenter.findings().list(parameters ...)}
*
*
* @return the resource collection
*/
public Findings findings() {
return new Findings();
}
/**
* The "findings" collection of methods.
*/
public class Findings {
/**
* Creates a finding. The corresponding source must exist for finding creation to succeed.
*
* Create a request for the method "findings.create".
*
* This request holds the parameters needed by the securitycenter server. After setting any
* optional parameters, call the {@link Create#execute()} method to invoke the remote operation.
*
* @param parent Required. Resource name of the new finding's parent. Its format should be
* `organizations/[organization_id]/sources/[source_id]`.
* @param content the {@link com.google.api.services.securitycenter.v1.model.Finding}
* @return the request
*/
public Create create(java.lang.String parent, com.google.api.services.securitycenter.v1.model.Finding content) throws java.io.IOException {
Create result = new Create(parent, content);
initialize(result);
return result;
}
public class Create extends SecurityCommandCenterRequest {
private static final String REST_PATH = "v1/{+parent}/findings";
private final java.util.regex.Pattern PARENT_PATTERN =
java.util.regex.Pattern.compile("^organizations/[^/]+/sources/[^/]+$");
/**
* Creates a finding. The corresponding source must exist for finding creation to succeed.
*
* Create a request for the method "findings.create".
*
* This request holds the parameters needed by the the securitycenter server. After setting any
* optional parameters, call the {@link Create#execute()} method to invoke the remote operation.
* {@link
* Create#initialize(com.google.api.client.googleapis.services.AbstractGoogleClientRequest)} must
* be called to initialize this instance immediately after invoking the constructor.
*
* @param parent Required. Resource name of the new finding's parent. Its format should be
* `organizations/[organization_id]/sources/[source_id]`.
* @param content the {@link com.google.api.services.securitycenter.v1.model.Finding}
* @since 1.13
*/
protected Create(java.lang.String parent, com.google.api.services.securitycenter.v1.model.Finding content) {
super(SecurityCommandCenter.this, "POST", REST_PATH, content, com.google.api.services.securitycenter.v1.model.Finding.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/[^/]+/sources/[^/]+$");
}
}
@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. Resource name of the new finding's parent. Its format should be
* `organizations/[organization_id]/sources/[source_id]`.
*/
@com.google.api.client.util.Key
private java.lang.String parent;
/** Required. Resource name of the new finding's parent. Its format should be
`organizations/[organization_id]/sources/[source_id]`.
*/
public java.lang.String getParent() {
return parent;
}
/**
* Required. Resource name of the new finding's parent. Its format should be
* `organizations/[organization_id]/sources/[source_id]`.
*/
public Create setParent(java.lang.String parent) {
if (!getSuppressPatternChecks()) {
com.google.api.client.util.Preconditions.checkArgument(PARENT_PATTERN.matcher(parent).matches(),
"Parameter parent must conform to the pattern " +
"^organizations/[^/]+/sources/[^/]+$");
}
this.parent = parent;
return this;
}
/**
* Required. Unique identifier provided by the client within the parent scope. It must be
* alphanumeric and less than or equal to 32 characters and greater than 0 characters in
* length.
*/
@com.google.api.client.util.Key
private java.lang.String findingId;
/** Required. Unique identifier provided by the client within the parent scope. It must be alphanumeric
and less than or equal to 32 characters and greater than 0 characters in length.
*/
public java.lang.String getFindingId() {
return findingId;
}
/**
* Required. Unique identifier provided by the client within the parent scope. It must be
* alphanumeric and less than or equal to 32 characters and greater than 0 characters in
* length.
*/
public Create setFindingId(java.lang.String findingId) {
this.findingId = findingId;
return this;
}
@Override
public Create set(String parameterName, Object value) {
return (Create) super.set(parameterName, value);
}
}
/**
* Filters an organization or source's findings and groups them by their specified properties. To
* group across all sources provide a `-` as the source id. Example:
* /v1/organizations/{organization_id}/sources/-/findings,
* /v1/folders/{folder_id}/sources/-/findings, /v1/projects/{project_id}/sources/-/findings
*
* Create a request for the method "findings.group".
*
* This request holds the parameters needed by the securitycenter server. After setting any
* optional parameters, call the {@link Group#execute()} method to invoke the remote operation.
*
* @param parent Required. Name of the source to groupBy. Its format is
* `organizations/[organization_id]/sources/[source_id]`,
* `folders/[folder_id]/sources/[source_id]`, or `projects/[project_id]/sources/[source_id]`.
* To groupBy across all sources provide a source_id of `-`. For example:
* `organizations/{organization_id}/sources/-, folders/{folder_id}/sources/-`, or
* `projects/{project_id}/sources/-`
* @param content the {@link com.google.api.services.securitycenter.v1.model.GroupFindingsRequest}
* @return the request
*/
public Group group(java.lang.String parent, com.google.api.services.securitycenter.v1.model.GroupFindingsRequest content) throws java.io.IOException {
Group result = new Group(parent, content);
initialize(result);
return result;
}
public class Group extends SecurityCommandCenterRequest {
private static final String REST_PATH = "v1/{+parent}/findings:group";
private final java.util.regex.Pattern PARENT_PATTERN =
java.util.regex.Pattern.compile("^organizations/[^/]+/sources/[^/]+$");
/**
* Filters an organization or source's findings and groups them by their specified properties. To
* group across all sources provide a `-` as the source id. Example:
* /v1/organizations/{organization_id}/sources/-/findings,
* /v1/folders/{folder_id}/sources/-/findings, /v1/projects/{project_id}/sources/-/findings
*
* Create a request for the method "findings.group".
*
* This request holds the parameters needed by the the securitycenter server. After setting any
* optional parameters, call the {@link Group#execute()} method to invoke the remote operation.
* {@link
* Group#initialize(com.google.api.client.googleapis.services.AbstractGoogleClientRequest)} must
* be called to initialize this instance immediately after invoking the constructor.
*
* @param parent Required. Name of the source to groupBy. Its format is
* `organizations/[organization_id]/sources/[source_id]`,
* `folders/[folder_id]/sources/[source_id]`, or `projects/[project_id]/sources/[source_id]`.
* To groupBy across all sources provide a source_id of `-`. For example:
* `organizations/{organization_id}/sources/-, folders/{folder_id}/sources/-`, or
* `projects/{project_id}/sources/-`
* @param content the {@link com.google.api.services.securitycenter.v1.model.GroupFindingsRequest}
* @since 1.13
*/
protected Group(java.lang.String parent, com.google.api.services.securitycenter.v1.model.GroupFindingsRequest content) {
super(SecurityCommandCenter.this, "POST", REST_PATH, content, com.google.api.services.securitycenter.v1.model.GroupFindingsResponse.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/[^/]+/sources/[^/]+$");
}
}
@Override
public Group set$Xgafv(java.lang.String $Xgafv) {
return (Group) super.set$Xgafv($Xgafv);
}
@Override
public Group setAccessToken(java.lang.String accessToken) {
return (Group) super.setAccessToken(accessToken);
}
@Override
public Group setAlt(java.lang.String alt) {
return (Group) super.setAlt(alt);
}
@Override
public Group setCallback(java.lang.String callback) {
return (Group) super.setCallback(callback);
}
@Override
public Group setFields(java.lang.String fields) {
return (Group) super.setFields(fields);
}
@Override
public Group setKey(java.lang.String key) {
return (Group) super.setKey(key);
}
@Override
public Group setOauthToken(java.lang.String oauthToken) {
return (Group) super.setOauthToken(oauthToken);
}
@Override
public Group setPrettyPrint(java.lang.Boolean prettyPrint) {
return (Group) super.setPrettyPrint(prettyPrint);
}
@Override
public Group setQuotaUser(java.lang.String quotaUser) {
return (Group) super.setQuotaUser(quotaUser);
}
@Override
public Group setUploadType(java.lang.String uploadType) {
return (Group) super.setUploadType(uploadType);
}
@Override
public Group setUploadProtocol(java.lang.String uploadProtocol) {
return (Group) super.setUploadProtocol(uploadProtocol);
}
/**
* Required. Name of the source to groupBy. Its format is
* `organizations/[organization_id]/sources/[source_id]`,
* `folders/[folder_id]/sources/[source_id]`, or
* `projects/[project_id]/sources/[source_id]`. To groupBy across all sources provide a
* source_id of `-`. For example: `organizations/{organization_id}/sources/-,
* folders/{folder_id}/sources/-`, or `projects/{project_id}/sources/-`
*/
@com.google.api.client.util.Key
private java.lang.String parent;
/** Required. Name of the source to groupBy. Its format is
`organizations/[organization_id]/sources/[source_id]`, `folders/[folder_id]/sources/[source_id]`,
or `projects/[project_id]/sources/[source_id]`. To groupBy across all sources provide a source_id
of `-`. For example: `organizations/{organization_id}/sources/-, folders/{folder_id}/sources/-`, or
`projects/{project_id}/sources/-`
*/
public java.lang.String getParent() {
return parent;
}
/**
* Required. Name of the source to groupBy. Its format is
* `organizations/[organization_id]/sources/[source_id]`,
* `folders/[folder_id]/sources/[source_id]`, or
* `projects/[project_id]/sources/[source_id]`. To groupBy across all sources provide a
* source_id of `-`. For example: `organizations/{organization_id}/sources/-,
* folders/{folder_id}/sources/-`, or `projects/{project_id}/sources/-`
*/
public Group 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/[^/]+/sources/[^/]+$");
}
this.parent = parent;
return this;
}
@Override
public Group set(String parameterName, Object value) {
return (Group) super.set(parameterName, value);
}
}
/**
* Lists an organization or source's findings. To list across all sources provide a `-` as the
* source id. Example: /v1/organizations/{organization_id}/sources/-/findings
*
* Create a request for the method "findings.list".
*
* This request holds the parameters needed by the securitycenter server. After setting any
* optional parameters, call the {@link List#execute()} method to invoke the remote operation.
*
* @param parent Required. Name of the source the findings belong to. Its format is
* `organizations/[organization_id]/sources/[source_id]`,
* `folders/[folder_id]/sources/[source_id]`, or `projects/[project_id]/sources/[source_id]`.
* To list across all sources provide a source_id of `-`. For example:
* `organizations/{organization_id}/sources/-`, `folders/{folder_id}/sources/-` or
* `projects/{projects_id}/sources/-`
* @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 SecurityCommandCenterRequest {
private static final String REST_PATH = "v1/{+parent}/findings";
private final java.util.regex.Pattern PARENT_PATTERN =
java.util.regex.Pattern.compile("^organizations/[^/]+/sources/[^/]+$");
/**
* Lists an organization or source's findings. To list across all sources provide a `-` as the
* source id. Example: /v1/organizations/{organization_id}/sources/-/findings
*
* Create a request for the method "findings.list".
*
* This request holds the parameters needed by the the securitycenter 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. Name of the source the findings belong to. Its format is
* `organizations/[organization_id]/sources/[source_id]`,
* `folders/[folder_id]/sources/[source_id]`, or `projects/[project_id]/sources/[source_id]`.
* To list across all sources provide a source_id of `-`. For example:
* `organizations/{organization_id}/sources/-`, `folders/{folder_id}/sources/-` or
* `projects/{projects_id}/sources/-`
* @since 1.13
*/
protected List(java.lang.String parent) {
super(SecurityCommandCenter.this, "GET", REST_PATH, null, com.google.api.services.securitycenter.v1.model.ListFindingsResponse.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/[^/]+/sources/[^/]+$");
}
}
@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. Name of the source the findings belong to. Its format is
* `organizations/[organization_id]/sources/[source_id]`,
* `folders/[folder_id]/sources/[source_id]`, or
* `projects/[project_id]/sources/[source_id]`. To list across all sources provide a
* source_id of `-`. For example: `organizations/{organization_id}/sources/-`,
* `folders/{folder_id}/sources/-` or `projects/{projects_id}/sources/-`
*/
@com.google.api.client.util.Key
private java.lang.String parent;
/** Required. Name of the source the findings belong to. Its format is
`organizations/[organization_id]/sources/[source_id]`, `folders/[folder_id]/sources/[source_id]`,
or `projects/[project_id]/sources/[source_id]`. To list across all sources provide a source_id of
`-`. For example: `organizations/{organization_id}/sources/-`, `folders/{folder_id}/sources/-` or
`projects/{projects_id}/sources/-`
*/
public java.lang.String getParent() {
return parent;
}
/**
* Required. Name of the source the findings belong to. Its format is
* `organizations/[organization_id]/sources/[source_id]`,
* `folders/[folder_id]/sources/[source_id]`, or
* `projects/[project_id]/sources/[source_id]`. To list across all sources provide a
* source_id of `-`. For example: `organizations/{organization_id}/sources/-`,
* `folders/{folder_id}/sources/-` or `projects/{projects_id}/sources/-`
*/
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/[^/]+/sources/[^/]+$");
}
this.parent = parent;
return this;
}
/**
* When compare_duration is set, the ListFindingsResult's "state_change" attribute is
* updated to indicate whether the finding had its state changed, the finding's state
* remained unchanged, or if the finding was added in any state during the
* compare_duration period of time that precedes the read_time. This is the time between
* (read_time - compare_duration) and read_time. The state_change value is derived based
* on the presence and state of the finding at the two points in time. Intermediate state
* changes between the two times don't affect the result. For example, the results aren't
* affected if the finding is made inactive and then active again. Possible "state_change"
* values when compare_duration is specified: * "CHANGED": indicates that the finding was
* present and matched the given filter at the start of compare_duration, but changed its
* state at read_time. * "UNCHANGED": indicates that the finding was present and matched
* the given filter at the start of compare_duration and did not change state at
* read_time. * "ADDED": indicates that the finding did not match the given filter or was
* not present at the start of compare_duration, but was present at read_time. *
* "REMOVED": indicates that the finding was present and matched the filter at the start
* of compare_duration, but did not match the filter at read_time. If compare_duration is
* not specified, then the only possible state_change is "UNUSED", which will be the
* state_change set for all findings present at read_time.
*/
@com.google.api.client.util.Key
private String compareDuration;
/** When compare_duration is set, the ListFindingsResult's "state_change" attribute is updated to
indicate whether the finding had its state changed, the finding's state remained unchanged, or if
the finding was added in any state during the compare_duration period of time that precedes the
read_time. This is the time between (read_time - compare_duration) and read_time. The state_change
value is derived based on the presence and state of the finding at the two points in time.
Intermediate state changes between the two times don't affect the result. For example, the results
aren't affected if the finding is made inactive and then active again. Possible "state_change"
values when compare_duration is specified: * "CHANGED": indicates that the finding was present and
matched the given filter at the start of compare_duration, but changed its state at read_time. *
"UNCHANGED": indicates that the finding was present and matched the given filter at the start of
compare_duration and did not change state at read_time. * "ADDED": indicates that the finding did
not match the given filter or was not present at the start of compare_duration, but was present at
read_time. * "REMOVED": indicates that the finding was present and matched the filter at the start
of compare_duration, but did not match the filter at read_time. If compare_duration is not
specified, then the only possible state_change is "UNUSED", which will be the state_change set for
all findings present at read_time.
*/
public String getCompareDuration() {
return compareDuration;
}
/**
* When compare_duration is set, the ListFindingsResult's "state_change" attribute is
* updated to indicate whether the finding had its state changed, the finding's state
* remained unchanged, or if the finding was added in any state during the
* compare_duration period of time that precedes the read_time. This is the time between
* (read_time - compare_duration) and read_time. The state_change value is derived based
* on the presence and state of the finding at the two points in time. Intermediate state
* changes between the two times don't affect the result. For example, the results aren't
* affected if the finding is made inactive and then active again. Possible "state_change"
* values when compare_duration is specified: * "CHANGED": indicates that the finding was
* present and matched the given filter at the start of compare_duration, but changed its
* state at read_time. * "UNCHANGED": indicates that the finding was present and matched
* the given filter at the start of compare_duration and did not change state at
* read_time. * "ADDED": indicates that the finding did not match the given filter or was
* not present at the start of compare_duration, but was present at read_time. *
* "REMOVED": indicates that the finding was present and matched the filter at the start
* of compare_duration, but did not match the filter at read_time. If compare_duration is
* not specified, then the only possible state_change is "UNUSED", which will be the
* state_change set for all findings present at read_time.
*/
public List setCompareDuration(String compareDuration) {
this.compareDuration = compareDuration;
return this;
}
/**
* A field mask to specify the Finding fields to be listed in the response. An empty field
* mask will list all fields.
*/
@com.google.api.client.util.Key
private String fieldMask;
/** A field mask to specify the Finding fields to be listed in the response. An empty field mask will
list all fields.
*/
public String getFieldMask() {
return fieldMask;
}
/**
* A field mask to specify the Finding fields to be listed in the response. An empty field
* mask will list all fields.
*/
public List setFieldMask(String fieldMask) {
this.fieldMask = fieldMask;
return this;
}
/**
* Expression that defines the filter to apply across findings. The expression is a list
* of one or more restrictions combined via logical operators `AND` and `OR`. Parentheses
* are supported, and `OR` has higher precedence than `AND`. Restrictions have the form `
* ` and may have a `-` character in front of them to indicate negation. Examples include:
* * name * source_properties.a_property * security_marks.marks.marka The supported
* operators are: * `=` for all value types. * `>`, `<`, `>=`, `<=` for integer values. *
* `:`, meaning substring matching, for strings. The supported value types are: * string
* literals in quotes. * integer literals without quotes. * boolean literals `true` and
* `false` without quotes. The following field and operator combinations are supported: *
* name: `=` * parent: `=`, `:` * resource_name: `=`, `:` * state: `=`, `:` * category:
* `=`, `:` * external_uri: `=`, `:` * event_time: `=`, `>`, `<`, `>=`, `<=` Usage: This
* should be milliseconds since epoch or an RFC3339 string. Examples: `event_time =
* "2019-06-10T16:07:18-07:00"` `event_time = 1560208038000` * severity: `=`, `:` *
* workflow_state: `=`, `:` * security_marks.marks: `=`, `:` * source_properties: `=`,
* `:`, `>`, `<`, `>=`, `<=` For example, `source_properties.size = 100` is a valid filter
* string. Use a partial match on the empty string to filter based on a property existing:
* `source_properties.my_property : ""` Use a negated partial match on the empty string to
* filter based on a property not existing: `-source_properties.my_property : ""` *
* resource: * resource.name: `=`, `:` * resource.parent_name: `=`, `:` *
* resource.parent_display_name: `=`, `:` * resource.project_name: `=`, `:` *
* resource.project_display_name: `=`, `:` * resource.type: `=`, `:` *
* resource.folders.resource_folder: `=`, `:` * resource.display_name: `=`, `:`
*/
@com.google.api.client.util.Key
private java.lang.String filter;
/** Expression that defines the filter to apply across findings. The expression is a list of one or
more restrictions combined via logical operators `AND` and `OR`. Parentheses are supported, and
`OR` has higher precedence than `AND`. Restrictions have the form ` ` and may have a `-` character
in front of them to indicate negation. Examples include: * name * source_properties.a_property *
security_marks.marks.marka The supported operators are: * `=` for all value types. * `>`, `<`,
`>=`, `<=` for integer values. * `:`, meaning substring matching, for strings. The supported value
types are: * string literals in quotes. * integer literals without quotes. * boolean literals
`true` and `false` without quotes. The following field and operator combinations are supported: *
name: `=` * parent: `=`, `:` * resource_name: `=`, `:` * state: `=`, `:` * category: `=`, `:` *
external_uri: `=`, `:` * event_time: `=`, `>`, `<`, `>=`, `<=` Usage: This should be milliseconds
since epoch or an RFC3339 string. Examples: `event_time = "2019-06-10T16:07:18-07:00"` `event_time
= 1560208038000` * severity: `=`, `:` * workflow_state: `=`, `:` * security_marks.marks: `=`, `:` *
source_properties: `=`, `:`, `>`, `<`, `>=`, `<=` For example, `source_properties.size = 100` is a
valid filter string. Use a partial match on the empty string to filter based on a property
existing: `source_properties.my_property : ""` Use a negated partial match on the empty string to
filter based on a property not existing: `-source_properties.my_property : ""` * resource: *
resource.name: `=`, `:` * resource.parent_name: `=`, `:` * resource.parent_display_name: `=`, `:` *
resource.project_name: `=`, `:` * resource.project_display_name: `=`, `:` * resource.type: `=`, `:`
* resource.folders.resource_folder: `=`, `:` * resource.display_name: `=`, `:`
*/
public java.lang.String getFilter() {
return filter;
}
/**
* Expression that defines the filter to apply across findings. The expression is a list
* of one or more restrictions combined via logical operators `AND` and `OR`. Parentheses
* are supported, and `OR` has higher precedence than `AND`. Restrictions have the form `
* ` and may have a `-` character in front of them to indicate negation. Examples include:
* * name * source_properties.a_property * security_marks.marks.marka The supported
* operators are: * `=` for all value types. * `>`, `<`, `>=`, `<=` for integer values. *
* `:`, meaning substring matching, for strings. The supported value types are: * string
* literals in quotes. * integer literals without quotes. * boolean literals `true` and
* `false` without quotes. The following field and operator combinations are supported: *
* name: `=` * parent: `=`, `:` * resource_name: `=`, `:` * state: `=`, `:` * category:
* `=`, `:` * external_uri: `=`, `:` * event_time: `=`, `>`, `<`, `>=`, `<=` Usage: This
* should be milliseconds since epoch or an RFC3339 string. Examples: `event_time =
* "2019-06-10T16:07:18-07:00"` `event_time = 1560208038000` * severity: `=`, `:` *
* workflow_state: `=`, `:` * security_marks.marks: `=`, `:` * source_properties: `=`,
* `:`, `>`, `<`, `>=`, `<=` For example, `source_properties.size = 100` is a valid filter
* string. Use a partial match on the empty string to filter based on a property existing:
* `source_properties.my_property : ""` Use a negated partial match on the empty string to
* filter based on a property not existing: `-source_properties.my_property : ""` *
* resource: * resource.name: `=`, `:` * resource.parent_name: `=`, `:` *
* resource.parent_display_name: `=`, `:` * resource.project_name: `=`, `:` *
* resource.project_display_name: `=`, `:` * resource.type: `=`, `:` *
* resource.folders.resource_folder: `=`, `:` * resource.display_name: `=`, `:`
*/
public List setFilter(java.lang.String filter) {
this.filter = filter;
return this;
}
/**
* Expression that defines what fields and order to use for sorting. The string value
* should follow SQL syntax: comma separated list of fields. For example:
* "name,resource_properties.a_property". The default sorting order is ascending. To
* specify descending order for a field, a suffix " desc" should be appended to the field
* name. For example: "name desc,source_properties.a_property". Redundant space characters
* in the syntax are insignificant. "name desc,source_properties.a_property" and " name
* desc , source_properties.a_property " are equivalent. The following fields are
* supported: name parent state category resource_name event_time source_properties
* security_marks.marks
*/
@com.google.api.client.util.Key
private java.lang.String orderBy;
/** Expression that defines what fields and order to use for sorting. The string value should follow
SQL syntax: comma separated list of fields. For example: "name,resource_properties.a_property". The
default sorting order is ascending. To specify descending order for a field, a suffix " desc"
should be appended to the field name. For example: "name desc,source_properties.a_property".
Redundant space characters in the syntax are insignificant. "name
desc,source_properties.a_property" and " name desc , source_properties.a_property " are equivalent.
The following fields are supported: name parent state category resource_name event_time
source_properties security_marks.marks
*/
public java.lang.String getOrderBy() {
return orderBy;
}
/**
* Expression that defines what fields and order to use for sorting. The string value
* should follow SQL syntax: comma separated list of fields. For example:
* "name,resource_properties.a_property". The default sorting order is ascending. To
* specify descending order for a field, a suffix " desc" should be appended to the field
* name. For example: "name desc,source_properties.a_property". Redundant space characters
* in the syntax are insignificant. "name desc,source_properties.a_property" and " name
* desc , source_properties.a_property " are equivalent. The following fields are
* supported: name parent state category resource_name event_time source_properties
* security_marks.marks
*/
public List setOrderBy(java.lang.String orderBy) {
this.orderBy = orderBy;
return this;
}
/**
* The maximum number of results to return in a single response. Default is 10, minimum is
* 1, maximum is 1000.
*/
@com.google.api.client.util.Key
private java.lang.Integer pageSize;
/** The maximum number of results to return in a single response. Default is 10, minimum is 1, maximum
is 1000.
*/
public java.lang.Integer getPageSize() {
return pageSize;
}
/**
* The maximum number of results to return in a single response. Default is 10, minimum is
* 1, maximum is 1000.
*/
public List setPageSize(java.lang.Integer pageSize) {
this.pageSize = pageSize;
return this;
}
/**
* The value returned by the last `ListFindingsResponse`; indicates that this is a
* continuation of a prior `ListFindings` call, and that the system should return the next
* page of data.
*/
@com.google.api.client.util.Key
private java.lang.String pageToken;
/** The value returned by the last `ListFindingsResponse`; indicates that this is a continuation of a
prior `ListFindings` call, and that the system should return the next page of data.
*/
public java.lang.String getPageToken() {
return pageToken;
}
/**
* The value returned by the last `ListFindingsResponse`; indicates that this is a
* continuation of a prior `ListFindings` call, and that the system should return the next
* page of data.
*/
public List setPageToken(java.lang.String pageToken) {
this.pageToken = pageToken;
return this;
}
/**
* Time used as a reference point when filtering findings. The filter is limited to
* findings existing at the supplied time and their values are those at that specific
* time. Absence of this field will default to the API's version of NOW.
*/
@com.google.api.client.util.Key
private String readTime;
/** Time used as a reference point when filtering findings. The filter is limited to findings existing
at the supplied time and their values are those at that specific time. Absence of this field will
default to the API's version of NOW.
*/
public String getReadTime() {
return readTime;
}
/**
* Time used as a reference point when filtering findings. The filter is limited to
* findings existing at the supplied time and their values are those at that specific
* time. Absence of this field will default to the API's version of NOW.
*/
public List setReadTime(String readTime) {
this.readTime = readTime;
return this;
}
@Override
public List set(String parameterName, Object value) {
return (List) super.set(parameterName, value);
}
}
/**
* Creates or updates a finding. The corresponding source must exist for a finding creation to
* succeed.
*
* Create a request for the method "findings.patch".
*
* This request holds the parameters needed by the securitycenter server. After setting any
* optional parameters, call the {@link Patch#execute()} method to invoke the remote operation.
*
* @param name The [relative resource
* name](https://cloud.google.com/apis/design/resource_names#relative_resource_name) of the
* finding. Example:
* "organizations/{organization_id}/sources/{source_id}/findings/{finding_id}",
* "folders/{folder_id}/sources/{source_id}/findings/{finding_id}",
* "projects/{project_id}/sources/{source_id}/findings/{finding_id}".
* @param content the {@link com.google.api.services.securitycenter.v1.model.Finding}
* @return the request
*/
public Patch patch(java.lang.String name, com.google.api.services.securitycenter.v1.model.Finding content) throws java.io.IOException {
Patch result = new Patch(name, content);
initialize(result);
return result;
}
public class Patch extends SecurityCommandCenterRequest {
private static final String REST_PATH = "v1/{+name}";
private final java.util.regex.Pattern NAME_PATTERN =
java.util.regex.Pattern.compile("^organizations/[^/]+/sources/[^/]+/findings/[^/]+$");
/**
* Creates or updates a finding. The corresponding source must exist for a finding creation to
* succeed.
*
* Create a request for the method "findings.patch".
*
* This request holds the parameters needed by the the securitycenter server. After setting any
* optional parameters, call the {@link Patch#execute()} method to invoke the remote operation.
* {@link
* Patch#initialize(com.google.api.client.googleapis.services.AbstractGoogleClientRequest)} must
* be called to initialize this instance immediately after invoking the constructor.
*
* @param name The [relative resource
* name](https://cloud.google.com/apis/design/resource_names#relative_resource_name) of the
* finding. Example:
* "organizations/{organization_id}/sources/{source_id}/findings/{finding_id}",
* "folders/{folder_id}/sources/{source_id}/findings/{finding_id}",
* "projects/{project_id}/sources/{source_id}/findings/{finding_id}".
* @param content the {@link com.google.api.services.securitycenter.v1.model.Finding}
* @since 1.13
*/
protected Patch(java.lang.String name, com.google.api.services.securitycenter.v1.model.Finding content) {
super(SecurityCommandCenter.this, "PATCH", REST_PATH, content, com.google.api.services.securitycenter.v1.model.Finding.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/[^/]+/sources/[^/]+/findings/[^/]+$");
}
}
@Override
public Patch set$Xgafv(java.lang.String $Xgafv) {
return (Patch) super.set$Xgafv($Xgafv);
}
@Override
public Patch setAccessToken(java.lang.String accessToken) {
return (Patch) super.setAccessToken(accessToken);
}
@Override
public Patch setAlt(java.lang.String alt) {
return (Patch) super.setAlt(alt);
}
@Override
public Patch setCallback(java.lang.String callback) {
return (Patch) super.setCallback(callback);
}
@Override
public Patch setFields(java.lang.String fields) {
return (Patch) super.setFields(fields);
}
@Override
public Patch setKey(java.lang.String key) {
return (Patch) super.setKey(key);
}
@Override
public Patch setOauthToken(java.lang.String oauthToken) {
return (Patch) super.setOauthToken(oauthToken);
}
@Override
public Patch setPrettyPrint(java.lang.Boolean prettyPrint) {
return (Patch) super.setPrettyPrint(prettyPrint);
}
@Override
public Patch setQuotaUser(java.lang.String quotaUser) {
return (Patch) super.setQuotaUser(quotaUser);
}
@Override
public Patch setUploadType(java.lang.String uploadType) {
return (Patch) super.setUploadType(uploadType);
}
@Override
public Patch setUploadProtocol(java.lang.String uploadProtocol) {
return (Patch) super.setUploadProtocol(uploadProtocol);
}
/**
* The [relative resource
* name](https://cloud.google.com/apis/design/resource_names#relative_resource_name) of
* the finding. Example:
* "organizations/{organization_id}/sources/{source_id}/findings/{finding_id}",
* "folders/{folder_id}/sources/{source_id}/findings/{finding_id}",
* "projects/{project_id}/sources/{source_id}/findings/{finding_id}".
*/
@com.google.api.client.util.Key
private java.lang.String name;
/** The [relative resource
name](https://cloud.google.com/apis/design/resource_names#relative_resource_name) of the finding.
Example: "organizations/{organization_id}/sources/{source_id}/findings/{finding_id}",
"folders/{folder_id}/sources/{source_id}/findings/{finding_id}",
"projects/{project_id}/sources/{source_id}/findings/{finding_id}".
*/
public java.lang.String getName() {
return name;
}
/**
* The [relative resource
* name](https://cloud.google.com/apis/design/resource_names#relative_resource_name) of
* the finding. Example:
* "organizations/{organization_id}/sources/{source_id}/findings/{finding_id}",
* "folders/{folder_id}/sources/{source_id}/findings/{finding_id}",
* "projects/{project_id}/sources/{source_id}/findings/{finding_id}".
*/
public Patch setName(java.lang.String name) {
if (!getSuppressPatternChecks()) {
com.google.api.client.util.Preconditions.checkArgument(NAME_PATTERN.matcher(name).matches(),
"Parameter name must conform to the pattern " +
"^organizations/[^/]+/sources/[^/]+/findings/[^/]+$");
}
this.name = name;
return this;
}
/**
* The FieldMask to use when updating the finding resource. This field should not be
* specified when creating a finding. When updating a finding, an empty mask is treated as
* updating all mutable fields and replacing source_properties. Individual
* source_properties can be added/updated by using "source_properties." in the field mask.
*/
@com.google.api.client.util.Key
private String updateMask;
/** The FieldMask to use when updating the finding resource. This field should not be specified when
creating a finding. When updating a finding, an empty mask is treated as updating all mutable
fields and replacing source_properties. Individual source_properties can be added/updated by using
"source_properties." in the field mask.
*/
public String getUpdateMask() {
return updateMask;
}
/**
* The FieldMask to use when updating the finding resource. This field should not be
* specified when creating a finding. When updating a finding, an empty mask is treated as
* updating all mutable fields and replacing source_properties. Individual
* source_properties can be added/updated by using "source_properties." in the field mask.
*/
public Patch setUpdateMask(String updateMask) {
this.updateMask = updateMask;
return this;
}
@Override
public Patch set(String parameterName, Object value) {
return (Patch) super.set(parameterName, value);
}
}
/**
* Updates the mute state of a finding.
*
* Create a request for the method "findings.setMute".
*
* This request holds the parameters needed by the securitycenter server. After setting any
* optional parameters, call the {@link SetMute#execute()} method to invoke the remote operation.
*
* @param name Required. The [relative resource
* name](https://cloud.google.com/apis/design/resource_names#relative_resource_name) of the
* finding. Example:
* `organizations/{organization_id}/sources/{source_id}/findings/{finding_id}`,
* `folders/{folder_id}/sources/{source_id}/findings/{finding_id}`,
* `projects/{project_id}/sources/{source_id}/findings/{finding_id}`.
* @param content the {@link com.google.api.services.securitycenter.v1.model.SetMuteRequest}
* @return the request
*/
public SetMute setMute(java.lang.String name, com.google.api.services.securitycenter.v1.model.SetMuteRequest content) throws java.io.IOException {
SetMute result = new SetMute(name, content);
initialize(result);
return result;
}
public class SetMute extends SecurityCommandCenterRequest {
private static final String REST_PATH = "v1/{+name}:setMute";
private final java.util.regex.Pattern NAME_PATTERN =
java.util.regex.Pattern.compile("^organizations/[^/]+/sources/[^/]+/findings/[^/]+$");
/**
* Updates the mute state of a finding.
*
* Create a request for the method "findings.setMute".
*
* This request holds the parameters needed by the the securitycenter server. After setting any
* optional parameters, call the {@link SetMute#execute()} method to invoke the remote operation.
* {@link
* SetMute#initialize(com.google.api.client.googleapis.services.AbstractGoogleClientRequest)} must
* be called to initialize this instance immediately after invoking the constructor.
*
* @param name Required. The [relative resource
* name](https://cloud.google.com/apis/design/resource_names#relative_resource_name) of the
* finding. Example:
* `organizations/{organization_id}/sources/{source_id}/findings/{finding_id}`,
* `folders/{folder_id}/sources/{source_id}/findings/{finding_id}`,
* `projects/{project_id}/sources/{source_id}/findings/{finding_id}`.
* @param content the {@link com.google.api.services.securitycenter.v1.model.SetMuteRequest}
* @since 1.13
*/
protected SetMute(java.lang.String name, com.google.api.services.securitycenter.v1.model.SetMuteRequest content) {
super(SecurityCommandCenter.this, "POST", REST_PATH, content, com.google.api.services.securitycenter.v1.model.Finding.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/[^/]+/sources/[^/]+/findings/[^/]+$");
}
}
@Override
public SetMute set$Xgafv(java.lang.String $Xgafv) {
return (SetMute) super.set$Xgafv($Xgafv);
}
@Override
public SetMute setAccessToken(java.lang.String accessToken) {
return (SetMute) super.setAccessToken(accessToken);
}
@Override
public SetMute setAlt(java.lang.String alt) {
return (SetMute) super.setAlt(alt);
}
@Override
public SetMute setCallback(java.lang.String callback) {
return (SetMute) super.setCallback(callback);
}
@Override
public SetMute setFields(java.lang.String fields) {
return (SetMute) super.setFields(fields);
}
@Override
public SetMute setKey(java.lang.String key) {
return (SetMute) super.setKey(key);
}
@Override
public SetMute setOauthToken(java.lang.String oauthToken) {
return (SetMute) super.setOauthToken(oauthToken);
}
@Override
public SetMute setPrettyPrint(java.lang.Boolean prettyPrint) {
return (SetMute) super.setPrettyPrint(prettyPrint);
}
@Override
public SetMute setQuotaUser(java.lang.String quotaUser) {
return (SetMute) super.setQuotaUser(quotaUser);
}
@Override
public SetMute setUploadType(java.lang.String uploadType) {
return (SetMute) super.setUploadType(uploadType);
}
@Override
public SetMute setUploadProtocol(java.lang.String uploadProtocol) {
return (SetMute) super.setUploadProtocol(uploadProtocol);
}
/**
* Required. The [relative resource
* name](https://cloud.google.com/apis/design/resource_names#relative_resource_name) of
* the finding. Example:
* `organizations/{organization_id}/sources/{source_id}/findings/{finding_id}`,
* `folders/{folder_id}/sources/{source_id}/findings/{finding_id}`,
* `projects/{project_id}/sources/{source_id}/findings/{finding_id}`.
*/
@com.google.api.client.util.Key
private java.lang.String name;
/** Required. The [relative resource
name](https://cloud.google.com/apis/design/resource_names#relative_resource_name) of the finding.
Example: `organizations/{organization_id}/sources/{source_id}/findings/{finding_id}`,
`folders/{folder_id}/sources/{source_id}/findings/{finding_id}`,
`projects/{project_id}/sources/{source_id}/findings/{finding_id}`.
*/
public java.lang.String getName() {
return name;
}
/**
* Required. The [relative resource
* name](https://cloud.google.com/apis/design/resource_names#relative_resource_name) of
* the finding. Example:
* `organizations/{organization_id}/sources/{source_id}/findings/{finding_id}`,
* `folders/{folder_id}/sources/{source_id}/findings/{finding_id}`,
* `projects/{project_id}/sources/{source_id}/findings/{finding_id}`.
*/
public SetMute 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/[^/]+/sources/[^/]+/findings/[^/]+$");
}
this.name = name;
return this;
}
@Override
public SetMute set(String parameterName, Object value) {
return (SetMute) super.set(parameterName, value);
}
}
/**
* Updates the state of a finding.
*
* Create a request for the method "findings.setState".
*
* This request holds the parameters needed by the securitycenter server. After setting any
* optional parameters, call the {@link SetState#execute()} method to invoke the remote operation.
*
* @param name Required. The [relative resource
* name](https://cloud.google.com/apis/design/resource_names#relative_resource_name) of the
* finding. Example:
* `organizations/{organization_id}/sources/{source_id}/findings/{finding_id}`,
* `folders/{folder_id}/sources/{source_id}/findings/{finding_id}`,
* `projects/{project_id}/sources/{source_id}/findings/{finding_id}`.
* @param content the {@link com.google.api.services.securitycenter.v1.model.SetFindingStateRequest}
* @return the request
*/
public SetState setState(java.lang.String name, com.google.api.services.securitycenter.v1.model.SetFindingStateRequest content) throws java.io.IOException {
SetState result = new SetState(name, content);
initialize(result);
return result;
}
public class SetState extends SecurityCommandCenterRequest {
private static final String REST_PATH = "v1/{+name}:setState";
private final java.util.regex.Pattern NAME_PATTERN =
java.util.regex.Pattern.compile("^organizations/[^/]+/sources/[^/]+/findings/[^/]+$");
/**
* Updates the state of a finding.
*
* Create a request for the method "findings.setState".
*
* This request holds the parameters needed by the the securitycenter server. After setting any
* optional parameters, call the {@link SetState#execute()} method to invoke the remote operation.
* {@link
* SetState#initialize(com.google.api.client.googleapis.services.AbstractGoogleClientRequest)}
* must be called to initialize this instance immediately after invoking the constructor.
*
* @param name Required. The [relative resource
* name](https://cloud.google.com/apis/design/resource_names#relative_resource_name) of the
* finding. Example:
* `organizations/{organization_id}/sources/{source_id}/findings/{finding_id}`,
* `folders/{folder_id}/sources/{source_id}/findings/{finding_id}`,
* `projects/{project_id}/sources/{source_id}/findings/{finding_id}`.
* @param content the {@link com.google.api.services.securitycenter.v1.model.SetFindingStateRequest}
* @since 1.13
*/
protected SetState(java.lang.String name, com.google.api.services.securitycenter.v1.model.SetFindingStateRequest content) {
super(SecurityCommandCenter.this, "POST", REST_PATH, content, com.google.api.services.securitycenter.v1.model.Finding.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/[^/]+/sources/[^/]+/findings/[^/]+$");
}
}
@Override
public SetState set$Xgafv(java.lang.String $Xgafv) {
return (SetState) super.set$Xgafv($Xgafv);
}
@Override
public SetState setAccessToken(java.lang.String accessToken) {
return (SetState) super.setAccessToken(accessToken);
}
@Override
public SetState setAlt(java.lang.String alt) {
return (SetState) super.setAlt(alt);
}
@Override
public SetState setCallback(java.lang.String callback) {
return (SetState) super.setCallback(callback);
}
@Override
public SetState setFields(java.lang.String fields) {
return (SetState) super.setFields(fields);
}
@Override
public SetState setKey(java.lang.String key) {
return (SetState) super.setKey(key);
}
@Override
public SetState setOauthToken(java.lang.String oauthToken) {
return (SetState) super.setOauthToken(oauthToken);
}
@Override
public SetState setPrettyPrint(java.lang.Boolean prettyPrint) {
return (SetState) super.setPrettyPrint(prettyPrint);
}
@Override
public SetState setQuotaUser(java.lang.String quotaUser) {
return (SetState) super.setQuotaUser(quotaUser);
}
@Override
public SetState setUploadType(java.lang.String uploadType) {
return (SetState) super.setUploadType(uploadType);
}
@Override
public SetState setUploadProtocol(java.lang.String uploadProtocol) {
return (SetState) super.setUploadProtocol(uploadProtocol);
}
/**
* Required. The [relative resource
* name](https://cloud.google.com/apis/design/resource_names#relative_resource_name) of
* the finding. Example:
* `organizations/{organization_id}/sources/{source_id}/findings/{finding_id}`,
* `folders/{folder_id}/sources/{source_id}/findings/{finding_id}`,
* `projects/{project_id}/sources/{source_id}/findings/{finding_id}`.
*/
@com.google.api.client.util.Key
private java.lang.String name;
/** Required. The [relative resource
name](https://cloud.google.com/apis/design/resource_names#relative_resource_name) of the finding.
Example: `organizations/{organization_id}/sources/{source_id}/findings/{finding_id}`,
`folders/{folder_id}/sources/{source_id}/findings/{finding_id}`,
`projects/{project_id}/sources/{source_id}/findings/{finding_id}`.
*/
public java.lang.String getName() {
return name;
}
/**
* Required. The [relative resource
* name](https://cloud.google.com/apis/design/resource_names#relative_resource_name) of
* the finding. Example:
* `organizations/{organization_id}/sources/{source_id}/findings/{finding_id}`,
* `folders/{folder_id}/sources/{source_id}/findings/{finding_id}`,
* `projects/{project_id}/sources/{source_id}/findings/{finding_id}`.
*/
public SetState 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/[^/]+/sources/[^/]+/findings/[^/]+$");
}
this.name = name;
return this;
}
@Override
public SetState set(String parameterName, Object value) {
return (SetState) super.set(parameterName, value);
}
}
/**
* Updates security marks.
*
* Create a request for the method "findings.updateSecurityMarks".
*
* This request holds the parameters needed by the securitycenter server. After setting any
* optional parameters, call the {@link UpdateSecurityMarks#execute()} method to invoke the remote
* operation.
*
* @param name The relative resource name of the SecurityMarks. See:
* https://cloud.google.com/apis/design/resource_names#relative_resource_name Examples:
* "organizations/{organization_id}/assets/{asset_id}/securityMarks"
* "organizations/{organization_id}/sources/{source_id}/findings/{finding_id}/securityMarks".
* @param content the {@link com.google.api.services.securitycenter.v1.model.SecurityMarks}
* @return the request
*/
public UpdateSecurityMarks updateSecurityMarks(java.lang.String name, com.google.api.services.securitycenter.v1.model.SecurityMarks content) throws java.io.IOException {
UpdateSecurityMarks result = new UpdateSecurityMarks(name, content);
initialize(result);
return result;
}
public class UpdateSecurityMarks extends SecurityCommandCenterRequest {
private static final String REST_PATH = "v1/{+name}";
private final java.util.regex.Pattern NAME_PATTERN =
java.util.regex.Pattern.compile("^organizations/[^/]+/sources/[^/]+/findings/[^/]+/securityMarks$");
/**
* Updates security marks.
*
* Create a request for the method "findings.updateSecurityMarks".
*
* This request holds the parameters needed by the the securitycenter server. After setting any
* optional parameters, call the {@link UpdateSecurityMarks#execute()} method to invoke the remote
* operation. {@link UpdateSecurityMarks#initialize(com.google.api.client.googleapis.services.
* AbstractGoogleClientRequest)} must be called to initialize this instance immediately after
* invoking the constructor.
*
* @param name The relative resource name of the SecurityMarks. See:
* https://cloud.google.com/apis/design/resource_names#relative_resource_name Examples:
* "organizations/{organization_id}/assets/{asset_id}/securityMarks"
* "organizations/{organization_id}/sources/{source_id}/findings/{finding_id}/securityMarks".
* @param content the {@link com.google.api.services.securitycenter.v1.model.SecurityMarks}
* @since 1.13
*/
protected UpdateSecurityMarks(java.lang.String name, com.google.api.services.securitycenter.v1.model.SecurityMarks content) {
super(SecurityCommandCenter.this, "PATCH", REST_PATH, content, com.google.api.services.securitycenter.v1.model.SecurityMarks.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/[^/]+/sources/[^/]+/findings/[^/]+/securityMarks$");
}
}
@Override
public UpdateSecurityMarks set$Xgafv(java.lang.String $Xgafv) {
return (UpdateSecurityMarks) super.set$Xgafv($Xgafv);
}
@Override
public UpdateSecurityMarks setAccessToken(java.lang.String accessToken) {
return (UpdateSecurityMarks) super.setAccessToken(accessToken);
}
@Override
public UpdateSecurityMarks setAlt(java.lang.String alt) {
return (UpdateSecurityMarks) super.setAlt(alt);
}
@Override
public UpdateSecurityMarks setCallback(java.lang.String callback) {
return (UpdateSecurityMarks) super.setCallback(callback);
}
@Override
public UpdateSecurityMarks setFields(java.lang.String fields) {
return (UpdateSecurityMarks) super.setFields(fields);
}
@Override
public UpdateSecurityMarks setKey(java.lang.String key) {
return (UpdateSecurityMarks) super.setKey(key);
}
@Override
public UpdateSecurityMarks setOauthToken(java.lang.String oauthToken) {
return (UpdateSecurityMarks) super.setOauthToken(oauthToken);
}
@Override
public UpdateSecurityMarks setPrettyPrint(java.lang.Boolean prettyPrint) {
return (UpdateSecurityMarks) super.setPrettyPrint(prettyPrint);
}
@Override
public UpdateSecurityMarks setQuotaUser(java.lang.String quotaUser) {
return (UpdateSecurityMarks) super.setQuotaUser(quotaUser);
}
@Override
public UpdateSecurityMarks setUploadType(java.lang.String uploadType) {
return (UpdateSecurityMarks) super.setUploadType(uploadType);
}
@Override
public UpdateSecurityMarks setUploadProtocol(java.lang.String uploadProtocol) {
return (UpdateSecurityMarks) super.setUploadProtocol(uploadProtocol);
}
/**
* The relative resource name of the SecurityMarks. See:
* https://cloud.google.com/apis/design/resource_names#relative_resource_name Examples:
* "organizations/{organization_id}/assets/{asset_id}/securityMarks" "organizations/{organ
* ization_id}/sources/{source_id}/findings/{finding_id}/securityMarks".
*/
@com.google.api.client.util.Key
private java.lang.String name;
/** The relative resource name of the SecurityMarks. See:
https://cloud.google.com/apis/design/resource_names#relative_resource_name Examples:
"organizations/{organization_id}/assets/{asset_id}/securityMarks"
"organizations/{organization_id}/sources/{source_id}/findings/{finding_id}/securityMarks".
*/
public java.lang.String getName() {
return name;
}
/**
* The relative resource name of the SecurityMarks. See:
* https://cloud.google.com/apis/design/resource_names#relative_resource_name Examples:
* "organizations/{organization_id}/assets/{asset_id}/securityMarks" "organizations/{organ
* ization_id}/sources/{source_id}/findings/{finding_id}/securityMarks".
*/
public UpdateSecurityMarks 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/[^/]+/sources/[^/]+/findings/[^/]+/securityMarks$");
}
this.name = name;
return this;
}
/**
* The time at which the updated SecurityMarks take effect. If not set uses current server
* time. Updates will be applied to the SecurityMarks that are active immediately
* preceding this time. Must be earlier or equal to the server time.
*/
@com.google.api.client.util.Key
private String startTime;
/** The time at which the updated SecurityMarks take effect. If not set uses current server time.
Updates will be applied to the SecurityMarks that are active immediately preceding this time. Must
be earlier or equal to the server time.
*/
public String getStartTime() {
return startTime;
}
/**
* The time at which the updated SecurityMarks take effect. If not set uses current server
* time. Updates will be applied to the SecurityMarks that are active immediately
* preceding this time. Must be earlier or equal to the server time.
*/
public UpdateSecurityMarks setStartTime(String startTime) {
this.startTime = startTime;
return this;
}
/**
* The FieldMask to use when updating the security marks resource. The field mask must not
* contain duplicate fields. If empty or set to "marks", all marks will be replaced.
* Individual marks can be updated using "marks.".
*/
@com.google.api.client.util.Key
private String updateMask;
/** The FieldMask to use when updating the security marks resource. The field mask must not contain
duplicate fields. If empty or set to "marks", all marks will be replaced. Individual marks can be
updated using "marks.".
*/
public String getUpdateMask() {
return updateMask;
}
/**
* The FieldMask to use when updating the security marks resource. The field mask must not
* contain duplicate fields. If empty or set to "marks", all marks will be replaced.
* Individual marks can be updated using "marks.".
*/
public UpdateSecurityMarks setUpdateMask(String updateMask) {
this.updateMask = updateMask;
return this;
}
@Override
public UpdateSecurityMarks set(String parameterName, Object value) {
return (UpdateSecurityMarks) super.set(parameterName, value);
}
}
/**
* An accessor for creating requests from the ExternalSystems collection.
*
* The typical use is:
*
* {@code SecurityCommandCenter securitycenter = new SecurityCommandCenter(...);}
* {@code SecurityCommandCenter.ExternalSystems.List request = securitycenter.externalSystems().list(parameters ...)}
*
*
* @return the resource collection
*/
public ExternalSystems externalSystems() {
return new ExternalSystems();
}
/**
* The "externalSystems" collection of methods.
*/
public class ExternalSystems {
/**
* Updates external system. This is for a given finding.
*
* Create a request for the method "externalSystems.patch".
*
* This request holds the parameters needed by the securitycenter server. After setting any
* optional parameters, call the {@link Patch#execute()} method to invoke the remote operation.
*
* @param name Full resource name of the external system, for example:
* "organizations/1234/sources/5678/findings/123456/externalSystems/jira",
* "folders/1234/sources/5678/findings/123456/externalSystems/jira",
* "projects/1234/sources/5678/findings/123456/externalSystems/jira"
* @param content the {@link com.google.api.services.securitycenter.v1.model.GoogleCloudSecuritycenterV1ExternalSystem}
* @return the request
*/
public Patch patch(java.lang.String name, com.google.api.services.securitycenter.v1.model.GoogleCloudSecuritycenterV1ExternalSystem content) throws java.io.IOException {
Patch result = new Patch(name, content);
initialize(result);
return result;
}
public class Patch extends SecurityCommandCenterRequest {
private static final String REST_PATH = "v1/{+name}";
private final java.util.regex.Pattern NAME_PATTERN =
java.util.regex.Pattern.compile("^organizations/[^/]+/sources/[^/]+/findings/[^/]+/externalSystems/[^/]+$");
/**
* Updates external system. This is for a given finding.
*
* Create a request for the method "externalSystems.patch".
*
* This request holds the parameters needed by the the securitycenter server. After setting any
* optional parameters, call the {@link Patch#execute()} method to invoke the remote operation.
* {@link
* Patch#initialize(com.google.api.client.googleapis.services.AbstractGoogleClientRequest)} must
* be called to initialize this instance immediately after invoking the constructor.
*
* @param name Full resource name of the external system, for example:
* "organizations/1234/sources/5678/findings/123456/externalSystems/jira",
* "folders/1234/sources/5678/findings/123456/externalSystems/jira",
* "projects/1234/sources/5678/findings/123456/externalSystems/jira"
* @param content the {@link com.google.api.services.securitycenter.v1.model.GoogleCloudSecuritycenterV1ExternalSystem}
* @since 1.13
*/
protected Patch(java.lang.String name, com.google.api.services.securitycenter.v1.model.GoogleCloudSecuritycenterV1ExternalSystem content) {
super(SecurityCommandCenter.this, "PATCH", REST_PATH, content, com.google.api.services.securitycenter.v1.model.GoogleCloudSecuritycenterV1ExternalSystem.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/[^/]+/sources/[^/]+/findings/[^/]+/externalSystems/[^/]+$");
}
}
@Override
public Patch set$Xgafv(java.lang.String $Xgafv) {
return (Patch) super.set$Xgafv($Xgafv);
}
@Override
public Patch setAccessToken(java.lang.String accessToken) {
return (Patch) super.setAccessToken(accessToken);
}
@Override
public Patch setAlt(java.lang.String alt) {
return (Patch) super.setAlt(alt);
}
@Override
public Patch setCallback(java.lang.String callback) {
return (Patch) super.setCallback(callback);
}
@Override
public Patch setFields(java.lang.String fields) {
return (Patch) super.setFields(fields);
}
@Override
public Patch setKey(java.lang.String key) {
return (Patch) super.setKey(key);
}
@Override
public Patch setOauthToken(java.lang.String oauthToken) {
return (Patch) super.setOauthToken(oauthToken);
}
@Override
public Patch setPrettyPrint(java.lang.Boolean prettyPrint) {
return (Patch) super.setPrettyPrint(prettyPrint);
}
@Override
public Patch setQuotaUser(java.lang.String quotaUser) {
return (Patch) super.setQuotaUser(quotaUser);
}
@Override
public Patch setUploadType(java.lang.String uploadType) {
return (Patch) super.setUploadType(uploadType);
}
@Override
public Patch setUploadProtocol(java.lang.String uploadProtocol) {
return (Patch) super.setUploadProtocol(uploadProtocol);
}
/**
* Full resource name of the external system, for example:
* "organizations/1234/sources/5678/findings/123456/externalSystems/jira",
* "folders/1234/sources/5678/findings/123456/externalSystems/jira",
* "projects/1234/sources/5678/findings/123456/externalSystems/jira"
*/
@com.google.api.client.util.Key
private java.lang.String name;
/** Full resource name of the external system, for example:
"organizations/1234/sources/5678/findings/123456/externalSystems/jira",
"folders/1234/sources/5678/findings/123456/externalSystems/jira",
"projects/1234/sources/5678/findings/123456/externalSystems/jira"
*/
public java.lang.String getName() {
return name;
}
/**
* Full resource name of the external system, for example:
* "organizations/1234/sources/5678/findings/123456/externalSystems/jira",
* "folders/1234/sources/5678/findings/123456/externalSystems/jira",
* "projects/1234/sources/5678/findings/123456/externalSystems/jira"
*/
public Patch setName(java.lang.String name) {
if (!getSuppressPatternChecks()) {
com.google.api.client.util.Preconditions.checkArgument(NAME_PATTERN.matcher(name).matches(),
"Parameter name must conform to the pattern " +
"^organizations/[^/]+/sources/[^/]+/findings/[^/]+/externalSystems/[^/]+$");
}
this.name = name;
return this;
}
/**
* The FieldMask to use when updating the external system resource. If empty all mutable
* fields will be updated.
*/
@com.google.api.client.util.Key
private String updateMask;
/** The FieldMask to use when updating the external system resource. If empty all mutable fields will
be updated.
*/
public String getUpdateMask() {
return updateMask;
}
/**
* The FieldMask to use when updating the external system resource. If empty all mutable
* fields will be updated.
*/
public Patch setUpdateMask(String updateMask) {
this.updateMask = updateMask;
return this;
}
@Override
public Patch set(String parameterName, Object value) {
return (Patch) super.set(parameterName, value);
}
}
}
}
}
/**
* An accessor for creating requests from the ValuedResources collection.
*
* The typical use is:
*
* {@code SecurityCommandCenter securitycenter = new SecurityCommandCenter(...);}
* {@code SecurityCommandCenter.ValuedResources.List request = securitycenter.valuedResources().list(parameters ...)}
*
*
* @return the resource collection
*/
public ValuedResources valuedResources() {
return new ValuedResources();
}
/**
* The "valuedResources" collection of methods.
*/
public class ValuedResources {
/**
* Lists the valued resources for a set of simulation results and filter.
*
* Create a request for the method "valuedResources.list".
*
* This request holds the parameters needed by the securitycenter server. After setting any
* optional parameters, call the {@link List#execute()} method to invoke the remote operation.
*
* @param parent Required. Name of parent to list valued resources. Valid formats: `organizations/{organization}`,
* `organizations/{organization}/simulations/{simulation}` `organizations/{organization}/simu
* lations/{simulation}/attackExposureResults/{attack_exposure_result_v2}`
* @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 SecurityCommandCenterRequest {
private static final String REST_PATH = "v1/{+parent}/valuedResources";
private final java.util.regex.Pattern PARENT_PATTERN =
java.util.regex.Pattern.compile("^organizations/[^/]+$");
/**
* Lists the valued resources for a set of simulation results and filter.
*
* Create a request for the method "valuedResources.list".
*
* This request holds the parameters needed by the the securitycenter 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. Name of parent to list valued resources. Valid formats: `organizations/{organization}`,
* `organizations/{organization}/simulations/{simulation}` `organizations/{organization}/simu
* lations/{simulation}/attackExposureResults/{attack_exposure_result_v2}`
* @since 1.13
*/
protected List(java.lang.String parent) {
super(SecurityCommandCenter.this, "GET", REST_PATH, null, com.google.api.services.securitycenter.v1.model.ListValuedResourcesResponse.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/[^/]+$");
}
}
@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. Name of parent to list valued resources. Valid formats:
* `organizations/{organization}`, `organizations/{organization}/simulations/{simulation}` `
* organizations/{organization}/simulations/{simulation}/attackExposureResults/{attack_expos
* ure_result_v2}`
*/
@com.google.api.client.util.Key
private java.lang.String parent;
/** Required. Name of parent to list valued resources. Valid formats: `organizations/{organization}`,
`organizations/{organization}/simulations/{simulation}` `organizations/{organization}/simulations/{
simulation}/attackExposureResults/{attack_exposure_result_v2}`
*/
public java.lang.String getParent() {
return parent;
}
/**
* Required. Name of parent to list valued resources. Valid formats:
* `organizations/{organization}`, `organizations/{organization}/simulations/{simulation}` `
* organizations/{organization}/simulations/{simulation}/attackExposureResults/{attack_expos
* ure_result_v2}`
*/
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/[^/]+$");
}
this.parent = parent;
return this;
}
/**
* The filter expression that filters the valued resources in the response. Supported
* fields: * `resource_value` supports = * `resource_type` supports =
*/
@com.google.api.client.util.Key
private java.lang.String filter;
/** The filter expression that filters the valued resources in the response. Supported fields: *
`resource_value` supports = * `resource_type` supports =
*/
public java.lang.String getFilter() {
return filter;
}
/**
* The filter expression that filters the valued resources in the response. Supported
* fields: * `resource_value` supports = * `resource_type` supports =
*/
public List setFilter(java.lang.String filter) {
this.filter = filter;
return this;
}
/**
* Optional. The fields by which to order the valued resources response. Supported fields: *
* `exposed_score` * `resource_value` * `resource_type` * `resource` * `display_name` Values
* should be a comma separated list of fields. For example: `exposed_score,resource_value`.
* The default sorting order is descending. To specify ascending or descending order for a
* field, append a ` ASC` or a ` DESC` suffix, respectively; for example: `exposed_score
* DESC`.
*/
@com.google.api.client.util.Key
private java.lang.String orderBy;
/** Optional. The fields by which to order the valued resources response. Supported fields: *
`exposed_score` * `resource_value` * `resource_type` * `resource` * `display_name` Values should be
a comma separated list of fields. For example: `exposed_score,resource_value`. The default sorting
order is descending. To specify ascending or descending order for a field, append a ` ASC` or a `
DESC` suffix, respectively; for example: `exposed_score DESC`.
*/
public java.lang.String getOrderBy() {
return orderBy;
}
/**
* Optional. The fields by which to order the valued resources response. Supported fields: *
* `exposed_score` * `resource_value` * `resource_type` * `resource` * `display_name` Values
* should be a comma separated list of fields. For example: `exposed_score,resource_value`.
* The default sorting order is descending. To specify ascending or descending order for a
* field, append a ` ASC` or a ` DESC` suffix, respectively; for example: `exposed_score
* DESC`.
*/
public List setOrderBy(java.lang.String orderBy) {
this.orderBy = orderBy;
return this;
}
/**
* The maximum number of results to return in a single response. Default is 10, minimum is
* 1, maximum is 1000.
*/
@com.google.api.client.util.Key
private java.lang.Integer pageSize;
/** The maximum number of results to return in a single response. Default is 10, minimum is 1, maximum
is 1000.
*/
public java.lang.Integer getPageSize() {
return pageSize;
}
/**
* The maximum number of results to return in a single response. Default is 10, minimum is
* 1, maximum is 1000.
*/
public List setPageSize(java.lang.Integer pageSize) {
this.pageSize = pageSize;
return this;
}
/**
* The value returned by the last `ListValuedResourcesResponse`; indicates that this is a
* continuation of a prior `ListValuedResources` call, and that the system should return the
* next page of data.
*/
@com.google.api.client.util.Key
private java.lang.String pageToken;
/** The value returned by the last `ListValuedResourcesResponse`; indicates that this is a continuation
of a prior `ListValuedResources` call, and that the system should return the next page of data.
*/
public java.lang.String getPageToken() {
return pageToken;
}
/**
* The value returned by the last `ListValuedResourcesResponse`; indicates that this is a
* continuation of a prior `ListValuedResources` call, and that the system should return the
* next page of data.
*/
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 Projects collection.
*
* The typical use is:
*
* {@code SecurityCommandCenter securitycenter = new SecurityCommandCenter(...);}
* {@code SecurityCommandCenter.Projects.List request = securitycenter.projects().list(parameters ...)}
*
*
* @return the resource collection
*/
public Projects projects() {
return new Projects();
}
/**
* The "projects" collection of methods.
*/
public class Projects {
/**
* An accessor for creating requests from the Assets collection.
*
* The typical use is:
*
* {@code SecurityCommandCenter securitycenter = new SecurityCommandCenter(...);}
* {@code SecurityCommandCenter.Assets.List request = securitycenter.assets().list(parameters ...)}
*
*
* @return the resource collection
*/
public Assets assets() {
return new Assets();
}
/**
* The "assets" collection of methods.
*/
public class Assets {
/**
* Filters an organization's assets and groups them by their specified properties.
*
* Create a request for the method "assets.group".
*
* This request holds the parameters needed by the securitycenter server. After setting any
* optional parameters, call the {@link Group#execute()} method to invoke the remote operation.
*
* @param parent Required. The name of the parent to group the assets by. Its format is
* `organizations/[organization_id]`, `folders/[folder_id]`, or `projects/[project_id]`.
* @param content the {@link com.google.api.services.securitycenter.v1.model.GroupAssetsRequest}
* @return the request
*/
public Group group(java.lang.String parent, com.google.api.services.securitycenter.v1.model.GroupAssetsRequest content) throws java.io.IOException {
Group result = new Group(parent, content);
initialize(result);
return result;
}
public class Group extends SecurityCommandCenterRequest {
private static final String REST_PATH = "v1/{+parent}/assets:group";
private final java.util.regex.Pattern PARENT_PATTERN =
java.util.regex.Pattern.compile("^projects/[^/]+$");
/**
* Filters an organization's assets and groups them by their specified properties.
*
* Create a request for the method "assets.group".
*
* This request holds the parameters needed by the the securitycenter server. After setting any
* optional parameters, call the {@link Group#execute()} method to invoke the remote operation.
* {@link
* Group#initialize(com.google.api.client.googleapis.services.AbstractGoogleClientRequest)} must
* be called to initialize this instance immediately after invoking the constructor.
*
* @param parent Required. The name of the parent to group the assets by. Its format is
* `organizations/[organization_id]`, `folders/[folder_id]`, or `projects/[project_id]`.
* @param content the {@link com.google.api.services.securitycenter.v1.model.GroupAssetsRequest}
* @since 1.13
*/
protected Group(java.lang.String parent, com.google.api.services.securitycenter.v1.model.GroupAssetsRequest content) {
super(SecurityCommandCenter.this, "POST", REST_PATH, content, com.google.api.services.securitycenter.v1.model.GroupAssetsResponse.class);
this.parent = com.google.api.client.util.Preconditions.checkNotNull(parent, "Required parameter parent must be specified.");
if (!getSuppressPatternChecks()) {
com.google.api.client.util.Preconditions.checkArgument(PARENT_PATTERN.matcher(parent).matches(),
"Parameter parent must conform to the pattern " +
"^projects/[^/]+$");
}
}
@Override
public Group set$Xgafv(java.lang.String $Xgafv) {
return (Group) super.set$Xgafv($Xgafv);
}
@Override
public Group setAccessToken(java.lang.String accessToken) {
return (Group) super.setAccessToken(accessToken);
}
@Override
public Group setAlt(java.lang.String alt) {
return (Group) super.setAlt(alt);
}
@Override
public Group setCallback(java.lang.String callback) {
return (Group) super.setCallback(callback);
}
@Override
public Group setFields(java.lang.String fields) {
return (Group) super.setFields(fields);
}
@Override
public Group setKey(java.lang.String key) {
return (Group) super.setKey(key);
}
@Override
public Group setOauthToken(java.lang.String oauthToken) {
return (Group) super.setOauthToken(oauthToken);
}
@Override
public Group setPrettyPrint(java.lang.Boolean prettyPrint) {
return (Group) super.setPrettyPrint(prettyPrint);
}
@Override
public Group setQuotaUser(java.lang.String quotaUser) {
return (Group) super.setQuotaUser(quotaUser);
}
@Override
public Group setUploadType(java.lang.String uploadType) {
return (Group) super.setUploadType(uploadType);
}
@Override
public Group setUploadProtocol(java.lang.String uploadProtocol) {
return (Group) super.setUploadProtocol(uploadProtocol);
}
/**
* Required. The name of the parent to group the assets by. Its format is
* `organizations/[organization_id]`, `folders/[folder_id]`, or `projects/[project_id]`.
*/
@com.google.api.client.util.Key
private java.lang.String parent;
/** Required. The name of the parent to group the assets by. Its format is
`organizations/[organization_id]`, `folders/[folder_id]`, or `projects/[project_id]`.
*/
public java.lang.String getParent() {
return parent;
}
/**
* Required. The name of the parent to group the assets by. Its format is
* `organizations/[organization_id]`, `folders/[folder_id]`, or `projects/[project_id]`.
*/
public Group setParent(java.lang.String parent) {
if (!getSuppressPatternChecks()) {
com.google.api.client.util.Preconditions.checkArgument(PARENT_PATTERN.matcher(parent).matches(),
"Parameter parent must conform to the pattern " +
"^projects/[^/]+$");
}
this.parent = parent;
return this;
}
@Override
public Group set(String parameterName, Object value) {
return (Group) super.set(parameterName, value);
}
}
/**
* Lists an organization's assets.
*
* Create a request for the method "assets.list".
*
* This request holds the parameters needed by the securitycenter server. After setting any
* optional parameters, call the {@link List#execute()} method to invoke the remote operation.
*
* @param parent Required. The name of the parent resource that contains the assets. The value that you can specify
* on parent depends on the method in which you specify parent. You can specify one of the
* following values: `organizations/[organization_id]`, `folders/[folder_id]`, or
* `projects/[project_id]`.
* @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 SecurityCommandCenterRequest {
private static final String REST_PATH = "v1/{+parent}/assets";
private final java.util.regex.Pattern PARENT_PATTERN =
java.util.regex.Pattern.compile("^projects/[^/]+$");
/**
* Lists an organization's assets.
*
* Create a request for the method "assets.list".
*
* This request holds the parameters needed by the the securitycenter server. After setting any
* optional parameters, call the {@link List#execute()} method to invoke the remote operation.
* {@link List#initialize(com.google.api.client.googleapis.services.AbstractGoogleClientRequest)}
* must be called to initialize this instance immediately after invoking the constructor.
*
* @param parent Required. The name of the parent resource that contains the assets. The value that you can specify
* on parent depends on the method in which you specify parent. You can specify one of the
* following values: `organizations/[organization_id]`, `folders/[folder_id]`, or
* `projects/[project_id]`.
* @since 1.13
*/
protected List(java.lang.String parent) {
super(SecurityCommandCenter.this, "GET", REST_PATH, null, com.google.api.services.securitycenter.v1.model.ListAssetsResponse.class);
this.parent = com.google.api.client.util.Preconditions.checkNotNull(parent, "Required parameter parent must be specified.");
if (!getSuppressPatternChecks()) {
com.google.api.client.util.Preconditions.checkArgument(PARENT_PATTERN.matcher(parent).matches(),
"Parameter parent must conform to the pattern " +
"^projects/[^/]+$");
}
}
@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 parent resource that contains the assets. The value that you
* can specify on parent depends on the method in which you specify parent. You can specify
* one of the following values: `organizations/[organization_id]`, `folders/[folder_id]`, or
* `projects/[project_id]`.
*/
@com.google.api.client.util.Key
private java.lang.String parent;
/** Required. The name of the parent resource that contains the assets. The value that you can specify
on parent depends on the method in which you specify parent. You can specify one of the following
values: `organizations/[organization_id]`, `folders/[folder_id]`, or `projects/[project_id]`.
*/
public java.lang.String getParent() {
return parent;
}
/**
* Required. The name of the parent resource that contains the assets. The value that you
* can specify on parent depends on the method in which you specify parent. You can specify
* one of the following values: `organizations/[organization_id]`, `folders/[folder_id]`, or
* `projects/[project_id]`.
*/
public List setParent(java.lang.String parent) {
if (!getSuppressPatternChecks()) {
com.google.api.client.util.Preconditions.checkArgument(PARENT_PATTERN.matcher(parent).matches(),
"Parameter parent must conform to the pattern " +
"^projects/[^/]+$");
}
this.parent = parent;
return this;
}
/**
* When compare_duration is set, the ListAssetsResult's "state_change" attribute is updated
* to indicate whether the asset was added, removed, or remained present during the
* compare_duration period of time that precedes the read_time. This is the time between
* (read_time - compare_duration) and read_time. The state_change value is derived based on
* the presence of the asset at the two points in time. Intermediate state changes between
* the two times don't affect the result. For example, the results aren't affected if the
* asset is removed and re-created again. Possible "state_change" values when
* compare_duration is specified: * "ADDED": indicates that the asset was not present at the
* start of compare_duration, but present at read_time. * "REMOVED": indicates that the
* asset was present at the start of compare_duration, but not present at read_time. *
* "ACTIVE": indicates that the asset was present at both the start and the end of the time
* period defined by compare_duration and read_time. If compare_duration is not specified,
* then the only possible state_change is "UNUSED", which will be the state_change set for
* all assets present at read_time.
*/
@com.google.api.client.util.Key
private String compareDuration;
/** When compare_duration is set, the ListAssetsResult's "state_change" attribute is updated to
indicate whether the asset was added, removed, or remained present during the compare_duration
period of time that precedes the read_time. This is the time between (read_time - compare_duration)
and read_time. The state_change value is derived based on the presence of the asset at the two
points in time. Intermediate state changes between the two times don't affect the result. For
example, the results aren't affected if the asset is removed and re-created again. Possible
"state_change" values when compare_duration is specified: * "ADDED": indicates that the asset was
not present at the start of compare_duration, but present at read_time. * "REMOVED": indicates that
the asset was present at the start of compare_duration, but not present at read_time. * "ACTIVE":
indicates that the asset was present at both the start and the end of the time period defined by
compare_duration and read_time. If compare_duration is not specified, then the only possible
state_change is "UNUSED", which will be the state_change set for all assets present at read_time.
*/
public String getCompareDuration() {
return compareDuration;
}
/**
* When compare_duration is set, the ListAssetsResult's "state_change" attribute is updated
* to indicate whether the asset was added, removed, or remained present during the
* compare_duration period of time that precedes the read_time. This is the time between
* (read_time - compare_duration) and read_time. The state_change value is derived based on
* the presence of the asset at the two points in time. Intermediate state changes between
* the two times don't affect the result. For example, the results aren't affected if the
* asset is removed and re-created again. Possible "state_change" values when
* compare_duration is specified: * "ADDED": indicates that the asset was not present at the
* start of compare_duration, but present at read_time. * "REMOVED": indicates that the
* asset was present at the start of compare_duration, but not present at read_time. *
* "ACTIVE": indicates that the asset was present at both the start and the end of the time
* period defined by compare_duration and read_time. If compare_duration is not specified,
* then the only possible state_change is "UNUSED", which will be the state_change set for
* all assets present at read_time.
*/
public List setCompareDuration(String compareDuration) {
this.compareDuration = compareDuration;
return this;
}
/**
* A field mask to specify the ListAssetsResult fields to be listed in the response. An
* empty field mask will list all fields.
*/
@com.google.api.client.util.Key
private String fieldMask;
/** A field mask to specify the ListAssetsResult fields to be listed in the response. An empty field
mask will list all fields.
*/
public String getFieldMask() {
return fieldMask;
}
/**
* A field mask to specify the ListAssetsResult fields to be listed in the response. An
* empty field mask will list all fields.
*/
public List setFieldMask(String fieldMask) {
this.fieldMask = fieldMask;
return this;
}
/**
* Expression that defines the filter to apply across assets. The expression is a list of
* zero or more restrictions combined via logical operators `AND` and `OR`. Parentheses are
* supported, and `OR` has higher precedence than `AND`. Restrictions have the form ` ` and
* may have a `-` character in front of them to indicate negation. The fields map to those
* defined in the Asset resource. Examples include: * name *
* security_center_properties.resource_name * resource_properties.a_property *
* security_marks.marks.marka The supported operators are: * `=` for all value types. * `>`,
* `<`, `>=`, `<=` for integer values. * `:`, meaning substring matching, for strings. The
* supported value types are: * string literals in quotes. * integer literals without
* quotes. * boolean literals `true` and `false` without quotes. The following are the
* allowed field and operator combinations: * name: `=` * update_time: `=`, `>`, `<`, `>=`,
* `<=` Usage: This should be milliseconds since epoch or an RFC3339 string. Examples:
* `update_time = "2019-06-10T16:07:18-07:00"` `update_time = 1560208038000` * create_time:
* `=`, `>`, `<`, `>=`, `<=` Usage: This should be milliseconds since epoch or an RFC3339
* string. Examples: `create_time = "2019-06-10T16:07:18-07:00"` `create_time =
* 1560208038000` * iam_policy.policy_blob: `=`, `:` * resource_properties: `=`, `:`, `>`,
* `<`, `>=`, `<=` * security_marks.marks: `=`, `:` *
* security_center_properties.resource_name: `=`, `:` *
* security_center_properties.resource_display_name: `=`, `:` *
* security_center_properties.resource_type: `=`, `:` *
* security_center_properties.resource_parent: `=`, `:` *
* security_center_properties.resource_parent_display_name: `=`, `:` *
* security_center_properties.resource_project: `=`, `:` *
* security_center_properties.resource_project_display_name: `=`, `:` *
* security_center_properties.resource_owners: `=`, `:` For example,
* `resource_properties.size = 100` is a valid filter string. Use a partial match on the
* empty string to filter based on a property existing: `resource_properties.my_property :
* ""` Use a negated partial match on the empty string to filter based on a property not
* existing: `-resource_properties.my_property : ""`
*/
@com.google.api.client.util.Key
private java.lang.String filter;
/** Expression that defines the filter to apply across assets. The expression is a list of zero or more
restrictions combined via logical operators `AND` and `OR`. Parentheses are supported, and `OR` has
higher precedence than `AND`. Restrictions have the form ` ` and may have a `-` character in front
of them to indicate negation. The fields map to those defined in the Asset resource. Examples
include: * name * security_center_properties.resource_name * resource_properties.a_property *
security_marks.marks.marka The supported operators are: * `=` for all value types. * `>`, `<`,
`>=`, `<=` for integer values. * `:`, meaning substring matching, for strings. The supported value
types are: * string literals in quotes. * integer literals without quotes. * boolean literals
`true` and `false` without quotes. The following are the allowed field and operator combinations: *
name: `=` * update_time: `=`, `>`, `<`, `>=`, `<=` Usage: This should be milliseconds since epoch
or an RFC3339 string. Examples: `update_time = "2019-06-10T16:07:18-07:00"` `update_time =
1560208038000` * create_time: `=`, `>`, `<`, `>=`, `<=` Usage: This should be milliseconds since
epoch or an RFC3339 string. Examples: `create_time = "2019-06-10T16:07:18-07:00"` `create_time =
1560208038000` * iam_policy.policy_blob: `=`, `:` * resource_properties: `=`, `:`, `>`, `<`, `>=`,
`<=` * security_marks.marks: `=`, `:` * security_center_properties.resource_name: `=`, `:` *
security_center_properties.resource_display_name: `=`, `:` *
security_center_properties.resource_type: `=`, `:` * security_center_properties.resource_parent:
`=`, `:` * security_center_properties.resource_parent_display_name: `=`, `:` *
security_center_properties.resource_project: `=`, `:` *
security_center_properties.resource_project_display_name: `=`, `:` *
security_center_properties.resource_owners: `=`, `:` For example, `resource_properties.size = 100`
is a valid filter string. Use a partial match on the empty string to filter based on a property
existing: `resource_properties.my_property : ""` Use a negated partial match on the empty string to
filter based on a property not existing: `-resource_properties.my_property : ""`
*/
public java.lang.String getFilter() {
return filter;
}
/**
* Expression that defines the filter to apply across assets. The expression is a list of
* zero or more restrictions combined via logical operators `AND` and `OR`. Parentheses are
* supported, and `OR` has higher precedence than `AND`. Restrictions have the form ` ` and
* may have a `-` character in front of them to indicate negation. The fields map to those
* defined in the Asset resource. Examples include: * name *
* security_center_properties.resource_name * resource_properties.a_property *
* security_marks.marks.marka The supported operators are: * `=` for all value types. * `>`,
* `<`, `>=`, `<=` for integer values. * `:`, meaning substring matching, for strings. The
* supported value types are: * string literals in quotes. * integer literals without
* quotes. * boolean literals `true` and `false` without quotes. The following are the
* allowed field and operator combinations: * name: `=` * update_time: `=`, `>`, `<`, `>=`,
* `<=` Usage: This should be milliseconds since epoch or an RFC3339 string. Examples:
* `update_time = "2019-06-10T16:07:18-07:00"` `update_time = 1560208038000` * create_time:
* `=`, `>`, `<`, `>=`, `<=` Usage: This should be milliseconds since epoch or an RFC3339
* string. Examples: `create_time = "2019-06-10T16:07:18-07:00"` `create_time =
* 1560208038000` * iam_policy.policy_blob: `=`, `:` * resource_properties: `=`, `:`, `>`,
* `<`, `>=`, `<=` * security_marks.marks: `=`, `:` *
* security_center_properties.resource_name: `=`, `:` *
* security_center_properties.resource_display_name: `=`, `:` *
* security_center_properties.resource_type: `=`, `:` *
* security_center_properties.resource_parent: `=`, `:` *
* security_center_properties.resource_parent_display_name: `=`, `:` *
* security_center_properties.resource_project: `=`, `:` *
* security_center_properties.resource_project_display_name: `=`, `:` *
* security_center_properties.resource_owners: `=`, `:` For example,
* `resource_properties.size = 100` is a valid filter string. Use a partial match on the
* empty string to filter based on a property existing: `resource_properties.my_property :
* ""` Use a negated partial match on the empty string to filter based on a property not
* existing: `-resource_properties.my_property : ""`
*/
public List setFilter(java.lang.String filter) {
this.filter = filter;
return this;
}
/**
* Expression that defines what fields and order to use for sorting. The string value should
* follow SQL syntax: comma separated list of fields. For example:
* "name,resource_properties.a_property". The default sorting order is ascending. To specify
* descending order for a field, a suffix " desc" should be appended to the field name. For
* example: "name desc,resource_properties.a_property". Redundant space characters in the
* syntax are insignificant. "name desc,resource_properties.a_property" and " name desc ,
* resource_properties.a_property " are equivalent. The following fields are supported: name
* update_time resource_properties security_marks.marks
* security_center_properties.resource_name security_center_properties.resource_display_name
* security_center_properties.resource_parent
* security_center_properties.resource_parent_display_name
* security_center_properties.resource_project
* security_center_properties.resource_project_display_name
* security_center_properties.resource_type
*/
@com.google.api.client.util.Key
private java.lang.String orderBy;
/** Expression that defines what fields and order to use for sorting. The string value should follow
SQL syntax: comma separated list of fields. For example: "name,resource_properties.a_property". The
default sorting order is ascending. To specify descending order for a field, a suffix " desc"
should be appended to the field name. For example: "name desc,resource_properties.a_property".
Redundant space characters in the syntax are insignificant. "name
desc,resource_properties.a_property" and " name desc , resource_properties.a_property " are
equivalent. The following fields are supported: name update_time resource_properties
security_marks.marks security_center_properties.resource_name
security_center_properties.resource_display_name security_center_properties.resource_parent
security_center_properties.resource_parent_display_name security_center_properties.resource_project
security_center_properties.resource_project_display_name security_center_properties.resource_type
*/
public java.lang.String getOrderBy() {
return orderBy;
}
/**
* Expression that defines what fields and order to use for sorting. The string value should
* follow SQL syntax: comma separated list of fields. For example:
* "name,resource_properties.a_property". The default sorting order is ascending. To specify
* descending order for a field, a suffix " desc" should be appended to the field name. For
* example: "name desc,resource_properties.a_property". Redundant space characters in the
* syntax are insignificant. "name desc,resource_properties.a_property" and " name desc ,
* resource_properties.a_property " are equivalent. The following fields are supported: name
* update_time resource_properties security_marks.marks
* security_center_properties.resource_name security_center_properties.resource_display_name
* security_center_properties.resource_parent
* security_center_properties.resource_parent_display_name
* security_center_properties.resource_project
* security_center_properties.resource_project_display_name
* security_center_properties.resource_type
*/
public List setOrderBy(java.lang.String orderBy) {
this.orderBy = orderBy;
return this;
}
/**
* The maximum number of results to return in a single response. Default is 10, minimum is
* 1, maximum is 1000.
*/
@com.google.api.client.util.Key
private java.lang.Integer pageSize;
/** The maximum number of results to return in a single response. Default is 10, minimum is 1, maximum
is 1000.
*/
public java.lang.Integer getPageSize() {
return pageSize;
}
/**
* The maximum number of results to return in a single response. Default is 10, minimum is
* 1, maximum is 1000.
*/
public List setPageSize(java.lang.Integer pageSize) {
this.pageSize = pageSize;
return this;
}
/**
* The value returned by the last `ListAssetsResponse`; indicates that this is a
* continuation of a prior `ListAssets` call, and that the system should return the next
* page of data.
*/
@com.google.api.client.util.Key
private java.lang.String pageToken;
/** The value returned by the last `ListAssetsResponse`; indicates that this is a continuation of a
prior `ListAssets` call, and that the system should return the next page of data.
*/
public java.lang.String getPageToken() {
return pageToken;
}
/**
* The value returned by the last `ListAssetsResponse`; indicates that this is a
* continuation of a prior `ListAssets` call, and that the system should return the next
* page of data.
*/
public List setPageToken(java.lang.String pageToken) {
this.pageToken = pageToken;
return this;
}
/**
* Time used as a reference point when filtering assets. The filter is limited to assets
* existing at the supplied time and their values are those at that specific time. Absence
* of this field will default to the API's version of NOW.
*/
@com.google.api.client.util.Key
private String readTime;
/** Time used as a reference point when filtering assets. The filter is limited to assets existing at
the supplied time and their values are those at that specific time. Absence of this field will
default to the API's version of NOW.
*/
public String getReadTime() {
return readTime;
}
/**
* Time used as a reference point when filtering assets. The filter is limited to assets
* existing at the supplied time and their values are those at that specific time. Absence
* of this field will default to the API's version of NOW.
*/
public List setReadTime(String readTime) {
this.readTime = readTime;
return this;
}
@Override
public List set(String parameterName, Object value) {
return (List) super.set(parameterName, value);
}
}
/**
* Updates security marks.
*
* Create a request for the method "assets.updateSecurityMarks".
*
* This request holds the parameters needed by the securitycenter server. After setting any
* optional parameters, call the {@link UpdateSecurityMarks#execute()} method to invoke the remote
* operation.
*
* @param name The relative resource name of the SecurityMarks. See:
* https://cloud.google.com/apis/design/resource_names#relative_resource_name Examples:
* "organizations/{organization_id}/assets/{asset_id}/securityMarks"
* "organizations/{organization_id}/sources/{source_id}/findings/{finding_id}/securityMarks".
* @param content the {@link com.google.api.services.securitycenter.v1.model.SecurityMarks}
* @return the request
*/
public UpdateSecurityMarks updateSecurityMarks(java.lang.String name, com.google.api.services.securitycenter.v1.model.SecurityMarks content) throws java.io.IOException {
UpdateSecurityMarks result = new UpdateSecurityMarks(name, content);
initialize(result);
return result;
}
public class UpdateSecurityMarks extends SecurityCommandCenterRequest {
private static final String REST_PATH = "v1/{+name}";
private final java.util.regex.Pattern NAME_PATTERN =
java.util.regex.Pattern.compile("^projects/[^/]+/assets/[^/]+/securityMarks$");
/**
* Updates security marks.
*
* Create a request for the method "assets.updateSecurityMarks".
*
* This request holds the parameters needed by the the securitycenter server. After setting any
* optional parameters, call the {@link UpdateSecurityMarks#execute()} method to invoke the remote
* operation. {@link UpdateSecurityMarks#initialize(com.google.api.client.googleapis.services.
* AbstractGoogleClientRequest)} must be called to initialize this instance immediately after
* invoking the constructor.
*
* @param name The relative resource name of the SecurityMarks. See:
* https://cloud.google.com/apis/design/resource_names#relative_resource_name Examples:
* "organizations/{organization_id}/assets/{asset_id}/securityMarks"
* "organizations/{organization_id}/sources/{source_id}/findings/{finding_id}/securityMarks".
* @param content the {@link com.google.api.services.securitycenter.v1.model.SecurityMarks}
* @since 1.13
*/
protected UpdateSecurityMarks(java.lang.String name, com.google.api.services.securitycenter.v1.model.SecurityMarks content) {
super(SecurityCommandCenter.this, "PATCH", REST_PATH, content, com.google.api.services.securitycenter.v1.model.SecurityMarks.class);
this.name = com.google.api.client.util.Preconditions.checkNotNull(name, "Required parameter name must be specified.");
if (!getSuppressPatternChecks()) {
com.google.api.client.util.Preconditions.checkArgument(NAME_PATTERN.matcher(name).matches(),
"Parameter name must conform to the pattern " +
"^projects/[^/]+/assets/[^/]+/securityMarks$");
}
}
@Override
public UpdateSecurityMarks set$Xgafv(java.lang.String $Xgafv) {
return (UpdateSecurityMarks) super.set$Xgafv($Xgafv);
}
@Override
public UpdateSecurityMarks setAccessToken(java.lang.String accessToken) {
return (UpdateSecurityMarks) super.setAccessToken(accessToken);
}
@Override
public UpdateSecurityMarks setAlt(java.lang.String alt) {
return (UpdateSecurityMarks) super.setAlt(alt);
}
@Override
public UpdateSecurityMarks setCallback(java.lang.String callback) {
return (UpdateSecurityMarks) super.setCallback(callback);
}
@Override
public UpdateSecurityMarks setFields(java.lang.String fields) {
return (UpdateSecurityMarks) super.setFields(fields);
}
@Override
public UpdateSecurityMarks setKey(java.lang.String key) {
return (UpdateSecurityMarks) super.setKey(key);
}
@Override
public UpdateSecurityMarks setOauthToken(java.lang.String oauthToken) {
return (UpdateSecurityMarks) super.setOauthToken(oauthToken);
}
@Override
public UpdateSecurityMarks setPrettyPrint(java.lang.Boolean prettyPrint) {
return (UpdateSecurityMarks) super.setPrettyPrint(prettyPrint);
}
@Override
public UpdateSecurityMarks setQuotaUser(java.lang.String quotaUser) {
return (UpdateSecurityMarks) super.setQuotaUser(quotaUser);
}
@Override
public UpdateSecurityMarks setUploadType(java.lang.String uploadType) {
return (UpdateSecurityMarks) super.setUploadType(uploadType);
}
@Override
public UpdateSecurityMarks setUploadProtocol(java.lang.String uploadProtocol) {
return (UpdateSecurityMarks) super.setUploadProtocol(uploadProtocol);
}
/**
* The relative resource name of the SecurityMarks. See:
* https://cloud.google.com/apis/design/resource_names#relative_resource_name Examples:
* "organizations/{organization_id}/assets/{asset_id}/securityMarks" "organizations/{organiz
* ation_id}/sources/{source_id}/findings/{finding_id}/securityMarks".
*/
@com.google.api.client.util.Key
private java.lang.String name;
/** The relative resource name of the SecurityMarks. See:
https://cloud.google.com/apis/design/resource_names#relative_resource_name Examples:
"organizations/{organization_id}/assets/{asset_id}/securityMarks"
"organizations/{organization_id}/sources/{source_id}/findings/{finding_id}/securityMarks".
*/
public java.lang.String getName() {
return name;
}
/**
* The relative resource name of the SecurityMarks. See:
* https://cloud.google.com/apis/design/resource_names#relative_resource_name Examples:
* "organizations/{organization_id}/assets/{asset_id}/securityMarks" "organizations/{organiz
* ation_id}/sources/{source_id}/findings/{finding_id}/securityMarks".
*/
public UpdateSecurityMarks setName(java.lang.String name) {
if (!getSuppressPatternChecks()) {
com.google.api.client.util.Preconditions.checkArgument(NAME_PATTERN.matcher(name).matches(),
"Parameter name must conform to the pattern " +
"^projects/[^/]+/assets/[^/]+/securityMarks$");
}
this.name = name;
return this;
}
/**
* The time at which the updated SecurityMarks take effect. If not set uses current server
* time. Updates will be applied to the SecurityMarks that are active immediately preceding
* this time. Must be earlier or equal to the server time.
*/
@com.google.api.client.util.Key
private String startTime;
/** The time at which the updated SecurityMarks take effect. If not set uses current server time.
Updates will be applied to the SecurityMarks that are active immediately preceding this time. Must
be earlier or equal to the server time.
*/
public String getStartTime() {
return startTime;
}
/**
* The time at which the updated SecurityMarks take effect. If not set uses current server
* time. Updates will be applied to the SecurityMarks that are active immediately preceding
* this time. Must be earlier or equal to the server time.
*/
public UpdateSecurityMarks setStartTime(String startTime) {
this.startTime = startTime;
return this;
}
/**
* The FieldMask to use when updating the security marks resource. The field mask must not
* contain duplicate fields. If empty or set to "marks", all marks will be replaced.
* Individual marks can be updated using "marks.".
*/
@com.google.api.client.util.Key
private String updateMask;
/** The FieldMask to use when updating the security marks resource. The field mask must not contain
duplicate fields. If empty or set to "marks", all marks will be replaced. Individual marks can be
updated using "marks.".
*/
public String getUpdateMask() {
return updateMask;
}
/**
* The FieldMask to use when updating the security marks resource. The field mask must not
* contain duplicate fields. If empty or set to "marks", all marks will be replaced.
* Individual marks can be updated using "marks.".
*/
public UpdateSecurityMarks setUpdateMask(String updateMask) {
this.updateMask = updateMask;
return this;
}
@Override
public UpdateSecurityMarks set(String parameterName, Object value) {
return (UpdateSecurityMarks) super.set(parameterName, value);
}
}
}
/**
* An accessor for creating requests from the BigQueryExports collection.
*
* The typical use is:
*
* {@code SecurityCommandCenter securitycenter = new SecurityCommandCenter(...);}
* {@code SecurityCommandCenter.BigQueryExports.List request = securitycenter.bigQueryExports().list(parameters ...)}
*
*
* @return the resource collection
*/
public BigQueryExports bigQueryExports() {
return new BigQueryExports();
}
/**
* The "bigQueryExports" collection of methods.
*/
public class BigQueryExports {
/**
* Creates a BigQuery export.
*
* Create a request for the method "bigQueryExports.create".
*
* This request holds the parameters needed by the securitycenter server. After setting any
* optional parameters, call the {@link Create#execute()} method to invoke the remote operation.
*
* @param parent Required. The name of the parent resource of the new BigQuery export. Its format is
* `organizations/[organization_id]`, `folders/[folder_id]`, or `projects/[project_id]`.
* @param content the {@link com.google.api.services.securitycenter.v1.model.GoogleCloudSecuritycenterV1BigQueryExport}
* @return the request
*/
public Create create(java.lang.String parent, com.google.api.services.securitycenter.v1.model.GoogleCloudSecuritycenterV1BigQueryExport content) throws java.io.IOException {
Create result = new Create(parent, content);
initialize(result);
return result;
}
public class Create extends SecurityCommandCenterRequest {
private static final String REST_PATH = "v1/{+parent}/bigQueryExports";
private final java.util.regex.Pattern PARENT_PATTERN =
java.util.regex.Pattern.compile("^projects/[^/]+$");
/**
* Creates a BigQuery export.
*
* Create a request for the method "bigQueryExports.create".
*
* This request holds the parameters needed by the the securitycenter server. After setting any
* optional parameters, call the {@link Create#execute()} method to invoke the remote operation.
* {@link
* Create#initialize(com.google.api.client.googleapis.services.AbstractGoogleClientRequest)} must
* be called to initialize this instance immediately after invoking the constructor.
*
* @param parent Required. The name of the parent resource of the new BigQuery export. Its format is
* `organizations/[organization_id]`, `folders/[folder_id]`, or `projects/[project_id]`.
* @param content the {@link com.google.api.services.securitycenter.v1.model.GoogleCloudSecuritycenterV1BigQueryExport}
* @since 1.13
*/
protected Create(java.lang.String parent, com.google.api.services.securitycenter.v1.model.GoogleCloudSecuritycenterV1BigQueryExport content) {
super(SecurityCommandCenter.this, "POST", REST_PATH, content, com.google.api.services.securitycenter.v1.model.GoogleCloudSecuritycenterV1BigQueryExport.class);
this.parent = com.google.api.client.util.Preconditions.checkNotNull(parent, "Required parameter parent must be specified.");
if (!getSuppressPatternChecks()) {
com.google.api.client.util.Preconditions.checkArgument(PARENT_PATTERN.matcher(parent).matches(),
"Parameter parent must conform to the pattern " +
"^projects/[^/]+$");
}
}
@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 parent resource of the new BigQuery export. Its format is
* `organizations/[organization_id]`, `folders/[folder_id]`, or `projects/[project_id]`.
*/
@com.google.api.client.util.Key
private java.lang.String parent;
/** Required. The name of the parent resource of the new BigQuery export. Its format is
`organizations/[organization_id]`, `folders/[folder_id]`, or `projects/[project_id]`.
*/
public java.lang.String getParent() {
return parent;
}
/**
* Required. The name of the parent resource of the new BigQuery export. Its format is
* `organizations/[organization_id]`, `folders/[folder_id]`, or `projects/[project_id]`.
*/
public Create setParent(java.lang.String parent) {
if (!getSuppressPatternChecks()) {
com.google.api.client.util.Preconditions.checkArgument(PARENT_PATTERN.matcher(parent).matches(),
"Parameter parent must conform to the pattern " +
"^projects/[^/]+$");
}
this.parent = parent;
return this;
}
/**
* Required. Unique identifier provided by the client within the parent scope. It must
* consist of only lowercase letters, numbers, and hyphens, must start with a letter, must
* end with either a letter or a number, and must be 63 characters or less.
*/
@com.google.api.client.util.Key
private java.lang.String bigQueryExportId;
/** Required. Unique identifier provided by the client within the parent scope. It must consist of only
lowercase letters, numbers, and hyphens, must start with a letter, must end with either a letter or
a number, and must be 63 characters or less.
*/
public java.lang.String getBigQueryExportId() {
return bigQueryExportId;
}
/**
* Required. Unique identifier provided by the client within the parent scope. It must
* consist of only lowercase letters, numbers, and hyphens, must start with a letter, must
* end with either a letter or a number, and must be 63 characters or less.
*/
public Create setBigQueryExportId(java.lang.String bigQueryExportId) {
this.bigQueryExportId = bigQueryExportId;
return this;
}
@Override
public Create set(String parameterName, Object value) {
return (Create) super.set(parameterName, value);
}
}
/**
* Deletes an existing BigQuery export.
*
* Create a request for the method "bigQueryExports.delete".
*
* This request holds the parameters needed by the securitycenter server. After setting any
* optional parameters, call the {@link Delete#execute()} method to invoke the remote operation.
*
* @param name Required. The name of the BigQuery export to delete. Its format is
* `organizations/{organization}/bigQueryExports/{export_id}`,
* `folders/{folder}/bigQueryExports/{export_id}`, or
* `projects/{project}/bigQueryExports/{export_id}`
* @return the request
*/
public Delete delete(java.lang.String name) throws java.io.IOException {
Delete result = new Delete(name);
initialize(result);
return result;
}
public class Delete extends SecurityCommandCenterRequest {
private static final String REST_PATH = "v1/{+name}";
private final java.util.regex.Pattern NAME_PATTERN =
java.util.regex.Pattern.compile("^projects/[^/]+/bigQueryExports/[^/]+$");
/**
* Deletes an existing BigQuery export.
*
* Create a request for the method "bigQueryExports.delete".
*
* This request holds the parameters needed by the the securitycenter server. After setting any
* optional parameters, call the {@link Delete#execute()} method to invoke the remote operation.
* {@link
* Delete#initialize(com.google.api.client.googleapis.services.AbstractGoogleClientRequest)} must
* be called to initialize this instance immediately after invoking the constructor.
*
* @param name Required. The name of the BigQuery export to delete. Its format is
* `organizations/{organization}/bigQueryExports/{export_id}`,
* `folders/{folder}/bigQueryExports/{export_id}`, or
* `projects/{project}/bigQueryExports/{export_id}`
* @since 1.13
*/
protected Delete(java.lang.String name) {
super(SecurityCommandCenter.this, "DELETE", REST_PATH, null, com.google.api.services.securitycenter.v1.model.Empty.class);
this.name = com.google.api.client.util.Preconditions.checkNotNull(name, "Required parameter name must be specified.");
if (!getSuppressPatternChecks()) {
com.google.api.client.util.Preconditions.checkArgument(NAME_PATTERN.matcher(name).matches(),
"Parameter name must conform to the pattern " +
"^projects/[^/]+/bigQueryExports/[^/]+$");
}
}
@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 BigQuery export to delete. Its format is
* `organizations/{organization}/bigQueryExports/{export_id}`,
* `folders/{folder}/bigQueryExports/{export_id}`, or
* `projects/{project}/bigQueryExports/{export_id}`
*/
@com.google.api.client.util.Key
private java.lang.String name;
/** Required. The name of the BigQuery export to delete. Its format is
`organizations/{organization}/bigQueryExports/{export_id}`,
`folders/{folder}/bigQueryExports/{export_id}`, or `projects/{project}/bigQueryExports/{export_id}`
*/
public java.lang.String getName() {
return name;
}
/**
* Required. The name of the BigQuery export to delete. Its format is
* `organizations/{organization}/bigQueryExports/{export_id}`,
* `folders/{folder}/bigQueryExports/{export_id}`, or
* `projects/{project}/bigQueryExports/{export_id}`
*/
public Delete setName(java.lang.String name) {
if (!getSuppressPatternChecks()) {
com.google.api.client.util.Preconditions.checkArgument(NAME_PATTERN.matcher(name).matches(),
"Parameter name must conform to the pattern " +
"^projects/[^/]+/bigQueryExports/[^/]+$");
}
this.name = name;
return this;
}
@Override
public Delete set(String parameterName, Object value) {
return (Delete) super.set(parameterName, value);
}
}
/**
* Gets a BigQuery export.
*
* Create a request for the method "bigQueryExports.get".
*
* This request holds the parameters needed by the securitycenter server. After setting any
* optional parameters, call the {@link Get#execute()} method to invoke the remote operation.
*
* @param name Required. Name of the BigQuery export to retrieve. Its format is
* `organizations/{organization}/bigQueryExports/{export_id}`,
* `folders/{folder}/bigQueryExports/{export_id}`, or
* `projects/{project}/bigQueryExports/{export_id}`
* @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 SecurityCommandCenterRequest {
private static final String REST_PATH = "v1/{+name}";
private final java.util.regex.Pattern NAME_PATTERN =
java.util.regex.Pattern.compile("^projects/[^/]+/bigQueryExports/[^/]+$");
/**
* Gets a BigQuery export.
*
* Create a request for the method "bigQueryExports.get".
*
* This request holds the parameters needed by the the securitycenter 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. Name of the BigQuery export to retrieve. Its format is
* `organizations/{organization}/bigQueryExports/{export_id}`,
* `folders/{folder}/bigQueryExports/{export_id}`, or
* `projects/{project}/bigQueryExports/{export_id}`
* @since 1.13
*/
protected Get(java.lang.String name) {
super(SecurityCommandCenter.this, "GET", REST_PATH, null, com.google.api.services.securitycenter.v1.model.GoogleCloudSecuritycenterV1BigQueryExport.class);
this.name = com.google.api.client.util.Preconditions.checkNotNull(name, "Required parameter name must be specified.");
if (!getSuppressPatternChecks()) {
com.google.api.client.util.Preconditions.checkArgument(NAME_PATTERN.matcher(name).matches(),
"Parameter name must conform to the pattern " +
"^projects/[^/]+/bigQueryExports/[^/]+$");
}
}
@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. Name of the BigQuery export to retrieve. Its format is
* `organizations/{organization}/bigQueryExports/{export_id}`,
* `folders/{folder}/bigQueryExports/{export_id}`, or
* `projects/{project}/bigQueryExports/{export_id}`
*/
@com.google.api.client.util.Key
private java.lang.String name;
/** Required. Name of the BigQuery export to retrieve. Its format is
`organizations/{organization}/bigQueryExports/{export_id}`,
`folders/{folder}/bigQueryExports/{export_id}`, or `projects/{project}/bigQueryExports/{export_id}`
*/
public java.lang.String getName() {
return name;
}
/**
* Required. Name of the BigQuery export to retrieve. Its format is
* `organizations/{organization}/bigQueryExports/{export_id}`,
* `folders/{folder}/bigQueryExports/{export_id}`, or
* `projects/{project}/bigQueryExports/{export_id}`
*/
public Get setName(java.lang.String name) {
if (!getSuppressPatternChecks()) {
com.google.api.client.util.Preconditions.checkArgument(NAME_PATTERN.matcher(name).matches(),
"Parameter name must conform to the pattern " +
"^projects/[^/]+/bigQueryExports/[^/]+$");
}
this.name = name;
return this;
}
@Override
public Get set(String parameterName, Object value) {
return (Get) super.set(parameterName, value);
}
}
/**
* Lists BigQuery exports. Note that when requesting BigQuery exports at a given level all exports
* under that level are also returned e.g. if requesting BigQuery exports under a folder, then all
* BigQuery exports immediately under the folder plus the ones created under the projects within the
* folder are returned.
*
* Create a request for the method "bigQueryExports.list".
*
* This request holds the parameters needed by the securitycenter server. After setting any
* optional parameters, call the {@link List#execute()} method to invoke the remote operation.
*
* @param parent Required. The parent, which owns the collection of BigQuery exports. Its format is
* `organizations/[organization_id]`, `folders/[folder_id]`, `projects/[project_id]`.
* @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 SecurityCommandCenterRequest {
private static final String REST_PATH = "v1/{+parent}/bigQueryExports";
private final java.util.regex.Pattern PARENT_PATTERN =
java.util.regex.Pattern.compile("^projects/[^/]+$");
/**
* Lists BigQuery exports. Note that when requesting BigQuery exports at a given level all exports
* under that level are also returned e.g. if requesting BigQuery exports under a folder, then all
* BigQuery exports immediately under the folder plus the ones created under the projects within
* the folder are returned.
*
* Create a request for the method "bigQueryExports.list".
*
* This request holds the parameters needed by the the securitycenter server. After setting any
* optional parameters, call the {@link List#execute()} method to invoke the remote operation.
* {@link List#initialize(com.google.api.client.googleapis.services.AbstractGoogleClientRequest)}
* must be called to initialize this instance immediately after invoking the constructor.
*
* @param parent Required. The parent, which owns the collection of BigQuery exports. Its format is
* `organizations/[organization_id]`, `folders/[folder_id]`, `projects/[project_id]`.
* @since 1.13
*/
protected List(java.lang.String parent) {
super(SecurityCommandCenter.this, "GET", REST_PATH, null, com.google.api.services.securitycenter.v1.model.ListBigQueryExportsResponse.class);
this.parent = com.google.api.client.util.Preconditions.checkNotNull(parent, "Required parameter parent must be specified.");
if (!getSuppressPatternChecks()) {
com.google.api.client.util.Preconditions.checkArgument(PARENT_PATTERN.matcher(parent).matches(),
"Parameter parent must conform to the pattern " +
"^projects/[^/]+$");
}
}
@Override
public com.google.api.client.http.HttpResponse executeUsingHead() throws java.io.IOException {
return super.executeUsingHead();
}
@Override
public com.google.api.client.http.HttpRequest buildHttpRequestUsingHead() throws java.io.IOException {
return super.buildHttpRequestUsingHead();
}
@Override
public List set$Xgafv(java.lang.String $Xgafv) {
return (List) super.set$Xgafv($Xgafv);
}
@Override
public List setAccessToken(java.lang.String accessToken) {
return (List) super.setAccessToken(accessToken);
}
@Override
public List setAlt(java.lang.String alt) {
return (List) super.setAlt(alt);
}
@Override
public List setCallback(java.lang.String callback) {
return (List) super.setCallback(callback);
}
@Override
public List setFields(java.lang.String fields) {
return (List) super.setFields(fields);
}
@Override
public List setKey(java.lang.String key) {
return (List) super.setKey(key);
}
@Override
public List setOauthToken(java.lang.String oauthToken) {
return (List) super.setOauthToken(oauthToken);
}
@Override
public List setPrettyPrint(java.lang.Boolean prettyPrint) {
return (List) super.setPrettyPrint(prettyPrint);
}
@Override
public List setQuotaUser(java.lang.String quotaUser) {
return (List) super.setQuotaUser(quotaUser);
}
@Override
public List setUploadType(java.lang.String uploadType) {
return (List) super.setUploadType(uploadType);
}
@Override
public List setUploadProtocol(java.lang.String uploadProtocol) {
return (List) super.setUploadProtocol(uploadProtocol);
}
/**
* Required. The parent, which owns the collection of BigQuery exports. Its format is
* `organizations/[organization_id]`, `folders/[folder_id]`, `projects/[project_id]`.
*/
@com.google.api.client.util.Key
private java.lang.String parent;
/** Required. The parent, which owns the collection of BigQuery exports. Its format is
`organizations/[organization_id]`, `folders/[folder_id]`, `projects/[project_id]`.
*/
public java.lang.String getParent() {
return parent;
}
/**
* Required. The parent, which owns the collection of BigQuery exports. Its format is
* `organizations/[organization_id]`, `folders/[folder_id]`, `projects/[project_id]`.
*/
public List setParent(java.lang.String parent) {
if (!getSuppressPatternChecks()) {
com.google.api.client.util.Preconditions.checkArgument(PARENT_PATTERN.matcher(parent).matches(),
"Parameter parent must conform to the pattern " +
"^projects/[^/]+$");
}
this.parent = parent;
return this;
}
/**
* The maximum number of configs to return. The service may return fewer than this value. If
* unspecified, at most 10 configs will be returned. The maximum value is 1000; values above
* 1000 will be coerced to 1000.
*/
@com.google.api.client.util.Key
private java.lang.Integer pageSize;
/** The maximum number of configs to return. The service may return fewer than this value. If
unspecified, at most 10 configs will be returned. The maximum value is 1000; values above 1000 will
be coerced to 1000.
*/
public java.lang.Integer getPageSize() {
return pageSize;
}
/**
* The maximum number of configs to return. The service may return fewer than this value. If
* unspecified, at most 10 configs will be returned. The maximum value is 1000; values above
* 1000 will be coerced to 1000.
*/
public List setPageSize(java.lang.Integer pageSize) {
this.pageSize = pageSize;
return this;
}
/**
* A page token, received from a previous `ListBigQueryExports` call. Provide this to
* retrieve the subsequent page. When paginating, all other parameters provided to
* `ListBigQueryExports` must match the call that provided the page token.
*/
@com.google.api.client.util.Key
private java.lang.String pageToken;
/** A page token, received from a previous `ListBigQueryExports` call. Provide this to retrieve the
subsequent page. When paginating, all other parameters provided to `ListBigQueryExports` must match
the call that provided the page token.
*/
public java.lang.String getPageToken() {
return pageToken;
}
/**
* A page token, received from a previous `ListBigQueryExports` call. Provide this to
* retrieve the subsequent page. When paginating, all other parameters provided to
* `ListBigQueryExports` must match the call that provided the 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);
}
}
/**
* Updates a BigQuery export.
*
* Create a request for the method "bigQueryExports.patch".
*
* This request holds the parameters needed by the securitycenter server. After setting any
* optional parameters, call the {@link Patch#execute()} method to invoke the remote operation.
*
* @param name The relative resource name of this export. See:
* https://cloud.google.com/apis/design/resource_names#relative_resource_name. Example
* format: "organizations/{organization_id}/bigQueryExports/{export_id}" Example format:
* "folders/{folder_id}/bigQueryExports/{export_id}" Example format:
* "projects/{project_id}/bigQueryExports/{export_id}" This field is provided in responses,
* and is ignored when provided in create requests.
* @param content the {@link com.google.api.services.securitycenter.v1.model.GoogleCloudSecuritycenterV1BigQueryExport}
* @return the request
*/
public Patch patch(java.lang.String name, com.google.api.services.securitycenter.v1.model.GoogleCloudSecuritycenterV1BigQueryExport content) throws java.io.IOException {
Patch result = new Patch(name, content);
initialize(result);
return result;
}
public class Patch extends SecurityCommandCenterRequest {
private static final String REST_PATH = "v1/{+name}";
private final java.util.regex.Pattern NAME_PATTERN =
java.util.regex.Pattern.compile("^projects/[^/]+/bigQueryExports/[^/]+$");
/**
* Updates a BigQuery export.
*
* Create a request for the method "bigQueryExports.patch".
*
* This request holds the parameters needed by the the securitycenter server. After setting any
* optional parameters, call the {@link Patch#execute()} method to invoke the remote operation.
* {@link
* Patch#initialize(com.google.api.client.googleapis.services.AbstractGoogleClientRequest)} must
* be called to initialize this instance immediately after invoking the constructor.
*
* @param name The relative resource name of this export. See:
* https://cloud.google.com/apis/design/resource_names#relative_resource_name. Example
* format: "organizations/{organization_id}/bigQueryExports/{export_id}" Example format:
* "folders/{folder_id}/bigQueryExports/{export_id}" Example format:
* "projects/{project_id}/bigQueryExports/{export_id}" This field is provided in responses,
* and is ignored when provided in create requests.
* @param content the {@link com.google.api.services.securitycenter.v1.model.GoogleCloudSecuritycenterV1BigQueryExport}
* @since 1.13
*/
protected Patch(java.lang.String name, com.google.api.services.securitycenter.v1.model.GoogleCloudSecuritycenterV1BigQueryExport content) {
super(SecurityCommandCenter.this, "PATCH", REST_PATH, content, com.google.api.services.securitycenter.v1.model.GoogleCloudSecuritycenterV1BigQueryExport.class);
this.name = com.google.api.client.util.Preconditions.checkNotNull(name, "Required parameter name must be specified.");
if (!getSuppressPatternChecks()) {
com.google.api.client.util.Preconditions.checkArgument(NAME_PATTERN.matcher(name).matches(),
"Parameter name must conform to the pattern " +
"^projects/[^/]+/bigQueryExports/[^/]+$");
}
}
@Override
public Patch set$Xgafv(java.lang.String $Xgafv) {
return (Patch) super.set$Xgafv($Xgafv);
}
@Override
public Patch setAccessToken(java.lang.String accessToken) {
return (Patch) super.setAccessToken(accessToken);
}
@Override
public Patch setAlt(java.lang.String alt) {
return (Patch) super.setAlt(alt);
}
@Override
public Patch setCallback(java.lang.String callback) {
return (Patch) super.setCallback(callback);
}
@Override
public Patch setFields(java.lang.String fields) {
return (Patch) super.setFields(fields);
}
@Override
public Patch setKey(java.lang.String key) {
return (Patch) super.setKey(key);
}
@Override
public Patch setOauthToken(java.lang.String oauthToken) {
return (Patch) super.setOauthToken(oauthToken);
}
@Override
public Patch setPrettyPrint(java.lang.Boolean prettyPrint) {
return (Patch) super.setPrettyPrint(prettyPrint);
}
@Override
public Patch setQuotaUser(java.lang.String quotaUser) {
return (Patch) super.setQuotaUser(quotaUser);
}
@Override
public Patch setUploadType(java.lang.String uploadType) {
return (Patch) super.setUploadType(uploadType);
}
@Override
public Patch setUploadProtocol(java.lang.String uploadProtocol) {
return (Patch) super.setUploadProtocol(uploadProtocol);
}
/**
* The relative resource name of this export. See:
* https://cloud.google.com/apis/design/resource_names#relative_resource_name. Example
* format: "organizations/{organization_id}/bigQueryExports/{export_id}" Example format:
* "folders/{folder_id}/bigQueryExports/{export_id}" Example format:
* "projects/{project_id}/bigQueryExports/{export_id}" This field is provided in responses,
* and is ignored when provided in create requests.
*/
@com.google.api.client.util.Key
private java.lang.String name;
/** The relative resource name of this export. See:
https://cloud.google.com/apis/design/resource_names#relative_resource_name. Example format:
"organizations/{organization_id}/bigQueryExports/{export_id}" Example format:
"folders/{folder_id}/bigQueryExports/{export_id}" Example format:
"projects/{project_id}/bigQueryExports/{export_id}" This field is provided in responses, and is
ignored when provided in create requests.
*/
public java.lang.String getName() {
return name;
}
/**
* The relative resource name of this export. See:
* https://cloud.google.com/apis/design/resource_names#relative_resource_name. Example
* format: "organizations/{organization_id}/bigQueryExports/{export_id}" Example format:
* "folders/{folder_id}/bigQueryExports/{export_id}" Example format:
* "projects/{project_id}/bigQueryExports/{export_id}" This field is provided in responses,
* and is ignored when provided in create requests.
*/
public Patch setName(java.lang.String name) {
if (!getSuppressPatternChecks()) {
com.google.api.client.util.Preconditions.checkArgument(NAME_PATTERN.matcher(name).matches(),
"Parameter name must conform to the pattern " +
"^projects/[^/]+/bigQueryExports/[^/]+$");
}
this.name = name;
return this;
}
/** The list of fields to be updated. If empty all mutable fields will be updated. */
@com.google.api.client.util.Key
private String updateMask;
/** The list of fields to be updated. If empty all mutable fields will be updated.
*/
public String getUpdateMask() {
return updateMask;
}
/** The list of fields to be updated. If empty all mutable fields will be updated. */
public Patch setUpdateMask(String updateMask) {
this.updateMask = updateMask;
return this;
}
@Override
public Patch set(String parameterName, Object value) {
return (Patch) super.set(parameterName, value);
}
}
}
/**
* An accessor for creating requests from the EventThreatDetectionSettings collection.
*
* The typical use is:
*
* {@code SecurityCommandCenter securitycenter = new SecurityCommandCenter(...);}
* {@code SecurityCommandCenter.EventThreatDetectionSettings.List request = securitycenter.eventThreatDetectionSettings().list(parameters ...)}
*
*
* @return the resource collection
*/
public EventThreatDetectionSettings eventThreatDetectionSettings() {
return new EventThreatDetectionSettings();
}
/**
* The "eventThreatDetectionSettings" collection of methods.
*/
public class EventThreatDetectionSettings {
/**
* Validates the given Event Threat Detection custom module.
*
* Create a request for the method "eventThreatDetectionSettings.validateCustomModule".
*
* This request holds the parameters needed by the securitycenter server. After setting any
* optional parameters, call the {@link ValidateCustomModule#execute()} method to invoke the remote
* operation.
*
* @param parent Required. Resource name of the parent to validate the Custom Module under. Its format is: *
* `organizations/{organization}/eventThreatDetectionSettings`. *
* `folders/{folder}/eventThreatDetectionSettings`. *
* `projects/{project}/eventThreatDetectionSettings`.
* @param content the {@link com.google.api.services.securitycenter.v1.model.ValidateEventThreatDetectionCustomModuleRequest}
* @return the request
*/
public ValidateCustomModule validateCustomModule(java.lang.String parent, com.google.api.services.securitycenter.v1.model.ValidateEventThreatDetectionCustomModuleRequest content) throws java.io.IOException {
ValidateCustomModule result = new ValidateCustomModule(parent, content);
initialize(result);
return result;
}
public class ValidateCustomModule extends SecurityCommandCenterRequest {
private static final String REST_PATH = "v1/{+parent}:validateCustomModule";
private final java.util.regex.Pattern PARENT_PATTERN =
java.util.regex.Pattern.compile("^projects/[^/]+/eventThreatDetectionSettings$");
/**
* Validates the given Event Threat Detection custom module.
*
* Create a request for the method "eventThreatDetectionSettings.validateCustomModule".
*
* This request holds the parameters needed by the the securitycenter server. After setting any
* optional parameters, call the {@link ValidateCustomModule#execute()} method to invoke the
* remote operation. {@link ValidateCustomModule#initialize(com.google.api.client.googleapis.s
* ervices.AbstractGoogleClientRequest)} must be called to initialize this instance immediately
* after invoking the constructor.
*
* @param parent Required. Resource name of the parent to validate the Custom Module under. Its format is: *
* `organizations/{organization}/eventThreatDetectionSettings`. *
* `folders/{folder}/eventThreatDetectionSettings`. *
* `projects/{project}/eventThreatDetectionSettings`.
* @param content the {@link com.google.api.services.securitycenter.v1.model.ValidateEventThreatDetectionCustomModuleRequest}
* @since 1.13
*/
protected ValidateCustomModule(java.lang.String parent, com.google.api.services.securitycenter.v1.model.ValidateEventThreatDetectionCustomModuleRequest content) {
super(SecurityCommandCenter.this, "POST", REST_PATH, content, com.google.api.services.securitycenter.v1.model.ValidateEventThreatDetectionCustomModuleResponse.class);
this.parent = com.google.api.client.util.Preconditions.checkNotNull(parent, "Required parameter parent must be specified.");
if (!getSuppressPatternChecks()) {
com.google.api.client.util.Preconditions.checkArgument(PARENT_PATTERN.matcher(parent).matches(),
"Parameter parent must conform to the pattern " +
"^projects/[^/]+/eventThreatDetectionSettings$");
}
}
@Override
public ValidateCustomModule set$Xgafv(java.lang.String $Xgafv) {
return (ValidateCustomModule) super.set$Xgafv($Xgafv);
}
@Override
public ValidateCustomModule setAccessToken(java.lang.String accessToken) {
return (ValidateCustomModule) super.setAccessToken(accessToken);
}
@Override
public ValidateCustomModule setAlt(java.lang.String alt) {
return (ValidateCustomModule) super.setAlt(alt);
}
@Override
public ValidateCustomModule setCallback(java.lang.String callback) {
return (ValidateCustomModule) super.setCallback(callback);
}
@Override
public ValidateCustomModule setFields(java.lang.String fields) {
return (ValidateCustomModule) super.setFields(fields);
}
@Override
public ValidateCustomModule setKey(java.lang.String key) {
return (ValidateCustomModule) super.setKey(key);
}
@Override
public ValidateCustomModule setOauthToken(java.lang.String oauthToken) {
return (ValidateCustomModule) super.setOauthToken(oauthToken);
}
@Override
public ValidateCustomModule setPrettyPrint(java.lang.Boolean prettyPrint) {
return (ValidateCustomModule) super.setPrettyPrint(prettyPrint);
}
@Override
public ValidateCustomModule setQuotaUser(java.lang.String quotaUser) {
return (ValidateCustomModule) super.setQuotaUser(quotaUser);
}
@Override
public ValidateCustomModule setUploadType(java.lang.String uploadType) {
return (ValidateCustomModule) super.setUploadType(uploadType);
}
@Override
public ValidateCustomModule setUploadProtocol(java.lang.String uploadProtocol) {
return (ValidateCustomModule) super.setUploadProtocol(uploadProtocol);
}
/**
* Required. Resource name of the parent to validate the Custom Module under. Its format is:
* * `organizations/{organization}/eventThreatDetectionSettings`. *
* `folders/{folder}/eventThreatDetectionSettings`. *
* `projects/{project}/eventThreatDetectionSettings`.
*/
@com.google.api.client.util.Key
private java.lang.String parent;
/** Required. Resource name of the parent to validate the Custom Module under. Its format is: *
`organizations/{organization}/eventThreatDetectionSettings`. *
`folders/{folder}/eventThreatDetectionSettings`. *
`projects/{project}/eventThreatDetectionSettings`.
*/
public java.lang.String getParent() {
return parent;
}
/**
* Required. Resource name of the parent to validate the Custom Module under. Its format is:
* * `organizations/{organization}/eventThreatDetectionSettings`. *
* `folders/{folder}/eventThreatDetectionSettings`. *
* `projects/{project}/eventThreatDetectionSettings`.
*/
public ValidateCustomModule setParent(java.lang.String parent) {
if (!getSuppressPatternChecks()) {
com.google.api.client.util.Preconditions.checkArgument(PARENT_PATTERN.matcher(parent).matches(),
"Parameter parent must conform to the pattern " +
"^projects/[^/]+/eventThreatDetectionSettings$");
}
this.parent = parent;
return this;
}
@Override
public ValidateCustomModule set(String parameterName, Object value) {
return (ValidateCustomModule) super.set(parameterName, value);
}
}
/**
* An accessor for creating requests from the CustomModules collection.
*
* The typical use is:
*
* {@code SecurityCommandCenter securitycenter = new SecurityCommandCenter(...);}
* {@code SecurityCommandCenter.CustomModules.List request = securitycenter.customModules().list(parameters ...)}
*
*
* @return the resource collection
*/
public CustomModules customModules() {
return new CustomModules();
}
/**
* The "customModules" collection of methods.
*/
public class CustomModules {
/**
* Creates a resident Event Threat Detection custom module at the scope of the given Resource
* Manager parent, and also creates inherited custom modules for all descendants of the given
* parent. These modules are enabled by default.
*
* Create a request for the method "customModules.create".
*
* This request holds the parameters needed by the securitycenter server. After setting any
* optional parameters, call the {@link Create#execute()} method to invoke the remote operation.
*
* @param parent Required. The new custom module's parent. Its format is: *
* `organizations/{organization}/eventThreatDetectionSettings`. *
* `folders/{folder}/eventThreatDetectionSettings`. *
* `projects/{project}/eventThreatDetectionSettings`.
* @param content the {@link com.google.api.services.securitycenter.v1.model.EventThreatDetectionCustomModule}
* @return the request
*/
public Create create(java.lang.String parent, com.google.api.services.securitycenter.v1.model.EventThreatDetectionCustomModule content) throws java.io.IOException {
Create result = new Create(parent, content);
initialize(result);
return result;
}
public class Create extends SecurityCommandCenterRequest {
private static final String REST_PATH = "v1/{+parent}/customModules";
private final java.util.regex.Pattern PARENT_PATTERN =
java.util.regex.Pattern.compile("^projects/[^/]+/eventThreatDetectionSettings$");
/**
* Creates a resident Event Threat Detection custom module at the scope of the given Resource
* Manager parent, and also creates inherited custom modules for all descendants of the given
* parent. These modules are enabled by default.
*
* Create a request for the method "customModules.create".
*
* This request holds the parameters needed by the the securitycenter server. After setting any
* optional parameters, call the {@link Create#execute()} method to invoke the remote operation.
* {@link
* Create#initialize(com.google.api.client.googleapis.services.AbstractGoogleClientRequest)} must
* be called to initialize this instance immediately after invoking the constructor.
*
* @param parent Required. The new custom module's parent. Its format is: *
* `organizations/{organization}/eventThreatDetectionSettings`. *
* `folders/{folder}/eventThreatDetectionSettings`. *
* `projects/{project}/eventThreatDetectionSettings`.
* @param content the {@link com.google.api.services.securitycenter.v1.model.EventThreatDetectionCustomModule}
* @since 1.13
*/
protected Create(java.lang.String parent, com.google.api.services.securitycenter.v1.model.EventThreatDetectionCustomModule content) {
super(SecurityCommandCenter.this, "POST", REST_PATH, content, com.google.api.services.securitycenter.v1.model.EventThreatDetectionCustomModule.class);
this.parent = com.google.api.client.util.Preconditions.checkNotNull(parent, "Required parameter parent must be specified.");
if (!getSuppressPatternChecks()) {
com.google.api.client.util.Preconditions.checkArgument(PARENT_PATTERN.matcher(parent).matches(),
"Parameter parent must conform to the pattern " +
"^projects/[^/]+/eventThreatDetectionSettings$");
}
}
@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 new custom module's parent. Its format is: *
* `organizations/{organization}/eventThreatDetectionSettings`. *
* `folders/{folder}/eventThreatDetectionSettings`. *
* `projects/{project}/eventThreatDetectionSettings`.
*/
@com.google.api.client.util.Key
private java.lang.String parent;
/** Required. The new custom module's parent. Its format is: *
`organizations/{organization}/eventThreatDetectionSettings`. *
`folders/{folder}/eventThreatDetectionSettings`. *
`projects/{project}/eventThreatDetectionSettings`.
*/
public java.lang.String getParent() {
return parent;
}
/**
* Required. The new custom module's parent. Its format is: *
* `organizations/{organization}/eventThreatDetectionSettings`. *
* `folders/{folder}/eventThreatDetectionSettings`. *
* `projects/{project}/eventThreatDetectionSettings`.
*/
public Create setParent(java.lang.String parent) {
if (!getSuppressPatternChecks()) {
com.google.api.client.util.Preconditions.checkArgument(PARENT_PATTERN.matcher(parent).matches(),
"Parameter parent must conform to the pattern " +
"^projects/[^/]+/eventThreatDetectionSettings$");
}
this.parent = parent;
return this;
}
@Override
public Create set(String parameterName, Object value) {
return (Create) super.set(parameterName, value);
}
}
/**
* Deletes the specified Event Threat Detection custom module and all of its descendants in the
* Resource Manager hierarchy. This method is only supported for resident custom modules.
*
* Create a request for the method "customModules.delete".
*
* This request holds the parameters needed by the securitycenter server. After setting any
* optional parameters, call the {@link Delete#execute()} method to invoke the remote operation.
*
* @param name Required. Name of the custom module to delete. Its format is: *
* `organizations/{organization}/eventThreatDetectionSettings/customModules/{module}`. *
* `folders/{folder}/eventThreatDetectionSettings/customModules/{module}`. *
* `projects/{project}/eventThreatDetectionSettings/customModules/{module}`.
* @return the request
*/
public Delete delete(java.lang.String name) throws java.io.IOException {
Delete result = new Delete(name);
initialize(result);
return result;
}
public class Delete extends SecurityCommandCenterRequest {
private static final String REST_PATH = "v1/{+name}";
private final java.util.regex.Pattern NAME_PATTERN =
java.util.regex.Pattern.compile("^projects/[^/]+/eventThreatDetectionSettings/customModules/[^/]+$");
/**
* Deletes the specified Event Threat Detection custom module and all of its descendants in the
* Resource Manager hierarchy. This method is only supported for resident custom modules.
*
* Create a request for the method "customModules.delete".
*
* This request holds the parameters needed by the the securitycenter server. After setting any
* optional parameters, call the {@link Delete#execute()} method to invoke the remote operation.
* {@link
* Delete#initialize(com.google.api.client.googleapis.services.AbstractGoogleClientRequest)} must
* be called to initialize this instance immediately after invoking the constructor.
*
* @param name Required. Name of the custom module to delete. Its format is: *
* `organizations/{organization}/eventThreatDetectionSettings/customModules/{module}`. *
* `folders/{folder}/eventThreatDetectionSettings/customModules/{module}`. *
* `projects/{project}/eventThreatDetectionSettings/customModules/{module}`.
* @since 1.13
*/
protected Delete(java.lang.String name) {
super(SecurityCommandCenter.this, "DELETE", REST_PATH, null, com.google.api.services.securitycenter.v1.model.Empty.class);
this.name = com.google.api.client.util.Preconditions.checkNotNull(name, "Required parameter name must be specified.");
if (!getSuppressPatternChecks()) {
com.google.api.client.util.Preconditions.checkArgument(NAME_PATTERN.matcher(name).matches(),
"Parameter name must conform to the pattern " +
"^projects/[^/]+/eventThreatDetectionSettings/customModules/[^/]+$");
}
}
@Override
public Delete set$Xgafv(java.lang.String $Xgafv) {
return (Delete) super.set$Xgafv($Xgafv);
}
@Override
public Delete setAccessToken(java.lang.String accessToken) {
return (Delete) super.setAccessToken(accessToken);
}
@Override
public Delete setAlt(java.lang.String alt) {
return (Delete) super.setAlt(alt);
}
@Override
public Delete setCallback(java.lang.String callback) {
return (Delete) super.setCallback(callback);
}
@Override
public Delete setFields(java.lang.String fields) {
return (Delete) super.setFields(fields);
}
@Override
public Delete setKey(java.lang.String key) {
return (Delete) super.setKey(key);
}
@Override
public Delete setOauthToken(java.lang.String oauthToken) {
return (Delete) super.setOauthToken(oauthToken);
}
@Override
public Delete setPrettyPrint(java.lang.Boolean prettyPrint) {
return (Delete) super.setPrettyPrint(prettyPrint);
}
@Override
public Delete setQuotaUser(java.lang.String quotaUser) {
return (Delete) super.setQuotaUser(quotaUser);
}
@Override
public Delete setUploadType(java.lang.String uploadType) {
return (Delete) super.setUploadType(uploadType);
}
@Override
public Delete setUploadProtocol(java.lang.String uploadProtocol) {
return (Delete) super.setUploadProtocol(uploadProtocol);
}
/**
* Required. Name of the custom module to delete. Its format is: *
* `organizations/{organization}/eventThreatDetectionSettings/customModules/{module}`. *
* `folders/{folder}/eventThreatDetectionSettings/customModules/{module}`. *
* `projects/{project}/eventThreatDetectionSettings/customModules/{module}`.
*/
@com.google.api.client.util.Key
private java.lang.String name;
/** Required. Name of the custom module to delete. Its format is: *
`organizations/{organization}/eventThreatDetectionSettings/customModules/{module}`. *
`folders/{folder}/eventThreatDetectionSettings/customModules/{module}`. *
`projects/{project}/eventThreatDetectionSettings/customModules/{module}`.
*/
public java.lang.String getName() {
return name;
}
/**
* Required. Name of the custom module to delete. Its format is: *
* `organizations/{organization}/eventThreatDetectionSettings/customModules/{module}`. *
* `folders/{folder}/eventThreatDetectionSettings/customModules/{module}`. *
* `projects/{project}/eventThreatDetectionSettings/customModules/{module}`.
*/
public Delete setName(java.lang.String name) {
if (!getSuppressPatternChecks()) {
com.google.api.client.util.Preconditions.checkArgument(NAME_PATTERN.matcher(name).matches(),
"Parameter name must conform to the pattern " +
"^projects/[^/]+/eventThreatDetectionSettings/customModules/[^/]+$");
}
this.name = name;
return this;
}
@Override
public Delete set(String parameterName, Object value) {
return (Delete) super.set(parameterName, value);
}
}
/**
* Gets an Event Threat Detection custom module.
*
* Create a request for the method "customModules.get".
*
* This request holds the parameters needed by the securitycenter server. After setting any
* optional parameters, call the {@link Get#execute()} method to invoke the remote operation.
*
* @param name Required. Name of the custom module to get. Its format is: *
* `organizations/{organization}/eventThreatDetectionSettings/customModules/{module}`. *
* `folders/{folder}/eventThreatDetectionSettings/customModules/{module}`. *
* `projects/{project}/eventThreatDetectionSettings/customModules/{module}`.
* @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 SecurityCommandCenterRequest {
private static final String REST_PATH = "v1/{+name}";
private final java.util.regex.Pattern NAME_PATTERN =
java.util.regex.Pattern.compile("^projects/[^/]+/eventThreatDetectionSettings/customModules/[^/]+$");
/**
* Gets an Event Threat Detection custom module.
*
* Create a request for the method "customModules.get".
*
* This request holds the parameters needed by the the securitycenter 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. Name of the custom module to get. Its format is: *
* `organizations/{organization}/eventThreatDetectionSettings/customModules/{module}`. *
* `folders/{folder}/eventThreatDetectionSettings/customModules/{module}`. *
* `projects/{project}/eventThreatDetectionSettings/customModules/{module}`.
* @since 1.13
*/
protected Get(java.lang.String name) {
super(SecurityCommandCenter.this, "GET", REST_PATH, null, com.google.api.services.securitycenter.v1.model.EventThreatDetectionCustomModule.class);
this.name = com.google.api.client.util.Preconditions.checkNotNull(name, "Required parameter name must be specified.");
if (!getSuppressPatternChecks()) {
com.google.api.client.util.Preconditions.checkArgument(NAME_PATTERN.matcher(name).matches(),
"Parameter name must conform to the pattern " +
"^projects/[^/]+/eventThreatDetectionSettings/customModules/[^/]+$");
}
}
@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. Name of the custom module to get. Its format is: *
* `organizations/{organization}/eventThreatDetectionSettings/customModules/{module}`. *
* `folders/{folder}/eventThreatDetectionSettings/customModules/{module}`. *
* `projects/{project}/eventThreatDetectionSettings/customModules/{module}`.
*/
@com.google.api.client.util.Key
private java.lang.String name;
/** Required. Name of the custom module to get. Its format is: *
`organizations/{organization}/eventThreatDetectionSettings/customModules/{module}`. *
`folders/{folder}/eventThreatDetectionSettings/customModules/{module}`. *
`projects/{project}/eventThreatDetectionSettings/customModules/{module}`.
*/
public java.lang.String getName() {
return name;
}
/**
* Required. Name of the custom module to get. Its format is: *
* `organizations/{organization}/eventThreatDetectionSettings/customModules/{module}`. *
* `folders/{folder}/eventThreatDetectionSettings/customModules/{module}`. *
* `projects/{project}/eventThreatDetectionSettings/customModules/{module}`.
*/
public Get setName(java.lang.String name) {
if (!getSuppressPatternChecks()) {
com.google.api.client.util.Preconditions.checkArgument(NAME_PATTERN.matcher(name).matches(),
"Parameter name must conform to the pattern " +
"^projects/[^/]+/eventThreatDetectionSettings/customModules/[^/]+$");
}
this.name = name;
return this;
}
@Override
public Get set(String parameterName, Object value) {
return (Get) super.set(parameterName, value);
}
}
/**
* Lists all Event Threat Detection custom modules for the given Resource Manager parent. This
* includes resident modules defined at the scope of the parent along with modules inherited from
* ancestors.
*
* Create a request for the method "customModules.list".
*
* This request holds the parameters needed by the securitycenter server. After setting any
* optional parameters, call the {@link List#execute()} method to invoke the remote operation.
*
* @param parent Required. Name of the parent to list custom modules under. Its format is: *
* `organizations/{organization}/eventThreatDetectionSettings`. *
* `folders/{folder}/eventThreatDetectionSettings`. *
* `projects/{project}/eventThreatDetectionSettings`.
* @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 SecurityCommandCenterRequest {
private static final String REST_PATH = "v1/{+parent}/customModules";
private final java.util.regex.Pattern PARENT_PATTERN =
java.util.regex.Pattern.compile("^projects/[^/]+/eventThreatDetectionSettings$");
/**
* Lists all Event Threat Detection custom modules for the given Resource Manager parent. This
* includes resident modules defined at the scope of the parent along with modules inherited from
* ancestors.
*
* Create a request for the method "customModules.list".
*
* This request holds the parameters needed by the the securitycenter 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. Name of the parent to list custom modules under. Its format is: *
* `organizations/{organization}/eventThreatDetectionSettings`. *
* `folders/{folder}/eventThreatDetectionSettings`. *
* `projects/{project}/eventThreatDetectionSettings`.
* @since 1.13
*/
protected List(java.lang.String parent) {
super(SecurityCommandCenter.this, "GET", REST_PATH, null, com.google.api.services.securitycenter.v1.model.ListEventThreatDetectionCustomModulesResponse.class);
this.parent = com.google.api.client.util.Preconditions.checkNotNull(parent, "Required parameter parent must be specified.");
if (!getSuppressPatternChecks()) {
com.google.api.client.util.Preconditions.checkArgument(PARENT_PATTERN.matcher(parent).matches(),
"Parameter parent must conform to the pattern " +
"^projects/[^/]+/eventThreatDetectionSettings$");
}
}
@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. Name of the parent to list custom modules under. Its format is: *
* `organizations/{organization}/eventThreatDetectionSettings`. *
* `folders/{folder}/eventThreatDetectionSettings`. *
* `projects/{project}/eventThreatDetectionSettings`.
*/
@com.google.api.client.util.Key
private java.lang.String parent;
/** Required. Name of the parent to list custom modules under. Its format is: *
`organizations/{organization}/eventThreatDetectionSettings`. *
`folders/{folder}/eventThreatDetectionSettings`. *
`projects/{project}/eventThreatDetectionSettings`.
*/
public java.lang.String getParent() {
return parent;
}
/**
* Required. Name of the parent to list custom modules under. Its format is: *
* `organizations/{organization}/eventThreatDetectionSettings`. *
* `folders/{folder}/eventThreatDetectionSettings`. *
* `projects/{project}/eventThreatDetectionSettings`.
*/
public List setParent(java.lang.String parent) {
if (!getSuppressPatternChecks()) {
com.google.api.client.util.Preconditions.checkArgument(PARENT_PATTERN.matcher(parent).matches(),
"Parameter parent must conform to the pattern " +
"^projects/[^/]+/eventThreatDetectionSettings$");
}
this.parent = parent;
return this;
}
/**
* The maximum number of modules to return. The service may return fewer than this value.
* If unspecified, at most 10 configs will be returned. The maximum value is 1000; values
* above 1000 will be coerced to 1000.
*/
@com.google.api.client.util.Key
private java.lang.Integer pageSize;
/** The maximum number of modules to return. The service may return fewer than this value. If
unspecified, at most 10 configs will be returned. The maximum value is 1000; values above 1000 will
be coerced to 1000.
*/
public java.lang.Integer getPageSize() {
return pageSize;
}
/**
* The maximum number of modules to return. The service may return fewer than this value.
* If unspecified, at most 10 configs will be returned. The maximum value is 1000; values
* above 1000 will be coerced to 1000.
*/
public List setPageSize(java.lang.Integer pageSize) {
this.pageSize = pageSize;
return this;
}
/**
* A page token, received from a previous `ListEventThreatDetectionCustomModules` call.
* Provide this to retrieve the subsequent page. When paginating, all other parameters
* provided to `ListEventThreatDetectionCustomModules` must match the call that provided
* the page token.
*/
@com.google.api.client.util.Key
private java.lang.String pageToken;
/** A page token, received from a previous `ListEventThreatDetectionCustomModules` call. Provide this
to retrieve the subsequent page. When paginating, all other parameters provided to
`ListEventThreatDetectionCustomModules` must match the call that provided the page token.
*/
public java.lang.String getPageToken() {
return pageToken;
}
/**
* A page token, received from a previous `ListEventThreatDetectionCustomModules` call.
* Provide this to retrieve the subsequent page. When paginating, all other parameters
* provided to `ListEventThreatDetectionCustomModules` must match the call that provided
* the 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);
}
}
/**
* Lists all resident Event Threat Detection custom modules under the given Resource Manager parent
* and its descendants.
*
* Create a request for the method "customModules.listDescendant".
*
* This request holds the parameters needed by the securitycenter server. After setting any
* optional parameters, call the {@link ListDescendant#execute()} method to invoke the remote
* operation.
*
* @param parent Required. Name of the parent to list custom modules under. Its format is: *
* `organizations/{organization}/eventThreatDetectionSettings`. *
* `folders/{folder}/eventThreatDetectionSettings`. *
* `projects/{project}/eventThreatDetectionSettings`.
* @return the request
*/
public ListDescendant listDescendant(java.lang.String parent) throws java.io.IOException {
ListDescendant result = new ListDescendant(parent);
initialize(result);
return result;
}
public class ListDescendant extends SecurityCommandCenterRequest {
private static final String REST_PATH = "v1/{+parent}/customModules:listDescendant";
private final java.util.regex.Pattern PARENT_PATTERN =
java.util.regex.Pattern.compile("^projects/[^/]+/eventThreatDetectionSettings$");
/**
* Lists all resident Event Threat Detection custom modules under the given Resource Manager
* parent and its descendants.
*
* Create a request for the method "customModules.listDescendant".
*
* This request holds the parameters needed by the the securitycenter server. After setting any
* optional parameters, call the {@link ListDescendant#execute()} method to invoke the remote
* operation. {@link ListDescendant#initialize(com.google.api.client.googleapis.services.Abstr
* actGoogleClientRequest)} must be called to initialize this instance immediately after invoking
* the constructor.
*
* @param parent Required. Name of the parent to list custom modules under. Its format is: *
* `organizations/{organization}/eventThreatDetectionSettings`. *
* `folders/{folder}/eventThreatDetectionSettings`. *
* `projects/{project}/eventThreatDetectionSettings`.
* @since 1.13
*/
protected ListDescendant(java.lang.String parent) {
super(SecurityCommandCenter.this, "GET", REST_PATH, null, com.google.api.services.securitycenter.v1.model.ListDescendantEventThreatDetectionCustomModulesResponse.class);
this.parent = com.google.api.client.util.Preconditions.checkNotNull(parent, "Required parameter parent must be specified.");
if (!getSuppressPatternChecks()) {
com.google.api.client.util.Preconditions.checkArgument(PARENT_PATTERN.matcher(parent).matches(),
"Parameter parent must conform to the pattern " +
"^projects/[^/]+/eventThreatDetectionSettings$");
}
}
@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 ListDescendant set$Xgafv(java.lang.String $Xgafv) {
return (ListDescendant) super.set$Xgafv($Xgafv);
}
@Override
public ListDescendant setAccessToken(java.lang.String accessToken) {
return (ListDescendant) super.setAccessToken(accessToken);
}
@Override
public ListDescendant setAlt(java.lang.String alt) {
return (ListDescendant) super.setAlt(alt);
}
@Override
public ListDescendant setCallback(java.lang.String callback) {
return (ListDescendant) super.setCallback(callback);
}
@Override
public ListDescendant setFields(java.lang.String fields) {
return (ListDescendant) super.setFields(fields);
}
@Override
public ListDescendant setKey(java.lang.String key) {
return (ListDescendant) super.setKey(key);
}
@Override
public ListDescendant setOauthToken(java.lang.String oauthToken) {
return (ListDescendant) super.setOauthToken(oauthToken);
}
@Override
public ListDescendant setPrettyPrint(java.lang.Boolean prettyPrint) {
return (ListDescendant) super.setPrettyPrint(prettyPrint);
}
@Override
public ListDescendant setQuotaUser(java.lang.String quotaUser) {
return (ListDescendant) super.setQuotaUser(quotaUser);
}
@Override
public ListDescendant setUploadType(java.lang.String uploadType) {
return (ListDescendant) super.setUploadType(uploadType);
}
@Override
public ListDescendant setUploadProtocol(java.lang.String uploadProtocol) {
return (ListDescendant) super.setUploadProtocol(uploadProtocol);
}
/**
* Required. Name of the parent to list custom modules under. Its format is: *
* `organizations/{organization}/eventThreatDetectionSettings`. *
* `folders/{folder}/eventThreatDetectionSettings`. *
* `projects/{project}/eventThreatDetectionSettings`.
*/
@com.google.api.client.util.Key
private java.lang.String parent;
/** Required. Name of the parent to list custom modules under. Its format is: *
`organizations/{organization}/eventThreatDetectionSettings`. *
`folders/{folder}/eventThreatDetectionSettings`. *
`projects/{project}/eventThreatDetectionSettings`.
*/
public java.lang.String getParent() {
return parent;
}
/**
* Required. Name of the parent to list custom modules under. Its format is: *
* `organizations/{organization}/eventThreatDetectionSettings`. *
* `folders/{folder}/eventThreatDetectionSettings`. *
* `projects/{project}/eventThreatDetectionSettings`.
*/
public ListDescendant setParent(java.lang.String parent) {
if (!getSuppressPatternChecks()) {
com.google.api.client.util.Preconditions.checkArgument(PARENT_PATTERN.matcher(parent).matches(),
"Parameter parent must conform to the pattern " +
"^projects/[^/]+/eventThreatDetectionSettings$");
}
this.parent = parent;
return this;
}
/**
* The maximum number of modules to return. The service may return fewer than this value.
* If unspecified, at most 10 configs will be returned. The maximum value is 1000; values
* above 1000 will be coerced to 1000.
*/
@com.google.api.client.util.Key
private java.lang.Integer pageSize;
/** The maximum number of modules to return. The service may return fewer than this value. If
unspecified, at most 10 configs will be returned. The maximum value is 1000; values above 1000 will
be coerced to 1000.
*/
public java.lang.Integer getPageSize() {
return pageSize;
}
/**
* The maximum number of modules to return. The service may return fewer than this value.
* If unspecified, at most 10 configs will be returned. The maximum value is 1000; values
* above 1000 will be coerced to 1000.
*/
public ListDescendant setPageSize(java.lang.Integer pageSize) {
this.pageSize = pageSize;
return this;
}
/**
* A page token, received from a previous
* `ListDescendantEventThreatDetectionCustomModules` call. Provide this to retrieve the
* subsequent page. When paginating, all other parameters provided to
* `ListDescendantEventThreatDetectionCustomModules` must match the call that provided the
* page token.
*/
@com.google.api.client.util.Key
private java.lang.String pageToken;
/** A page token, received from a previous `ListDescendantEventThreatDetectionCustomModules` call.
Provide this to retrieve the subsequent page. When paginating, all other parameters provided to
`ListDescendantEventThreatDetectionCustomModules` must match the call that provided the page token.
*/
public java.lang.String getPageToken() {
return pageToken;
}
/**
* A page token, received from a previous
* `ListDescendantEventThreatDetectionCustomModules` call. Provide this to retrieve the
* subsequent page. When paginating, all other parameters provided to
* `ListDescendantEventThreatDetectionCustomModules` must match the call that provided the
* page token.
*/
public ListDescendant setPageToken(java.lang.String pageToken) {
this.pageToken = pageToken;
return this;
}
@Override
public ListDescendant set(String parameterName, Object value) {
return (ListDescendant) super.set(parameterName, value);
}
}
/**
* Updates the Event Threat Detection custom module with the given name based on the given update
* mask. Updating the enablement state is supported for both resident and inherited modules (though
* resident modules cannot have an enablement state of "inherited"). Updating the display name or
* configuration of a module is supported for resident modules only. The type of a module cannot be
* changed.
*
* Create a request for the method "customModules.patch".
*
* This request holds the parameters needed by the securitycenter server. After setting any
* optional parameters, call the {@link Patch#execute()} method to invoke the remote operation.
*
* @param name Immutable. The resource name of the Event Threat Detection custom module. Its format is: *
* `organizations/{organization}/eventThreatDetectionSettings/customModules/{module}`. *
* `folders/{folder}/eventThreatDetectionSettings/customModules/{module}`. *
* `projects/{project}/eventThreatDetectionSettings/customModules/{module}`.
* @param content the {@link com.google.api.services.securitycenter.v1.model.EventThreatDetectionCustomModule}
* @return the request
*/
public Patch patch(java.lang.String name, com.google.api.services.securitycenter.v1.model.EventThreatDetectionCustomModule content) throws java.io.IOException {
Patch result = new Patch(name, content);
initialize(result);
return result;
}
public class Patch extends SecurityCommandCenterRequest {
private static final String REST_PATH = "v1/{+name}";
private final java.util.regex.Pattern NAME_PATTERN =
java.util.regex.Pattern.compile("^projects/[^/]+/eventThreatDetectionSettings/customModules/[^/]+$");
/**
* Updates the Event Threat Detection custom module with the given name based on the given update
* mask. Updating the enablement state is supported for both resident and inherited modules
* (though resident modules cannot have an enablement state of "inherited"). Updating the display
* name or configuration of a module is supported for resident modules only. The type of a module
* cannot be changed.
*
* Create a request for the method "customModules.patch".
*
* This request holds the parameters needed by the the securitycenter server. After setting any
* optional parameters, call the {@link Patch#execute()} method to invoke the remote operation.
* {@link
* Patch#initialize(com.google.api.client.googleapis.services.AbstractGoogleClientRequest)} must
* be called to initialize this instance immediately after invoking the constructor.
*
* @param name Immutable. The resource name of the Event Threat Detection custom module. Its format is: *
* `organizations/{organization}/eventThreatDetectionSettings/customModules/{module}`. *
* `folders/{folder}/eventThreatDetectionSettings/customModules/{module}`. *
* `projects/{project}/eventThreatDetectionSettings/customModules/{module}`.
* @param content the {@link com.google.api.services.securitycenter.v1.model.EventThreatDetectionCustomModule}
* @since 1.13
*/
protected Patch(java.lang.String name, com.google.api.services.securitycenter.v1.model.EventThreatDetectionCustomModule content) {
super(SecurityCommandCenter.this, "PATCH", REST_PATH, content, com.google.api.services.securitycenter.v1.model.EventThreatDetectionCustomModule.class);
this.name = com.google.api.client.util.Preconditions.checkNotNull(name, "Required parameter name must be specified.");
if (!getSuppressPatternChecks()) {
com.google.api.client.util.Preconditions.checkArgument(NAME_PATTERN.matcher(name).matches(),
"Parameter name must conform to the pattern " +
"^projects/[^/]+/eventThreatDetectionSettings/customModules/[^/]+$");
}
}
@Override
public Patch set$Xgafv(java.lang.String $Xgafv) {
return (Patch) super.set$Xgafv($Xgafv);
}
@Override
public Patch setAccessToken(java.lang.String accessToken) {
return (Patch) super.setAccessToken(accessToken);
}
@Override
public Patch setAlt(java.lang.String alt) {
return (Patch) super.setAlt(alt);
}
@Override
public Patch setCallback(java.lang.String callback) {
return (Patch) super.setCallback(callback);
}
@Override
public Patch setFields(java.lang.String fields) {
return (Patch) super.setFields(fields);
}
@Override
public Patch setKey(java.lang.String key) {
return (Patch) super.setKey(key);
}
@Override
public Patch setOauthToken(java.lang.String oauthToken) {
return (Patch) super.setOauthToken(oauthToken);
}
@Override
public Patch setPrettyPrint(java.lang.Boolean prettyPrint) {
return (Patch) super.setPrettyPrint(prettyPrint);
}
@Override
public Patch setQuotaUser(java.lang.String quotaUser) {
return (Patch) super.setQuotaUser(quotaUser);
}
@Override
public Patch setUploadType(java.lang.String uploadType) {
return (Patch) super.setUploadType(uploadType);
}
@Override
public Patch setUploadProtocol(java.lang.String uploadProtocol) {
return (Patch) super.setUploadProtocol(uploadProtocol);
}
/**
* Immutable. The resource name of the Event Threat Detection custom module. Its format
* is: *
* `organizations/{organization}/eventThreatDetectionSettings/customModules/{module}`. *
* `folders/{folder}/eventThreatDetectionSettings/customModules/{module}`. *
* `projects/{project}/eventThreatDetectionSettings/customModules/{module}`.
*/
@com.google.api.client.util.Key
private java.lang.String name;
/** Immutable. The resource name of the Event Threat Detection custom module. Its format is: *
`organizations/{organization}/eventThreatDetectionSettings/customModules/{module}`. *
`folders/{folder}/eventThreatDetectionSettings/customModules/{module}`. *
`projects/{project}/eventThreatDetectionSettings/customModules/{module}`.
*/
public java.lang.String getName() {
return name;
}
/**
* Immutable. The resource name of the Event Threat Detection custom module. Its format
* is: *
* `organizations/{organization}/eventThreatDetectionSettings/customModules/{module}`. *
* `folders/{folder}/eventThreatDetectionSettings/customModules/{module}`. *
* `projects/{project}/eventThreatDetectionSettings/customModules/{module}`.
*/
public Patch setName(java.lang.String name) {
if (!getSuppressPatternChecks()) {
com.google.api.client.util.Preconditions.checkArgument(NAME_PATTERN.matcher(name).matches(),
"Parameter name must conform to the pattern " +
"^projects/[^/]+/eventThreatDetectionSettings/customModules/[^/]+$");
}
this.name = name;
return this;
}
/** The list of fields to be updated. If empty all mutable fields will be updated. */
@com.google.api.client.util.Key
private String updateMask;
/** The list of fields to be updated. If empty all mutable fields will be updated.
*/
public String getUpdateMask() {
return updateMask;
}
/** The list of fields to be updated. If empty all mutable fields will be updated. */
public Patch setUpdateMask(String updateMask) {
this.updateMask = updateMask;
return this;
}
@Override
public Patch set(String parameterName, Object value) {
return (Patch) super.set(parameterName, value);
}
}
}
/**
* An accessor for creating requests from the EffectiveCustomModules collection.
*
* The typical use is:
*
* {@code SecurityCommandCenter securitycenter = new SecurityCommandCenter(...);}
* {@code SecurityCommandCenter.EffectiveCustomModules.List request = securitycenter.effectiveCustomModules().list(parameters ...)}
*
*
* @return the resource collection
*/
public EffectiveCustomModules effectiveCustomModules() {
return new EffectiveCustomModules();
}
/**
* The "effectiveCustomModules" collection of methods.
*/
public class EffectiveCustomModules {
/**
* Gets an effective Event Threat Detection custom module at the given level.
*
* Create a request for the method "effectiveCustomModules.get".
*
* This request holds the parameters needed by the securitycenter server. After setting any
* optional parameters, call the {@link Get#execute()} method to invoke the remote operation.
*
* @param name Required. The resource name of the effective Event Threat Detection custom module. Its format is: *
* `organizations/{organization}/eventThreatDetectionSettings/effectiveCustomModules/{module}
* `. * `folders/{folder}/eventThreatDetectionSettings/effectiveCustomModules/{module}`. *
* `projects/{project}/eventThreatDetectionSettings/effectiveCustomModules/{module}`.
* @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 SecurityCommandCenterRequest {
private static final String REST_PATH = "v1/{+name}";
private final java.util.regex.Pattern NAME_PATTERN =
java.util.regex.Pattern.compile("^projects/[^/]+/eventThreatDetectionSettings/effectiveCustomModules/[^/]+$");
/**
* Gets an effective Event Threat Detection custom module at the given level.
*
* Create a request for the method "effectiveCustomModules.get".
*
* This request holds the parameters needed by the the securitycenter server. After setting any
* optional parameters, call the {@link Get#execute()} method to invoke the remote operation.
* {@link Get#initialize(com.google.api.client.googleapis.services.AbstractGoogleClientRequest)}
* must be called to initialize this instance immediately after invoking the constructor.
*
* @param name Required. The resource name of the effective Event Threat Detection custom module. Its format is: *
* `organizations/{organization}/eventThreatDetectionSettings/effectiveCustomModules/{module}
* `. * `folders/{folder}/eventThreatDetectionSettings/effectiveCustomModules/{module}`. *
* `projects/{project}/eventThreatDetectionSettings/effectiveCustomModules/{module}`.
* @since 1.13
*/
protected Get(java.lang.String name) {
super(SecurityCommandCenter.this, "GET", REST_PATH, null, com.google.api.services.securitycenter.v1.model.EffectiveEventThreatDetectionCustomModule.class);
this.name = com.google.api.client.util.Preconditions.checkNotNull(name, "Required parameter name must be specified.");
if (!getSuppressPatternChecks()) {
com.google.api.client.util.Preconditions.checkArgument(NAME_PATTERN.matcher(name).matches(),
"Parameter name must conform to the pattern " +
"^projects/[^/]+/eventThreatDetectionSettings/effectiveCustomModules/[^/]+$");
}
}
@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 resource name of the effective Event Threat Detection custom module. Its
* format is: * `organizations/{organization}/eventThreatDetectionSettings/effectiveCustom
* Modules/{module}`. *
* `folders/{folder}/eventThreatDetectionSettings/effectiveCustomModules/{module}`. *
* `projects/{project}/eventThreatDetectionSettings/effectiveCustomModules/{module}`.
*/
@com.google.api.client.util.Key
private java.lang.String name;
/** Required. The resource name of the effective Event Threat Detection custom module. Its format is: *
`organizations/{organization}/eventThreatDetectionSettings/effectiveCustomModules/{module}`. *
`folders/{folder}/eventThreatDetectionSettings/effectiveCustomModules/{module}`. *
`projects/{project}/eventThreatDetectionSettings/effectiveCustomModules/{module}`.
*/
public java.lang.String getName() {
return name;
}
/**
* Required. The resource name of the effective Event Threat Detection custom module. Its
* format is: * `organizations/{organization}/eventThreatDetectionSettings/effectiveCustom
* Modules/{module}`. *
* `folders/{folder}/eventThreatDetectionSettings/effectiveCustomModules/{module}`. *
* `projects/{project}/eventThreatDetectionSettings/effectiveCustomModules/{module}`.
*/
public Get setName(java.lang.String name) {
if (!getSuppressPatternChecks()) {
com.google.api.client.util.Preconditions.checkArgument(NAME_PATTERN.matcher(name).matches(),
"Parameter name must conform to the pattern " +
"^projects/[^/]+/eventThreatDetectionSettings/effectiveCustomModules/[^/]+$");
}
this.name = name;
return this;
}
@Override
public Get set(String parameterName, Object value) {
return (Get) super.set(parameterName, value);
}
}
/**
* Lists all effective Event Threat Detection custom modules for the given parent. This includes
* resident modules defined at the scope of the parent along with modules inherited from its
* ancestors.
*
* Create a request for the method "effectiveCustomModules.list".
*
* This request holds the parameters needed by the securitycenter server. After setting any
* optional parameters, call the {@link List#execute()} method to invoke the remote operation.
*
* @param parent Required. Name of the parent to list custom modules for. Its format is: *
* `organizations/{organization}/eventThreatDetectionSettings`. *
* `folders/{folder}/eventThreatDetectionSettings`. *
* `projects/{project}/eventThreatDetectionSettings`.
* @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 SecurityCommandCenterRequest {
private static final String REST_PATH = "v1/{+parent}/effectiveCustomModules";
private final java.util.regex.Pattern PARENT_PATTERN =
java.util.regex.Pattern.compile("^projects/[^/]+/eventThreatDetectionSettings$");
/**
* Lists all effective Event Threat Detection custom modules for the given parent. This includes
* resident modules defined at the scope of the parent along with modules inherited from its
* ancestors.
*
* Create a request for the method "effectiveCustomModules.list".
*
* This request holds the parameters needed by the the securitycenter 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. Name of the parent to list custom modules for. Its format is: *
* `organizations/{organization}/eventThreatDetectionSettings`. *
* `folders/{folder}/eventThreatDetectionSettings`. *
* `projects/{project}/eventThreatDetectionSettings`.
* @since 1.13
*/
protected List(java.lang.String parent) {
super(SecurityCommandCenter.this, "GET", REST_PATH, null, com.google.api.services.securitycenter.v1.model.ListEffectiveEventThreatDetectionCustomModulesResponse.class);
this.parent = com.google.api.client.util.Preconditions.checkNotNull(parent, "Required parameter parent must be specified.");
if (!getSuppressPatternChecks()) {
com.google.api.client.util.Preconditions.checkArgument(PARENT_PATTERN.matcher(parent).matches(),
"Parameter parent must conform to the pattern " +
"^projects/[^/]+/eventThreatDetectionSettings$");
}
}
@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. Name of the parent to list custom modules for. Its format is: *
* `organizations/{organization}/eventThreatDetectionSettings`. *
* `folders/{folder}/eventThreatDetectionSettings`. *
* `projects/{project}/eventThreatDetectionSettings`.
*/
@com.google.api.client.util.Key
private java.lang.String parent;
/** Required. Name of the parent to list custom modules for. Its format is: *
`organizations/{organization}/eventThreatDetectionSettings`. *
`folders/{folder}/eventThreatDetectionSettings`. *
`projects/{project}/eventThreatDetectionSettings`.
*/
public java.lang.String getParent() {
return parent;
}
/**
* Required. Name of the parent to list custom modules for. Its format is: *
* `organizations/{organization}/eventThreatDetectionSettings`. *
* `folders/{folder}/eventThreatDetectionSettings`. *
* `projects/{project}/eventThreatDetectionSettings`.
*/
public List setParent(java.lang.String parent) {
if (!getSuppressPatternChecks()) {
com.google.api.client.util.Preconditions.checkArgument(PARENT_PATTERN.matcher(parent).matches(),
"Parameter parent must conform to the pattern " +
"^projects/[^/]+/eventThreatDetectionSettings$");
}
this.parent = parent;
return this;
}
/**
* The maximum number of modules to return. The service may return fewer than this value.
* If unspecified, at most 10 configs will be returned. The maximum value is 1000; values
* above 1000 will be coerced to 1000.
*/
@com.google.api.client.util.Key
private java.lang.Integer pageSize;
/** The maximum number of modules to return. The service may return fewer than this value. If
unspecified, at most 10 configs will be returned. The maximum value is 1000; values above 1000 will
be coerced to 1000.
*/
public java.lang.Integer getPageSize() {
return pageSize;
}
/**
* The maximum number of modules to return. The service may return fewer than this value.
* If unspecified, at most 10 configs will be returned. The maximum value is 1000; values
* above 1000 will be coerced to 1000.
*/
public List setPageSize(java.lang.Integer pageSize) {
this.pageSize = pageSize;
return this;
}
/**
* A page token, received from a previous `ListEffectiveEventThreatDetectionCustomModules`
* call. Provide this to retrieve the subsequent page. When paginating, all other
* parameters provided to `ListEffectiveEventThreatDetectionCustomModules` must match the
* call that provided the page token.
*/
@com.google.api.client.util.Key
private java.lang.String pageToken;
/** A page token, received from a previous `ListEffectiveEventThreatDetectionCustomModules` call.
Provide this to retrieve the subsequent page. When paginating, all other parameters provided to
`ListEffectiveEventThreatDetectionCustomModules` must match the call that provided the page token.
*/
public java.lang.String getPageToken() {
return pageToken;
}
/**
* A page token, received from a previous `ListEffectiveEventThreatDetectionCustomModules`
* call. Provide this to retrieve the subsequent page. When paginating, all other
* parameters provided to `ListEffectiveEventThreatDetectionCustomModules` must match the
* call that provided the 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 Findings collection.
*
* The typical use is:
*
* {@code SecurityCommandCenter securitycenter = new SecurityCommandCenter(...);}
* {@code SecurityCommandCenter.Findings.List request = securitycenter.findings().list(parameters ...)}
*
*
* @return the resource collection
*/
public Findings findings() {
return new Findings();
}
/**
* The "findings" collection of methods.
*/
public class Findings {
/**
* Kicks off an LRO to bulk mute findings for a parent based on a filter. The parent can be either
* an organization, folder or project. The findings matched by the filter will be muted after the
* LRO is done.
*
* Create a request for the method "findings.bulkMute".
*
* This request holds the parameters needed by the securitycenter server. After setting any
* optional parameters, call the {@link BulkMute#execute()} method to invoke the remote operation.
*
* @param parent Required. The parent, at which bulk action needs to be applied. Its format is
* `organizations/[organization_id]`, `folders/[folder_id]`, `projects/[project_id]`.
* @param content the {@link com.google.api.services.securitycenter.v1.model.BulkMuteFindingsRequest}
* @return the request
*/
public BulkMute bulkMute(java.lang.String parent, com.google.api.services.securitycenter.v1.model.BulkMuteFindingsRequest content) throws java.io.IOException {
BulkMute result = new BulkMute(parent, content);
initialize(result);
return result;
}
public class BulkMute extends SecurityCommandCenterRequest {
private static final String REST_PATH = "v1/{+parent}/findings:bulkMute";
private final java.util.regex.Pattern PARENT_PATTERN =
java.util.regex.Pattern.compile("^projects/[^/]+$");
/**
* Kicks off an LRO to bulk mute findings for a parent based on a filter. The parent can be either
* an organization, folder or project. The findings matched by the filter will be muted after the
* LRO is done.
*
* Create a request for the method "findings.bulkMute".
*
* This request holds the parameters needed by the the securitycenter server. After setting any
* optional parameters, call the {@link BulkMute#execute()} method to invoke the remote operation.
* {@link
* BulkMute#initialize(com.google.api.client.googleapis.services.AbstractGoogleClientRequest)}
* must be called to initialize this instance immediately after invoking the constructor.
*
* @param parent Required. The parent, at which bulk action needs to be applied. Its format is
* `organizations/[organization_id]`, `folders/[folder_id]`, `projects/[project_id]`.
* @param content the {@link com.google.api.services.securitycenter.v1.model.BulkMuteFindingsRequest}
* @since 1.13
*/
protected BulkMute(java.lang.String parent, com.google.api.services.securitycenter.v1.model.BulkMuteFindingsRequest content) {
super(SecurityCommandCenter.this, "POST", REST_PATH, content, com.google.api.services.securitycenter.v1.model.Operation.class);
this.parent = com.google.api.client.util.Preconditions.checkNotNull(parent, "Required parameter parent must be specified.");
if (!getSuppressPatternChecks()) {
com.google.api.client.util.Preconditions.checkArgument(PARENT_PATTERN.matcher(parent).matches(),
"Parameter parent must conform to the pattern " +
"^projects/[^/]+$");
}
}
@Override
public BulkMute set$Xgafv(java.lang.String $Xgafv) {
return (BulkMute) super.set$Xgafv($Xgafv);
}
@Override
public BulkMute setAccessToken(java.lang.String accessToken) {
return (BulkMute) super.setAccessToken(accessToken);
}
@Override
public BulkMute setAlt(java.lang.String alt) {
return (BulkMute) super.setAlt(alt);
}
@Override
public BulkMute setCallback(java.lang.String callback) {
return (BulkMute) super.setCallback(callback);
}
@Override
public BulkMute setFields(java.lang.String fields) {
return (BulkMute) super.setFields(fields);
}
@Override
public BulkMute setKey(java.lang.String key) {
return (BulkMute) super.setKey(key);
}
@Override
public BulkMute setOauthToken(java.lang.String oauthToken) {
return (BulkMute) super.setOauthToken(oauthToken);
}
@Override
public BulkMute setPrettyPrint(java.lang.Boolean prettyPrint) {
return (BulkMute) super.setPrettyPrint(prettyPrint);
}
@Override
public BulkMute setQuotaUser(java.lang.String quotaUser) {
return (BulkMute) super.setQuotaUser(quotaUser);
}
@Override
public BulkMute setUploadType(java.lang.String uploadType) {
return (BulkMute) super.setUploadType(uploadType);
}
@Override
public BulkMute setUploadProtocol(java.lang.String uploadProtocol) {
return (BulkMute) super.setUploadProtocol(uploadProtocol);
}
/**
* Required. The parent, at which bulk action needs to be applied. Its format is
* `organizations/[organization_id]`, `folders/[folder_id]`, `projects/[project_id]`.
*/
@com.google.api.client.util.Key
private java.lang.String parent;
/** Required. The parent, at which bulk action needs to be applied. Its format is
`organizations/[organization_id]`, `folders/[folder_id]`, `projects/[project_id]`.
*/
public java.lang.String getParent() {
return parent;
}
/**
* Required. The parent, at which bulk action needs to be applied. Its format is
* `organizations/[organization_id]`, `folders/[folder_id]`, `projects/[project_id]`.
*/
public BulkMute setParent(java.lang.String parent) {
if (!getSuppressPatternChecks()) {
com.google.api.client.util.Preconditions.checkArgument(PARENT_PATTERN.matcher(parent).matches(),
"Parameter parent must conform to the pattern " +
"^projects/[^/]+$");
}
this.parent = parent;
return this;
}
@Override
public BulkMute set(String parameterName, Object value) {
return (BulkMute) super.set(parameterName, value);
}
}
}
/**
* An accessor for creating requests from the Locations collection.
*
* The typical use is:
*
* {@code SecurityCommandCenter securitycenter = new SecurityCommandCenter(...);}
* {@code SecurityCommandCenter.Locations.List request = securitycenter.locations().list(parameters ...)}
*
*
* @return the resource collection
*/
public Locations locations() {
return new Locations();
}
/**
* The "locations" collection of methods.
*/
public class Locations {
/**
* An accessor for creating requests from the MuteConfigs collection.
*
* The typical use is:
*
* {@code SecurityCommandCenter securitycenter = new SecurityCommandCenter(...);}
* {@code SecurityCommandCenter.MuteConfigs.List request = securitycenter.muteConfigs().list(parameters ...)}
*
*
* @return the resource collection
*/
public MuteConfigs muteConfigs() {
return new MuteConfigs();
}
/**
* The "muteConfigs" collection of methods.
*/
public class MuteConfigs {
/**
* Deletes an existing mute config.
*
* Create a request for the method "muteConfigs.delete".
*
* This request holds the parameters needed by the securitycenter server. After setting any
* optional parameters, call the {@link Delete#execute()} method to invoke the remote operation.
*
* @param name Required. Name of the mute config to delete. Its format is
* `organizations/{organization}/muteConfigs/{config_id}`,
* `folders/{folder}/muteConfigs/{config_id}`, `projects/{project}/muteConfigs/{config_id}`,
* `organizations/{organization}/locations/global/muteConfigs/{config_id}`,
* `folders/{folder}/locations/global/muteConfigs/{config_id}`, or
* `projects/{project}/locations/global/muteConfigs/{config_id}`.
* @return the request
*/
public Delete delete(java.lang.String name) throws java.io.IOException {
Delete result = new Delete(name);
initialize(result);
return result;
}
public class Delete extends SecurityCommandCenterRequest {
private static final String REST_PATH = "v1/{+name}";
private final java.util.regex.Pattern NAME_PATTERN =
java.util.regex.Pattern.compile("^projects/[^/]+/locations/[^/]+/muteConfigs/[^/]+$");
/**
* Deletes an existing mute config.
*
* Create a request for the method "muteConfigs.delete".
*
* This request holds the parameters needed by the the securitycenter server. After setting any
* optional parameters, call the {@link Delete#execute()} method to invoke the remote operation.
* {@link
* Delete#initialize(com.google.api.client.googleapis.services.AbstractGoogleClientRequest)} must
* be called to initialize this instance immediately after invoking the constructor.
*
* @param name Required. Name of the mute config to delete. Its format is
* `organizations/{organization}/muteConfigs/{config_id}`,
* `folders/{folder}/muteConfigs/{config_id}`, `projects/{project}/muteConfigs/{config_id}`,
* `organizations/{organization}/locations/global/muteConfigs/{config_id}`,
* `folders/{folder}/locations/global/muteConfigs/{config_id}`, or
* `projects/{project}/locations/global/muteConfigs/{config_id}`.
* @since 1.13
*/
protected Delete(java.lang.String name) {
super(SecurityCommandCenter.this, "DELETE", REST_PATH, null, com.google.api.services.securitycenter.v1.model.Empty.class);
this.name = com.google.api.client.util.Preconditions.checkNotNull(name, "Required parameter name must be specified.");
if (!getSuppressPatternChecks()) {
com.google.api.client.util.Preconditions.checkArgument(NAME_PATTERN.matcher(name).matches(),
"Parameter name must conform to the pattern " +
"^projects/[^/]+/locations/[^/]+/muteConfigs/[^/]+$");
}
}
@Override
public Delete set$Xgafv(java.lang.String $Xgafv) {
return (Delete) super.set$Xgafv($Xgafv);
}
@Override
public Delete setAccessToken(java.lang.String accessToken) {
return (Delete) super.setAccessToken(accessToken);
}
@Override
public Delete setAlt(java.lang.String alt) {
return (Delete) super.setAlt(alt);
}
@Override
public Delete setCallback(java.lang.String callback) {
return (Delete) super.setCallback(callback);
}
@Override
public Delete setFields(java.lang.String fields) {
return (Delete) super.setFields(fields);
}
@Override
public Delete setKey(java.lang.String key) {
return (Delete) super.setKey(key);
}
@Override
public Delete setOauthToken(java.lang.String oauthToken) {
return (Delete) super.setOauthToken(oauthToken);
}
@Override
public Delete setPrettyPrint(java.lang.Boolean prettyPrint) {
return (Delete) super.setPrettyPrint(prettyPrint);
}
@Override
public Delete setQuotaUser(java.lang.String quotaUser) {
return (Delete) super.setQuotaUser(quotaUser);
}
@Override
public Delete setUploadType(java.lang.String uploadType) {
return (Delete) super.setUploadType(uploadType);
}
@Override
public Delete setUploadProtocol(java.lang.String uploadProtocol) {
return (Delete) super.setUploadProtocol(uploadProtocol);
}
/**
* Required. Name of the mute config to delete. Its format is
* `organizations/{organization}/muteConfigs/{config_id}`,
* `folders/{folder}/muteConfigs/{config_id}`,
* `projects/{project}/muteConfigs/{config_id}`,
* `organizations/{organization}/locations/global/muteConfigs/{config_id}`,
* `folders/{folder}/locations/global/muteConfigs/{config_id}`, or
* `projects/{project}/locations/global/muteConfigs/{config_id}`.
*/
@com.google.api.client.util.Key
private java.lang.String name;
/** Required. Name of the mute config to delete. Its format is
`organizations/{organization}/muteConfigs/{config_id}`, `folders/{folder}/muteConfigs/{config_id}`,
`projects/{project}/muteConfigs/{config_id}`,
`organizations/{organization}/locations/global/muteConfigs/{config_id}`,
`folders/{folder}/locations/global/muteConfigs/{config_id}`, or
`projects/{project}/locations/global/muteConfigs/{config_id}`.
*/
public java.lang.String getName() {
return name;
}
/**
* Required. Name of the mute config to delete. Its format is
* `organizations/{organization}/muteConfigs/{config_id}`,
* `folders/{folder}/muteConfigs/{config_id}`,
* `projects/{project}/muteConfigs/{config_id}`,
* `organizations/{organization}/locations/global/muteConfigs/{config_id}`,
* `folders/{folder}/locations/global/muteConfigs/{config_id}`, or
* `projects/{project}/locations/global/muteConfigs/{config_id}`.
*/
public Delete setName(java.lang.String name) {
if (!getSuppressPatternChecks()) {
com.google.api.client.util.Preconditions.checkArgument(NAME_PATTERN.matcher(name).matches(),
"Parameter name must conform to the pattern " +
"^projects/[^/]+/locations/[^/]+/muteConfigs/[^/]+$");
}
this.name = name;
return this;
}
@Override
public Delete set(String parameterName, Object value) {
return (Delete) super.set(parameterName, value);
}
}
/**
* Gets a mute config.
*
* Create a request for the method "muteConfigs.get".
*
* This request holds the parameters needed by the securitycenter server. After setting any
* optional parameters, call the {@link Get#execute()} method to invoke the remote operation.
*
* @param name Required. Name of the mute config to retrieve. Its format is
* `organizations/{organization}/muteConfigs/{config_id}`,
* `folders/{folder}/muteConfigs/{config_id}`, `projects/{project}/muteConfigs/{config_id}`,
* `organizations/{organization}/locations/global/muteConfigs/{config_id}`,
* `folders/{folder}/locations/global/muteConfigs/{config_id}`, or
* `projects/{project}/locations/global/muteConfigs/{config_id}`.
* @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 SecurityCommandCenterRequest {
private static final String REST_PATH = "v1/{+name}";
private final java.util.regex.Pattern NAME_PATTERN =
java.util.regex.Pattern.compile("^projects/[^/]+/locations/[^/]+/muteConfigs/[^/]+$");
/**
* Gets a mute config.
*
* Create a request for the method "muteConfigs.get".
*
* This request holds the parameters needed by the the securitycenter 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. Name of the mute config to retrieve. Its format is
* `organizations/{organization}/muteConfigs/{config_id}`,
* `folders/{folder}/muteConfigs/{config_id}`, `projects/{project}/muteConfigs/{config_id}`,
* `organizations/{organization}/locations/global/muteConfigs/{config_id}`,
* `folders/{folder}/locations/global/muteConfigs/{config_id}`, or
* `projects/{project}/locations/global/muteConfigs/{config_id}`.
* @since 1.13
*/
protected Get(java.lang.String name) {
super(SecurityCommandCenter.this, "GET", REST_PATH, null, com.google.api.services.securitycenter.v1.model.GoogleCloudSecuritycenterV1MuteConfig.class);
this.name = com.google.api.client.util.Preconditions.checkNotNull(name, "Required parameter name must be specified.");
if (!getSuppressPatternChecks()) {
com.google.api.client.util.Preconditions.checkArgument(NAME_PATTERN.matcher(name).matches(),
"Parameter name must conform to the pattern " +
"^projects/[^/]+/locations/[^/]+/muteConfigs/[^/]+$");
}
}
@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. Name of the mute config to retrieve. Its format is
* `organizations/{organization}/muteConfigs/{config_id}`,
* `folders/{folder}/muteConfigs/{config_id}`,
* `projects/{project}/muteConfigs/{config_id}`,
* `organizations/{organization}/locations/global/muteConfigs/{config_id}`,
* `folders/{folder}/locations/global/muteConfigs/{config_id}`, or
* `projects/{project}/locations/global/muteConfigs/{config_id}`.
*/
@com.google.api.client.util.Key
private java.lang.String name;
/** Required. Name of the mute config to retrieve. Its format is
`organizations/{organization}/muteConfigs/{config_id}`, `folders/{folder}/muteConfigs/{config_id}`,
`projects/{project}/muteConfigs/{config_id}`,
`organizations/{organization}/locations/global/muteConfigs/{config_id}`,
`folders/{folder}/locations/global/muteConfigs/{config_id}`, or
`projects/{project}/locations/global/muteConfigs/{config_id}`.
*/
public java.lang.String getName() {
return name;
}
/**
* Required. Name of the mute config to retrieve. Its format is
* `organizations/{organization}/muteConfigs/{config_id}`,
* `folders/{folder}/muteConfigs/{config_id}`,
* `projects/{project}/muteConfigs/{config_id}`,
* `organizations/{organization}/locations/global/muteConfigs/{config_id}`,
* `folders/{folder}/locations/global/muteConfigs/{config_id}`, or
* `projects/{project}/locations/global/muteConfigs/{config_id}`.
*/
public Get setName(java.lang.String name) {
if (!getSuppressPatternChecks()) {
com.google.api.client.util.Preconditions.checkArgument(NAME_PATTERN.matcher(name).matches(),
"Parameter name must conform to the pattern " +
"^projects/[^/]+/locations/[^/]+/muteConfigs/[^/]+$");
}
this.name = name;
return this;
}
@Override
public Get set(String parameterName, Object value) {
return (Get) super.set(parameterName, value);
}
}
/**
* Updates a mute config.
*
* Create a request for the method "muteConfigs.patch".
*
* This request holds the parameters needed by the securitycenter server. After setting any
* optional parameters, call the {@link Patch#execute()} method to invoke the remote operation.
*
* @param name This field will be ignored if provided on config creation. Format
* `organizations/{organization}/muteConfigs/{mute_config}`
* `folders/{folder}/muteConfigs/{mute_config}`
* `projects/{project}/muteConfigs/{mute_config}`
* `organizations/{organization}/locations/global/muteConfigs/{mute_config}`
* `folders/{folder}/locations/global/muteConfigs/{mute_config}`
* `projects/{project}/locations/global/muteConfigs/{mute_config}`
* @param content the {@link com.google.api.services.securitycenter.v1.model.GoogleCloudSecuritycenterV1MuteConfig}
* @return the request
*/
public Patch patch(java.lang.String name, com.google.api.services.securitycenter.v1.model.GoogleCloudSecuritycenterV1MuteConfig content) throws java.io.IOException {
Patch result = new Patch(name, content);
initialize(result);
return result;
}
public class Patch extends SecurityCommandCenterRequest {
private static final String REST_PATH = "v1/{+name}";
private final java.util.regex.Pattern NAME_PATTERN =
java.util.regex.Pattern.compile("^projects/[^/]+/locations/[^/]+/muteConfigs/[^/]+$");
/**
* Updates a mute config.
*
* Create a request for the method "muteConfigs.patch".
*
* This request holds the parameters needed by the the securitycenter server. After setting any
* optional parameters, call the {@link Patch#execute()} method to invoke the remote operation.
* {@link
* Patch#initialize(com.google.api.client.googleapis.services.AbstractGoogleClientRequest)} must
* be called to initialize this instance immediately after invoking the constructor.
*
* @param name This field will be ignored if provided on config creation. Format
* `organizations/{organization}/muteConfigs/{mute_config}`
* `folders/{folder}/muteConfigs/{mute_config}`
* `projects/{project}/muteConfigs/{mute_config}`
* `organizations/{organization}/locations/global/muteConfigs/{mute_config}`
* `folders/{folder}/locations/global/muteConfigs/{mute_config}`
* `projects/{project}/locations/global/muteConfigs/{mute_config}`
* @param content the {@link com.google.api.services.securitycenter.v1.model.GoogleCloudSecuritycenterV1MuteConfig}
* @since 1.13
*/
protected Patch(java.lang.String name, com.google.api.services.securitycenter.v1.model.GoogleCloudSecuritycenterV1MuteConfig content) {
super(SecurityCommandCenter.this, "PATCH", REST_PATH, content, com.google.api.services.securitycenter.v1.model.GoogleCloudSecuritycenterV1MuteConfig.class);
this.name = com.google.api.client.util.Preconditions.checkNotNull(name, "Required parameter name must be specified.");
if (!getSuppressPatternChecks()) {
com.google.api.client.util.Preconditions.checkArgument(NAME_PATTERN.matcher(name).matches(),
"Parameter name must conform to the pattern " +
"^projects/[^/]+/locations/[^/]+/muteConfigs/[^/]+$");
}
}
@Override
public Patch set$Xgafv(java.lang.String $Xgafv) {
return (Patch) super.set$Xgafv($Xgafv);
}
@Override
public Patch setAccessToken(java.lang.String accessToken) {
return (Patch) super.setAccessToken(accessToken);
}
@Override
public Patch setAlt(java.lang.String alt) {
return (Patch) super.setAlt(alt);
}
@Override
public Patch setCallback(java.lang.String callback) {
return (Patch) super.setCallback(callback);
}
@Override
public Patch setFields(java.lang.String fields) {
return (Patch) super.setFields(fields);
}
@Override
public Patch setKey(java.lang.String key) {
return (Patch) super.setKey(key);
}
@Override
public Patch setOauthToken(java.lang.String oauthToken) {
return (Patch) super.setOauthToken(oauthToken);
}
@Override
public Patch setPrettyPrint(java.lang.Boolean prettyPrint) {
return (Patch) super.setPrettyPrint(prettyPrint);
}
@Override
public Patch setQuotaUser(java.lang.String quotaUser) {
return (Patch) super.setQuotaUser(quotaUser);
}
@Override
public Patch setUploadType(java.lang.String uploadType) {
return (Patch) super.setUploadType(uploadType);
}
@Override
public Patch setUploadProtocol(java.lang.String uploadProtocol) {
return (Patch) super.setUploadProtocol(uploadProtocol);
}
/**
* This field will be ignored if provided on config creation. Format
* `organizations/{organization}/muteConfigs/{mute_config}`
* `folders/{folder}/muteConfigs/{mute_config}`
* `projects/{project}/muteConfigs/{mute_config}`
* `organizations/{organization}/locations/global/muteConfigs/{mute_config}`
* `folders/{folder}/locations/global/muteConfigs/{mute_config}`
* `projects/{project}/locations/global/muteConfigs/{mute_config}`
*/
@com.google.api.client.util.Key
private java.lang.String name;
/** This field will be ignored if provided on config creation. Format
`organizations/{organization}/muteConfigs/{mute_config}`
`folders/{folder}/muteConfigs/{mute_config}` `projects/{project}/muteConfigs/{mute_config}`
`organizations/{organization}/locations/global/muteConfigs/{mute_config}`
`folders/{folder}/locations/global/muteConfigs/{mute_config}`
`projects/{project}/locations/global/muteConfigs/{mute_config}`
*/
public java.lang.String getName() {
return name;
}
/**
* This field will be ignored if provided on config creation. Format
* `organizations/{organization}/muteConfigs/{mute_config}`
* `folders/{folder}/muteConfigs/{mute_config}`
* `projects/{project}/muteConfigs/{mute_config}`
* `organizations/{organization}/locations/global/muteConfigs/{mute_config}`
* `folders/{folder}/locations/global/muteConfigs/{mute_config}`
* `projects/{project}/locations/global/muteConfigs/{mute_config}`
*/
public Patch setName(java.lang.String name) {
if (!getSuppressPatternChecks()) {
com.google.api.client.util.Preconditions.checkArgument(NAME_PATTERN.matcher(name).matches(),
"Parameter name must conform to the pattern " +
"^projects/[^/]+/locations/[^/]+/muteConfigs/[^/]+$");
}
this.name = name;
return this;
}
/** The list of fields to be updated. If empty all mutable fields will be updated. */
@com.google.api.client.util.Key
private String updateMask;
/** The list of fields to be updated. If empty all mutable fields will be updated.
*/
public String getUpdateMask() {
return updateMask;
}
/** The list of fields to be updated. If empty all mutable fields will be updated. */
public Patch setUpdateMask(String updateMask) {
this.updateMask = updateMask;
return this;
}
@Override
public Patch set(String parameterName, Object value) {
return (Patch) super.set(parameterName, value);
}
}
}
}
/**
* An accessor for creating requests from the MuteConfigs collection.
*
* The typical use is:
*
* {@code SecurityCommandCenter securitycenter = new SecurityCommandCenter(...);}
* {@code SecurityCommandCenter.MuteConfigs.List request = securitycenter.muteConfigs().list(parameters ...)}
*
*
* @return the resource collection
*/
public MuteConfigs muteConfigs() {
return new MuteConfigs();
}
/**
* The "muteConfigs" collection of methods.
*/
public class MuteConfigs {
/**
* Creates a mute config.
*
* Create a request for the method "muteConfigs.create".
*
* This request holds the parameters needed by the securitycenter server. After setting any
* optional parameters, call the {@link Create#execute()} method to invoke the remote operation.
*
* @param parent Required. Resource name of the new mute configs's parent. Its format is
* `organizations/[organization_id]`, `folders/[folder_id]`, or `projects/[project_id]`.
* @param content the {@link com.google.api.services.securitycenter.v1.model.GoogleCloudSecuritycenterV1MuteConfig}
* @return the request
*/
public Create create(java.lang.String parent, com.google.api.services.securitycenter.v1.model.GoogleCloudSecuritycenterV1MuteConfig content) throws java.io.IOException {
Create result = new Create(parent, content);
initialize(result);
return result;
}
public class Create extends SecurityCommandCenterRequest {
private static final String REST_PATH = "v1/{+parent}/muteConfigs";
private final java.util.regex.Pattern PARENT_PATTERN =
java.util.regex.Pattern.compile("^projects/[^/]+$");
/**
* Creates a mute config.
*
* Create a request for the method "muteConfigs.create".
*
* This request holds the parameters needed by the the securitycenter server. After setting any
* optional parameters, call the {@link Create#execute()} method to invoke the remote operation.
* {@link
* Create#initialize(com.google.api.client.googleapis.services.AbstractGoogleClientRequest)} must
* be called to initialize this instance immediately after invoking the constructor.
*
* @param parent Required. Resource name of the new mute configs's parent. Its format is
* `organizations/[organization_id]`, `folders/[folder_id]`, or `projects/[project_id]`.
* @param content the {@link com.google.api.services.securitycenter.v1.model.GoogleCloudSecuritycenterV1MuteConfig}
* @since 1.13
*/
protected Create(java.lang.String parent, com.google.api.services.securitycenter.v1.model.GoogleCloudSecuritycenterV1MuteConfig content) {
super(SecurityCommandCenter.this, "POST", REST_PATH, content, com.google.api.services.securitycenter.v1.model.GoogleCloudSecuritycenterV1MuteConfig.class);
this.parent = com.google.api.client.util.Preconditions.checkNotNull(parent, "Required parameter parent must be specified.");
if (!getSuppressPatternChecks()) {
com.google.api.client.util.Preconditions.checkArgument(PARENT_PATTERN.matcher(parent).matches(),
"Parameter parent must conform to the pattern " +
"^projects/[^/]+$");
}
}
@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. Resource name of the new mute configs's parent. Its format is
* `organizations/[organization_id]`, `folders/[folder_id]`, or `projects/[project_id]`.
*/
@com.google.api.client.util.Key
private java.lang.String parent;
/** Required. Resource name of the new mute configs's parent. Its format is
`organizations/[organization_id]`, `folders/[folder_id]`, or `projects/[project_id]`.
*/
public java.lang.String getParent() {
return parent;
}
/**
* Required. Resource name of the new mute configs's parent. Its format is
* `organizations/[organization_id]`, `folders/[folder_id]`, or `projects/[project_id]`.
*/
public Create setParent(java.lang.String parent) {
if (!getSuppressPatternChecks()) {
com.google.api.client.util.Preconditions.checkArgument(PARENT_PATTERN.matcher(parent).matches(),
"Parameter parent must conform to the pattern " +
"^projects/[^/]+$");
}
this.parent = parent;
return this;
}
/**
* Required. Unique identifier provided by the client within the parent scope. It must
* consist of only lowercase letters, numbers, and hyphens, must start with a letter, must
* end with either a letter or a number, and must be 63 characters or less.
*/
@com.google.api.client.util.Key
private java.lang.String muteConfigId;
/** Required. Unique identifier provided by the client within the parent scope. It must consist of only
lowercase letters, numbers, and hyphens, must start with a letter, must end with either a letter or
a number, and must be 63 characters or less.
*/
public java.lang.String getMuteConfigId() {
return muteConfigId;
}
/**
* Required. Unique identifier provided by the client within the parent scope. It must
* consist of only lowercase letters, numbers, and hyphens, must start with a letter, must
* end with either a letter or a number, and must be 63 characters or less.
*/
public Create setMuteConfigId(java.lang.String muteConfigId) {
this.muteConfigId = muteConfigId;
return this;
}
@Override
public Create set(String parameterName, Object value) {
return (Create) super.set(parameterName, value);
}
}
/**
* Deletes an existing mute config.
*
* Create a request for the method "muteConfigs.delete".
*
* This request holds the parameters needed by the securitycenter server. After setting any
* optional parameters, call the {@link Delete#execute()} method to invoke the remote operation.
*
* @param name Required. Name of the mute config to delete. Its format is
* `organizations/{organization}/muteConfigs/{config_id}`,
* `folders/{folder}/muteConfigs/{config_id}`, `projects/{project}/muteConfigs/{config_id}`,
* `organizations/{organization}/locations/global/muteConfigs/{config_id}`,
* `folders/{folder}/locations/global/muteConfigs/{config_id}`, or
* `projects/{project}/locations/global/muteConfigs/{config_id}`.
* @return the request
*/
public Delete delete(java.lang.String name) throws java.io.IOException {
Delete result = new Delete(name);
initialize(result);
return result;
}
public class Delete extends SecurityCommandCenterRequest {
private static final String REST_PATH = "v1/{+name}";
private final java.util.regex.Pattern NAME_PATTERN =
java.util.regex.Pattern.compile("^projects/[^/]+/muteConfigs/[^/]+$");
/**
* Deletes an existing mute config.
*
* Create a request for the method "muteConfigs.delete".
*
* This request holds the parameters needed by the the securitycenter server. After setting any
* optional parameters, call the {@link Delete#execute()} method to invoke the remote operation.
* {@link
* Delete#initialize(com.google.api.client.googleapis.services.AbstractGoogleClientRequest)} must
* be called to initialize this instance immediately after invoking the constructor.
*
* @param name Required. Name of the mute config to delete. Its format is
* `organizations/{organization}/muteConfigs/{config_id}`,
* `folders/{folder}/muteConfigs/{config_id}`, `projects/{project}/muteConfigs/{config_id}`,
* `organizations/{organization}/locations/global/muteConfigs/{config_id}`,
* `folders/{folder}/locations/global/muteConfigs/{config_id}`, or
* `projects/{project}/locations/global/muteConfigs/{config_id}`.
* @since 1.13
*/
protected Delete(java.lang.String name) {
super(SecurityCommandCenter.this, "DELETE", REST_PATH, null, com.google.api.services.securitycenter.v1.model.Empty.class);
this.name = com.google.api.client.util.Preconditions.checkNotNull(name, "Required parameter name must be specified.");
if (!getSuppressPatternChecks()) {
com.google.api.client.util.Preconditions.checkArgument(NAME_PATTERN.matcher(name).matches(),
"Parameter name must conform to the pattern " +
"^projects/[^/]+/muteConfigs/[^/]+$");
}
}
@Override
public Delete set$Xgafv(java.lang.String $Xgafv) {
return (Delete) super.set$Xgafv($Xgafv);
}
@Override
public Delete setAccessToken(java.lang.String accessToken) {
return (Delete) super.setAccessToken(accessToken);
}
@Override
public Delete setAlt(java.lang.String alt) {
return (Delete) super.setAlt(alt);
}
@Override
public Delete setCallback(java.lang.String callback) {
return (Delete) super.setCallback(callback);
}
@Override
public Delete setFields(java.lang.String fields) {
return (Delete) super.setFields(fields);
}
@Override
public Delete setKey(java.lang.String key) {
return (Delete) super.setKey(key);
}
@Override
public Delete setOauthToken(java.lang.String oauthToken) {
return (Delete) super.setOauthToken(oauthToken);
}
@Override
public Delete setPrettyPrint(java.lang.Boolean prettyPrint) {
return (Delete) super.setPrettyPrint(prettyPrint);
}
@Override
public Delete setQuotaUser(java.lang.String quotaUser) {
return (Delete) super.setQuotaUser(quotaUser);
}
@Override
public Delete setUploadType(java.lang.String uploadType) {
return (Delete) super.setUploadType(uploadType);
}
@Override
public Delete setUploadProtocol(java.lang.String uploadProtocol) {
return (Delete) super.setUploadProtocol(uploadProtocol);
}
/**
* Required. Name of the mute config to delete. Its format is
* `organizations/{organization}/muteConfigs/{config_id}`,
* `folders/{folder}/muteConfigs/{config_id}`, `projects/{project}/muteConfigs/{config_id}`,
* `organizations/{organization}/locations/global/muteConfigs/{config_id}`,
* `folders/{folder}/locations/global/muteConfigs/{config_id}`, or
* `projects/{project}/locations/global/muteConfigs/{config_id}`.
*/
@com.google.api.client.util.Key
private java.lang.String name;
/** Required. Name of the mute config to delete. Its format is
`organizations/{organization}/muteConfigs/{config_id}`, `folders/{folder}/muteConfigs/{config_id}`,
`projects/{project}/muteConfigs/{config_id}`,
`organizations/{organization}/locations/global/muteConfigs/{config_id}`,
`folders/{folder}/locations/global/muteConfigs/{config_id}`, or
`projects/{project}/locations/global/muteConfigs/{config_id}`.
*/
public java.lang.String getName() {
return name;
}
/**
* Required. Name of the mute config to delete. Its format is
* `organizations/{organization}/muteConfigs/{config_id}`,
* `folders/{folder}/muteConfigs/{config_id}`, `projects/{project}/muteConfigs/{config_id}`,
* `organizations/{organization}/locations/global/muteConfigs/{config_id}`,
* `folders/{folder}/locations/global/muteConfigs/{config_id}`, or
* `projects/{project}/locations/global/muteConfigs/{config_id}`.
*/
public Delete setName(java.lang.String name) {
if (!getSuppressPatternChecks()) {
com.google.api.client.util.Preconditions.checkArgument(NAME_PATTERN.matcher(name).matches(),
"Parameter name must conform to the pattern " +
"^projects/[^/]+/muteConfigs/[^/]+$");
}
this.name = name;
return this;
}
@Override
public Delete set(String parameterName, Object value) {
return (Delete) super.set(parameterName, value);
}
}
/**
* Gets a mute config.
*
* Create a request for the method "muteConfigs.get".
*
* This request holds the parameters needed by the securitycenter server. After setting any
* optional parameters, call the {@link Get#execute()} method to invoke the remote operation.
*
* @param name Required. Name of the mute config to retrieve. Its format is
* `organizations/{organization}/muteConfigs/{config_id}`,
* `folders/{folder}/muteConfigs/{config_id}`, `projects/{project}/muteConfigs/{config_id}`,
* `organizations/{organization}/locations/global/muteConfigs/{config_id}`,
* `folders/{folder}/locations/global/muteConfigs/{config_id}`, or
* `projects/{project}/locations/global/muteConfigs/{config_id}`.
* @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 SecurityCommandCenterRequest {
private static final String REST_PATH = "v1/{+name}";
private final java.util.regex.Pattern NAME_PATTERN =
java.util.regex.Pattern.compile("^projects/[^/]+/muteConfigs/[^/]+$");
/**
* Gets a mute config.
*
* Create a request for the method "muteConfigs.get".
*
* This request holds the parameters needed by the the securitycenter 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. Name of the mute config to retrieve. Its format is
* `organizations/{organization}/muteConfigs/{config_id}`,
* `folders/{folder}/muteConfigs/{config_id}`, `projects/{project}/muteConfigs/{config_id}`,
* `organizations/{organization}/locations/global/muteConfigs/{config_id}`,
* `folders/{folder}/locations/global/muteConfigs/{config_id}`, or
* `projects/{project}/locations/global/muteConfigs/{config_id}`.
* @since 1.13
*/
protected Get(java.lang.String name) {
super(SecurityCommandCenter.this, "GET", REST_PATH, null, com.google.api.services.securitycenter.v1.model.GoogleCloudSecuritycenterV1MuteConfig.class);
this.name = com.google.api.client.util.Preconditions.checkNotNull(name, "Required parameter name must be specified.");
if (!getSuppressPatternChecks()) {
com.google.api.client.util.Preconditions.checkArgument(NAME_PATTERN.matcher(name).matches(),
"Parameter name must conform to the pattern " +
"^projects/[^/]+/muteConfigs/[^/]+$");
}
}
@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. Name of the mute config to retrieve. Its format is
* `organizations/{organization}/muteConfigs/{config_id}`,
* `folders/{folder}/muteConfigs/{config_id}`, `projects/{project}/muteConfigs/{config_id}`,
* `organizations/{organization}/locations/global/muteConfigs/{config_id}`,
* `folders/{folder}/locations/global/muteConfigs/{config_id}`, or
* `projects/{project}/locations/global/muteConfigs/{config_id}`.
*/
@com.google.api.client.util.Key
private java.lang.String name;
/** Required. Name of the mute config to retrieve. Its format is
`organizations/{organization}/muteConfigs/{config_id}`, `folders/{folder}/muteConfigs/{config_id}`,
`projects/{project}/muteConfigs/{config_id}`,
`organizations/{organization}/locations/global/muteConfigs/{config_id}`,
`folders/{folder}/locations/global/muteConfigs/{config_id}`, or
`projects/{project}/locations/global/muteConfigs/{config_id}`.
*/
public java.lang.String getName() {
return name;
}
/**
* Required. Name of the mute config to retrieve. Its format is
* `organizations/{organization}/muteConfigs/{config_id}`,
* `folders/{folder}/muteConfigs/{config_id}`, `projects/{project}/muteConfigs/{config_id}`,
* `organizations/{organization}/locations/global/muteConfigs/{config_id}`,
* `folders/{folder}/locations/global/muteConfigs/{config_id}`, or
* `projects/{project}/locations/global/muteConfigs/{config_id}`.
*/
public Get setName(java.lang.String name) {
if (!getSuppressPatternChecks()) {
com.google.api.client.util.Preconditions.checkArgument(NAME_PATTERN.matcher(name).matches(),
"Parameter name must conform to the pattern " +
"^projects/[^/]+/muteConfigs/[^/]+$");
}
this.name = name;
return this;
}
@Override
public Get set(String parameterName, Object value) {
return (Get) super.set(parameterName, value);
}
}
/**
* Lists mute configs.
*
* Create a request for the method "muteConfigs.list".
*
* This request holds the parameters needed by the securitycenter server. After setting any
* optional parameters, call the {@link List#execute()} method to invoke the remote operation.
*
* @param parent Required. The parent, which owns the collection of mute configs. Its format is
* `organizations/[organization_id]`, `folders/[folder_id]`, `projects/[project_id]`.
* @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 SecurityCommandCenterRequest {
private static final String REST_PATH = "v1/{+parent}/muteConfigs";
private final java.util.regex.Pattern PARENT_PATTERN =
java.util.regex.Pattern.compile("^projects/[^/]+$");
/**
* Lists mute configs.
*
* Create a request for the method "muteConfigs.list".
*
* This request holds the parameters needed by the the securitycenter server. After setting any
* optional parameters, call the {@link List#execute()} method to invoke the remote operation.
* {@link List#initialize(com.google.api.client.googleapis.services.AbstractGoogleClientRequest)}
* must be called to initialize this instance immediately after invoking the constructor.
*
* @param parent Required. The parent, which owns the collection of mute configs. Its format is
* `organizations/[organization_id]`, `folders/[folder_id]`, `projects/[project_id]`.
* @since 1.13
*/
protected List(java.lang.String parent) {
super(SecurityCommandCenter.this, "GET", REST_PATH, null, com.google.api.services.securitycenter.v1.model.ListMuteConfigsResponse.class);
this.parent = com.google.api.client.util.Preconditions.checkNotNull(parent, "Required parameter parent must be specified.");
if (!getSuppressPatternChecks()) {
com.google.api.client.util.Preconditions.checkArgument(PARENT_PATTERN.matcher(parent).matches(),
"Parameter parent must conform to the pattern " +
"^projects/[^/]+$");
}
}
@Override
public com.google.api.client.http.HttpResponse executeUsingHead() throws java.io.IOException {
return super.executeUsingHead();
}
@Override
public com.google.api.client.http.HttpRequest buildHttpRequestUsingHead() throws java.io.IOException {
return super.buildHttpRequestUsingHead();
}
@Override
public List set$Xgafv(java.lang.String $Xgafv) {
return (List) super.set$Xgafv($Xgafv);
}
@Override
public List setAccessToken(java.lang.String accessToken) {
return (List) super.setAccessToken(accessToken);
}
@Override
public List setAlt(java.lang.String alt) {
return (List) super.setAlt(alt);
}
@Override
public List setCallback(java.lang.String callback) {
return (List) super.setCallback(callback);
}
@Override
public List setFields(java.lang.String fields) {
return (List) super.setFields(fields);
}
@Override
public List setKey(java.lang.String key) {
return (List) super.setKey(key);
}
@Override
public List setOauthToken(java.lang.String oauthToken) {
return (List) super.setOauthToken(oauthToken);
}
@Override
public List setPrettyPrint(java.lang.Boolean prettyPrint) {
return (List) super.setPrettyPrint(prettyPrint);
}
@Override
public List setQuotaUser(java.lang.String quotaUser) {
return (List) super.setQuotaUser(quotaUser);
}
@Override
public List setUploadType(java.lang.String uploadType) {
return (List) super.setUploadType(uploadType);
}
@Override
public List setUploadProtocol(java.lang.String uploadProtocol) {
return (List) super.setUploadProtocol(uploadProtocol);
}
/**
* Required. The parent, which owns the collection of mute configs. Its format is
* `organizations/[organization_id]`, `folders/[folder_id]`, `projects/[project_id]`.
*/
@com.google.api.client.util.Key
private java.lang.String parent;
/** Required. The parent, which owns the collection of mute configs. Its format is
`organizations/[organization_id]`, `folders/[folder_id]`, `projects/[project_id]`.
*/
public java.lang.String getParent() {
return parent;
}
/**
* Required. The parent, which owns the collection of mute configs. Its format is
* `organizations/[organization_id]`, `folders/[folder_id]`, `projects/[project_id]`.
*/
public List setParent(java.lang.String parent) {
if (!getSuppressPatternChecks()) {
com.google.api.client.util.Preconditions.checkArgument(PARENT_PATTERN.matcher(parent).matches(),
"Parameter parent must conform to the pattern " +
"^projects/[^/]+$");
}
this.parent = parent;
return this;
}
/**
* The maximum number of configs to return. The service may return fewer than this value. If
* unspecified, at most 10 configs will be returned. The maximum value is 1000; values above
* 1000 will be coerced to 1000.
*/
@com.google.api.client.util.Key
private java.lang.Integer pageSize;
/** The maximum number of configs to return. The service may return fewer than this value. If
unspecified, at most 10 configs will be returned. The maximum value is 1000; values above 1000 will
be coerced to 1000.
*/
public java.lang.Integer getPageSize() {
return pageSize;
}
/**
* The maximum number of configs to return. The service may return fewer than this value. If
* unspecified, at most 10 configs will be returned. The maximum value is 1000; values above
* 1000 will be coerced to 1000.
*/
public List setPageSize(java.lang.Integer pageSize) {
this.pageSize = pageSize;
return this;
}
/**
* A page token, received from a previous `ListMuteConfigs` call. Provide this to retrieve
* the subsequent page. When paginating, all other parameters provided to `ListMuteConfigs`
* must match the call that provided the page token.
*/
@com.google.api.client.util.Key
private java.lang.String pageToken;
/** A page token, received from a previous `ListMuteConfigs` call. Provide this to retrieve the
subsequent page. When paginating, all other parameters provided to `ListMuteConfigs` must match the
call that provided the page token.
*/
public java.lang.String getPageToken() {
return pageToken;
}
/**
* A page token, received from a previous `ListMuteConfigs` call. Provide this to retrieve
* the subsequent page. When paginating, all other parameters provided to `ListMuteConfigs`
* must match the call that provided the 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);
}
}
/**
* Updates a mute config.
*
* Create a request for the method "muteConfigs.patch".
*
* This request holds the parameters needed by the securitycenter server. After setting any
* optional parameters, call the {@link Patch#execute()} method to invoke the remote operation.
*
* @param name This field will be ignored if provided on config creation. Format
* `organizations/{organization}/muteConfigs/{mute_config}`
* `folders/{folder}/muteConfigs/{mute_config}`
* `projects/{project}/muteConfigs/{mute_config}`
* `organizations/{organization}/locations/global/muteConfigs/{mute_config}`
* `folders/{folder}/locations/global/muteConfigs/{mute_config}`
* `projects/{project}/locations/global/muteConfigs/{mute_config}`
* @param content the {@link com.google.api.services.securitycenter.v1.model.GoogleCloudSecuritycenterV1MuteConfig}
* @return the request
*/
public Patch patch(java.lang.String name, com.google.api.services.securitycenter.v1.model.GoogleCloudSecuritycenterV1MuteConfig content) throws java.io.IOException {
Patch result = new Patch(name, content);
initialize(result);
return result;
}
public class Patch extends SecurityCommandCenterRequest {
private static final String REST_PATH = "v1/{+name}";
private final java.util.regex.Pattern NAME_PATTERN =
java.util.regex.Pattern.compile("^projects/[^/]+/muteConfigs/[^/]+$");
/**
* Updates a mute config.
*
* Create a request for the method "muteConfigs.patch".
*
* This request holds the parameters needed by the the securitycenter server. After setting any
* optional parameters, call the {@link Patch#execute()} method to invoke the remote operation.
* {@link
* Patch#initialize(com.google.api.client.googleapis.services.AbstractGoogleClientRequest)} must
* be called to initialize this instance immediately after invoking the constructor.
*
* @param name This field will be ignored if provided on config creation. Format
* `organizations/{organization}/muteConfigs/{mute_config}`
* `folders/{folder}/muteConfigs/{mute_config}`
* `projects/{project}/muteConfigs/{mute_config}`
* `organizations/{organization}/locations/global/muteConfigs/{mute_config}`
* `folders/{folder}/locations/global/muteConfigs/{mute_config}`
* `projects/{project}/locations/global/muteConfigs/{mute_config}`
* @param content the {@link com.google.api.services.securitycenter.v1.model.GoogleCloudSecuritycenterV1MuteConfig}
* @since 1.13
*/
protected Patch(java.lang.String name, com.google.api.services.securitycenter.v1.model.GoogleCloudSecuritycenterV1MuteConfig content) {
super(SecurityCommandCenter.this, "PATCH", REST_PATH, content, com.google.api.services.securitycenter.v1.model.GoogleCloudSecuritycenterV1MuteConfig.class);
this.name = com.google.api.client.util.Preconditions.checkNotNull(name, "Required parameter name must be specified.");
if (!getSuppressPatternChecks()) {
com.google.api.client.util.Preconditions.checkArgument(NAME_PATTERN.matcher(name).matches(),
"Parameter name must conform to the pattern " +
"^projects/[^/]+/muteConfigs/[^/]+$");
}
}
@Override
public Patch set$Xgafv(java.lang.String $Xgafv) {
return (Patch) super.set$Xgafv($Xgafv);
}
@Override
public Patch setAccessToken(java.lang.String accessToken) {
return (Patch) super.setAccessToken(accessToken);
}
@Override
public Patch setAlt(java.lang.String alt) {
return (Patch) super.setAlt(alt);
}
@Override
public Patch setCallback(java.lang.String callback) {
return (Patch) super.setCallback(callback);
}
@Override
public Patch setFields(java.lang.String fields) {
return (Patch) super.setFields(fields);
}
@Override
public Patch setKey(java.lang.String key) {
return (Patch) super.setKey(key);
}
@Override
public Patch setOauthToken(java.lang.String oauthToken) {
return (Patch) super.setOauthToken(oauthToken);
}
@Override
public Patch setPrettyPrint(java.lang.Boolean prettyPrint) {
return (Patch) super.setPrettyPrint(prettyPrint);
}
@Override
public Patch setQuotaUser(java.lang.String quotaUser) {
return (Patch) super.setQuotaUser(quotaUser);
}
@Override
public Patch setUploadType(java.lang.String uploadType) {
return (Patch) super.setUploadType(uploadType);
}
@Override
public Patch setUploadProtocol(java.lang.String uploadProtocol) {
return (Patch) super.setUploadProtocol(uploadProtocol);
}
/**
* This field will be ignored if provided on config creation. Format
* `organizations/{organization}/muteConfigs/{mute_config}`
* `folders/{folder}/muteConfigs/{mute_config}`
* `projects/{project}/muteConfigs/{mute_config}`
* `organizations/{organization}/locations/global/muteConfigs/{mute_config}`
* `folders/{folder}/locations/global/muteConfigs/{mute_config}`
* `projects/{project}/locations/global/muteConfigs/{mute_config}`
*/
@com.google.api.client.util.Key
private java.lang.String name;
/** This field will be ignored if provided on config creation. Format
`organizations/{organization}/muteConfigs/{mute_config}`
`folders/{folder}/muteConfigs/{mute_config}` `projects/{project}/muteConfigs/{mute_config}`
`organizations/{organization}/locations/global/muteConfigs/{mute_config}`
`folders/{folder}/locations/global/muteConfigs/{mute_config}`
`projects/{project}/locations/global/muteConfigs/{mute_config}`
*/
public java.lang.String getName() {
return name;
}
/**
* This field will be ignored if provided on config creation. Format
* `organizations/{organization}/muteConfigs/{mute_config}`
* `folders/{folder}/muteConfigs/{mute_config}`
* `projects/{project}/muteConfigs/{mute_config}`
* `organizations/{organization}/locations/global/muteConfigs/{mute_config}`
* `folders/{folder}/locations/global/muteConfigs/{mute_config}`
* `projects/{project}/locations/global/muteConfigs/{mute_config}`
*/
public Patch setName(java.lang.String name) {
if (!getSuppressPatternChecks()) {
com.google.api.client.util.Preconditions.checkArgument(NAME_PATTERN.matcher(name).matches(),
"Parameter name must conform to the pattern " +
"^projects/[^/]+/muteConfigs/[^/]+$");
}
this.name = name;
return this;
}
/** The list of fields to be updated. If empty all mutable fields will be updated. */
@com.google.api.client.util.Key
private String updateMask;
/** The list of fields to be updated. If empty all mutable fields will be updated.
*/
public String getUpdateMask() {
return updateMask;
}
/** The list of fields to be updated. If empty all mutable fields will be updated. */
public Patch setUpdateMask(String updateMask) {
this.updateMask = updateMask;
return this;
}
@Override
public Patch set(String parameterName, Object value) {
return (Patch) super.set(parameterName, value);
}
}
}
/**
* An accessor for creating requests from the NotificationConfigs collection.
*
* The typical use is:
*
* {@code SecurityCommandCenter securitycenter = new SecurityCommandCenter(...);}
* {@code SecurityCommandCenter.NotificationConfigs.List request = securitycenter.notificationConfigs().list(parameters ...)}
*
*
* @return the resource collection
*/
public NotificationConfigs notificationConfigs() {
return new NotificationConfigs();
}
/**
* The "notificationConfigs" collection of methods.
*/
public class NotificationConfigs {
/**
* Creates a notification config.
*
* Create a request for the method "notificationConfigs.create".
*
* This request holds the parameters needed by the securitycenter server. After setting any
* optional parameters, call the {@link Create#execute()} method to invoke the remote operation.
*
* @param parent Required. Resource name of the new notification config's parent. Its format is
* `organizations/[organization_id]`, `folders/[folder_id]`, or `projects/[project_id]`.
* @param content the {@link com.google.api.services.securitycenter.v1.model.NotificationConfig}
* @return the request
*/
public Create create(java.lang.String parent, com.google.api.services.securitycenter.v1.model.NotificationConfig content) throws java.io.IOException {
Create result = new Create(parent, content);
initialize(result);
return result;
}
public class Create extends SecurityCommandCenterRequest {
private static final String REST_PATH = "v1/{+parent}/notificationConfigs";
private final java.util.regex.Pattern PARENT_PATTERN =
java.util.regex.Pattern.compile("^projects/[^/]+$");
/**
* Creates a notification config.
*
* Create a request for the method "notificationConfigs.create".
*
* This request holds the parameters needed by the the securitycenter server. After setting any
* optional parameters, call the {@link Create#execute()} method to invoke the remote operation.
* {@link
* Create#initialize(com.google.api.client.googleapis.services.AbstractGoogleClientRequest)} must
* be called to initialize this instance immediately after invoking the constructor.
*
* @param parent Required. Resource name of the new notification config's parent. Its format is
* `organizations/[organization_id]`, `folders/[folder_id]`, or `projects/[project_id]`.
* @param content the {@link com.google.api.services.securitycenter.v1.model.NotificationConfig}
* @since 1.13
*/
protected Create(java.lang.String parent, com.google.api.services.securitycenter.v1.model.NotificationConfig content) {
super(SecurityCommandCenter.this, "POST", REST_PATH, content, com.google.api.services.securitycenter.v1.model.NotificationConfig.class);
this.parent = com.google.api.client.util.Preconditions.checkNotNull(parent, "Required parameter parent must be specified.");
if (!getSuppressPatternChecks()) {
com.google.api.client.util.Preconditions.checkArgument(PARENT_PATTERN.matcher(parent).matches(),
"Parameter parent must conform to the pattern " +
"^projects/[^/]+$");
}
}
@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. Resource name of the new notification config's parent. Its format is
* `organizations/[organization_id]`, `folders/[folder_id]`, or `projects/[project_id]`.
*/
@com.google.api.client.util.Key
private java.lang.String parent;
/** Required. Resource name of the new notification config's parent. Its format is
`organizations/[organization_id]`, `folders/[folder_id]`, or `projects/[project_id]`.
*/
public java.lang.String getParent() {
return parent;
}
/**
* Required. Resource name of the new notification config's parent. Its format is
* `organizations/[organization_id]`, `folders/[folder_id]`, or `projects/[project_id]`.
*/
public Create setParent(java.lang.String parent) {
if (!getSuppressPatternChecks()) {
com.google.api.client.util.Preconditions.checkArgument(PARENT_PATTERN.matcher(parent).matches(),
"Parameter parent must conform to the pattern " +
"^projects/[^/]+$");
}
this.parent = parent;
return this;
}
/**
* Required. Unique identifier provided by the client within the parent scope. It must be
* between 1 and 128 characters and contain alphanumeric characters, underscores, or hyphens
* only.
*/
@com.google.api.client.util.Key
private java.lang.String configId;
/** Required. Unique identifier provided by the client within the parent scope. It must be between 1
and 128 characters and contain alphanumeric characters, underscores, or hyphens only.
*/
public java.lang.String getConfigId() {
return configId;
}
/**
* Required. Unique identifier provided by the client within the parent scope. It must be
* between 1 and 128 characters and contain alphanumeric characters, underscores, or hyphens
* only.
*/
public Create setConfigId(java.lang.String configId) {
this.configId = configId;
return this;
}
@Override
public Create set(String parameterName, Object value) {
return (Create) super.set(parameterName, value);
}
}
/**
* Deletes a notification config.
*
* Create a request for the method "notificationConfigs.delete".
*
* This request holds the parameters needed by the securitycenter server. After setting any
* optional parameters, call the {@link Delete#execute()} method to invoke the remote operation.
*
* @param name Required. Name of the notification config to delete. Its format is
* `organizations/[organization_id]/notificationConfigs/[config_id]`,
* `folders/[folder_id]/notificationConfigs/[config_id]`, or
* `projects/[project_id]/notificationConfigs/[config_id]`.
* @return the request
*/
public Delete delete(java.lang.String name) throws java.io.IOException {
Delete result = new Delete(name);
initialize(result);
return result;
}
public class Delete extends SecurityCommandCenterRequest {
private static final String REST_PATH = "v1/{+name}";
private final java.util.regex.Pattern NAME_PATTERN =
java.util.regex.Pattern.compile("^projects/[^/]+/notificationConfigs/[^/]+$");
/**
* Deletes a notification config.
*
* Create a request for the method "notificationConfigs.delete".
*
* This request holds the parameters needed by the the securitycenter server. After setting any
* optional parameters, call the {@link Delete#execute()} method to invoke the remote operation.
* {@link
* Delete#initialize(com.google.api.client.googleapis.services.AbstractGoogleClientRequest)} must
* be called to initialize this instance immediately after invoking the constructor.
*
* @param name Required. Name of the notification config to delete. Its format is
* `organizations/[organization_id]/notificationConfigs/[config_id]`,
* `folders/[folder_id]/notificationConfigs/[config_id]`, or
* `projects/[project_id]/notificationConfigs/[config_id]`.
* @since 1.13
*/
protected Delete(java.lang.String name) {
super(SecurityCommandCenter.this, "DELETE", REST_PATH, null, com.google.api.services.securitycenter.v1.model.Empty.class);
this.name = com.google.api.client.util.Preconditions.checkNotNull(name, "Required parameter name must be specified.");
if (!getSuppressPatternChecks()) {
com.google.api.client.util.Preconditions.checkArgument(NAME_PATTERN.matcher(name).matches(),
"Parameter name must conform to the pattern " +
"^projects/[^/]+/notificationConfigs/[^/]+$");
}
}
@Override
public Delete set$Xgafv(java.lang.String $Xgafv) {
return (Delete) super.set$Xgafv($Xgafv);
}
@Override
public Delete setAccessToken(java.lang.String accessToken) {
return (Delete) super.setAccessToken(accessToken);
}
@Override
public Delete setAlt(java.lang.String alt) {
return (Delete) super.setAlt(alt);
}
@Override
public Delete setCallback(java.lang.String callback) {
return (Delete) super.setCallback(callback);
}
@Override
public Delete setFields(java.lang.String fields) {
return (Delete) super.setFields(fields);
}
@Override
public Delete setKey(java.lang.String key) {
return (Delete) super.setKey(key);
}
@Override
public Delete setOauthToken(java.lang.String oauthToken) {
return (Delete) super.setOauthToken(oauthToken);
}
@Override
public Delete setPrettyPrint(java.lang.Boolean prettyPrint) {
return (Delete) super.setPrettyPrint(prettyPrint);
}
@Override
public Delete setQuotaUser(java.lang.String quotaUser) {
return (Delete) super.setQuotaUser(quotaUser);
}
@Override
public Delete setUploadType(java.lang.String uploadType) {
return (Delete) super.setUploadType(uploadType);
}
@Override
public Delete setUploadProtocol(java.lang.String uploadProtocol) {
return (Delete) super.setUploadProtocol(uploadProtocol);
}
/**
* Required. Name of the notification config to delete. Its format is
* `organizations/[organization_id]/notificationConfigs/[config_id]`,
* `folders/[folder_id]/notificationConfigs/[config_id]`, or
* `projects/[project_id]/notificationConfigs/[config_id]`.
*/
@com.google.api.client.util.Key
private java.lang.String name;
/** Required. Name of the notification config to delete. Its format is
`organizations/[organization_id]/notificationConfigs/[config_id]`,
`folders/[folder_id]/notificationConfigs/[config_id]`, or
`projects/[project_id]/notificationConfigs/[config_id]`.
*/
public java.lang.String getName() {
return name;
}
/**
* Required. Name of the notification config to delete. Its format is
* `organizations/[organization_id]/notificationConfigs/[config_id]`,
* `folders/[folder_id]/notificationConfigs/[config_id]`, or
* `projects/[project_id]/notificationConfigs/[config_id]`.
*/
public Delete setName(java.lang.String name) {
if (!getSuppressPatternChecks()) {
com.google.api.client.util.Preconditions.checkArgument(NAME_PATTERN.matcher(name).matches(),
"Parameter name must conform to the pattern " +
"^projects/[^/]+/notificationConfigs/[^/]+$");
}
this.name = name;
return this;
}
@Override
public Delete set(String parameterName, Object value) {
return (Delete) super.set(parameterName, value);
}
}
/**
* Gets a notification config.
*
* Create a request for the method "notificationConfigs.get".
*
* This request holds the parameters needed by the securitycenter server. After setting any
* optional parameters, call the {@link Get#execute()} method to invoke the remote operation.
*
* @param name Required. Name of the notification config to get. Its format is
* `organizations/[organization_id]/notificationConfigs/[config_id]`,
* `folders/[folder_id]/notificationConfigs/[config_id]`, or
* `projects/[project_id]/notificationConfigs/[config_id]`.
* @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 SecurityCommandCenterRequest {
private static final String REST_PATH = "v1/{+name}";
private final java.util.regex.Pattern NAME_PATTERN =
java.util.regex.Pattern.compile("^projects/[^/]+/notificationConfigs/[^/]+$");
/**
* Gets a notification config.
*
* Create a request for the method "notificationConfigs.get".
*
* This request holds the parameters needed by the the securitycenter 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. Name of the notification config to get. Its format is
* `organizations/[organization_id]/notificationConfigs/[config_id]`,
* `folders/[folder_id]/notificationConfigs/[config_id]`, or
* `projects/[project_id]/notificationConfigs/[config_id]`.
* @since 1.13
*/
protected Get(java.lang.String name) {
super(SecurityCommandCenter.this, "GET", REST_PATH, null, com.google.api.services.securitycenter.v1.model.NotificationConfig.class);
this.name = com.google.api.client.util.Preconditions.checkNotNull(name, "Required parameter name must be specified.");
if (!getSuppressPatternChecks()) {
com.google.api.client.util.Preconditions.checkArgument(NAME_PATTERN.matcher(name).matches(),
"Parameter name must conform to the pattern " +
"^projects/[^/]+/notificationConfigs/[^/]+$");
}
}
@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. Name of the notification config to get. Its format is
* `organizations/[organization_id]/notificationConfigs/[config_id]`,
* `folders/[folder_id]/notificationConfigs/[config_id]`, or
* `projects/[project_id]/notificationConfigs/[config_id]`.
*/
@com.google.api.client.util.Key
private java.lang.String name;
/** Required. Name of the notification config to get. Its format is
`organizations/[organization_id]/notificationConfigs/[config_id]`,
`folders/[folder_id]/notificationConfigs/[config_id]`, or
`projects/[project_id]/notificationConfigs/[config_id]`.
*/
public java.lang.String getName() {
return name;
}
/**
* Required. Name of the notification config to get. Its format is
* `organizations/[organization_id]/notificationConfigs/[config_id]`,
* `folders/[folder_id]/notificationConfigs/[config_id]`, or
* `projects/[project_id]/notificationConfigs/[config_id]`.
*/
public Get setName(java.lang.String name) {
if (!getSuppressPatternChecks()) {
com.google.api.client.util.Preconditions.checkArgument(NAME_PATTERN.matcher(name).matches(),
"Parameter name must conform to the pattern " +
"^projects/[^/]+/notificationConfigs/[^/]+$");
}
this.name = name;
return this;
}
@Override
public Get set(String parameterName, Object value) {
return (Get) super.set(parameterName, value);
}
}
/**
* Lists notification configs.
*
* Create a request for the method "notificationConfigs.list".
*
* This request holds the parameters needed by the securitycenter server. After setting any
* optional parameters, call the {@link List#execute()} method to invoke the remote operation.
*
* @param parent Required. The name of the parent in which to list the notification configurations. Its format is
* "organizations/[organization_id]", "folders/[folder_id]", or "projects/[project_id]".
* @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 SecurityCommandCenterRequest {
private static final String REST_PATH = "v1/{+parent}/notificationConfigs";
private final java.util.regex.Pattern PARENT_PATTERN =
java.util.regex.Pattern.compile("^projects/[^/]+$");
/**
* Lists notification configs.
*
* Create a request for the method "notificationConfigs.list".
*
* This request holds the parameters needed by the the securitycenter server. After setting any
* optional parameters, call the {@link List#execute()} method to invoke the remote operation.
* {@link List#initialize(com.google.api.client.googleapis.services.AbstractGoogleClientRequest)}
* must be called to initialize this instance immediately after invoking the constructor.
*
* @param parent Required. The name of the parent in which to list the notification configurations. Its format is
* "organizations/[organization_id]", "folders/[folder_id]", or "projects/[project_id]".
* @since 1.13
*/
protected List(java.lang.String parent) {
super(SecurityCommandCenter.this, "GET", REST_PATH, null, com.google.api.services.securitycenter.v1.model.ListNotificationConfigsResponse.class);
this.parent = com.google.api.client.util.Preconditions.checkNotNull(parent, "Required parameter parent must be specified.");
if (!getSuppressPatternChecks()) {
com.google.api.client.util.Preconditions.checkArgument(PARENT_PATTERN.matcher(parent).matches(),
"Parameter parent must conform to the pattern " +
"^projects/[^/]+$");
}
}
@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 parent in which to list the notification configurations. Its
* format is "organizations/[organization_id]", "folders/[folder_id]", or
* "projects/[project_id]".
*/
@com.google.api.client.util.Key
private java.lang.String parent;
/** Required. The name of the parent in which to list the notification configurations. Its format is
"organizations/[organization_id]", "folders/[folder_id]", or "projects/[project_id]".
*/
public java.lang.String getParent() {
return parent;
}
/**
* Required. The name of the parent in which to list the notification configurations. Its
* format is "organizations/[organization_id]", "folders/[folder_id]", or
* "projects/[project_id]".
*/
public List setParent(java.lang.String parent) {
if (!getSuppressPatternChecks()) {
com.google.api.client.util.Preconditions.checkArgument(PARENT_PATTERN.matcher(parent).matches(),
"Parameter parent must conform to the pattern " +
"^projects/[^/]+$");
}
this.parent = parent;
return this;
}
/**
* The maximum number of results to return in a single response. Default is 10, minimum is
* 1, maximum is 1000.
*/
@com.google.api.client.util.Key
private java.lang.Integer pageSize;
/** The maximum number of results to return in a single response. Default is 10, minimum is 1, maximum
is 1000.
*/
public java.lang.Integer getPageSize() {
return pageSize;
}
/**
* The maximum number of results to return in a single response. Default is 10, minimum is
* 1, maximum is 1000.
*/
public List setPageSize(java.lang.Integer pageSize) {
this.pageSize = pageSize;
return this;
}
/**
* The value returned by the last `ListNotificationConfigsResponse`; indicates that this is
* a continuation of a prior `ListNotificationConfigs` call, and that the system should
* return the next page of data.
*/
@com.google.api.client.util.Key
private java.lang.String pageToken;
/** The value returned by the last `ListNotificationConfigsResponse`; indicates that this is a
continuation of a prior `ListNotificationConfigs` call, and that the system should return the next
page of data.
*/
public java.lang.String getPageToken() {
return pageToken;
}
/**
* The value returned by the last `ListNotificationConfigsResponse`; indicates that this is
* a continuation of a prior `ListNotificationConfigs` call, and that the system should
* return the next page of data.
*/
public List setPageToken(java.lang.String pageToken) {
this.pageToken = pageToken;
return this;
}
@Override
public List set(String parameterName, Object value) {
return (List) super.set(parameterName, value);
}
}
/**
* Updates a notification config. The following update fields are allowed: description,
* pubsub_topic, streaming_config.filter
*
* Create a request for the method "notificationConfigs.patch".
*
* This request holds the parameters needed by the securitycenter server. After setting any
* optional parameters, call the {@link Patch#execute()} method to invoke the remote operation.
*
* @param name The relative resource name of this notification config. See:
* https://cloud.google.com/apis/design/resource_names#relative_resource_name Example:
* "organizations/{organization_id}/notificationConfigs/notify_public_bucket",
* "folders/{folder_id}/notificationConfigs/notify_public_bucket", or
* "projects/{project_id}/notificationConfigs/notify_public_bucket".
* @param content the {@link com.google.api.services.securitycenter.v1.model.NotificationConfig}
* @return the request
*/
public Patch patch(java.lang.String name, com.google.api.services.securitycenter.v1.model.NotificationConfig content) throws java.io.IOException {
Patch result = new Patch(name, content);
initialize(result);
return result;
}
public class Patch extends SecurityCommandCenterRequest {
private static final String REST_PATH = "v1/{+name}";
private final java.util.regex.Pattern NAME_PATTERN =
java.util.regex.Pattern.compile("^projects/[^/]+/notificationConfigs/[^/]+$");
/**
* Updates a notification config. The following update fields are allowed: description,
* pubsub_topic, streaming_config.filter
*
* Create a request for the method "notificationConfigs.patch".
*
* This request holds the parameters needed by the the securitycenter server. After setting any
* optional parameters, call the {@link Patch#execute()} method to invoke the remote operation.
* {@link
* Patch#initialize(com.google.api.client.googleapis.services.AbstractGoogleClientRequest)} must
* be called to initialize this instance immediately after invoking the constructor.
*
* @param name The relative resource name of this notification config. See:
* https://cloud.google.com/apis/design/resource_names#relative_resource_name Example:
* "organizations/{organization_id}/notificationConfigs/notify_public_bucket",
* "folders/{folder_id}/notificationConfigs/notify_public_bucket", or
* "projects/{project_id}/notificationConfigs/notify_public_bucket".
* @param content the {@link com.google.api.services.securitycenter.v1.model.NotificationConfig}
* @since 1.13
*/
protected Patch(java.lang.String name, com.google.api.services.securitycenter.v1.model.NotificationConfig content) {
super(SecurityCommandCenter.this, "PATCH", REST_PATH, content, com.google.api.services.securitycenter.v1.model.NotificationConfig.class);
this.name = com.google.api.client.util.Preconditions.checkNotNull(name, "Required parameter name must be specified.");
if (!getSuppressPatternChecks()) {
com.google.api.client.util.Preconditions.checkArgument(NAME_PATTERN.matcher(name).matches(),
"Parameter name must conform to the pattern " +
"^projects/[^/]+/notificationConfigs/[^/]+$");
}
}
@Override
public Patch set$Xgafv(java.lang.String $Xgafv) {
return (Patch) super.set$Xgafv($Xgafv);
}
@Override
public Patch setAccessToken(java.lang.String accessToken) {
return (Patch) super.setAccessToken(accessToken);
}
@Override
public Patch setAlt(java.lang.String alt) {
return (Patch) super.setAlt(alt);
}
@Override
public Patch setCallback(java.lang.String callback) {
return (Patch) super.setCallback(callback);
}
@Override
public Patch setFields(java.lang.String fields) {
return (Patch) super.setFields(fields);
}
@Override
public Patch setKey(java.lang.String key) {
return (Patch) super.setKey(key);
}
@Override
public Patch setOauthToken(java.lang.String oauthToken) {
return (Patch) super.setOauthToken(oauthToken);
}
@Override
public Patch setPrettyPrint(java.lang.Boolean prettyPrint) {
return (Patch) super.setPrettyPrint(prettyPrint);
}
@Override
public Patch setQuotaUser(java.lang.String quotaUser) {
return (Patch) super.setQuotaUser(quotaUser);
}
@Override
public Patch setUploadType(java.lang.String uploadType) {
return (Patch) super.setUploadType(uploadType);
}
@Override
public Patch setUploadProtocol(java.lang.String uploadProtocol) {
return (Patch) super.setUploadProtocol(uploadProtocol);
}
/**
* The relative resource name of this notification config. See:
* https://cloud.google.com/apis/design/resource_names#relative_resource_name Example:
* "organizations/{organization_id}/notificationConfigs/notify_public_bucket",
* "folders/{folder_id}/notificationConfigs/notify_public_bucket", or
* "projects/{project_id}/notificationConfigs/notify_public_bucket".
*/
@com.google.api.client.util.Key
private java.lang.String name;
/** The relative resource name of this notification config. See:
https://cloud.google.com/apis/design/resource_names#relative_resource_name Example:
"organizations/{organization_id}/notificationConfigs/notify_public_bucket",
"folders/{folder_id}/notificationConfigs/notify_public_bucket", or
"projects/{project_id}/notificationConfigs/notify_public_bucket".
*/
public java.lang.String getName() {
return name;
}
/**
* The relative resource name of this notification config. See:
* https://cloud.google.com/apis/design/resource_names#relative_resource_name Example:
* "organizations/{organization_id}/notificationConfigs/notify_public_bucket",
* "folders/{folder_id}/notificationConfigs/notify_public_bucket", or
* "projects/{project_id}/notificationConfigs/notify_public_bucket".
*/
public Patch setName(java.lang.String name) {
if (!getSuppressPatternChecks()) {
com.google.api.client.util.Preconditions.checkArgument(NAME_PATTERN.matcher(name).matches(),
"Parameter name must conform to the pattern " +
"^projects/[^/]+/notificationConfigs/[^/]+$");
}
this.name = name;
return this;
}
/**
* The FieldMask to use when updating the notification config. If empty all mutable fields
* will be updated.
*/
@com.google.api.client.util.Key
private String updateMask;
/** The FieldMask to use when updating the notification config. If empty all mutable fields will be
updated.
*/
public String getUpdateMask() {
return updateMask;
}
/**
* The FieldMask to use when updating the notification config. If empty all mutable fields
* will be updated.
*/
public Patch setUpdateMask(String updateMask) {
this.updateMask = updateMask;
return this;
}
@Override
public Patch set(String parameterName, Object value) {
return (Patch) super.set(parameterName, value);
}
}
}
/**
* An accessor for creating requests from the SecurityHealthAnalyticsSettings collection.
*
* The typical use is:
*
* {@code SecurityCommandCenter securitycenter = new SecurityCommandCenter(...);}
* {@code SecurityCommandCenter.SecurityHealthAnalyticsSettings.List request = securitycenter.securityHealthAnalyticsSettings().list(parameters ...)}
*
*
* @return the resource collection
*/
public SecurityHealthAnalyticsSettings securityHealthAnalyticsSettings() {
return new SecurityHealthAnalyticsSettings();
}
/**
* The "securityHealthAnalyticsSettings" collection of methods.
*/
public class SecurityHealthAnalyticsSettings {
/**
* An accessor for creating requests from the CustomModules collection.
*
* The typical use is:
*
* {@code SecurityCommandCenter securitycenter = new SecurityCommandCenter(...);}
* {@code SecurityCommandCenter.CustomModules.List request = securitycenter.customModules().list(parameters ...)}
*
*
* @return the resource collection
*/
public CustomModules customModules() {
return new CustomModules();
}
/**
* The "customModules" collection of methods.
*/
public class CustomModules {
/**
* Creates a resident SecurityHealthAnalyticsCustomModule at the scope of the given CRM parent, and
* also creates inherited SecurityHealthAnalyticsCustomModules for all CRM descendants of the given
* parent. These modules are enabled by default.
*
* Create a request for the method "customModules.create".
*
* This request holds the parameters needed by the securitycenter server. After setting any
* optional parameters, call the {@link Create#execute()} method to invoke the remote operation.
*
* @param parent Required. Resource name of the new custom module's parent. Its format is
* `organizations/{organization}/securityHealthAnalyticsSettings`,
* `folders/{folder}/securityHealthAnalyticsSettings`, or
* `projects/{project}/securityHealthAnalyticsSettings`
* @param content the {@link com.google.api.services.securitycenter.v1.model.GoogleCloudSecuritycenterV1SecurityHealthAnalyticsCustomModule}
* @return the request
*/
public Create create(java.lang.String parent, com.google.api.services.securitycenter.v1.model.GoogleCloudSecuritycenterV1SecurityHealthAnalyticsCustomModule content) throws java.io.IOException {
Create result = new Create(parent, content);
initialize(result);
return result;
}
public class Create extends SecurityCommandCenterRequest {
private static final String REST_PATH = "v1/{+parent}/customModules";
private final java.util.regex.Pattern PARENT_PATTERN =
java.util.regex.Pattern.compile("^projects/[^/]+/securityHealthAnalyticsSettings$");
/**
* Creates a resident SecurityHealthAnalyticsCustomModule at the scope of the given CRM parent,
* and also creates inherited SecurityHealthAnalyticsCustomModules for all CRM descendants of the
* given parent. These modules are enabled by default.
*
* Create a request for the method "customModules.create".
*
* This request holds the parameters needed by the the securitycenter server. After setting any
* optional parameters, call the {@link Create#execute()} method to invoke the remote operation.
* {@link
* Create#initialize(com.google.api.client.googleapis.services.AbstractGoogleClientRequest)} must
* be called to initialize this instance immediately after invoking the constructor.
*
* @param parent Required. Resource name of the new custom module's parent. Its format is
* `organizations/{organization}/securityHealthAnalyticsSettings`,
* `folders/{folder}/securityHealthAnalyticsSettings`, or
* `projects/{project}/securityHealthAnalyticsSettings`
* @param content the {@link com.google.api.services.securitycenter.v1.model.GoogleCloudSecuritycenterV1SecurityHealthAnalyticsCustomModule}
* @since 1.13
*/
protected Create(java.lang.String parent, com.google.api.services.securitycenter.v1.model.GoogleCloudSecuritycenterV1SecurityHealthAnalyticsCustomModule content) {
super(SecurityCommandCenter.this, "POST", REST_PATH, content, com.google.api.services.securitycenter.v1.model.GoogleCloudSecuritycenterV1SecurityHealthAnalyticsCustomModule.class);
this.parent = com.google.api.client.util.Preconditions.checkNotNull(parent, "Required parameter parent must be specified.");
if (!getSuppressPatternChecks()) {
com.google.api.client.util.Preconditions.checkArgument(PARENT_PATTERN.matcher(parent).matches(),
"Parameter parent must conform to the pattern " +
"^projects/[^/]+/securityHealthAnalyticsSettings$");
}
}
@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. Resource name of the new custom module's parent. Its format is
* `organizations/{organization}/securityHealthAnalyticsSettings`,
* `folders/{folder}/securityHealthAnalyticsSettings`, or
* `projects/{project}/securityHealthAnalyticsSettings`
*/
@com.google.api.client.util.Key
private java.lang.String parent;
/** Required. Resource name of the new custom module's parent. Its format is
`organizations/{organization}/securityHealthAnalyticsSettings`,
`folders/{folder}/securityHealthAnalyticsSettings`, or
`projects/{project}/securityHealthAnalyticsSettings`
*/
public java.lang.String getParent() {
return parent;
}
/**
* Required. Resource name of the new custom module's parent. Its format is
* `organizations/{organization}/securityHealthAnalyticsSettings`,
* `folders/{folder}/securityHealthAnalyticsSettings`, or
* `projects/{project}/securityHealthAnalyticsSettings`
*/
public Create setParent(java.lang.String parent) {
if (!getSuppressPatternChecks()) {
com.google.api.client.util.Preconditions.checkArgument(PARENT_PATTERN.matcher(parent).matches(),
"Parameter parent must conform to the pattern " +
"^projects/[^/]+/securityHealthAnalyticsSettings$");
}
this.parent = parent;
return this;
}
@Override
public Create set(String parameterName, Object value) {
return (Create) super.set(parameterName, value);
}
}
/**
* Deletes the specified SecurityHealthAnalyticsCustomModule and all of its descendants in the CRM
* hierarchy. This method is only supported for resident custom modules.
*
* Create a request for the method "customModules.delete".
*
* This request holds the parameters needed by the securitycenter server. After setting any
* optional parameters, call the {@link Delete#execute()} method to invoke the remote operation.
*
* @param name Required. Name of the custom module to delete. Its format is
* `organizations/{organization}/securityHealthAnalyticsSettings/customModules/{customModule}
* `, `folders/{folder}/securityHealthAnalyticsSettings/customModules/{customModule}`, or
* `projects/{project}/securityHealthAnalyticsSettings/customModules/{customModule}`
* @return the request
*/
public Delete delete(java.lang.String name) throws java.io.IOException {
Delete result = new Delete(name);
initialize(result);
return result;
}
public class Delete extends SecurityCommandCenterRequest {
private static final String REST_PATH = "v1/{+name}";
private final java.util.regex.Pattern NAME_PATTERN =
java.util.regex.Pattern.compile("^projects/[^/]+/securityHealthAnalyticsSettings/customModules/[^/]+$");
/**
* Deletes the specified SecurityHealthAnalyticsCustomModule and all of its descendants in the CRM
* hierarchy. This method is only supported for resident custom modules.
*
* Create a request for the method "customModules.delete".
*
* This request holds the parameters needed by the the securitycenter server. After setting any
* optional parameters, call the {@link Delete#execute()} method to invoke the remote operation.
* {@link
* Delete#initialize(com.google.api.client.googleapis.services.AbstractGoogleClientRequest)} must
* be called to initialize this instance immediately after invoking the constructor.
*
* @param name Required. Name of the custom module to delete. Its format is
* `organizations/{organization}/securityHealthAnalyticsSettings/customModules/{customModule}
* `, `folders/{folder}/securityHealthAnalyticsSettings/customModules/{customModule}`, or
* `projects/{project}/securityHealthAnalyticsSettings/customModules/{customModule}`
* @since 1.13
*/
protected Delete(java.lang.String name) {
super(SecurityCommandCenter.this, "DELETE", REST_PATH, null, com.google.api.services.securitycenter.v1.model.Empty.class);
this.name = com.google.api.client.util.Preconditions.checkNotNull(name, "Required parameter name must be specified.");
if (!getSuppressPatternChecks()) {
com.google.api.client.util.Preconditions.checkArgument(NAME_PATTERN.matcher(name).matches(),
"Parameter name must conform to the pattern " +
"^projects/[^/]+/securityHealthAnalyticsSettings/customModules/[^/]+$");
}
}
@Override
public Delete set$Xgafv(java.lang.String $Xgafv) {
return (Delete) super.set$Xgafv($Xgafv);
}
@Override
public Delete setAccessToken(java.lang.String accessToken) {
return (Delete) super.setAccessToken(accessToken);
}
@Override
public Delete setAlt(java.lang.String alt) {
return (Delete) super.setAlt(alt);
}
@Override
public Delete setCallback(java.lang.String callback) {
return (Delete) super.setCallback(callback);
}
@Override
public Delete setFields(java.lang.String fields) {
return (Delete) super.setFields(fields);
}
@Override
public Delete setKey(java.lang.String key) {
return (Delete) super.setKey(key);
}
@Override
public Delete setOauthToken(java.lang.String oauthToken) {
return (Delete) super.setOauthToken(oauthToken);
}
@Override
public Delete setPrettyPrint(java.lang.Boolean prettyPrint) {
return (Delete) super.setPrettyPrint(prettyPrint);
}
@Override
public Delete setQuotaUser(java.lang.String quotaUser) {
return (Delete) super.setQuotaUser(quotaUser);
}
@Override
public Delete setUploadType(java.lang.String uploadType) {
return (Delete) super.setUploadType(uploadType);
}
@Override
public Delete setUploadProtocol(java.lang.String uploadProtocol) {
return (Delete) super.setUploadProtocol(uploadProtocol);
}
/**
* Required. Name of the custom module to delete. Its format is `organizations/{organizati
* on}/securityHealthAnalyticsSettings/customModules/{customModule}`,
* `folders/{folder}/securityHealthAnalyticsSettings/customModules/{customModule}`, or
* `projects/{project}/securityHealthAnalyticsSettings/customModules/{customModule}`
*/
@com.google.api.client.util.Key
private java.lang.String name;
/** Required. Name of the custom module to delete. Its format is
`organizations/{organization}/securityHealthAnalyticsSettings/customModules/{customModule}`,
`folders/{folder}/securityHealthAnalyticsSettings/customModules/{customModule}`, or
`projects/{project}/securityHealthAnalyticsSettings/customModules/{customModule}`
*/
public java.lang.String getName() {
return name;
}
/**
* Required. Name of the custom module to delete. Its format is `organizations/{organizati
* on}/securityHealthAnalyticsSettings/customModules/{customModule}`,
* `folders/{folder}/securityHealthAnalyticsSettings/customModules/{customModule}`, or
* `projects/{project}/securityHealthAnalyticsSettings/customModules/{customModule}`
*/
public Delete setName(java.lang.String name) {
if (!getSuppressPatternChecks()) {
com.google.api.client.util.Preconditions.checkArgument(NAME_PATTERN.matcher(name).matches(),
"Parameter name must conform to the pattern " +
"^projects/[^/]+/securityHealthAnalyticsSettings/customModules/[^/]+$");
}
this.name = name;
return this;
}
@Override
public Delete set(String parameterName, Object value) {
return (Delete) super.set(parameterName, value);
}
}
/**
* Retrieves a SecurityHealthAnalyticsCustomModule.
*
* Create a request for the method "customModules.get".
*
* This request holds the parameters needed by the securitycenter server. After setting any
* optional parameters, call the {@link Get#execute()} method to invoke the remote operation.
*
* @param name Required. Name of the custom module to get. Its format is
* `organizations/{organization}/securityHealthAnalyticsSettings/customModules/{customModule}
* `, `folders/{folder}/securityHealthAnalyticsSettings/customModules/{customModule}`, or
* `projects/{project}/securityHealthAnalyticsSettings/customModules/{customModule}`
* @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 SecurityCommandCenterRequest {
private static final String REST_PATH = "v1/{+name}";
private final java.util.regex.Pattern NAME_PATTERN =
java.util.regex.Pattern.compile("^projects/[^/]+/securityHealthAnalyticsSettings/customModules/[^/]+$");
/**
* Retrieves a SecurityHealthAnalyticsCustomModule.
*
* Create a request for the method "customModules.get".
*
* This request holds the parameters needed by the the securitycenter 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. Name of the custom module to get. Its format is
* `organizations/{organization}/securityHealthAnalyticsSettings/customModules/{customModule}
* `, `folders/{folder}/securityHealthAnalyticsSettings/customModules/{customModule}`, or
* `projects/{project}/securityHealthAnalyticsSettings/customModules/{customModule}`
* @since 1.13
*/
protected Get(java.lang.String name) {
super(SecurityCommandCenter.this, "GET", REST_PATH, null, com.google.api.services.securitycenter.v1.model.GoogleCloudSecuritycenterV1SecurityHealthAnalyticsCustomModule.class);
this.name = com.google.api.client.util.Preconditions.checkNotNull(name, "Required parameter name must be specified.");
if (!getSuppressPatternChecks()) {
com.google.api.client.util.Preconditions.checkArgument(NAME_PATTERN.matcher(name).matches(),
"Parameter name must conform to the pattern " +
"^projects/[^/]+/securityHealthAnalyticsSettings/customModules/[^/]+$");
}
}
@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. Name of the custom module to get. Its format is `organizations/{organization}
* /securityHealthAnalyticsSettings/customModules/{customModule}`,
* `folders/{folder}/securityHealthAnalyticsSettings/customModules/{customModule}`, or
* `projects/{project}/securityHealthAnalyticsSettings/customModules/{customModule}`
*/
@com.google.api.client.util.Key
private java.lang.String name;
/** Required. Name of the custom module to get. Its format is
`organizations/{organization}/securityHealthAnalyticsSettings/customModules/{customModule}`,
`folders/{folder}/securityHealthAnalyticsSettings/customModules/{customModule}`, or
`projects/{project}/securityHealthAnalyticsSettings/customModules/{customModule}`
*/
public java.lang.String getName() {
return name;
}
/**
* Required. Name of the custom module to get. Its format is `organizations/{organization}
* /securityHealthAnalyticsSettings/customModules/{customModule}`,
* `folders/{folder}/securityHealthAnalyticsSettings/customModules/{customModule}`, or
* `projects/{project}/securityHealthAnalyticsSettings/customModules/{customModule}`
*/
public Get setName(java.lang.String name) {
if (!getSuppressPatternChecks()) {
com.google.api.client.util.Preconditions.checkArgument(NAME_PATTERN.matcher(name).matches(),
"Parameter name must conform to the pattern " +
"^projects/[^/]+/securityHealthAnalyticsSettings/customModules/[^/]+$");
}
this.name = name;
return this;
}
@Override
public Get set(String parameterName, Object value) {
return (Get) super.set(parameterName, value);
}
}
/**
* Returns a list of all SecurityHealthAnalyticsCustomModules for the given parent. This includes
* resident modules defined at the scope of the parent, and inherited modules, inherited from CRM
* ancestors.
*
* Create a request for the method "customModules.list".
*
* This request holds the parameters needed by the securitycenter server. After setting any
* optional parameters, call the {@link List#execute()} method to invoke the remote operation.
*
* @param parent Required. Name of parent to list custom modules. Its format is
* `organizations/{organization}/securityHealthAnalyticsSettings`,
* `folders/{folder}/securityHealthAnalyticsSettings`, or
* `projects/{project}/securityHealthAnalyticsSettings`
* @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 SecurityCommandCenterRequest {
private static final String REST_PATH = "v1/{+parent}/customModules";
private final java.util.regex.Pattern PARENT_PATTERN =
java.util.regex.Pattern.compile("^projects/[^/]+/securityHealthAnalyticsSettings$");
/**
* Returns a list of all SecurityHealthAnalyticsCustomModules for the given parent. This includes
* resident modules defined at the scope of the parent, and inherited modules, inherited from CRM
* ancestors.
*
* Create a request for the method "customModules.list".
*
* This request holds the parameters needed by the the securitycenter 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. Name of parent to list custom modules. Its format is
* `organizations/{organization}/securityHealthAnalyticsSettings`,
* `folders/{folder}/securityHealthAnalyticsSettings`, or
* `projects/{project}/securityHealthAnalyticsSettings`
* @since 1.13
*/
protected List(java.lang.String parent) {
super(SecurityCommandCenter.this, "GET", REST_PATH, null, com.google.api.services.securitycenter.v1.model.ListSecurityHealthAnalyticsCustomModulesResponse.class);
this.parent = com.google.api.client.util.Preconditions.checkNotNull(parent, "Required parameter parent must be specified.");
if (!getSuppressPatternChecks()) {
com.google.api.client.util.Preconditions.checkArgument(PARENT_PATTERN.matcher(parent).matches(),
"Parameter parent must conform to the pattern " +
"^projects/[^/]+/securityHealthAnalyticsSettings$");
}
}
@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. Name of parent to list custom modules. Its format is
* `organizations/{organization}/securityHealthAnalyticsSettings`,
* `folders/{folder}/securityHealthAnalyticsSettings`, or
* `projects/{project}/securityHealthAnalyticsSettings`
*/
@com.google.api.client.util.Key
private java.lang.String parent;
/** Required. Name of parent to list custom modules. Its format is
`organizations/{organization}/securityHealthAnalyticsSettings`,
`folders/{folder}/securityHealthAnalyticsSettings`, or
`projects/{project}/securityHealthAnalyticsSettings`
*/
public java.lang.String getParent() {
return parent;
}
/**
* Required. Name of parent to list custom modules. Its format is
* `organizations/{organization}/securityHealthAnalyticsSettings`,
* `folders/{folder}/securityHealthAnalyticsSettings`, or
* `projects/{project}/securityHealthAnalyticsSettings`
*/
public List setParent(java.lang.String parent) {
if (!getSuppressPatternChecks()) {
com.google.api.client.util.Preconditions.checkArgument(PARENT_PATTERN.matcher(parent).matches(),
"Parameter parent must conform to the pattern " +
"^projects/[^/]+/securityHealthAnalyticsSettings$");
}
this.parent = parent;
return this;
}
/**
* The maximum number of results to return in a single response. Default is 10, minimum is
* 1, maximum is 1000.
*/
@com.google.api.client.util.Key
private java.lang.Integer pageSize;
/** The maximum number of results to return in a single response. Default is 10, minimum is 1, maximum
is 1000.
*/
public java.lang.Integer getPageSize() {
return pageSize;
}
/**
* The maximum number of results to return in a single response. Default is 10, minimum is
* 1, maximum is 1000.
*/
public List setPageSize(java.lang.Integer pageSize) {
this.pageSize = pageSize;
return this;
}
/** The value returned by the last call indicating a continuation */
@com.google.api.client.util.Key
private java.lang.String pageToken;
/** The value returned by the last call indicating a continuation
*/
public java.lang.String getPageToken() {
return pageToken;
}
/** The value returned by the last call indicating a continuation */
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);
}
}
/**
* Returns a list of all resident SecurityHealthAnalyticsCustomModules under the given CRM parent
* and all of the parent’s CRM descendants.
*
* Create a request for the method "customModules.listDescendant".
*
* This request holds the parameters needed by the securitycenter server. After setting any
* optional parameters, call the {@link ListDescendant#execute()} method to invoke the remote
* operation.
*
* @param parent Required. Name of parent to list descendant custom modules. Its format is
* `organizations/{organization}/securityHealthAnalyticsSettings`,
* `folders/{folder}/securityHealthAnalyticsSettings`, or
* `projects/{project}/securityHealthAnalyticsSettings`
* @return the request
*/
public ListDescendant listDescendant(java.lang.String parent) throws java.io.IOException {
ListDescendant result = new ListDescendant(parent);
initialize(result);
return result;
}
public class ListDescendant extends SecurityCommandCenterRequest {
private static final String REST_PATH = "v1/{+parent}/customModules:listDescendant";
private final java.util.regex.Pattern PARENT_PATTERN =
java.util.regex.Pattern.compile("^projects/[^/]+/securityHealthAnalyticsSettings$");
/**
* Returns a list of all resident SecurityHealthAnalyticsCustomModules under the given CRM parent
* and all of the parent’s CRM descendants.
*
* Create a request for the method "customModules.listDescendant".
*
* This request holds the parameters needed by the the securitycenter server. After setting any
* optional parameters, call the {@link ListDescendant#execute()} method to invoke the remote
* operation. {@link ListDescendant#initialize(com.google.api.client.googleapis.services.Abstr
* actGoogleClientRequest)} must be called to initialize this instance immediately after invoking
* the constructor.
*
* @param parent Required. Name of parent to list descendant custom modules. Its format is
* `organizations/{organization}/securityHealthAnalyticsSettings`,
* `folders/{folder}/securityHealthAnalyticsSettings`, or
* `projects/{project}/securityHealthAnalyticsSettings`
* @since 1.13
*/
protected ListDescendant(java.lang.String parent) {
super(SecurityCommandCenter.this, "GET", REST_PATH, null, com.google.api.services.securitycenter.v1.model.ListDescendantSecurityHealthAnalyticsCustomModulesResponse.class);
this.parent = com.google.api.client.util.Preconditions.checkNotNull(parent, "Required parameter parent must be specified.");
if (!getSuppressPatternChecks()) {
com.google.api.client.util.Preconditions.checkArgument(PARENT_PATTERN.matcher(parent).matches(),
"Parameter parent must conform to the pattern " +
"^projects/[^/]+/securityHealthAnalyticsSettings$");
}
}
@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 ListDescendant set$Xgafv(java.lang.String $Xgafv) {
return (ListDescendant) super.set$Xgafv($Xgafv);
}
@Override
public ListDescendant setAccessToken(java.lang.String accessToken) {
return (ListDescendant) super.setAccessToken(accessToken);
}
@Override
public ListDescendant setAlt(java.lang.String alt) {
return (ListDescendant) super.setAlt(alt);
}
@Override
public ListDescendant setCallback(java.lang.String callback) {
return (ListDescendant) super.setCallback(callback);
}
@Override
public ListDescendant setFields(java.lang.String fields) {
return (ListDescendant) super.setFields(fields);
}
@Override
public ListDescendant setKey(java.lang.String key) {
return (ListDescendant) super.setKey(key);
}
@Override
public ListDescendant setOauthToken(java.lang.String oauthToken) {
return (ListDescendant) super.setOauthToken(oauthToken);
}
@Override
public ListDescendant setPrettyPrint(java.lang.Boolean prettyPrint) {
return (ListDescendant) super.setPrettyPrint(prettyPrint);
}
@Override
public ListDescendant setQuotaUser(java.lang.String quotaUser) {
return (ListDescendant) super.setQuotaUser(quotaUser);
}
@Override
public ListDescendant setUploadType(java.lang.String uploadType) {
return (ListDescendant) super.setUploadType(uploadType);
}
@Override
public ListDescendant setUploadProtocol(java.lang.String uploadProtocol) {
return (ListDescendant) super.setUploadProtocol(uploadProtocol);
}
/**
* Required. Name of parent to list descendant custom modules. Its format is
* `organizations/{organization}/securityHealthAnalyticsSettings`,
* `folders/{folder}/securityHealthAnalyticsSettings`, or
* `projects/{project}/securityHealthAnalyticsSettings`
*/
@com.google.api.client.util.Key
private java.lang.String parent;
/** Required. Name of parent to list descendant custom modules. Its format is
`organizations/{organization}/securityHealthAnalyticsSettings`,
`folders/{folder}/securityHealthAnalyticsSettings`, or
`projects/{project}/securityHealthAnalyticsSettings`
*/
public java.lang.String getParent() {
return parent;
}
/**
* Required. Name of parent to list descendant custom modules. Its format is
* `organizations/{organization}/securityHealthAnalyticsSettings`,
* `folders/{folder}/securityHealthAnalyticsSettings`, or
* `projects/{project}/securityHealthAnalyticsSettings`
*/
public ListDescendant setParent(java.lang.String parent) {
if (!getSuppressPatternChecks()) {
com.google.api.client.util.Preconditions.checkArgument(PARENT_PATTERN.matcher(parent).matches(),
"Parameter parent must conform to the pattern " +
"^projects/[^/]+/securityHealthAnalyticsSettings$");
}
this.parent = parent;
return this;
}
/**
* The maximum number of results to return in a single response. Default is 10, minimum is
* 1, maximum is 1000.
*/
@com.google.api.client.util.Key
private java.lang.Integer pageSize;
/** The maximum number of results to return in a single response. Default is 10, minimum is 1, maximum
is 1000.
*/
public java.lang.Integer getPageSize() {
return pageSize;
}
/**
* The maximum number of results to return in a single response. Default is 10, minimum is
* 1, maximum is 1000.
*/
public ListDescendant setPageSize(java.lang.Integer pageSize) {
this.pageSize = pageSize;
return this;
}
/** The value returned by the last call indicating a continuation */
@com.google.api.client.util.Key
private java.lang.String pageToken;
/** The value returned by the last call indicating a continuation
*/
public java.lang.String getPageToken() {
return pageToken;
}
/** The value returned by the last call indicating a continuation */
public ListDescendant setPageToken(java.lang.String pageToken) {
this.pageToken = pageToken;
return this;
}
@Override
public ListDescendant set(String parameterName, Object value) {
return (ListDescendant) super.set(parameterName, value);
}
}
/**
* Updates the SecurityHealthAnalyticsCustomModule under the given name based on the given update
* mask. Updating the enablement state is supported on both resident and inherited modules (though
* resident modules cannot have an enablement state of "inherited"). Updating the display name and
* custom config of a module is supported on resident modules only.
*
* Create a request for the method "customModules.patch".
*
* This request holds the parameters needed by the securitycenter server. After setting any
* optional parameters, call the {@link Patch#execute()} method to invoke the remote operation.
*
* @param name Immutable. The resource name of the custom module. Its format is
* "organizations/{organization}/securityHealthAnalyticsSettings/customModules/{customModule}
* ", or "folders/{folder}/securityHealthAnalyticsSettings/customModules/{customModule}", or
* "projects/{project}/securityHealthAnalyticsSettings/customModules/{customModule}" The id
* {customModule} is server-generated and is not user settable. It will be a numeric id
* containing 1-20 digits.
* @param content the {@link com.google.api.services.securitycenter.v1.model.GoogleCloudSecuritycenterV1SecurityHealthAnalyticsCustomModule}
* @return the request
*/
public Patch patch(java.lang.String name, com.google.api.services.securitycenter.v1.model.GoogleCloudSecuritycenterV1SecurityHealthAnalyticsCustomModule content) throws java.io.IOException {
Patch result = new Patch(name, content);
initialize(result);
return result;
}
public class Patch extends SecurityCommandCenterRequest {
private static final String REST_PATH = "v1/{+name}";
private final java.util.regex.Pattern NAME_PATTERN =
java.util.regex.Pattern.compile("^projects/[^/]+/securityHealthAnalyticsSettings/customModules/[^/]+$");
/**
* Updates the SecurityHealthAnalyticsCustomModule under the given name based on the given update
* mask. Updating the enablement state is supported on both resident and inherited modules (though
* resident modules cannot have an enablement state of "inherited"). Updating the display name and
* custom config of a module is supported on resident modules only.
*
* Create a request for the method "customModules.patch".
*
* This request holds the parameters needed by the the securitycenter server. After setting any
* optional parameters, call the {@link Patch#execute()} method to invoke the remote operation.
* {@link
* Patch#initialize(com.google.api.client.googleapis.services.AbstractGoogleClientRequest)} must
* be called to initialize this instance immediately after invoking the constructor.
*
* @param name Immutable. The resource name of the custom module. Its format is
* "organizations/{organization}/securityHealthAnalyticsSettings/customModules/{customModule}
* ", or "folders/{folder}/securityHealthAnalyticsSettings/customModules/{customModule}", or
* "projects/{project}/securityHealthAnalyticsSettings/customModules/{customModule}" The id
* {customModule} is server-generated and is not user settable. It will be a numeric id
* containing 1-20 digits.
* @param content the {@link com.google.api.services.securitycenter.v1.model.GoogleCloudSecuritycenterV1SecurityHealthAnalyticsCustomModule}
* @since 1.13
*/
protected Patch(java.lang.String name, com.google.api.services.securitycenter.v1.model.GoogleCloudSecuritycenterV1SecurityHealthAnalyticsCustomModule content) {
super(SecurityCommandCenter.this, "PATCH", REST_PATH, content, com.google.api.services.securitycenter.v1.model.GoogleCloudSecuritycenterV1SecurityHealthAnalyticsCustomModule.class);
this.name = com.google.api.client.util.Preconditions.checkNotNull(name, "Required parameter name must be specified.");
if (!getSuppressPatternChecks()) {
com.google.api.client.util.Preconditions.checkArgument(NAME_PATTERN.matcher(name).matches(),
"Parameter name must conform to the pattern " +
"^projects/[^/]+/securityHealthAnalyticsSettings/customModules/[^/]+$");
}
}
@Override
public Patch set$Xgafv(java.lang.String $Xgafv) {
return (Patch) super.set$Xgafv($Xgafv);
}
@Override
public Patch setAccessToken(java.lang.String accessToken) {
return (Patch) super.setAccessToken(accessToken);
}
@Override
public Patch setAlt(java.lang.String alt) {
return (Patch) super.setAlt(alt);
}
@Override
public Patch setCallback(java.lang.String callback) {
return (Patch) super.setCallback(callback);
}
@Override
public Patch setFields(java.lang.String fields) {
return (Patch) super.setFields(fields);
}
@Override
public Patch setKey(java.lang.String key) {
return (Patch) super.setKey(key);
}
@Override
public Patch setOauthToken(java.lang.String oauthToken) {
return (Patch) super.setOauthToken(oauthToken);
}
@Override
public Patch setPrettyPrint(java.lang.Boolean prettyPrint) {
return (Patch) super.setPrettyPrint(prettyPrint);
}
@Override
public Patch setQuotaUser(java.lang.String quotaUser) {
return (Patch) super.setQuotaUser(quotaUser);
}
@Override
public Patch setUploadType(java.lang.String uploadType) {
return (Patch) super.setUploadType(uploadType);
}
@Override
public Patch setUploadProtocol(java.lang.String uploadProtocol) {
return (Patch) super.setUploadProtocol(uploadProtocol);
}
/**
* Immutable. The resource name of the custom module. Its format is "organizations/{organi
* zation}/securityHealthAnalyticsSettings/customModules/{customModule}", or
* "folders/{folder}/securityHealthAnalyticsSettings/customModules/{customModule}", or
* "projects/{project}/securityHealthAnalyticsSettings/customModules/{customModule}" The
* id {customModule} is server-generated and is not user settable. It will be a numeric id
* containing 1-20 digits.
*/
@com.google.api.client.util.Key
private java.lang.String name;
/** Immutable. The resource name of the custom module. Its format is
"organizations/{organization}/securityHealthAnalyticsSettings/customModules/{customModule}", or
"folders/{folder}/securityHealthAnalyticsSettings/customModules/{customModule}", or
"projects/{project}/securityHealthAnalyticsSettings/customModules/{customModule}" The id
{customModule} is server-generated and is not user settable. It will be a numeric id containing
1-20 digits.
*/
public java.lang.String getName() {
return name;
}
/**
* Immutable. The resource name of the custom module. Its format is "organizations/{organi
* zation}/securityHealthAnalyticsSettings/customModules/{customModule}", or
* "folders/{folder}/securityHealthAnalyticsSettings/customModules/{customModule}", or
* "projects/{project}/securityHealthAnalyticsSettings/customModules/{customModule}" The
* id {customModule} is server-generated and is not user settable. It will be a numeric id
* containing 1-20 digits.
*/
public Patch setName(java.lang.String name) {
if (!getSuppressPatternChecks()) {
com.google.api.client.util.Preconditions.checkArgument(NAME_PATTERN.matcher(name).matches(),
"Parameter name must conform to the pattern " +
"^projects/[^/]+/securityHealthAnalyticsSettings/customModules/[^/]+$");
}
this.name = name;
return this;
}
/**
* The list of fields to be updated. The only fields that can be updated are
* `enablement_state` and `custom_config`. If empty or set to the wildcard value `*`, both
* `enablement_state` and `custom_config` are updated.
*/
@com.google.api.client.util.Key
private String updateMask;
/** The list of fields to be updated. The only fields that can be updated are `enablement_state` and
`custom_config`. If empty or set to the wildcard value `*`, both `enablement_state` and
`custom_config` are updated.
*/
public String getUpdateMask() {
return updateMask;
}
/**
* The list of fields to be updated. The only fields that can be updated are
* `enablement_state` and `custom_config`. If empty or set to the wildcard value `*`, both
* `enablement_state` and `custom_config` are updated.
*/
public Patch setUpdateMask(String updateMask) {
this.updateMask = updateMask;
return this;
}
@Override
public Patch set(String parameterName, Object value) {
return (Patch) super.set(parameterName, value);
}
}
/**
* Simulates a given SecurityHealthAnalyticsCustomModule and Resource.
*
* Create a request for the method "customModules.simulate".
*
* This request holds the parameters needed by the securitycenter server. After setting any
* optional parameters, call the {@link Simulate#execute()} method to invoke the remote operation.
*
* @param parent Required. The relative resource name of the organization, project, or folder. For more information
* about relative resource names, see [Relative Resource
* Name](https://cloud.google.com/apis/design/resource_names#relative_resource_name) Example:
* `organizations/{organization_id}`
* @param content the {@link com.google.api.services.securitycenter.v1.model.SimulateSecurityHealthAnalyticsCustomModuleRequest}
* @return the request
*/
public Simulate simulate(java.lang.String parent, com.google.api.services.securitycenter.v1.model.SimulateSecurityHealthAnalyticsCustomModuleRequest content) throws java.io.IOException {
Simulate result = new Simulate(parent, content);
initialize(result);
return result;
}
public class Simulate extends SecurityCommandCenterRequest {
private static final String REST_PATH = "v1/{+parent}/customModules:simulate";
private final java.util.regex.Pattern PARENT_PATTERN =
java.util.regex.Pattern.compile("^projects/[^/]+/securityHealthAnalyticsSettings$");
/**
* Simulates a given SecurityHealthAnalyticsCustomModule and Resource.
*
* Create a request for the method "customModules.simulate".
*
* This request holds the parameters needed by the the securitycenter server. After setting any
* optional parameters, call the {@link Simulate#execute()} method to invoke the remote operation.
* {@link
* Simulate#initialize(com.google.api.client.googleapis.services.AbstractGoogleClientRequest)}
* must be called to initialize this instance immediately after invoking the constructor.
*
* @param parent Required. The relative resource name of the organization, project, or folder. For more information
* about relative resource names, see [Relative Resource
* Name](https://cloud.google.com/apis/design/resource_names#relative_resource_name) Example:
* `organizations/{organization_id}`
* @param content the {@link com.google.api.services.securitycenter.v1.model.SimulateSecurityHealthAnalyticsCustomModuleRequest}
* @since 1.13
*/
protected Simulate(java.lang.String parent, com.google.api.services.securitycenter.v1.model.SimulateSecurityHealthAnalyticsCustomModuleRequest content) {
super(SecurityCommandCenter.this, "POST", REST_PATH, content, com.google.api.services.securitycenter.v1.model.SimulateSecurityHealthAnalyticsCustomModuleResponse.class);
this.parent = com.google.api.client.util.Preconditions.checkNotNull(parent, "Required parameter parent must be specified.");
if (!getSuppressPatternChecks()) {
com.google.api.client.util.Preconditions.checkArgument(PARENT_PATTERN.matcher(parent).matches(),
"Parameter parent must conform to the pattern " +
"^projects/[^/]+/securityHealthAnalyticsSettings$");
}
}
@Override
public Simulate set$Xgafv(java.lang.String $Xgafv) {
return (Simulate) super.set$Xgafv($Xgafv);
}
@Override
public Simulate setAccessToken(java.lang.String accessToken) {
return (Simulate) super.setAccessToken(accessToken);
}
@Override
public Simulate setAlt(java.lang.String alt) {
return (Simulate) super.setAlt(alt);
}
@Override
public Simulate setCallback(java.lang.String callback) {
return (Simulate) super.setCallback(callback);
}
@Override
public Simulate setFields(java.lang.String fields) {
return (Simulate) super.setFields(fields);
}
@Override
public Simulate setKey(java.lang.String key) {
return (Simulate) super.setKey(key);
}
@Override
public Simulate setOauthToken(java.lang.String oauthToken) {
return (Simulate) super.setOauthToken(oauthToken);
}
@Override
public Simulate setPrettyPrint(java.lang.Boolean prettyPrint) {
return (Simulate) super.setPrettyPrint(prettyPrint);
}
@Override
public Simulate setQuotaUser(java.lang.String quotaUser) {
return (Simulate) super.setQuotaUser(quotaUser);
}
@Override
public Simulate setUploadType(java.lang.String uploadType) {
return (Simulate) super.setUploadType(uploadType);
}
@Override
public Simulate setUploadProtocol(java.lang.String uploadProtocol) {
return (Simulate) super.setUploadProtocol(uploadProtocol);
}
/**
* Required. The relative resource name of the organization, project, or folder. For more
* information about relative resource names, see [Relative Resource
* Name](https://cloud.google.com/apis/design/resource_names#relative_resource_name)
* Example: `organizations/{organization_id}`
*/
@com.google.api.client.util.Key
private java.lang.String parent;
/** Required. The relative resource name of the organization, project, or folder. For more information
about relative resource names, see [Relative Resource
Name](https://cloud.google.com/apis/design/resource_names#relative_resource_name) Example:
`organizations/{organization_id}`
*/
public java.lang.String getParent() {
return parent;
}
/**
* Required. The relative resource name of the organization, project, or folder. For more
* information about relative resource names, see [Relative Resource
* Name](https://cloud.google.com/apis/design/resource_names#relative_resource_name)
* Example: `organizations/{organization_id}`
*/
public Simulate setParent(java.lang.String parent) {
if (!getSuppressPatternChecks()) {
com.google.api.client.util.Preconditions.checkArgument(PARENT_PATTERN.matcher(parent).matches(),
"Parameter parent must conform to the pattern " +
"^projects/[^/]+/securityHealthAnalyticsSettings$");
}
this.parent = parent;
return this;
}
@Override
public Simulate set(String parameterName, Object value) {
return (Simulate) super.set(parameterName, value);
}
}
}
/**
* An accessor for creating requests from the EffectiveCustomModules collection.
*
* The typical use is:
*
* {@code SecurityCommandCenter securitycenter = new SecurityCommandCenter(...);}
* {@code SecurityCommandCenter.EffectiveCustomModules.List request = securitycenter.effectiveCustomModules().list(parameters ...)}
*
*
* @return the resource collection
*/
public EffectiveCustomModules effectiveCustomModules() {
return new EffectiveCustomModules();
}
/**
* The "effectiveCustomModules" collection of methods.
*/
public class EffectiveCustomModules {
/**
* Retrieves an EffectiveSecurityHealthAnalyticsCustomModule.
*
* Create a request for the method "effectiveCustomModules.get".
*
* This request holds the parameters needed by the securitycenter server. After setting any
* optional parameters, call the {@link Get#execute()} method to invoke the remote operation.
*
* @param name Required. Name of the effective custom module to get. Its format is `organizations/{organization}/se
* curityHealthAnalyticsSettings/effectiveCustomModules/{customModule}`,
* `folders/{folder}/securityHealthAnalyticsSettings/effectiveCustomModules/{customModule}`,
* or
* `projects/{project}/securityHealthAnalyticsSettings/effectiveCustomModules/{customModule}`
* @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 SecurityCommandCenterRequest {
private static final String REST_PATH = "v1/{+name}";
private final java.util.regex.Pattern NAME_PATTERN =
java.util.regex.Pattern.compile("^projects/[^/]+/securityHealthAnalyticsSettings/effectiveCustomModules/[^/]+$");
/**
* Retrieves an EffectiveSecurityHealthAnalyticsCustomModule.
*
* Create a request for the method "effectiveCustomModules.get".
*
* This request holds the parameters needed by the the securitycenter 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. Name of the effective custom module to get. Its format is `organizations/{organization}/se
* curityHealthAnalyticsSettings/effectiveCustomModules/{customModule}`,
* `folders/{folder}/securityHealthAnalyticsSettings/effectiveCustomModules/{customModule}`,
* or
* `projects/{project}/securityHealthAnalyticsSettings/effectiveCustomModules/{customModule}`
* @since 1.13
*/
protected Get(java.lang.String name) {
super(SecurityCommandCenter.this, "GET", REST_PATH, null, com.google.api.services.securitycenter.v1.model.GoogleCloudSecuritycenterV1EffectiveSecurityHealthAnalyticsCustomModule.class);
this.name = com.google.api.client.util.Preconditions.checkNotNull(name, "Required parameter name must be specified.");
if (!getSuppressPatternChecks()) {
com.google.api.client.util.Preconditions.checkArgument(NAME_PATTERN.matcher(name).matches(),
"Parameter name must conform to the pattern " +
"^projects/[^/]+/securityHealthAnalyticsSettings/effectiveCustomModules/[^/]+$");
}
}
@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. Name of the effective custom module to get. Its format is `organizations/{org
* anization}/securityHealthAnalyticsSettings/effectiveCustomModules/{customModule}`, `fol
* ders/{folder}/securityHealthAnalyticsSettings/effectiveCustomModules/{customModule}`,
* or `projects/{project}/securityHealthAnalyticsSettings/effectiveCustomModules/{customMo
* dule}`
*/
@com.google.api.client.util.Key
private java.lang.String name;
/** Required. Name of the effective custom module to get. Its format is `organizations/{organization}/s
ecurityHealthAnalyticsSettings/effectiveCustomModules/{customModule}`,
`folders/{folder}/securityHealthAnalyticsSettings/effectiveCustomModules/{customModule}`, or
`projects/{project}/securityHealthAnalyticsSettings/effectiveCustomModules/{customModule}`
*/
public java.lang.String getName() {
return name;
}
/**
* Required. Name of the effective custom module to get. Its format is `organizations/{org
* anization}/securityHealthAnalyticsSettings/effectiveCustomModules/{customModule}`, `fol
* ders/{folder}/securityHealthAnalyticsSettings/effectiveCustomModules/{customModule}`,
* or `projects/{project}/securityHealthAnalyticsSettings/effectiveCustomModules/{customMo
* dule}`
*/
public Get setName(java.lang.String name) {
if (!getSuppressPatternChecks()) {
com.google.api.client.util.Preconditions.checkArgument(NAME_PATTERN.matcher(name).matches(),
"Parameter name must conform to the pattern " +
"^projects/[^/]+/securityHealthAnalyticsSettings/effectiveCustomModules/[^/]+$");
}
this.name = name;
return this;
}
@Override
public Get set(String parameterName, Object value) {
return (Get) super.set(parameterName, value);
}
}
/**
* Returns a list of all EffectiveSecurityHealthAnalyticsCustomModules for the given parent. This
* includes resident modules defined at the scope of the parent, and inherited modules, inherited
* from CRM ancestors.
*
* Create a request for the method "effectiveCustomModules.list".
*
* This request holds the parameters needed by the securitycenter server. After setting any
* optional parameters, call the {@link List#execute()} method to invoke the remote operation.
*
* @param parent Required. Name of parent to list effective custom modules. Its format is
* `organizations/{organization}/securityHealthAnalyticsSettings`,
* `folders/{folder}/securityHealthAnalyticsSettings`, or
* `projects/{project}/securityHealthAnalyticsSettings`
* @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 SecurityCommandCenterRequest {
private static final String REST_PATH = "v1/{+parent}/effectiveCustomModules";
private final java.util.regex.Pattern PARENT_PATTERN =
java.util.regex.Pattern.compile("^projects/[^/]+/securityHealthAnalyticsSettings$");
/**
* Returns a list of all EffectiveSecurityHealthAnalyticsCustomModules for the given parent. This
* includes resident modules defined at the scope of the parent, and inherited modules, inherited
* from CRM ancestors.
*
* Create a request for the method "effectiveCustomModules.list".
*
* This request holds the parameters needed by the the securitycenter 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. Name of parent to list effective custom modules. Its format is
* `organizations/{organization}/securityHealthAnalyticsSettings`,
* `folders/{folder}/securityHealthAnalyticsSettings`, or
* `projects/{project}/securityHealthAnalyticsSettings`
* @since 1.13
*/
protected List(java.lang.String parent) {
super(SecurityCommandCenter.this, "GET", REST_PATH, null, com.google.api.services.securitycenter.v1.model.ListEffectiveSecurityHealthAnalyticsCustomModulesResponse.class);
this.parent = com.google.api.client.util.Preconditions.checkNotNull(parent, "Required parameter parent must be specified.");
if (!getSuppressPatternChecks()) {
com.google.api.client.util.Preconditions.checkArgument(PARENT_PATTERN.matcher(parent).matches(),
"Parameter parent must conform to the pattern " +
"^projects/[^/]+/securityHealthAnalyticsSettings$");
}
}
@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. Name of parent to list effective custom modules. Its format is
* `organizations/{organization}/securityHealthAnalyticsSettings`,
* `folders/{folder}/securityHealthAnalyticsSettings`, or
* `projects/{project}/securityHealthAnalyticsSettings`
*/
@com.google.api.client.util.Key
private java.lang.String parent;
/** Required. Name of parent to list effective custom modules. Its format is
`organizations/{organization}/securityHealthAnalyticsSettings`,
`folders/{folder}/securityHealthAnalyticsSettings`, or
`projects/{project}/securityHealthAnalyticsSettings`
*/
public java.lang.String getParent() {
return parent;
}
/**
* Required. Name of parent to list effective custom modules. Its format is
* `organizations/{organization}/securityHealthAnalyticsSettings`,
* `folders/{folder}/securityHealthAnalyticsSettings`, or
* `projects/{project}/securityHealthAnalyticsSettings`
*/
public List setParent(java.lang.String parent) {
if (!getSuppressPatternChecks()) {
com.google.api.client.util.Preconditions.checkArgument(PARENT_PATTERN.matcher(parent).matches(),
"Parameter parent must conform to the pattern " +
"^projects/[^/]+/securityHealthAnalyticsSettings$");
}
this.parent = parent;
return this;
}
/**
* The maximum number of results to return in a single response. Default is 10, minimum is
* 1, maximum is 1000.
*/
@com.google.api.client.util.Key
private java.lang.Integer pageSize;
/** The maximum number of results to return in a single response. Default is 10, minimum is 1, maximum
is 1000.
*/
public java.lang.Integer getPageSize() {
return pageSize;
}
/**
* The maximum number of results to return in a single response. Default is 10, minimum is
* 1, maximum is 1000.
*/
public List setPageSize(java.lang.Integer pageSize) {
this.pageSize = pageSize;
return this;
}
/** The value returned by the last call indicating a continuation */
@com.google.api.client.util.Key
private java.lang.String pageToken;
/** The value returned by the last call indicating a continuation
*/
public java.lang.String getPageToken() {
return pageToken;
}
/** The value returned by the last call indicating a continuation */
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 Sources collection.
*
* The typical use is:
*
* {@code SecurityCommandCenter securitycenter = new SecurityCommandCenter(...);}
* {@code SecurityCommandCenter.Sources.List request = securitycenter.sources().list(parameters ...)}
*
*
* @return the resource collection
*/
public Sources sources() {
return new Sources();
}
/**
* The "sources" collection of methods.
*/
public class Sources {
/**
* Lists all sources belonging to an organization.
*
* Create a request for the method "sources.list".
*
* This request holds the parameters needed by the securitycenter server. After setting any
* optional parameters, call the {@link List#execute()} method to invoke the remote operation.
*
* @param parent Required. Resource name of the parent of sources to list. Its format should be
* `organizations/[organization_id]`, `folders/[folder_id]`, or `projects/[project_id]`.
* @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 SecurityCommandCenterRequest {
private static final String REST_PATH = "v1/{+parent}/sources";
private final java.util.regex.Pattern PARENT_PATTERN =
java.util.regex.Pattern.compile("^projects/[^/]+$");
/**
* Lists all sources belonging to an organization.
*
* Create a request for the method "sources.list".
*
* This request holds the parameters needed by the the securitycenter 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. Resource name of the parent of sources to list. Its format should be
* `organizations/[organization_id]`, `folders/[folder_id]`, or `projects/[project_id]`.
* @since 1.13
*/
protected List(java.lang.String parent) {
super(SecurityCommandCenter.this, "GET", REST_PATH, null, com.google.api.services.securitycenter.v1.model.ListSourcesResponse.class);
this.parent = com.google.api.client.util.Preconditions.checkNotNull(parent, "Required parameter parent must be specified.");
if (!getSuppressPatternChecks()) {
com.google.api.client.util.Preconditions.checkArgument(PARENT_PATTERN.matcher(parent).matches(),
"Parameter parent must conform to the pattern " +
"^projects/[^/]+$");
}
}
@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. Resource name of the parent of sources to list. Its format should be
* `organizations/[organization_id]`, `folders/[folder_id]`, or `projects/[project_id]`.
*/
@com.google.api.client.util.Key
private java.lang.String parent;
/** Required. Resource name of the parent of sources to list. Its format should be
`organizations/[organization_id]`, `folders/[folder_id]`, or `projects/[project_id]`.
*/
public java.lang.String getParent() {
return parent;
}
/**
* Required. Resource name of the parent of sources to list. Its format should be
* `organizations/[organization_id]`, `folders/[folder_id]`, or `projects/[project_id]`.
*/
public List setParent(java.lang.String parent) {
if (!getSuppressPatternChecks()) {
com.google.api.client.util.Preconditions.checkArgument(PARENT_PATTERN.matcher(parent).matches(),
"Parameter parent must conform to the pattern " +
"^projects/[^/]+$");
}
this.parent = parent;
return this;
}
/**
* The maximum number of results to return in a single response. Default is 10, minimum is
* 1, maximum is 1000.
*/
@com.google.api.client.util.Key
private java.lang.Integer pageSize;
/** The maximum number of results to return in a single response. Default is 10, minimum is 1, maximum
is 1000.
*/
public java.lang.Integer getPageSize() {
return pageSize;
}
/**
* The maximum number of results to return in a single response. Default is 10, minimum is
* 1, maximum is 1000.
*/
public List setPageSize(java.lang.Integer pageSize) {
this.pageSize = pageSize;
return this;
}
/**
* The value returned by the last `ListSourcesResponse`; indicates that this is a
* continuation of a prior `ListSources` call, and that the system should return the next
* page of data.
*/
@com.google.api.client.util.Key
private java.lang.String pageToken;
/** The value returned by the last `ListSourcesResponse`; indicates that this is a continuation of a
prior `ListSources` call, and that the system should return the next page of data.
*/
public java.lang.String getPageToken() {
return pageToken;
}
/**
* The value returned by the last `ListSourcesResponse`; indicates that this is a
* continuation of a prior `ListSources` call, and that the system should return the next
* page of data.
*/
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 Findings collection.
*
* The typical use is:
*
* {@code SecurityCommandCenter securitycenter = new SecurityCommandCenter(...);}
* {@code SecurityCommandCenter.Findings.List request = securitycenter.findings().list(parameters ...)}
*
*
* @return the resource collection
*/
public Findings findings() {
return new Findings();
}
/**
* The "findings" collection of methods.
*/
public class Findings {
/**
* Filters an organization or source's findings and groups them by their specified properties. To
* group across all sources provide a `-` as the source id. Example:
* /v1/organizations/{organization_id}/sources/-/findings,
* /v1/folders/{folder_id}/sources/-/findings, /v1/projects/{project_id}/sources/-/findings
*
* Create a request for the method "findings.group".
*
* This request holds the parameters needed by the securitycenter server. After setting any
* optional parameters, call the {@link Group#execute()} method to invoke the remote operation.
*
* @param parent Required. Name of the source to groupBy. Its format is
* `organizations/[organization_id]/sources/[source_id]`,
* `folders/[folder_id]/sources/[source_id]`, or `projects/[project_id]/sources/[source_id]`.
* To groupBy across all sources provide a source_id of `-`. For example:
* `organizations/{organization_id}/sources/-, folders/{folder_id}/sources/-`, or
* `projects/{project_id}/sources/-`
* @param content the {@link com.google.api.services.securitycenter.v1.model.GroupFindingsRequest}
* @return the request
*/
public Group group(java.lang.String parent, com.google.api.services.securitycenter.v1.model.GroupFindingsRequest content) throws java.io.IOException {
Group result = new Group(parent, content);
initialize(result);
return result;
}
public class Group extends SecurityCommandCenterRequest {
private static final String REST_PATH = "v1/{+parent}/findings:group";
private final java.util.regex.Pattern PARENT_PATTERN =
java.util.regex.Pattern.compile("^projects/[^/]+/sources/[^/]+$");
/**
* Filters an organization or source's findings and groups them by their specified properties. To
* group across all sources provide a `-` as the source id. Example:
* /v1/organizations/{organization_id}/sources/-/findings,
* /v1/folders/{folder_id}/sources/-/findings, /v1/projects/{project_id}/sources/-/findings
*
* Create a request for the method "findings.group".
*
* This request holds the parameters needed by the the securitycenter server. After setting any
* optional parameters, call the {@link Group#execute()} method to invoke the remote operation.
* {@link
* Group#initialize(com.google.api.client.googleapis.services.AbstractGoogleClientRequest)} must
* be called to initialize this instance immediately after invoking the constructor.
*
* @param parent Required. Name of the source to groupBy. Its format is
* `organizations/[organization_id]/sources/[source_id]`,
* `folders/[folder_id]/sources/[source_id]`, or `projects/[project_id]/sources/[source_id]`.
* To groupBy across all sources provide a source_id of `-`. For example:
* `organizations/{organization_id}/sources/-, folders/{folder_id}/sources/-`, or
* `projects/{project_id}/sources/-`
* @param content the {@link com.google.api.services.securitycenter.v1.model.GroupFindingsRequest}
* @since 1.13
*/
protected Group(java.lang.String parent, com.google.api.services.securitycenter.v1.model.GroupFindingsRequest content) {
super(SecurityCommandCenter.this, "POST", REST_PATH, content, com.google.api.services.securitycenter.v1.model.GroupFindingsResponse.class);
this.parent = com.google.api.client.util.Preconditions.checkNotNull(parent, "Required parameter parent must be specified.");
if (!getSuppressPatternChecks()) {
com.google.api.client.util.Preconditions.checkArgument(PARENT_PATTERN.matcher(parent).matches(),
"Parameter parent must conform to the pattern " +
"^projects/[^/]+/sources/[^/]+$");
}
}
@Override
public Group set$Xgafv(java.lang.String $Xgafv) {
return (Group) super.set$Xgafv($Xgafv);
}
@Override
public Group setAccessToken(java.lang.String accessToken) {
return (Group) super.setAccessToken(accessToken);
}
@Override
public Group setAlt(java.lang.String alt) {
return (Group) super.setAlt(alt);
}
@Override
public Group setCallback(java.lang.String callback) {
return (Group) super.setCallback(callback);
}
@Override
public Group setFields(java.lang.String fields) {
return (Group) super.setFields(fields);
}
@Override
public Group setKey(java.lang.String key) {
return (Group) super.setKey(key);
}
@Override
public Group setOauthToken(java.lang.String oauthToken) {
return (Group) super.setOauthToken(oauthToken);
}
@Override
public Group setPrettyPrint(java.lang.Boolean prettyPrint) {
return (Group) super.setPrettyPrint(prettyPrint);
}
@Override
public Group setQuotaUser(java.lang.String quotaUser) {
return (Group) super.setQuotaUser(quotaUser);
}
@Override
public Group setUploadType(java.lang.String uploadType) {
return (Group) super.setUploadType(uploadType);
}
@Override
public Group setUploadProtocol(java.lang.String uploadProtocol) {
return (Group) super.setUploadProtocol(uploadProtocol);
}
/**
* Required. Name of the source to groupBy. Its format is
* `organizations/[organization_id]/sources/[source_id]`,
* `folders/[folder_id]/sources/[source_id]`, or
* `projects/[project_id]/sources/[source_id]`. To groupBy across all sources provide a
* source_id of `-`. For example: `organizations/{organization_id}/sources/-,
* folders/{folder_id}/sources/-`, or `projects/{project_id}/sources/-`
*/
@com.google.api.client.util.Key
private java.lang.String parent;
/** Required. Name of the source to groupBy. Its format is
`organizations/[organization_id]/sources/[source_id]`, `folders/[folder_id]/sources/[source_id]`,
or `projects/[project_id]/sources/[source_id]`. To groupBy across all sources provide a source_id
of `-`. For example: `organizations/{organization_id}/sources/-, folders/{folder_id}/sources/-`, or
`projects/{project_id}/sources/-`
*/
public java.lang.String getParent() {
return parent;
}
/**
* Required. Name of the source to groupBy. Its format is
* `organizations/[organization_id]/sources/[source_id]`,
* `folders/[folder_id]/sources/[source_id]`, or
* `projects/[project_id]/sources/[source_id]`. To groupBy across all sources provide a
* source_id of `-`. For example: `organizations/{organization_id}/sources/-,
* folders/{folder_id}/sources/-`, or `projects/{project_id}/sources/-`
*/
public Group setParent(java.lang.String parent) {
if (!getSuppressPatternChecks()) {
com.google.api.client.util.Preconditions.checkArgument(PARENT_PATTERN.matcher(parent).matches(),
"Parameter parent must conform to the pattern " +
"^projects/[^/]+/sources/[^/]+$");
}
this.parent = parent;
return this;
}
@Override
public Group set(String parameterName, Object value) {
return (Group) super.set(parameterName, value);
}
}
/**
* Lists an organization or source's findings. To list across all sources provide a `-` as the
* source id. Example: /v1/organizations/{organization_id}/sources/-/findings
*
* Create a request for the method "findings.list".
*
* This request holds the parameters needed by the securitycenter server. After setting any
* optional parameters, call the {@link List#execute()} method to invoke the remote operation.
*
* @param parent Required. Name of the source the findings belong to. Its format is
* `organizations/[organization_id]/sources/[source_id]`,
* `folders/[folder_id]/sources/[source_id]`, or `projects/[project_id]/sources/[source_id]`.
* To list across all sources provide a source_id of `-`. For example:
* `organizations/{organization_id}/sources/-`, `folders/{folder_id}/sources/-` or
* `projects/{projects_id}/sources/-`
* @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 SecurityCommandCenterRequest {
private static final String REST_PATH = "v1/{+parent}/findings";
private final java.util.regex.Pattern PARENT_PATTERN =
java.util.regex.Pattern.compile("^projects/[^/]+/sources/[^/]+$");
/**
* Lists an organization or source's findings. To list across all sources provide a `-` as the
* source id. Example: /v1/organizations/{organization_id}/sources/-/findings
*
* Create a request for the method "findings.list".
*
* This request holds the parameters needed by the the securitycenter 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. Name of the source the findings belong to. Its format is
* `organizations/[organization_id]/sources/[source_id]`,
* `folders/[folder_id]/sources/[source_id]`, or `projects/[project_id]/sources/[source_id]`.
* To list across all sources provide a source_id of `-`. For example:
* `organizations/{organization_id}/sources/-`, `folders/{folder_id}/sources/-` or
* `projects/{projects_id}/sources/-`
* @since 1.13
*/
protected List(java.lang.String parent) {
super(SecurityCommandCenter.this, "GET", REST_PATH, null, com.google.api.services.securitycenter.v1.model.ListFindingsResponse.class);
this.parent = com.google.api.client.util.Preconditions.checkNotNull(parent, "Required parameter parent must be specified.");
if (!getSuppressPatternChecks()) {
com.google.api.client.util.Preconditions.checkArgument(PARENT_PATTERN.matcher(parent).matches(),
"Parameter parent must conform to the pattern " +
"^projects/[^/]+/sources/[^/]+$");
}
}
@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. Name of the source the findings belong to. Its format is
* `organizations/[organization_id]/sources/[source_id]`,
* `folders/[folder_id]/sources/[source_id]`, or
* `projects/[project_id]/sources/[source_id]`. To list across all sources provide a
* source_id of `-`. For example: `organizations/{organization_id}/sources/-`,
* `folders/{folder_id}/sources/-` or `projects/{projects_id}/sources/-`
*/
@com.google.api.client.util.Key
private java.lang.String parent;
/** Required. Name of the source the findings belong to. Its format is
`organizations/[organization_id]/sources/[source_id]`, `folders/[folder_id]/sources/[source_id]`,
or `projects/[project_id]/sources/[source_id]`. To list across all sources provide a source_id of
`-`. For example: `organizations/{organization_id}/sources/-`, `folders/{folder_id}/sources/-` or
`projects/{projects_id}/sources/-`
*/
public java.lang.String getParent() {
return parent;
}
/**
* Required. Name of the source the findings belong to. Its format is
* `organizations/[organization_id]/sources/[source_id]`,
* `folders/[folder_id]/sources/[source_id]`, or
* `projects/[project_id]/sources/[source_id]`. To list across all sources provide a
* source_id of `-`. For example: `organizations/{organization_id}/sources/-`,
* `folders/{folder_id}/sources/-` or `projects/{projects_id}/sources/-`
*/
public List setParent(java.lang.String parent) {
if (!getSuppressPatternChecks()) {
com.google.api.client.util.Preconditions.checkArgument(PARENT_PATTERN.matcher(parent).matches(),
"Parameter parent must conform to the pattern " +
"^projects/[^/]+/sources/[^/]+$");
}
this.parent = parent;
return this;
}
/**
* When compare_duration is set, the ListFindingsResult's "state_change" attribute is
* updated to indicate whether the finding had its state changed, the finding's state
* remained unchanged, or if the finding was added in any state during the
* compare_duration period of time that precedes the read_time. This is the time between
* (read_time - compare_duration) and read_time. The state_change value is derived based
* on the presence and state of the finding at the two points in time. Intermediate state
* changes between the two times don't affect the result. For example, the results aren't
* affected if the finding is made inactive and then active again. Possible "state_change"
* values when compare_duration is specified: * "CHANGED": indicates that the finding was
* present and matched the given filter at the start of compare_duration, but changed its
* state at read_time. * "UNCHANGED": indicates that the finding was present and matched
* the given filter at the start of compare_duration and did not change state at
* read_time. * "ADDED": indicates that the finding did not match the given filter or was
* not present at the start of compare_duration, but was present at read_time. *
* "REMOVED": indicates that the finding was present and matched the filter at the start
* of compare_duration, but did not match the filter at read_time. If compare_duration is
* not specified, then the only possible state_change is "UNUSED", which will be the
* state_change set for all findings present at read_time.
*/
@com.google.api.client.util.Key
private String compareDuration;
/** When compare_duration is set, the ListFindingsResult's "state_change" attribute is updated to
indicate whether the finding had its state changed, the finding's state remained unchanged, or if
the finding was added in any state during the compare_duration period of time that precedes the
read_time. This is the time between (read_time - compare_duration) and read_time. The state_change
value is derived based on the presence and state of the finding at the two points in time.
Intermediate state changes between the two times don't affect the result. For example, the results
aren't affected if the finding is made inactive and then active again. Possible "state_change"
values when compare_duration is specified: * "CHANGED": indicates that the finding was present and
matched the given filter at the start of compare_duration, but changed its state at read_time. *
"UNCHANGED": indicates that the finding was present and matched the given filter at the start of
compare_duration and did not change state at read_time. * "ADDED": indicates that the finding did
not match the given filter or was not present at the start of compare_duration, but was present at
read_time. * "REMOVED": indicates that the finding was present and matched the filter at the start
of compare_duration, but did not match the filter at read_time. If compare_duration is not
specified, then the only possible state_change is "UNUSED", which will be the state_change set for
all findings present at read_time.
*/
public String getCompareDuration() {
return compareDuration;
}
/**
* When compare_duration is set, the ListFindingsResult's "state_change" attribute is
* updated to indicate whether the finding had its state changed, the finding's state
* remained unchanged, or if the finding was added in any state during the
* compare_duration period of time that precedes the read_time. This is the time between
* (read_time - compare_duration) and read_time. The state_change value is derived based
* on the presence and state of the finding at the two points in time. Intermediate state
* changes between the two times don't affect the result. For example, the results aren't
* affected if the finding is made inactive and then active again. Possible "state_change"
* values when compare_duration is specified: * "CHANGED": indicates that the finding was
* present and matched the given filter at the start of compare_duration, but changed its
* state at read_time. * "UNCHANGED": indicates that the finding was present and matched
* the given filter at the start of compare_duration and did not change state at
* read_time. * "ADDED": indicates that the finding did not match the given filter or was
* not present at the start of compare_duration, but was present at read_time. *
* "REMOVED": indicates that the finding was present and matched the filter at the start
* of compare_duration, but did not match the filter at read_time. If compare_duration is
* not specified, then the only possible state_change is "UNUSED", which will be the
* state_change set for all findings present at read_time.
*/
public List setCompareDuration(String compareDuration) {
this.compareDuration = compareDuration;
return this;
}
/**
* A field mask to specify the Finding fields to be listed in the response. An empty field
* mask will list all fields.
*/
@com.google.api.client.util.Key
private String fieldMask;
/** A field mask to specify the Finding fields to be listed in the response. An empty field mask will
list all fields.
*/
public String getFieldMask() {
return fieldMask;
}
/**
* A field mask to specify the Finding fields to be listed in the response. An empty field
* mask will list all fields.
*/
public List setFieldMask(String fieldMask) {
this.fieldMask = fieldMask;
return this;
}
/**
* Expression that defines the filter to apply across findings. The expression is a list
* of one or more restrictions combined via logical operators `AND` and `OR`. Parentheses
* are supported, and `OR` has higher precedence than `AND`. Restrictions have the form `
* ` and may have a `-` character in front of them to indicate negation. Examples include:
* * name * source_properties.a_property * security_marks.marks.marka The supported
* operators are: * `=` for all value types. * `>`, `<`, `>=`, `<=` for integer values. *
* `:`, meaning substring matching, for strings. The supported value types are: * string
* literals in quotes. * integer literals without quotes. * boolean literals `true` and
* `false` without quotes. The following field and operator combinations are supported: *
* name: `=` * parent: `=`, `:` * resource_name: `=`, `:` * state: `=`, `:` * category:
* `=`, `:` * external_uri: `=`, `:` * event_time: `=`, `>`, `<`, `>=`, `<=` Usage: This
* should be milliseconds since epoch or an RFC3339 string. Examples: `event_time =
* "2019-06-10T16:07:18-07:00"` `event_time = 1560208038000` * severity: `=`, `:` *
* workflow_state: `=`, `:` * security_marks.marks: `=`, `:` * source_properties: `=`,
* `:`, `>`, `<`, `>=`, `<=` For example, `source_properties.size = 100` is a valid filter
* string. Use a partial match on the empty string to filter based on a property existing:
* `source_properties.my_property : ""` Use a negated partial match on the empty string to
* filter based on a property not existing: `-source_properties.my_property : ""` *
* resource: * resource.name: `=`, `:` * resource.parent_name: `=`, `:` *
* resource.parent_display_name: `=`, `:` * resource.project_name: `=`, `:` *
* resource.project_display_name: `=`, `:` * resource.type: `=`, `:` *
* resource.folders.resource_folder: `=`, `:` * resource.display_name: `=`, `:`
*/
@com.google.api.client.util.Key
private java.lang.String filter;
/** Expression that defines the filter to apply across findings. The expression is a list of one or
more restrictions combined via logical operators `AND` and `OR`. Parentheses are supported, and
`OR` has higher precedence than `AND`. Restrictions have the form ` ` and may have a `-` character
in front of them to indicate negation. Examples include: * name * source_properties.a_property *
security_marks.marks.marka The supported operators are: * `=` for all value types. * `>`, `<`,
`>=`, `<=` for integer values. * `:`, meaning substring matching, for strings. The supported value
types are: * string literals in quotes. * integer literals without quotes. * boolean literals
`true` and `false` without quotes. The following field and operator combinations are supported: *
name: `=` * parent: `=`, `:` * resource_name: `=`, `:` * state: `=`, `:` * category: `=`, `:` *
external_uri: `=`, `:` * event_time: `=`, `>`, `<`, `>=`, `<=` Usage: This should be milliseconds
since epoch or an RFC3339 string. Examples: `event_time = "2019-06-10T16:07:18-07:00"` `event_time
= 1560208038000` * severity: `=`, `:` * workflow_state: `=`, `:` * security_marks.marks: `=`, `:` *
source_properties: `=`, `:`, `>`, `<`, `>=`, `<=` For example, `source_properties.size = 100` is a
valid filter string. Use a partial match on the empty string to filter based on a property
existing: `source_properties.my_property : ""` Use a negated partial match on the empty string to
filter based on a property not existing: `-source_properties.my_property : ""` * resource: *
resource.name: `=`, `:` * resource.parent_name: `=`, `:` * resource.parent_display_name: `=`, `:` *
resource.project_name: `=`, `:` * resource.project_display_name: `=`, `:` * resource.type: `=`, `:`
* resource.folders.resource_folder: `=`, `:` * resource.display_name: `=`, `:`
*/
public java.lang.String getFilter() {
return filter;
}
/**
* Expression that defines the filter to apply across findings. The expression is a list
* of one or more restrictions combined via logical operators `AND` and `OR`. Parentheses
* are supported, and `OR` has higher precedence than `AND`. Restrictions have the form `
* ` and may have a `-` character in front of them to indicate negation. Examples include:
* * name * source_properties.a_property * security_marks.marks.marka The supported
* operators are: * `=` for all value types. * `>`, `<`, `>=`, `<=` for integer values. *
* `:`, meaning substring matching, for strings. The supported value types are: * string
* literals in quotes. * integer literals without quotes. * boolean literals `true` and
* `false` without quotes. The following field and operator combinations are supported: *
* name: `=` * parent: `=`, `:` * resource_name: `=`, `:` * state: `=`, `:` * category:
* `=`, `:` * external_uri: `=`, `:` * event_time: `=`, `>`, `<`, `>=`, `<=` Usage: This
* should be milliseconds since epoch or an RFC3339 string. Examples: `event_time =
* "2019-06-10T16:07:18-07:00"` `event_time = 1560208038000` * severity: `=`, `:` *
* workflow_state: `=`, `:` * security_marks.marks: `=`, `:` * source_properties: `=`,
* `:`, `>`, `<`, `>=`, `<=` For example, `source_properties.size = 100` is a valid filter
* string. Use a partial match on the empty string to filter based on a property existing:
* `source_properties.my_property : ""` Use a negated partial match on the empty string to
* filter based on a property not existing: `-source_properties.my_property : ""` *
* resource: * resource.name: `=`, `:` * resource.parent_name: `=`, `:` *
* resource.parent_display_name: `=`, `:` * resource.project_name: `=`, `:` *
* resource.project_display_name: `=`, `:` * resource.type: `=`, `:` *
* resource.folders.resource_folder: `=`, `:` * resource.display_name: `=`, `:`
*/
public List setFilter(java.lang.String filter) {
this.filter = filter;
return this;
}
/**
* Expression that defines what fields and order to use for sorting. The string value
* should follow SQL syntax: comma separated list of fields. For example:
* "name,resource_properties.a_property". The default sorting order is ascending. To
* specify descending order for a field, a suffix " desc" should be appended to the field
* name. For example: "name desc,source_properties.a_property". Redundant space characters
* in the syntax are insignificant. "name desc,source_properties.a_property" and " name
* desc , source_properties.a_property " are equivalent. The following fields are
* supported: name parent state category resource_name event_time source_properties
* security_marks.marks
*/
@com.google.api.client.util.Key
private java.lang.String orderBy;
/** Expression that defines what fields and order to use for sorting. The string value should follow
SQL syntax: comma separated list of fields. For example: "name,resource_properties.a_property". The
default sorting order is ascending. To specify descending order for a field, a suffix " desc"
should be appended to the field name. For example: "name desc,source_properties.a_property".
Redundant space characters in the syntax are insignificant. "name
desc,source_properties.a_property" and " name desc , source_properties.a_property " are equivalent.
The following fields are supported: name parent state category resource_name event_time
source_properties security_marks.marks
*/
public java.lang.String getOrderBy() {
return orderBy;
}
/**
* Expression that defines what fields and order to use for sorting. The string value
* should follow SQL syntax: comma separated list of fields. For example:
* "name,resource_properties.a_property". The default sorting order is ascending. To
* specify descending order for a field, a suffix " desc" should be appended to the field
* name. For example: "name desc,source_properties.a_property". Redundant space characters
* in the syntax are insignificant. "name desc,source_properties.a_property" and " name
* desc , source_properties.a_property " are equivalent. The following fields are
* supported: name parent state category resource_name event_time source_properties
* security_marks.marks
*/
public List setOrderBy(java.lang.String orderBy) {
this.orderBy = orderBy;
return this;
}
/**
* The maximum number of results to return in a single response. Default is 10, minimum is
* 1, maximum is 1000.
*/
@com.google.api.client.util.Key
private java.lang.Integer pageSize;
/** The maximum number of results to return in a single response. Default is 10, minimum is 1, maximum
is 1000.
*/
public java.lang.Integer getPageSize() {
return pageSize;
}
/**
* The maximum number of results to return in a single response. Default is 10, minimum is
* 1, maximum is 1000.
*/
public List setPageSize(java.lang.Integer pageSize) {
this.pageSize = pageSize;
return this;
}
/**
* The value returned by the last `ListFindingsResponse`; indicates that this is a
* continuation of a prior `ListFindings` call, and that the system should return the next
* page of data.
*/
@com.google.api.client.util.Key
private java.lang.String pageToken;
/** The value returned by the last `ListFindingsResponse`; indicates that this is a continuation of a
prior `ListFindings` call, and that the system should return the next page of data.
*/
public java.lang.String getPageToken() {
return pageToken;
}
/**
* The value returned by the last `ListFindingsResponse`; indicates that this is a
* continuation of a prior `ListFindings` call, and that the system should return the next
* page of data.
*/
public List setPageToken(java.lang.String pageToken) {
this.pageToken = pageToken;
return this;
}
/**
* Time used as a reference point when filtering findings. The filter is limited to
* findings existing at the supplied time and their values are those at that specific
* time. Absence of this field will default to the API's version of NOW.
*/
@com.google.api.client.util.Key
private String readTime;
/** Time used as a reference point when filtering findings. The filter is limited to findings existing
at the supplied time and their values are those at that specific time. Absence of this field will
default to the API's version of NOW.
*/
public String getReadTime() {
return readTime;
}
/**
* Time used as a reference point when filtering findings. The filter is limited to
* findings existing at the supplied time and their values are those at that specific
* time. Absence of this field will default to the API's version of NOW.
*/
public List setReadTime(String readTime) {
this.readTime = readTime;
return this;
}
@Override
public List set(String parameterName, Object value) {
return (List) super.set(parameterName, value);
}
}
/**
* Creates or updates a finding. The corresponding source must exist for a finding creation to
* succeed.
*
* Create a request for the method "findings.patch".
*
* This request holds the parameters needed by the securitycenter server. After setting any
* optional parameters, call the {@link Patch#execute()} method to invoke the remote operation.
*
* @param name The [relative resource
* name](https://cloud.google.com/apis/design/resource_names#relative_resource_name) of the
* finding. Example:
* "organizations/{organization_id}/sources/{source_id}/findings/{finding_id}",
* "folders/{folder_id}/sources/{source_id}/findings/{finding_id}",
* "projects/{project_id}/sources/{source_id}/findings/{finding_id}".
* @param content the {@link com.google.api.services.securitycenter.v1.model.Finding}
* @return the request
*/
public Patch patch(java.lang.String name, com.google.api.services.securitycenter.v1.model.Finding content) throws java.io.IOException {
Patch result = new Patch(name, content);
initialize(result);
return result;
}
public class Patch extends SecurityCommandCenterRequest {
private static final String REST_PATH = "v1/{+name}";
private final java.util.regex.Pattern NAME_PATTERN =
java.util.regex.Pattern.compile("^projects/[^/]+/sources/[^/]+/findings/[^/]+$");
/**
* Creates or updates a finding. The corresponding source must exist for a finding creation to
* succeed.
*
* Create a request for the method "findings.patch".
*
* This request holds the parameters needed by the the securitycenter server. After setting any
* optional parameters, call the {@link Patch#execute()} method to invoke the remote operation.
* {@link
* Patch#initialize(com.google.api.client.googleapis.services.AbstractGoogleClientRequest)} must
* be called to initialize this instance immediately after invoking the constructor.
*
* @param name The [relative resource
* name](https://cloud.google.com/apis/design/resource_names#relative_resource_name) of the
* finding. Example:
* "organizations/{organization_id}/sources/{source_id}/findings/{finding_id}",
* "folders/{folder_id}/sources/{source_id}/findings/{finding_id}",
* "projects/{project_id}/sources/{source_id}/findings/{finding_id}".
* @param content the {@link com.google.api.services.securitycenter.v1.model.Finding}
* @since 1.13
*/
protected Patch(java.lang.String name, com.google.api.services.securitycenter.v1.model.Finding content) {
super(SecurityCommandCenter.this, "PATCH", REST_PATH, content, com.google.api.services.securitycenter.v1.model.Finding.class);
this.name = com.google.api.client.util.Preconditions.checkNotNull(name, "Required parameter name must be specified.");
if (!getSuppressPatternChecks()) {
com.google.api.client.util.Preconditions.checkArgument(NAME_PATTERN.matcher(name).matches(),
"Parameter name must conform to the pattern " +
"^projects/[^/]+/sources/[^/]+/findings/[^/]+$");
}
}
@Override
public Patch set$Xgafv(java.lang.String $Xgafv) {
return (Patch) super.set$Xgafv($Xgafv);
}
@Override
public Patch setAccessToken(java.lang.String accessToken) {
return (Patch) super.setAccessToken(accessToken);
}
@Override
public Patch setAlt(java.lang.String alt) {
return (Patch) super.setAlt(alt);
}
@Override
public Patch setCallback(java.lang.String callback) {
return (Patch) super.setCallback(callback);
}
@Override
public Patch setFields(java.lang.String fields) {
return (Patch) super.setFields(fields);
}
@Override
public Patch setKey(java.lang.String key) {
return (Patch) super.setKey(key);
}
@Override
public Patch setOauthToken(java.lang.String oauthToken) {
return (Patch) super.setOauthToken(oauthToken);
}
@Override
public Patch setPrettyPrint(java.lang.Boolean prettyPrint) {
return (Patch) super.setPrettyPrint(prettyPrint);
}
@Override
public Patch setQuotaUser(java.lang.String quotaUser) {
return (Patch) super.setQuotaUser(quotaUser);
}
@Override
public Patch setUploadType(java.lang.String uploadType) {
return (Patch) super.setUploadType(uploadType);
}
@Override
public Patch setUploadProtocol(java.lang.String uploadProtocol) {
return (Patch) super.setUploadProtocol(uploadProtocol);
}
/**
* The [relative resource
* name](https://cloud.google.com/apis/design/resource_names#relative_resource_name) of
* the finding. Example:
* "organizations/{organization_id}/sources/{source_id}/findings/{finding_id}",
* "folders/{folder_id}/sources/{source_id}/findings/{finding_id}",
* "projects/{project_id}/sources/{source_id}/findings/{finding_id}".
*/
@com.google.api.client.util.Key
private java.lang.String name;
/** The [relative resource
name](https://cloud.google.com/apis/design/resource_names#relative_resource_name) of the finding.
Example: "organizations/{organization_id}/sources/{source_id}/findings/{finding_id}",
"folders/{folder_id}/sources/{source_id}/findings/{finding_id}",
"projects/{project_id}/sources/{source_id}/findings/{finding_id}".
*/
public java.lang.String getName() {
return name;
}
/**
* The [relative resource
* name](https://cloud.google.com/apis/design/resource_names#relative_resource_name) of
* the finding. Example:
* "organizations/{organization_id}/sources/{source_id}/findings/{finding_id}",
* "folders/{folder_id}/sources/{source_id}/findings/{finding_id}",
* "projects/{project_id}/sources/{source_id}/findings/{finding_id}".
*/
public Patch setName(java.lang.String name) {
if (!getSuppressPatternChecks()) {
com.google.api.client.util.Preconditions.checkArgument(NAME_PATTERN.matcher(name).matches(),
"Parameter name must conform to the pattern " +
"^projects/[^/]+/sources/[^/]+/findings/[^/]+$");
}
this.name = name;
return this;
}
/**
* The FieldMask to use when updating the finding resource. This field should not be
* specified when creating a finding. When updating a finding, an empty mask is treated as
* updating all mutable fields and replacing source_properties. Individual
* source_properties can be added/updated by using "source_properties." in the field mask.
*/
@com.google.api.client.util.Key
private String updateMask;
/** The FieldMask to use when updating the finding resource. This field should not be specified when
creating a finding. When updating a finding, an empty mask is treated as updating all mutable
fields and replacing source_properties. Individual source_properties can be added/updated by using
"source_properties." in the field mask.
*/
public String getUpdateMask() {
return updateMask;
}
/**
* The FieldMask to use when updating the finding resource. This field should not be
* specified when creating a finding. When updating a finding, an empty mask is treated as
* updating all mutable fields and replacing source_properties. Individual
* source_properties can be added/updated by using "source_properties." in the field mask.
*/
public Patch setUpdateMask(String updateMask) {
this.updateMask = updateMask;
return this;
}
@Override
public Patch set(String parameterName, Object value) {
return (Patch) super.set(parameterName, value);
}
}
/**
* Updates the mute state of a finding.
*
* Create a request for the method "findings.setMute".
*
* This request holds the parameters needed by the securitycenter server. After setting any
* optional parameters, call the {@link SetMute#execute()} method to invoke the remote operation.
*
* @param name Required. The [relative resource
* name](https://cloud.google.com/apis/design/resource_names#relative_resource_name) of the
* finding. Example:
* `organizations/{organization_id}/sources/{source_id}/findings/{finding_id}`,
* `folders/{folder_id}/sources/{source_id}/findings/{finding_id}`,
* `projects/{project_id}/sources/{source_id}/findings/{finding_id}`.
* @param content the {@link com.google.api.services.securitycenter.v1.model.SetMuteRequest}
* @return the request
*/
public SetMute setMute(java.lang.String name, com.google.api.services.securitycenter.v1.model.SetMuteRequest content) throws java.io.IOException {
SetMute result = new SetMute(name, content);
initialize(result);
return result;
}
public class SetMute extends SecurityCommandCenterRequest {
private static final String REST_PATH = "v1/{+name}:setMute";
private final java.util.regex.Pattern NAME_PATTERN =
java.util.regex.Pattern.compile("^projects/[^/]+/sources/[^/]+/findings/[^/]+$");
/**
* Updates the mute state of a finding.
*
* Create a request for the method "findings.setMute".
*
* This request holds the parameters needed by the the securitycenter server. After setting any
* optional parameters, call the {@link SetMute#execute()} method to invoke the remote operation.
* {@link
* SetMute#initialize(com.google.api.client.googleapis.services.AbstractGoogleClientRequest)} must
* be called to initialize this instance immediately after invoking the constructor.
*
* @param name Required. The [relative resource
* name](https://cloud.google.com/apis/design/resource_names#relative_resource_name) of the
* finding. Example:
* `organizations/{organization_id}/sources/{source_id}/findings/{finding_id}`,
* `folders/{folder_id}/sources/{source_id}/findings/{finding_id}`,
* `projects/{project_id}/sources/{source_id}/findings/{finding_id}`.
* @param content the {@link com.google.api.services.securitycenter.v1.model.SetMuteRequest}
* @since 1.13
*/
protected SetMute(java.lang.String name, com.google.api.services.securitycenter.v1.model.SetMuteRequest content) {
super(SecurityCommandCenter.this, "POST", REST_PATH, content, com.google.api.services.securitycenter.v1.model.Finding.class);
this.name = com.google.api.client.util.Preconditions.checkNotNull(name, "Required parameter name must be specified.");
if (!getSuppressPatternChecks()) {
com.google.api.client.util.Preconditions.checkArgument(NAME_PATTERN.matcher(name).matches(),
"Parameter name must conform to the pattern " +
"^projects/[^/]+/sources/[^/]+/findings/[^/]+$");
}
}
@Override
public SetMute set$Xgafv(java.lang.String $Xgafv) {
return (SetMute) super.set$Xgafv($Xgafv);
}
@Override
public SetMute setAccessToken(java.lang.String accessToken) {
return (SetMute) super.setAccessToken(accessToken);
}
@Override
public SetMute setAlt(java.lang.String alt) {
return (SetMute) super.setAlt(alt);
}
@Override
public SetMute setCallback(java.lang.String callback) {
return (SetMute) super.setCallback(callback);
}
@Override
public SetMute setFields(java.lang.String fields) {
return (SetMute) super.setFields(fields);
}
@Override
public SetMute setKey(java.lang.String key) {
return (SetMute) super.setKey(key);
}
@Override
public SetMute setOauthToken(java.lang.String oauthToken) {
return (SetMute) super.setOauthToken(oauthToken);
}
@Override
public SetMute setPrettyPrint(java.lang.Boolean prettyPrint) {
return (SetMute) super.setPrettyPrint(prettyPrint);
}
@Override
public SetMute setQuotaUser(java.lang.String quotaUser) {
return (SetMute) super.setQuotaUser(quotaUser);
}
@Override
public SetMute setUploadType(java.lang.String uploadType) {
return (SetMute) super.setUploadType(uploadType);
}
@Override
public SetMute setUploadProtocol(java.lang.String uploadProtocol) {
return (SetMute) super.setUploadProtocol(uploadProtocol);
}
/**
* Required. The [relative resource
* name](https://cloud.google.com/apis/design/resource_names#relative_resource_name) of
* the finding. Example:
* `organizations/{organization_id}/sources/{source_id}/findings/{finding_id}`,
* `folders/{folder_id}/sources/{source_id}/findings/{finding_id}`,
* `projects/{project_id}/sources/{source_id}/findings/{finding_id}`.
*/
@com.google.api.client.util.Key
private java.lang.String name;
/** Required. The [relative resource
name](https://cloud.google.com/apis/design/resource_names#relative_resource_name) of the finding.
Example: `organizations/{organization_id}/sources/{source_id}/findings/{finding_id}`,
`folders/{folder_id}/sources/{source_id}/findings/{finding_id}`,
`projects/{project_id}/sources/{source_id}/findings/{finding_id}`.
*/
public java.lang.String getName() {
return name;
}
/**
* Required. The [relative resource
* name](https://cloud.google.com/apis/design/resource_names#relative_resource_name) of
* the finding. Example:
* `organizations/{organization_id}/sources/{source_id}/findings/{finding_id}`,
* `folders/{folder_id}/sources/{source_id}/findings/{finding_id}`,
* `projects/{project_id}/sources/{source_id}/findings/{finding_id}`.
*/
public SetMute setName(java.lang.String name) {
if (!getSuppressPatternChecks()) {
com.google.api.client.util.Preconditions.checkArgument(NAME_PATTERN.matcher(name).matches(),
"Parameter name must conform to the pattern " +
"^projects/[^/]+/sources/[^/]+/findings/[^/]+$");
}
this.name = name;
return this;
}
@Override
public SetMute set(String parameterName, Object value) {
return (SetMute) super.set(parameterName, value);
}
}
/**
* Updates the state of a finding.
*
* Create a request for the method "findings.setState".
*
* This request holds the parameters needed by the securitycenter server. After setting any
* optional parameters, call the {@link SetState#execute()} method to invoke the remote operation.
*
* @param name Required. The [relative resource
* name](https://cloud.google.com/apis/design/resource_names#relative_resource_name) of the
* finding. Example:
* `organizations/{organization_id}/sources/{source_id}/findings/{finding_id}`,
* `folders/{folder_id}/sources/{source_id}/findings/{finding_id}`,
* `projects/{project_id}/sources/{source_id}/findings/{finding_id}`.
* @param content the {@link com.google.api.services.securitycenter.v1.model.SetFindingStateRequest}
* @return the request
*/
public SetState setState(java.lang.String name, com.google.api.services.securitycenter.v1.model.SetFindingStateRequest content) throws java.io.IOException {
SetState result = new SetState(name, content);
initialize(result);
return result;
}
public class SetState extends SecurityCommandCenterRequest {
private static final String REST_PATH = "v1/{+name}:setState";
private final java.util.regex.Pattern NAME_PATTERN =
java.util.regex.Pattern.compile("^projects/[^/]+/sources/[^/]+/findings/[^/]+$");
/**
* Updates the state of a finding.
*
* Create a request for the method "findings.setState".
*
* This request holds the parameters needed by the the securitycenter server. After setting any
* optional parameters, call the {@link SetState#execute()} method to invoke the remote operation.
* {@link
* SetState#initialize(com.google.api.client.googleapis.services.AbstractGoogleClientRequest)}
* must be called to initialize this instance immediately after invoking the constructor.
*
* @param name Required. The [relative resource
* name](https://cloud.google.com/apis/design/resource_names#relative_resource_name) of the
* finding. Example:
* `organizations/{organization_id}/sources/{source_id}/findings/{finding_id}`,
* `folders/{folder_id}/sources/{source_id}/findings/{finding_id}`,
* `projects/{project_id}/sources/{source_id}/findings/{finding_id}`.
* @param content the {@link com.google.api.services.securitycenter.v1.model.SetFindingStateRequest}
* @since 1.13
*/
protected SetState(java.lang.String name, com.google.api.services.securitycenter.v1.model.SetFindingStateRequest content) {
super(SecurityCommandCenter.this, "POST", REST_PATH, content, com.google.api.services.securitycenter.v1.model.Finding.class);
this.name = com.google.api.client.util.Preconditions.checkNotNull(name, "Required parameter name must be specified.");
if (!getSuppressPatternChecks()) {
com.google.api.client.util.Preconditions.checkArgument(NAME_PATTERN.matcher(name).matches(),
"Parameter name must conform to the pattern " +
"^projects/[^/]+/sources/[^/]+/findings/[^/]+$");
}
}
@Override
public SetState set$Xgafv(java.lang.String $Xgafv) {
return (SetState) super.set$Xgafv($Xgafv);
}
@Override
public SetState setAccessToken(java.lang.String accessToken) {
return (SetState) super.setAccessToken(accessToken);
}
@Override
public SetState setAlt(java.lang.String alt) {
return (SetState) super.setAlt(alt);
}
@Override
public SetState setCallback(java.lang.String callback) {
return (SetState) super.setCallback(callback);
}
@Override
public SetState setFields(java.lang.String fields) {
return (SetState) super.setFields(fields);
}
@Override
public SetState setKey(java.lang.String key) {
return (SetState) super.setKey(key);
}
@Override
public SetState setOauthToken(java.lang.String oauthToken) {
return (SetState) super.setOauthToken(oauthToken);
}
@Override
public SetState setPrettyPrint(java.lang.Boolean prettyPrint) {
return (SetState) super.setPrettyPrint(prettyPrint);
}
@Override
public SetState setQuotaUser(java.lang.String quotaUser) {
return (SetState) super.setQuotaUser(quotaUser);
}
@Override
public SetState setUploadType(java.lang.String uploadType) {
return (SetState) super.setUploadType(uploadType);
}
@Override
public SetState setUploadProtocol(java.lang.String uploadProtocol) {
return (SetState) super.setUploadProtocol(uploadProtocol);
}
/**
* Required. The [relative resource
* name](https://cloud.google.com/apis/design/resource_names#relative_resource_name) of
* the finding. Example:
* `organizations/{organization_id}/sources/{source_id}/findings/{finding_id}`,
* `folders/{folder_id}/sources/{source_id}/findings/{finding_id}`,
* `projects/{project_id}/sources/{source_id}/findings/{finding_id}`.
*/
@com.google.api.client.util.Key
private java.lang.String name;
/** Required. The [relative resource
name](https://cloud.google.com/apis/design/resource_names#relative_resource_name) of the finding.
Example: `organizations/{organization_id}/sources/{source_id}/findings/{finding_id}`,
`folders/{folder_id}/sources/{source_id}/findings/{finding_id}`,
`projects/{project_id}/sources/{source_id}/findings/{finding_id}`.
*/
public java.lang.String getName() {
return name;
}
/**
* Required. The [relative resource
* name](https://cloud.google.com/apis/design/resource_names#relative_resource_name) of
* the finding. Example:
* `organizations/{organization_id}/sources/{source_id}/findings/{finding_id}`,
* `folders/{folder_id}/sources/{source_id}/findings/{finding_id}`,
* `projects/{project_id}/sources/{source_id}/findings/{finding_id}`.
*/
public SetState setName(java.lang.String name) {
if (!getSuppressPatternChecks()) {
com.google.api.client.util.Preconditions.checkArgument(NAME_PATTERN.matcher(name).matches(),
"Parameter name must conform to the pattern " +
"^projects/[^/]+/sources/[^/]+/findings/[^/]+$");
}
this.name = name;
return this;
}
@Override
public SetState set(String parameterName, Object value) {
return (SetState) super.set(parameterName, value);
}
}
/**
* Updates security marks.
*
* Create a request for the method "findings.updateSecurityMarks".
*
* This request holds the parameters needed by the securitycenter server. After setting any
* optional parameters, call the {@link UpdateSecurityMarks#execute()} method to invoke the remote
* operation.
*
* @param name The relative resource name of the SecurityMarks. See:
* https://cloud.google.com/apis/design/resource_names#relative_resource_name Examples:
* "organizations/{organization_id}/assets/{asset_id}/securityMarks"
* "organizations/{organization_id}/sources/{source_id}/findings/{finding_id}/securityMarks".
* @param content the {@link com.google.api.services.securitycenter.v1.model.SecurityMarks}
* @return the request
*/
public UpdateSecurityMarks updateSecurityMarks(java.lang.String name, com.google.api.services.securitycenter.v1.model.SecurityMarks content) throws java.io.IOException {
UpdateSecurityMarks result = new UpdateSecurityMarks(name, content);
initialize(result);
return result;
}
public class UpdateSecurityMarks extends SecurityCommandCenterRequest {
private static final String REST_PATH = "v1/{+name}";
private final java.util.regex.Pattern NAME_PATTERN =
java.util.regex.Pattern.compile("^projects/[^/]+/sources/[^/]+/findings/[^/]+/securityMarks$");
/**
* Updates security marks.
*
* Create a request for the method "findings.updateSecurityMarks".
*
* This request holds the parameters needed by the the securitycenter server. After setting any
* optional parameters, call the {@link UpdateSecurityMarks#execute()} method to invoke the remote
* operation. {@link UpdateSecurityMarks#initialize(com.google.api.client.googleapis.services.
* AbstractGoogleClientRequest)} must be called to initialize this instance immediately after
* invoking the constructor.
*
* @param name The relative resource name of the SecurityMarks. See:
* https://cloud.google.com/apis/design/resource_names#relative_resource_name Examples:
* "organizations/{organization_id}/assets/{asset_id}/securityMarks"
* "organizations/{organization_id}/sources/{source_id}/findings/{finding_id}/securityMarks".
* @param content the {@link com.google.api.services.securitycenter.v1.model.SecurityMarks}
* @since 1.13
*/
protected UpdateSecurityMarks(java.lang.String name, com.google.api.services.securitycenter.v1.model.SecurityMarks content) {
super(SecurityCommandCenter.this, "PATCH", REST_PATH, content, com.google.api.services.securitycenter.v1.model.SecurityMarks.class);
this.name = com.google.api.client.util.Preconditions.checkNotNull(name, "Required parameter name must be specified.");
if (!getSuppressPatternChecks()) {
com.google.api.client.util.Preconditions.checkArgument(NAME_PATTERN.matcher(name).matches(),
"Parameter name must conform to the pattern " +
"^projects/[^/]+/sources/[^/]+/findings/[^/]+/securityMarks$");
}
}
@Override
public UpdateSecurityMarks set$Xgafv(java.lang.String $Xgafv) {
return (UpdateSecurityMarks) super.set$Xgafv($Xgafv);
}
@Override
public UpdateSecurityMarks setAccessToken(java.lang.String accessToken) {
return (UpdateSecurityMarks) super.setAccessToken(accessToken);
}
@Override
public UpdateSecurityMarks setAlt(java.lang.String alt) {
return (UpdateSecurityMarks) super.setAlt(alt);
}
@Override
public UpdateSecurityMarks setCallback(java.lang.String callback) {
return (UpdateSecurityMarks) super.setCallback(callback);
}
@Override
public UpdateSecurityMarks setFields(java.lang.String fields) {
return (UpdateSecurityMarks) super.setFields(fields);
}
@Override
public UpdateSecurityMarks setKey(java.lang.String key) {
return (UpdateSecurityMarks) super.setKey(key);
}
@Override
public UpdateSecurityMarks setOauthToken(java.lang.String oauthToken) {
return (UpdateSecurityMarks) super.setOauthToken(oauthToken);
}
@Override
public UpdateSecurityMarks setPrettyPrint(java.lang.Boolean prettyPrint) {
return (UpdateSecurityMarks) super.setPrettyPrint(prettyPrint);
}
@Override
public UpdateSecurityMarks setQuotaUser(java.lang.String quotaUser) {
return (UpdateSecurityMarks) super.setQuotaUser(quotaUser);
}
@Override
public UpdateSecurityMarks setUploadType(java.lang.String uploadType) {
return (UpdateSecurityMarks) super.setUploadType(uploadType);
}
@Override
public UpdateSecurityMarks setUploadProtocol(java.lang.String uploadProtocol) {
return (UpdateSecurityMarks) super.setUploadProtocol(uploadProtocol);
}
/**
* The relative resource name of the SecurityMarks. See:
* https://cloud.google.com/apis/design/resource_names#relative_resource_name Examples:
* "organizations/{organization_id}/assets/{asset_id}/securityMarks" "organizations/{organ
* ization_id}/sources/{source_id}/findings/{finding_id}/securityMarks".
*/
@com.google.api.client.util.Key
private java.lang.String name;
/** The relative resource name of the SecurityMarks. See:
https://cloud.google.com/apis/design/resource_names#relative_resource_name Examples:
"organizations/{organization_id}/assets/{asset_id}/securityMarks"
"organizations/{organization_id}/sources/{source_id}/findings/{finding_id}/securityMarks".
*/
public java.lang.String getName() {
return name;
}
/**
* The relative resource name of the SecurityMarks. See:
* https://cloud.google.com/apis/design/resource_names#relative_resource_name Examples:
* "organizations/{organization_id}/assets/{asset_id}/securityMarks" "organizations/{organ
* ization_id}/sources/{source_id}/findings/{finding_id}/securityMarks".
*/
public UpdateSecurityMarks setName(java.lang.String name) {
if (!getSuppressPatternChecks()) {
com.google.api.client.util.Preconditions.checkArgument(NAME_PATTERN.matcher(name).matches(),
"Parameter name must conform to the pattern " +
"^projects/[^/]+/sources/[^/]+/findings/[^/]+/securityMarks$");
}
this.name = name;
return this;
}
/**
* The time at which the updated SecurityMarks take effect. If not set uses current server
* time. Updates will be applied to the SecurityMarks that are active immediately
* preceding this time. Must be earlier or equal to the server time.
*/
@com.google.api.client.util.Key
private String startTime;
/** The time at which the updated SecurityMarks take effect. If not set uses current server time.
Updates will be applied to the SecurityMarks that are active immediately preceding this time. Must
be earlier or equal to the server time.
*/
public String getStartTime() {
return startTime;
}
/**
* The time at which the updated SecurityMarks take effect. If not set uses current server
* time. Updates will be applied to the SecurityMarks that are active immediately
* preceding this time. Must be earlier or equal to the server time.
*/
public UpdateSecurityMarks setStartTime(String startTime) {
this.startTime = startTime;
return this;
}
/**
* The FieldMask to use when updating the security marks resource. The field mask must not
* contain duplicate fields. If empty or set to "marks", all marks will be replaced.
* Individual marks can be updated using "marks.".
*/
@com.google.api.client.util.Key
private String updateMask;
/** The FieldMask to use when updating the security marks resource. The field mask must not contain
duplicate fields. If empty or set to "marks", all marks will be replaced. Individual marks can be
updated using "marks.".
*/
public String getUpdateMask() {
return updateMask;
}
/**
* The FieldMask to use when updating the security marks resource. The field mask must not
* contain duplicate fields. If empty or set to "marks", all marks will be replaced.
* Individual marks can be updated using "marks.".
*/
public UpdateSecurityMarks setUpdateMask(String updateMask) {
this.updateMask = updateMask;
return this;
}
@Override
public UpdateSecurityMarks set(String parameterName, Object value) {
return (UpdateSecurityMarks) super.set(parameterName, value);
}
}
/**
* An accessor for creating requests from the ExternalSystems collection.
*
* The typical use is:
*
* {@code SecurityCommandCenter securitycenter = new SecurityCommandCenter(...);}
* {@code SecurityCommandCenter.ExternalSystems.List request = securitycenter.externalSystems().list(parameters ...)}
*
*
* @return the resource collection
*/
public ExternalSystems externalSystems() {
return new ExternalSystems();
}
/**
* The "externalSystems" collection of methods.
*/
public class ExternalSystems {
/**
* Updates external system. This is for a given finding.
*
* Create a request for the method "externalSystems.patch".
*
* This request holds the parameters needed by the securitycenter server. After setting any
* optional parameters, call the {@link Patch#execute()} method to invoke the remote operation.
*
* @param name Full resource name of the external system, for example:
* "organizations/1234/sources/5678/findings/123456/externalSystems/jira",
* "folders/1234/sources/5678/findings/123456/externalSystems/jira",
* "projects/1234/sources/5678/findings/123456/externalSystems/jira"
* @param content the {@link com.google.api.services.securitycenter.v1.model.GoogleCloudSecuritycenterV1ExternalSystem}
* @return the request
*/
public Patch patch(java.lang.String name, com.google.api.services.securitycenter.v1.model.GoogleCloudSecuritycenterV1ExternalSystem content) throws java.io.IOException {
Patch result = new Patch(name, content);
initialize(result);
return result;
}
public class Patch extends SecurityCommandCenterRequest {
private static final String REST_PATH = "v1/{+name}";
private final java.util.regex.Pattern NAME_PATTERN =
java.util.regex.Pattern.compile("^projects/[^/]+/sources/[^/]+/findings/[^/]+/externalSystems/[^/]+$");
/**
* Updates external system. This is for a given finding.
*
* Create a request for the method "externalSystems.patch".
*
* This request holds the parameters needed by the the securitycenter server. After setting any
* optional parameters, call the {@link Patch#execute()} method to invoke the remote operation.
* {@link
* Patch#initialize(com.google.api.client.googleapis.services.AbstractGoogleClientRequest)} must
* be called to initialize this instance immediately after invoking the constructor.
*
* @param name Full resource name of the external system, for example:
* "organizations/1234/sources/5678/findings/123456/externalSystems/jira",
* "folders/1234/sources/5678/findings/123456/externalSystems/jira",
* "projects/1234/sources/5678/findings/123456/externalSystems/jira"
* @param content the {@link com.google.api.services.securitycenter.v1.model.GoogleCloudSecuritycenterV1ExternalSystem}
* @since 1.13
*/
protected Patch(java.lang.String name, com.google.api.services.securitycenter.v1.model.GoogleCloudSecuritycenterV1ExternalSystem content) {
super(SecurityCommandCenter.this, "PATCH", REST_PATH, content, com.google.api.services.securitycenter.v1.model.GoogleCloudSecuritycenterV1ExternalSystem.class);
this.name = com.google.api.client.util.Preconditions.checkNotNull(name, "Required parameter name must be specified.");
if (!getSuppressPatternChecks()) {
com.google.api.client.util.Preconditions.checkArgument(NAME_PATTERN.matcher(name).matches(),
"Parameter name must conform to the pattern " +
"^projects/[^/]+/sources/[^/]+/findings/[^/]+/externalSystems/[^/]+$");
}
}
@Override
public Patch set$Xgafv(java.lang.String $Xgafv) {
return (Patch) super.set$Xgafv($Xgafv);
}
@Override
public Patch setAccessToken(java.lang.String accessToken) {
return (Patch) super.setAccessToken(accessToken);
}
@Override
public Patch setAlt(java.lang.String alt) {
return (Patch) super.setAlt(alt);
}
@Override
public Patch setCallback(java.lang.String callback) {
return (Patch) super.setCallback(callback);
}
@Override
public Patch setFields(java.lang.String fields) {
return (Patch) super.setFields(fields);
}
@Override
public Patch setKey(java.lang.String key) {
return (Patch) super.setKey(key);
}
@Override
public Patch setOauthToken(java.lang.String oauthToken) {
return (Patch) super.setOauthToken(oauthToken);
}
@Override
public Patch setPrettyPrint(java.lang.Boolean prettyPrint) {
return (Patch) super.setPrettyPrint(prettyPrint);
}
@Override
public Patch setQuotaUser(java.lang.String quotaUser) {
return (Patch) super.setQuotaUser(quotaUser);
}
@Override
public Patch setUploadType(java.lang.String uploadType) {
return (Patch) super.setUploadType(uploadType);
}
@Override
public Patch setUploadProtocol(java.lang.String uploadProtocol) {
return (Patch) super.setUploadProtocol(uploadProtocol);
}
/**
* Full resource name of the external system, for example:
* "organizations/1234/sources/5678/findings/123456/externalSystems/jira",
* "folders/1234/sources/5678/findings/123456/externalSystems/jira",
* "projects/1234/sources/5678/findings/123456/externalSystems/jira"
*/
@com.google.api.client.util.Key
private java.lang.String name;
/** Full resource name of the external system, for example:
"organizations/1234/sources/5678/findings/123456/externalSystems/jira",
"folders/1234/sources/5678/findings/123456/externalSystems/jira",
"projects/1234/sources/5678/findings/123456/externalSystems/jira"
*/
public java.lang.String getName() {
return name;
}
/**
* Full resource name of the external system, for example:
* "organizations/1234/sources/5678/findings/123456/externalSystems/jira",
* "folders/1234/sources/5678/findings/123456/externalSystems/jira",
* "projects/1234/sources/5678/findings/123456/externalSystems/jira"
*/
public Patch setName(java.lang.String name) {
if (!getSuppressPatternChecks()) {
com.google.api.client.util.Preconditions.checkArgument(NAME_PATTERN.matcher(name).matches(),
"Parameter name must conform to the pattern " +
"^projects/[^/]+/sources/[^/]+/findings/[^/]+/externalSystems/[^/]+$");
}
this.name = name;
return this;
}
/**
* The FieldMask to use when updating the external system resource. If empty all mutable
* fields will be updated.
*/
@com.google.api.client.util.Key
private String updateMask;
/** The FieldMask to use when updating the external system resource. If empty all mutable fields will
be updated.
*/
public String getUpdateMask() {
return updateMask;
}
/**
* The FieldMask to use when updating the external system resource. If empty all mutable
* fields will be updated.
*/
public Patch setUpdateMask(String updateMask) {
this.updateMask = updateMask;
return this;
}
@Override
public Patch set(String parameterName, Object value) {
return (Patch) super.set(parameterName, value);
}
}
}
}
}
}
/**
* Builder for {@link SecurityCommandCenter}.
*
*
* 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 SecurityCommandCenter}. */
@Override
public SecurityCommandCenter build() {
return new SecurityCommandCenter(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 SecurityCommandCenterRequestInitializer}.
*
* @since 1.12
*/
public Builder setSecurityCommandCenterRequestInitializer(
SecurityCommandCenterRequestInitializer securitycommandcenterRequestInitializer) {
return (Builder) super.setGoogleClientRequestInitializer(securitycommandcenterRequestInitializer);
}
@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);
}
}
}