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

com.cloudconvert.client.AbstractCloudConvertClient Maven / Gradle / Ivy

Go to download

CloudConvert is an online file converter API - more than 200 different audio, video, document, ebook, archive, image, spreadsheet and presentation formats supported.

There is a newer version: 1.2.1
Show newest version
package com.cloudconvert.client;

import com.cloudconvert.dto.response.JobResponse;
import com.cloudconvert.dto.response.OperationResponse;
import com.cloudconvert.dto.response.Pageable;
import com.cloudconvert.dto.response.TaskResponse;
import com.cloudconvert.dto.response.UserResponse;
import com.cloudconvert.dto.response.WebhookResponse;
import com.cloudconvert.dto.result.AbstractResult;
import com.cloudconvert.resource.AbstractExportFilesResource;
import com.cloudconvert.resource.AbstractFilesResource;
import com.cloudconvert.resource.AbstractImportFilesResource;
import com.cloudconvert.resource.AbstractJobsResource;
import com.cloudconvert.resource.AbstractTasksResource;
import com.cloudconvert.resource.AbstractUsersResource;
import com.cloudconvert.resource.AbstractWebhooksResource;

import java.io.Closeable;
import java.io.IOException;
import java.io.InputStream;

public class AbstractCloudConvertClient<
    VAR extends AbstractResult, ISAR extends AbstractResult,
    TRAR extends AbstractResult, TRPAR extends AbstractResult>,
    JRAR extends AbstractResult, JRPAR extends AbstractResult>,
    WRAR extends AbstractResult, WRPAR extends AbstractResult>,
    URAR extends AbstractResult, ORPAR extends AbstractResult>> implements Closeable {

    private final AbstractTasksResource abstractTasksResource;
    private final AbstractJobsResource abstractJobsResource;
    private final AbstractImportFilesResource abstractImportFilesResource;
    private final AbstractExportFilesResource abstractExportFilesResource;
    private final AbstractUsersResource abstractUsersResource;
    private final AbstractWebhooksResource abstractWebhooksResource;
    private final AbstractFilesResource abstractFilesResource;

    public AbstractCloudConvertClient(
        final AbstractTasksResource abstractTasksResource, final AbstractJobsResource abstractJobsResource,
        final AbstractImportFilesResource abstractImportFilesResource, final AbstractExportFilesResource abstractExportFilesResource,
        final AbstractUsersResource abstractUsersResource, final AbstractWebhooksResource abstractWebhooksResource,
        final AbstractFilesResource abstractFilesResource
    ) {
        this.abstractTasksResource = abstractTasksResource;
        this.abstractJobsResource = abstractJobsResource;
        this.abstractImportFilesResource = abstractImportFilesResource;
        this.abstractExportFilesResource = abstractExportFilesResource;
        this.abstractUsersResource = abstractUsersResource;
        this.abstractWebhooksResource = abstractWebhooksResource;
        this.abstractFilesResource = abstractFilesResource;
    }

    public AbstractTasksResource tasks() {
        return abstractTasksResource;
    }

    public AbstractJobsResource jobs() {
        return abstractJobsResource;
    }

    public AbstractImportFilesResource importUsing() {
        return abstractImportFilesResource;
    }

    public AbstractExportFilesResource exportUsing() {
        return abstractExportFilesResource;
    }

    public AbstractUsersResource users() {
        return abstractUsersResource;
    }

    public AbstractWebhooksResource webhooks() {
        return abstractWebhooksResource;
    }

    public AbstractFilesResource files() {
        return abstractFilesResource;
    }

    @Override
    public void close() throws IOException {
        abstractTasksResource.close();
        abstractJobsResource.close();
        abstractImportFilesResource.close();
        abstractExportFilesResource.close();
        abstractUsersResource.close();
        abstractWebhooksResource.close();
        abstractFilesResource.close();
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy