/* * Copyright 2018-2023 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with * the License. A copy of the License is located at * * http://aws.amazon.com/apache2.0 * * or in the "license" file accompanying this file. This file 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. */ package com.amazonaws.services.guardduty.model; import java.io.Serializable; import javax.annotation.Generated; import com.amazonaws.AmazonWebServiceRequest; /** * * @see AWS API * Documentation */ @Generated("com.amazonaws:aws-java-sdk-code-generator") public class CreateDetectorRequest extends com.amazonaws.AmazonWebServiceRequest implements Serializable, Cloneable { /** *
* A Boolean value that specifies whether the detector is to be enabled. *
*/ private Boolean enable; /** ** The idempotency token for the create request. *
*/ private String clientToken; /** ** A value that specifies how frequently updated findings are exported. *
*/ private String findingPublishingFrequency; /** ** Describes which data sources will be enabled for the detector. *
** There might be regional differences because some data sources might not be available in all the Amazon Web * Services Regions where GuardDuty is presently supported. For more information, see Regions and endpoints. *
*/ @Deprecated private DataSourceConfigurations dataSources; /** ** The tags to be added to a new detector resource. *
*/ private java.util.Map* A list of features that will be configured for the detector. *
*/ private java.util.List* A Boolean value that specifies whether the detector is to be enabled. *
* * @param enable * A Boolean value that specifies whether the detector is to be enabled. */ public void setEnable(Boolean enable) { this.enable = enable; } /** ** A Boolean value that specifies whether the detector is to be enabled. *
* * @return A Boolean value that specifies whether the detector is to be enabled. */ public Boolean getEnable() { return this.enable; } /** ** A Boolean value that specifies whether the detector is to be enabled. *
* * @param enable * A Boolean value that specifies whether the detector is to be enabled. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateDetectorRequest withEnable(Boolean enable) { setEnable(enable); return this; } /** ** A Boolean value that specifies whether the detector is to be enabled. *
* * @return A Boolean value that specifies whether the detector is to be enabled. */ public Boolean isEnable() { return this.enable; } /** ** The idempotency token for the create request. *
* * @param clientToken * The idempotency token for the create request. */ public void setClientToken(String clientToken) { this.clientToken = clientToken; } /** ** The idempotency token for the create request. *
* * @return The idempotency token for the create request. */ public String getClientToken() { return this.clientToken; } /** ** The idempotency token for the create request. *
* * @param clientToken * The idempotency token for the create request. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateDetectorRequest withClientToken(String clientToken) { setClientToken(clientToken); return this; } /** ** A value that specifies how frequently updated findings are exported. *
* * @param findingPublishingFrequency * A value that specifies how frequently updated findings are exported. * @see FindingPublishingFrequency */ public void setFindingPublishingFrequency(String findingPublishingFrequency) { this.findingPublishingFrequency = findingPublishingFrequency; } /** ** A value that specifies how frequently updated findings are exported. *
* * @return A value that specifies how frequently updated findings are exported. * @see FindingPublishingFrequency */ public String getFindingPublishingFrequency() { return this.findingPublishingFrequency; } /** ** A value that specifies how frequently updated findings are exported. *
* * @param findingPublishingFrequency * A value that specifies how frequently updated findings are exported. * @return Returns a reference to this object so that method calls can be chained together. * @see FindingPublishingFrequency */ public CreateDetectorRequest withFindingPublishingFrequency(String findingPublishingFrequency) { setFindingPublishingFrequency(findingPublishingFrequency); return this; } /** ** A value that specifies how frequently updated findings are exported. *
* * @param findingPublishingFrequency * A value that specifies how frequently updated findings are exported. * @return Returns a reference to this object so that method calls can be chained together. * @see FindingPublishingFrequency */ public CreateDetectorRequest withFindingPublishingFrequency(FindingPublishingFrequency findingPublishingFrequency) { this.findingPublishingFrequency = findingPublishingFrequency.toString(); return this; } /** ** Describes which data sources will be enabled for the detector. *
** There might be regional differences because some data sources might not be available in all the Amazon Web * Services Regions where GuardDuty is presently supported. For more information, see Regions and endpoints. *
* * @param dataSources * Describes which data sources will be enabled for the detector. ** There might be regional differences because some data sources might not be available in all the Amazon Web * Services Regions where GuardDuty is presently supported. For more information, see Regions and endpoints. */ @Deprecated public void setDataSources(DataSourceConfigurations dataSources) { this.dataSources = dataSources; } /** *
* Describes which data sources will be enabled for the detector. *
** There might be regional differences because some data sources might not be available in all the Amazon Web * Services Regions where GuardDuty is presently supported. For more information, see Regions and endpoints. *
* * @return Describes which data sources will be enabled for the detector. ** There might be regional differences because some data sources might not be available in all the Amazon * Web Services Regions where GuardDuty is presently supported. For more information, see Regions and endpoints. */ @Deprecated public DataSourceConfigurations getDataSources() { return this.dataSources; } /** *
* Describes which data sources will be enabled for the detector. *
** There might be regional differences because some data sources might not be available in all the Amazon Web * Services Regions where GuardDuty is presently supported. For more information, see Regions and endpoints. *
* * @param dataSources * Describes which data sources will be enabled for the detector. ** There might be regional differences because some data sources might not be available in all the Amazon Web * Services Regions where GuardDuty is presently supported. For more information, see Regions and endpoints. * @return Returns a reference to this object so that method calls can be chained together. */ @Deprecated public CreateDetectorRequest withDataSources(DataSourceConfigurations dataSources) { setDataSources(dataSources); return this; } /** *
* The tags to be added to a new detector resource. *
* * @return The tags to be added to a new detector resource. */ public java.util.Map* The tags to be added to a new detector resource. *
* * @param tags * The tags to be added to a new detector resource. */ public void setTags(java.util.Map* The tags to be added to a new detector resource. *
* * @param tags * The tags to be added to a new detector resource. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateDetectorRequest withTags(java.util.Map* A list of features that will be configured for the detector. *
* * @return A list of features that will be configured for the detector. */ public java.util.List* A list of features that will be configured for the detector. *
* * @param features * A list of features that will be configured for the detector. */ public void setFeatures(java.util.Collection* A list of features that will be configured for the detector. *
** NOTE: This method appends the values to the existing list (if any). Use * {@link #setFeatures(java.util.Collection)} or {@link #withFeatures(java.util.Collection)} if you want to override * the existing values. *
* * @param features * A list of features that will be configured for the detector. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateDetectorRequest withFeatures(DetectorFeatureConfiguration... features) { if (this.features == null) { setFeatures(new java.util.ArrayList* A list of features that will be configured for the detector. *
* * @param features * A list of features that will be configured for the detector. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateDetectorRequest withFeatures(java.util.Collection