/* * 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.cloudtrail.model; import java.io.Serializable; import javax.annotation.Generated; import com.amazonaws.protocol.StructuredPojo; import com.amazonaws.protocol.ProtocolMarshaller; /** *
* Advanced event selectors let you create fine-grained selectors for the following CloudTrail event record fields. They * help you control costs by logging only those events that are important to you. For more information about advanced * event selectors, see Logging * data events in the CloudTrail User Guide. *
*
* readOnly
*
* eventSource
*
* eventName
*
* eventCategory
*
* resources.type
*
* resources.ARN
*
* You cannot apply both event selectors and advanced event selectors to a trail. *
* * @see AWS * API Documentation */ @Generated("com.amazonaws:aws-java-sdk-code-generator") public class AdvancedEventSelector implements Serializable, Cloneable, StructuredPojo { /** ** An optional, descriptive name for an advanced event selector, such as "Log data events for only two S3 buckets". *
*/ private String name; /** ** Contains all selector statements in an advanced event selector. *
*/ private com.amazonaws.internal.SdkInternalList* An optional, descriptive name for an advanced event selector, such as "Log data events for only two S3 buckets". *
* * @param name * An optional, descriptive name for an advanced event selector, such as * "Log data events for only two S3 buckets". */ public void setName(String name) { this.name = name; } /** ** An optional, descriptive name for an advanced event selector, such as "Log data events for only two S3 buckets". *
* * @return An optional, descriptive name for an advanced event selector, such as * "Log data events for only two S3 buckets". */ public String getName() { return this.name; } /** ** An optional, descriptive name for an advanced event selector, such as "Log data events for only two S3 buckets". *
* * @param name * An optional, descriptive name for an advanced event selector, such as * "Log data events for only two S3 buckets". * @return Returns a reference to this object so that method calls can be chained together. */ public AdvancedEventSelector withName(String name) { setName(name); return this; } /** ** Contains all selector statements in an advanced event selector. *
* * @return Contains all selector statements in an advanced event selector. */ public java.util.List* Contains all selector statements in an advanced event selector. *
* * @param fieldSelectors * Contains all selector statements in an advanced event selector. */ public void setFieldSelectors(java.util.Collection* Contains all selector statements in an advanced event selector. *
** NOTE: This method appends the values to the existing list (if any). Use * {@link #setFieldSelectors(java.util.Collection)} or {@link #withFieldSelectors(java.util.Collection)} if you want * to override the existing values. *
* * @param fieldSelectors * Contains all selector statements in an advanced event selector. * @return Returns a reference to this object so that method calls can be chained together. */ public AdvancedEventSelector withFieldSelectors(AdvancedFieldSelector... fieldSelectors) { if (this.fieldSelectors == null) { setFieldSelectors(new com.amazonaws.internal.SdkInternalList* Contains all selector statements in an advanced event selector. *
* * @param fieldSelectors * Contains all selector statements in an advanced event selector. * @return Returns a reference to this object so that method calls can be chained together. */ public AdvancedEventSelector withFieldSelectors(java.util.Collection