All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.hubspot.singularity.s3uploader.config.SingularityS3UploaderContentHeaders Maven / Gradle / Ivy

package com.hubspot.singularity.s3uploader.config;

import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.util.Optional;
import org.hibernate.validator.constraints.NotEmpty;

public class SingularityS3UploaderContentHeaders {
  @NotEmpty
  private final String filenameEndsWith;

  private final Optional contentType;
  private final Optional contentEncoding;

  @JsonCreator
  public SingularityS3UploaderContentHeaders(
    @JsonProperty("filenameEndsWith") String filenameEndsWith,
    @JsonProperty("contentType") Optional contentType,
    @JsonProperty("contentEncoding") Optional contentEncoding
  ) {
    this.filenameEndsWith = filenameEndsWith;
    this.contentType = contentType;
    this.contentEncoding = contentEncoding;
  }

  public String getFilenameEndsWith() {
    return filenameEndsWith;
  }

  public Optional getContentType() {
    return contentType;
  }

  public Optional getContentEncoding() {
    return contentEncoding;
  }

  @Override
  public String toString() {
    return (
      "SingularityContentTypeAndEncoding{" +
      "contentType=" +
      contentType +
      ", contentEncoding=" +
      contentEncoding +
      '}'
    );
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy