Class Inventory.Builder
java.lang.Object
software.amazon.awscdk.services.s3.Inventory.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<Inventory>
- Enclosing interface:
Inventory
@Stability(Stable)
public static final class Inventory.Builder
extends Object
implements software.amazon.jsii.Builder<Inventory>
A builder for
Inventory
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionbuild()
Builds the configured instance.destination
(InventoryDestination destination) Sets the value ofInventory.getDestination()
Sets the value ofInventory.getEnabled()
format
(InventoryFormat format) Sets the value ofInventory.getFormat()
frequency
(InventoryFrequency frequency) Sets the value ofInventory.getFrequency()
includeObjectVersions
(InventoryObjectVersion includeObjectVersions) Sets the value ofInventory.getIncludeObjectVersions()
inventoryId
(String inventoryId) Sets the value ofInventory.getInventoryId()
objectsPrefix
(String objectsPrefix) Sets the value ofInventory.getObjectsPrefix()
optionalFields
(List<String> optionalFields) Sets the value ofInventory.getOptionalFields()
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
destination
Sets the value ofInventory.getDestination()
- Parameters:
destination
- The destination of the inventory. This parameter is required.- Returns:
this
-
enabled
Sets the value ofInventory.getEnabled()
- Parameters:
enabled
- Whether the inventory is enabled or disabled.- Returns:
this
-
format
Sets the value ofInventory.getFormat()
- Parameters:
format
- The format of the inventory.- Returns:
this
-
frequency
Sets the value ofInventory.getFrequency()
- Parameters:
frequency
- Frequency at which the inventory should be generated.- Returns:
this
-
includeObjectVersions
@Stability(Stable) public Inventory.Builder includeObjectVersions(InventoryObjectVersion includeObjectVersions) Sets the value ofInventory.getIncludeObjectVersions()
- Parameters:
includeObjectVersions
- If the inventory should contain all the object versions or only the current one.- Returns:
this
-
inventoryId
Sets the value ofInventory.getInventoryId()
- Parameters:
inventoryId
- The inventory configuration ID.- Returns:
this
-
objectsPrefix
Sets the value ofInventory.getObjectsPrefix()
- Parameters:
objectsPrefix
- The inventory will only include objects that meet the prefix filter criteria.- Returns:
this
-
optionalFields
Sets the value ofInventory.getOptionalFields()
- Parameters:
optionalFields
- A list of optional fields to be included in the inventory result.- Returns:
this
-
build
Builds the configured instance.- Specified by:
build
in interfacesoftware.amazon.jsii.Builder<Inventory>
- Returns:
- a new instance of
Inventory
- Throws:
NullPointerException
- if any required attribute was not provided
-