/* * 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 the result of GuardDuty usage. If a UsageStatisticType is provided the result for other types will be null. *
* * @see AWS API * Documentation */ @Generated("com.amazonaws:aws-java-sdk-code-generator") public class UsageStatistics implements Serializable, Cloneable, StructuredPojo { /** ** The usage statistic sum organized by account ID. *
*/ private java.util.List* The usage statistic sum organized by on data source. *
*/ private java.util.List* The usage statistic sum organized by resource. *
*/ private java.util.List* Lists the top 50 resources that have generated the most GuardDuty usage, in order from most to least expensive. *
*/ private java.util.List* The usage statistic sum organized by feature. *
*/ private java.util.List* The usage statistic sum organized by account ID. *
* * @return The usage statistic sum organized by account ID. */ public java.util.List* The usage statistic sum organized by account ID. *
* * @param sumByAccount * The usage statistic sum organized by account ID. */ public void setSumByAccount(java.util.Collection* The usage statistic sum organized by account ID. *
** NOTE: This method appends the values to the existing list (if any). Use * {@link #setSumByAccount(java.util.Collection)} or {@link #withSumByAccount(java.util.Collection)} if you want to * override the existing values. *
* * @param sumByAccount * The usage statistic sum organized by account ID. * @return Returns a reference to this object so that method calls can be chained together. */ public UsageStatistics withSumByAccount(UsageAccountResult... sumByAccount) { if (this.sumByAccount == null) { setSumByAccount(new java.util.ArrayList* The usage statistic sum organized by account ID. *
* * @param sumByAccount * The usage statistic sum organized by account ID. * @return Returns a reference to this object so that method calls can be chained together. */ public UsageStatistics withSumByAccount(java.util.Collection* The usage statistic sum organized by on data source. *
* * @return The usage statistic sum organized by on data source. */ public java.util.List* The usage statistic sum organized by on data source. *
* * @param sumByDataSource * The usage statistic sum organized by on data source. */ public void setSumByDataSource(java.util.Collection* The usage statistic sum organized by on data source. *
** NOTE: This method appends the values to the existing list (if any). Use * {@link #setSumByDataSource(java.util.Collection)} or {@link #withSumByDataSource(java.util.Collection)} if you * want to override the existing values. *
* * @param sumByDataSource * The usage statistic sum organized by on data source. * @return Returns a reference to this object so that method calls can be chained together. */ public UsageStatistics withSumByDataSource(UsageDataSourceResult... sumByDataSource) { if (this.sumByDataSource == null) { setSumByDataSource(new java.util.ArrayList* The usage statistic sum organized by on data source. *
* * @param sumByDataSource * The usage statistic sum organized by on data source. * @return Returns a reference to this object so that method calls can be chained together. */ public UsageStatistics withSumByDataSource(java.util.Collection* The usage statistic sum organized by resource. *
* * @return The usage statistic sum organized by resource. */ public java.util.List* The usage statistic sum organized by resource. *
* * @param sumByResource * The usage statistic sum organized by resource. */ public void setSumByResource(java.util.Collection* The usage statistic sum organized by resource. *
** NOTE: This method appends the values to the existing list (if any). Use * {@link #setSumByResource(java.util.Collection)} or {@link #withSumByResource(java.util.Collection)} if you want * to override the existing values. *
* * @param sumByResource * The usage statistic sum organized by resource. * @return Returns a reference to this object so that method calls can be chained together. */ public UsageStatistics withSumByResource(UsageResourceResult... sumByResource) { if (this.sumByResource == null) { setSumByResource(new java.util.ArrayList* The usage statistic sum organized by resource. *
* * @param sumByResource * The usage statistic sum organized by resource. * @return Returns a reference to this object so that method calls can be chained together. */ public UsageStatistics withSumByResource(java.util.Collection* Lists the top 50 resources that have generated the most GuardDuty usage, in order from most to least expensive. *
* * @return Lists the top 50 resources that have generated the most GuardDuty usage, in order from most to least * expensive. */ public java.util.List* Lists the top 50 resources that have generated the most GuardDuty usage, in order from most to least expensive. *
* * @param topResources * Lists the top 50 resources that have generated the most GuardDuty usage, in order from most to least * expensive. */ public void setTopResources(java.util.Collection* Lists the top 50 resources that have generated the most GuardDuty usage, in order from most to least expensive. *
** NOTE: This method appends the values to the existing list (if any). Use * {@link #setTopResources(java.util.Collection)} or {@link #withTopResources(java.util.Collection)} if you want to * override the existing values. *
* * @param topResources * Lists the top 50 resources that have generated the most GuardDuty usage, in order from most to least * expensive. * @return Returns a reference to this object so that method calls can be chained together. */ public UsageStatistics withTopResources(UsageResourceResult... topResources) { if (this.topResources == null) { setTopResources(new java.util.ArrayList* Lists the top 50 resources that have generated the most GuardDuty usage, in order from most to least expensive. *
* * @param topResources * Lists the top 50 resources that have generated the most GuardDuty usage, in order from most to least * expensive. * @return Returns a reference to this object so that method calls can be chained together. */ public UsageStatistics withTopResources(java.util.Collection* The usage statistic sum organized by feature. *
* * @return The usage statistic sum organized by feature. */ public java.util.List* The usage statistic sum organized by feature. *
* * @param sumByFeature * The usage statistic sum organized by feature. */ public void setSumByFeature(java.util.Collection* The usage statistic sum organized by feature. *
** NOTE: This method appends the values to the existing list (if any). Use * {@link #setSumByFeature(java.util.Collection)} or {@link #withSumByFeature(java.util.Collection)} if you want to * override the existing values. *
* * @param sumByFeature * The usage statistic sum organized by feature. * @return Returns a reference to this object so that method calls can be chained together. */ public UsageStatistics withSumByFeature(UsageFeatureResult... sumByFeature) { if (this.sumByFeature == null) { setSumByFeature(new java.util.ArrayList* The usage statistic sum organized by feature. *
* * @param sumByFeature * The usage statistic sum organized by feature. * @return Returns a reference to this object so that method calls can be chained together. */ public UsageStatistics withSumByFeature(java.util.Collection