com.ionoscloud.s3.messages.UserMetadata 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.Map;
import java.util.Objects;
import javax.annotation.Nonnull;
import org.simpleframework.xml.ElementMap;
import org.simpleframework.xml.Namespace;
import org.simpleframework.xml.Root;
/** Helper class to denote user metadata information of {@link S3OutputLocation}. */
@Root(name = "UserMetadata", strict = false)
@Namespace(reference = "http://s3.amazonaws.com/doc/2006-03-01/")
@edu.umd.cs.findbugs.annotations.SuppressFBWarnings(value = "URF_UNREAD_FIELD")
public class UserMetadata {
@ElementMap(
attribute = false,
entry = "MetadataEntry",
inline = true,
key = "Name",
value = "Value",
required = false)
Map metadataEntries;
private UserMetadata(@Nonnull Map metadataEntries) {
Objects.requireNonNull(metadataEntries, "Metadata entries must not be null");
if (metadataEntries.size() == 0) {
throw new IllegalArgumentException("Metadata entries must not be empty");
}
this.metadataEntries = Collections.unmodifiableMap(metadataEntries);
}
}