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

com.bitmovin.api.sdk.encoding.configurations.audio.heAacV1.HeAacV1Api Maven / Gradle / Ivy

There is a newer version: 1.205.0
Show newest version
package com.bitmovin.api.sdk.encoding.configurations.audio.heAacV1;

import java.util.Date;
import java.util.List;
import java.util.Map;
import java.util.HashMap;

import feign.Param;
import feign.QueryMap;
import feign.RequestLine;
import feign.Body;
import feign.Headers;

import com.bitmovin.api.sdk.model.*;
import com.bitmovin.api.sdk.common.BitmovinException;
import static com.bitmovin.api.sdk.common.BitmovinExceptionFactory.buildBitmovinException;
import com.bitmovin.api.sdk.common.BitmovinDateExpander;
import com.bitmovin.api.sdk.common.QueryMapWrapper;
import com.bitmovin.api.sdk.common.BitmovinApiBuilder;
import com.bitmovin.api.sdk.common.BitmovinApiClientFactory;
import com.bitmovin.api.sdk.encoding.configurations.audio.heAacV1.customdata.CustomdataApi;

public class HeAacV1Api {
    public final CustomdataApi customdata;

    private final HeAacV1ApiClient apiClient;

    public HeAacV1Api(BitmovinApiClientFactory clientFactory) {
        if (clientFactory == null)
        {
            throw new IllegalArgumentException("Parameter 'clientFactory' may not be null.");
        }

        this.apiClient = clientFactory.createApiClient(HeAacV1ApiClient.class);

        this.customdata = new CustomdataApi(clientFactory);
    }

    /**
     * Fluent builder for creating an instance of HeAacV1Api
     */
    public static BitmovinApiBuilder builder() {
        return new BitmovinApiBuilder<>(HeAacV1Api.class);
    }

    /**
     * Create HE-AAC v1 Codec Configuration
     * 
     * @param heAacV1AudioConfiguration The HE-AAC Codec Configuration to be created (required)
     * @return HeAacV1AudioConfiguration
     * @throws BitmovinException if fails to make API call
     */
    public HeAacV1AudioConfiguration create(HeAacV1AudioConfiguration heAacV1AudioConfiguration) throws BitmovinException {
        try {
            return this.apiClient.create(heAacV1AudioConfiguration).getData().getResult();
        } catch (Exception ex) {
            throw buildBitmovinException(ex);
        }
    }

    /**
     * Delete HE-AAC v1 Codec Configuration
     * 
     * @param configurationId Id of the codec configuration (required)
     * @return BitmovinResponse
     * @throws BitmovinException if fails to make API call
     */
    public BitmovinResponse delete(String configurationId) throws BitmovinException {
        try {
            return this.apiClient.delete(configurationId).getData().getResult();
        } catch (Exception ex) {
            throw buildBitmovinException(ex);
        }
    }

    /**
     * HE-AAC v1 Codec Configuration Details
     * 
     * @param configurationId Id of the codec configuration (required)
     * @return HeAacV1AudioConfiguration
     * @throws BitmovinException if fails to make API call
     */
    public HeAacV1AudioConfiguration get(String configurationId) throws BitmovinException {
        try {
            return this.apiClient.get(configurationId).getData().getResult();
        } catch (Exception ex) {
            throw buildBitmovinException(ex);
        }
    }

    /**
     * List HE-AAC v1 Configurations
     * 
     * @return List<HeAacV1AudioConfiguration>
     * @throws BitmovinException if fails to make API call
     */
    public PaginationResponse list() throws BitmovinException {
        try {
            return this.apiClient.list(new QueryMapWrapper()).getData().getResult();
        } catch (Exception ex) {
            throw buildBitmovinException(ex);
        }
    }

    /**
     * List HE-AAC v1 Configurations
     * 
     * @param queryParams The query parameters for sorting, filtering and paging options (optional)
     * @return List<HeAacV1AudioConfiguration>
     * @throws BitmovinException if fails to make API call
     */
    public PaginationResponse list(HeAacV1AudioConfigurationListQueryParams queryParams) throws BitmovinException {
        try {
            return this.apiClient.list(new QueryMapWrapper(queryParams)).getData().getResult();
        } catch (Exception ex) {
            throw buildBitmovinException(ex);
        }
    }

    interface HeAacV1ApiClient {

        @RequestLine("POST /encoding/configurations/audio/he-aac-v1")
        ResponseEnvelope create(HeAacV1AudioConfiguration heAacV1AudioConfiguration) throws BitmovinException;
    
        @RequestLine("DELETE /encoding/configurations/audio/he-aac-v1/{configuration_id}")
        ResponseEnvelope delete(@Param(value = "configuration_id") String configurationId) throws BitmovinException;
    
        @RequestLine("GET /encoding/configurations/audio/he-aac-v1/{configuration_id}")
        ResponseEnvelope get(@Param(value = "configuration_id") String configurationId) throws BitmovinException;
    
        @RequestLine("GET /encoding/configurations/audio/he-aac-v1")
        ResponseEnvelope> list(@QueryMap QueryMapWrapper queryParams) throws BitmovinException;
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy