/* * 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.protocol.StructuredPojo; import com.amazonaws.protocol.ProtocolMarshaller; /** *
* Contains information about the criteria used to query usage statistics. *
* * @see AWS API * Documentation */ @Generated("com.amazonaws:aws-java-sdk-code-generator") public class UsageCriteria implements Serializable, Cloneable, StructuredPojo { /** ** The account IDs to aggregate usage statistics from. *
*/ private java.util.List* The data sources to aggregate usage statistics from. *
*/ @Deprecated private java.util.List* The resources to aggregate usage statistics from. Only accepts exact resource names. *
*/ private java.util.List* The features to aggregate usage statistics from. *
*/ private java.util.List* The account IDs to aggregate usage statistics from. *
* * @return The account IDs to aggregate usage statistics from. */ public java.util.List* The account IDs to aggregate usage statistics from. *
* * @param accountIds * The account IDs to aggregate usage statistics from. */ public void setAccountIds(java.util.Collection* The account IDs to aggregate usage statistics from. *
** NOTE: This method appends the values to the existing list (if any). Use * {@link #setAccountIds(java.util.Collection)} or {@link #withAccountIds(java.util.Collection)} if you want to * override the existing values. *
* * @param accountIds * The account IDs to aggregate usage statistics from. * @return Returns a reference to this object so that method calls can be chained together. */ public UsageCriteria withAccountIds(String... accountIds) { if (this.accountIds == null) { setAccountIds(new java.util.ArrayList* The account IDs to aggregate usage statistics from. *
* * @param accountIds * The account IDs to aggregate usage statistics from. * @return Returns a reference to this object so that method calls can be chained together. */ public UsageCriteria withAccountIds(java.util.Collection* The data sources to aggregate usage statistics from. *
* * @return The data sources to aggregate usage statistics from. * @see DataSource */ @Deprecated public java.util.List* The data sources to aggregate usage statistics from. *
* * @param dataSources * The data sources to aggregate usage statistics from. * @see DataSource */ @Deprecated public void setDataSources(java.util.Collection* The data sources to aggregate usage statistics from. *
** NOTE: This method appends the values to the existing list (if any). Use * {@link #setDataSources(java.util.Collection)} or {@link #withDataSources(java.util.Collection)} if you want to * override the existing values. *
* * @param dataSources * The data sources to aggregate usage statistics from. * @return Returns a reference to this object so that method calls can be chained together. * @see DataSource */ @Deprecated public UsageCriteria withDataSources(String... dataSources) { if (this.dataSources == null) { setDataSources(new java.util.ArrayList* The data sources to aggregate usage statistics from. *
* * @param dataSources * The data sources to aggregate usage statistics from. * @return Returns a reference to this object so that method calls can be chained together. * @see DataSource */ @Deprecated public UsageCriteria withDataSources(java.util.Collection* The data sources to aggregate usage statistics from. *
* * @param dataSources * The data sources to aggregate usage statistics from. * @return Returns a reference to this object so that method calls can be chained together. * @see DataSource */ @Deprecated public UsageCriteria withDataSources(DataSource... dataSources) { java.util.ArrayList* The resources to aggregate usage statistics from. Only accepts exact resource names. *
* * @return The resources to aggregate usage statistics from. Only accepts exact resource names. */ public java.util.List* The resources to aggregate usage statistics from. Only accepts exact resource names. *
* * @param resources * The resources to aggregate usage statistics from. Only accepts exact resource names. */ public void setResources(java.util.Collection* The resources to aggregate usage statistics from. Only accepts exact resource names. *
** NOTE: This method appends the values to the existing list (if any). Use * {@link #setResources(java.util.Collection)} or {@link #withResources(java.util.Collection)} if you want to * override the existing values. *
* * @param resources * The resources to aggregate usage statistics from. Only accepts exact resource names. * @return Returns a reference to this object so that method calls can be chained together. */ public UsageCriteria withResources(String... resources) { if (this.resources == null) { setResources(new java.util.ArrayList* The resources to aggregate usage statistics from. Only accepts exact resource names. *
* * @param resources * The resources to aggregate usage statistics from. Only accepts exact resource names. * @return Returns a reference to this object so that method calls can be chained together. */ public UsageCriteria withResources(java.util.Collection* The features to aggregate usage statistics from. *
* * @return The features to aggregate usage statistics from. * @see UsageFeature */ public java.util.List* The features to aggregate usage statistics from. *
* * @param features * The features to aggregate usage statistics from. * @see UsageFeature */ public void setFeatures(java.util.Collection* The features to aggregate usage statistics from. *
** 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 * The features to aggregate usage statistics from. * @return Returns a reference to this object so that method calls can be chained together. * @see UsageFeature */ public UsageCriteria withFeatures(String... features) { if (this.features == null) { setFeatures(new java.util.ArrayList* The features to aggregate usage statistics from. *
* * @param features * The features to aggregate usage statistics from. * @return Returns a reference to this object so that method calls can be chained together. * @see UsageFeature */ public UsageCriteria withFeatures(java.util.Collection* The features to aggregate usage statistics from. *
* * @param features * The features to aggregate usage statistics from. * @return Returns a reference to this object so that method calls can be chained together. * @see UsageFeature */ public UsageCriteria withFeatures(UsageFeature... features) { java.util.ArrayList