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

com.rapidapi.p.wordsapiv1.utilities.FileWrapper Maven / Gradle / Ivy

/*
 * WordsAPILib
 *
 * This file was automatically generated by APIMATIC v3.0 ( https://www.apimatic.io ).
 */

package com.rapidapi.p.wordsapiv1.utilities;

import com.fasterxml.jackson.annotation.JsonInclude;
import java.io.File;
import io.apimatic.coreinterfaces.type.CoreFileWrapper;

/**
 * Class to wrap file and contentType to be sent as part of a HTTP request.
 */
public class FileWrapper implements CoreFileWrapper {

    @JsonInclude(JsonInclude.Include.NON_NULL)
    private File file;
    @JsonInclude(JsonInclude.Include.NON_NULL)
    private String contentType;

    /**
     * Initialization constructor.
     * @param file File object to be wrapped
     * @param contentType content type of file
     */
    public FileWrapper(File file, String contentType) {
        this.file = file;
        this.contentType = contentType;
    }

    /**
     * Initialization constructor.
     * @param file File object to be wrapped
     */
    public FileWrapper(File file) {
        this.file = file;
    }

    /**
     * Getter for file.
     * @return File instance
     */
    public File getFile() {
        return file;
    }

    /**
     * Getter for content type.
     * @return content type of the file
     */
    public String getContentType() {
        return contentType;
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy