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

de.mklinger.qetcher.client.impl.InputConversionFileBuilderImpl 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 de.mklinger.commons.httpclient.HttpRequest.BodyProvider;
import de.mklinger.qetcher.client.InputConversionFile;
import de.mklinger.qetcher.client.model.v1.MediaType;

/**
 * @author Marc Klinger - mklinger[at]mklinger[dot]de
 */
public class InputConversionFileBuilderImpl implements InputConversionFile.Builder {
	private BodyProvider bodyProvider;
	private MediaType mediaType;
	private String filename;
	private Duration deleteTimeout;

	@Override
	public InputConversionFile.Builder bodyProvider(final BodyProvider bodyProvider) {
		this.bodyProvider = bodyProvider;
		return this;
	}

	public BodyProvider getBodyProvider() {
		return bodyProvider;
	}

	@Override
	public InputConversionFile.Builder mediaType(final MediaType mediaType) {
		this.mediaType = mediaType;
		return this;
	}

	public MediaType getMediaType() {
		return mediaType;
	}

	@Override
	public InputConversionFile.Builder filename(final String filename) {
		this.filename = filename;
		return this;
	}

	public String getFilename() {
		return filename;
	}

	@Override
	public InputConversionFile.Builder deleteTimeout(final Duration deleteTimeout) {
		this.deleteTimeout = deleteTimeout;
		return this;
	}

	public Duration getDeleteTimeout() {
		return deleteTimeout;
	}

	@Override
	public InputConversionFile build() {
		return InstanceFactory.newInstance(this);
	}
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy