com.ionoscloud.s3.messages.LifecycleConfiguration Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of ionos-cloud-sdk-s3 Show documentation
Show all versions of ionos-cloud-sdk-s3 Show documentation
IONOS Java SDK for Amazon S3 Compatible Cloud Storage
The newest version!
package com.ionoscloud.s3.messages;
import java.util.Collections;
import java.util.List;
import java.util.Objects;
import javax.annotation.Nonnull;
import org.simpleframework.xml.ElementList;
import org.simpleframework.xml.Namespace;
import org.simpleframework.xml.Root;
/**
* Object representation of request XML of PutBucketLifecycleConfiguration
* API and response XML of GetBucketLifecycleConfiguration
* API.
*/
@Root(name = "LifecycleConfiguration")
@Namespace(reference = "http://s3.amazonaws.com/doc/2006-03-01/")
public class LifecycleConfiguration {
@ElementList(name = "Rule", inline = true)
private List rules;
/** Constructs new lifecycle configuration. */
public LifecycleConfiguration(
@Nonnull @ElementList(name = "Rule", inline = true) List rules) {
this.rules =
Collections.unmodifiableList(Objects.requireNonNull(rules, "Rules must not be null"));
if (rules.isEmpty()) {
throw new IllegalArgumentException("Rules must not be empty");
}
}
public List rules() {
return rules;
}
}