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

de.mklinger.qetcher.client.impl.InputConversionFileImpl Maven / Gradle / Ivy

There is a newer version: 2.0.42.rc
Show newest version
package de.mklinger.qetcher.client.impl;

import java.time.Duration;
import java.util.Objects;

import de.mklinger.commons.httpclient.HttpRequest.BodyProvider;
import de.mklinger.qetcher.client.InputConversionFile;
import de.mklinger.qetcher.client.model.v1.MediaType;

public class InputConversionFileImpl implements InputConversionFile {
	private final BodyProvider bodyProvider;
	private final MediaType mediaType;
	private final String filename;
	private final Duration deleteTimeout;

	public InputConversionFileImpl(final InputConversionFileBuilderImpl builder) {
		this.bodyProvider = Objects.requireNonNull(builder.getBodyProvider(), "Missing bodyProvider");
		this.mediaType = Objects.requireNonNull(builder.getMediaType(), "Missing mediaType");
		this.filename = builder.getFilename();
		this.deleteTimeout = builder.getDeleteTimeout();
	}

	@Override
	public BodyProvider getBodyProvider() {
		return bodyProvider;
	}

	@Override
	public MediaType getMediaType() {
		return mediaType;
	}

	@Override
	public String getFilename() {
		return filename;
	}

	@Override
	public Duration getDeleteTimeout() {
		return deleteTimeout;
	}
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy