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

com.kaltura.client.services.AssetService Maven / Gradle / Ivy

Go to download

KalturaOttApiClient is a library of Java classes that can be used to interact with the Kaltura OTT REST API. More information about the REST API can be found at https://ott.developer.kaltura.com/ Many of the Java classes in this library are auto-generated from a schema that defines the objects that are used to interact with the API.

There is a newer version: 5.1.2.17630
Show newest version
// ===================================================================================================
//                           _  __     _ _
//                          | |/ /__ _| | |_ _  _ _ _ __ _
//                          | ' .
//
// @ignore
// ===================================================================================================
package com.kaltura.client.services;

import com.kaltura.client.enums.AssetReferenceType;
import com.kaltura.client.enums.AssetType;
import com.kaltura.client.types.Asset;
import com.kaltura.client.types.AssetCount;
import com.kaltura.client.types.AssetFilter;
import com.kaltura.client.types.AssetGroupBy;
import com.kaltura.client.types.FilterPager;
import com.kaltura.client.types.PlaybackContext;
import com.kaltura.client.types.PlaybackContextOptions;
import com.kaltura.client.types.SearchAssetFilter;
import com.kaltura.client.utils.request.ListResponseRequestBuilder;
import com.kaltura.client.utils.request.RequestBuilder;
import java.util.List;

/**
 * This class was generated using clients-generator\exec.php
 * against an XML schema provided by Kaltura.
 * 
 * MANUAL CHANGES TO THIS CLASS WILL BE OVERWRITTEN.
 */

public class AssetService {
	
	public static class CountAssetBuilder extends RequestBuilder {
		
		public CountAssetBuilder(List groupBy, SearchAssetFilter filter) {
			super(AssetCount.class, "asset", "count");
			params.add("groupBy", groupBy);
			params.add("filter", filter);
		}
	}

	public static CountAssetBuilder count(List groupBy)  {
		return count(groupBy, null);
	}

	/**
	 * Returns a group-by result for media or EPG according to given filter. Lists
	  values of each field and their respective count.
	 * 
	 * @param groupBy List of asset parameters to group by
	 * @param filter Filtering the assets request
	 */
    public static CountAssetBuilder count(List groupBy, SearchAssetFilter filter)  {
		return new CountAssetBuilder(groupBy, filter);
	}
	
	public static class GetAssetBuilder extends RequestBuilder {
		
		public GetAssetBuilder(String id, AssetReferenceType assetReferenceType) {
			super(Asset.class, "asset", "get");
			params.add("id", id);
			params.add("assetReferenceType", assetReferenceType);
		}
		
		public void id(String multirequestToken) {
			params.add("id", multirequestToken);
		}
		
		public void assetReferenceType(String multirequestToken) {
			params.add("assetReferenceType", multirequestToken);
		}
	}

	/**
	 * Returns media or EPG asset by media / EPG internal or external identifier
	 * 
	 * @param id Asset identifier
	 * @param assetReferenceType Asset type
	 */
    public static GetAssetBuilder get(String id, AssetReferenceType assetReferenceType)  {
		return new GetAssetBuilder(id, assetReferenceType);
	}
	
	public static class GetPlaybackContextAssetBuilder extends RequestBuilder {
		
		public GetPlaybackContextAssetBuilder(String assetId, AssetType assetType, PlaybackContextOptions contextDataParams) {
			super(PlaybackContext.class, "asset", "getPlaybackContext");
			params.add("assetId", assetId);
			params.add("assetType", assetType);
			params.add("contextDataParams", contextDataParams);
		}
		
		public void assetId(String multirequestToken) {
			params.add("assetId", multirequestToken);
		}
		
		public void assetType(String multirequestToken) {
			params.add("assetType", multirequestToken);
		}
	}

	/**
	 * This action delivers all data relevant for player
	 * 
	 * @param assetId Asset identifier
	 * @param assetType Asset type
	 * @param contextDataParams Parameters for the request
	 */
    public static GetPlaybackContextAssetBuilder getPlaybackContext(String assetId, AssetType assetType, PlaybackContextOptions contextDataParams)  {
		return new GetPlaybackContextAssetBuilder(assetId, assetType, contextDataParams);
	}
	
	public static class ListAssetBuilder extends ListResponseRequestBuilder {
		
		public ListAssetBuilder(AssetFilter filter, FilterPager pager) {
			super(Asset.class, "asset", "list");
			params.add("filter", filter);
			params.add("pager", pager);
		}
	}

	public static ListAssetBuilder list()  {
		return list(null);
	}

	public static ListAssetBuilder list(AssetFilter filter)  {
		return list(filter, null);
	}

	/**
	 * Returns media or EPG assets. Filters by media identifiers or by EPG internal or
	  external identifier.
	 * 
	 * @param filter Filtering the assets request
	 * @param pager Paging the request
	 */
    public static ListAssetBuilder list(AssetFilter filter, FilterPager pager)  {
		return new ListAssetBuilder(filter, pager);
	}
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy