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

com.kaltura.client.services.HouseholdDeviceService 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.DeviceStatus;
import com.kaltura.client.types.DevicePin;
import com.kaltura.client.types.HouseholdDevice;
import com.kaltura.client.types.HouseholdDeviceFilter;
import com.kaltura.client.utils.request.ListResponseRequestBuilder;
import com.kaltura.client.utils.request.RequestBuilder;

/**
 * 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 HouseholdDeviceService {
	
	public static class AddHouseholdDeviceBuilder extends RequestBuilder {
		
		public AddHouseholdDeviceBuilder(HouseholdDevice device) {
			super(HouseholdDevice.class, "householddevice", "add");
			params.add("device", device);
		}
	}

	/**
	 * Add device to household
	 * 
	 * @param device Device
	 */
    public static AddHouseholdDeviceBuilder add(HouseholdDevice device)  {
		return new AddHouseholdDeviceBuilder(device);
	}
	
	public static class AddByPinHouseholdDeviceBuilder extends RequestBuilder {
		
		public AddByPinHouseholdDeviceBuilder(String deviceName, String pin) {
			super(HouseholdDevice.class, "householddevice", "addByPin");
			params.add("deviceName", deviceName);
			params.add("pin", pin);
		}
		
		public void deviceName(String multirequestToken) {
			params.add("deviceName", multirequestToken);
		}
		
		public void pin(String multirequestToken) {
			params.add("pin", multirequestToken);
		}
	}

	/**
	 * Registers a device to a household using pin code
	 * 
	 * @param deviceName Device name
	 * @param pin Pin code
	 */
    public static AddByPinHouseholdDeviceBuilder addByPin(String deviceName, String pin)  {
		return new AddByPinHouseholdDeviceBuilder(deviceName, pin);
	}
	
	public static class DeleteHouseholdDeviceBuilder extends RequestBuilder {
		
		public DeleteHouseholdDeviceBuilder(String udid) {
			super(Boolean.class, "householddevice", "delete");
			params.add("udid", udid);
		}
		
		public void udid(String multirequestToken) {
			params.add("udid", multirequestToken);
		}
	}

	/**
	 * Removes a device from household
	 * 
	 * @param udid device UDID
	 */
    public static DeleteHouseholdDeviceBuilder delete(String udid)  {
		return new DeleteHouseholdDeviceBuilder(udid);
	}
	
	public static class GeneratePinHouseholdDeviceBuilder extends RequestBuilder {
		
		public GeneratePinHouseholdDeviceBuilder(String udid, int brandId) {
			super(DevicePin.class, "householddevice", "generatePin");
			params.add("udid", udid);
			params.add("brandId", brandId);
		}
		
		public void udid(String multirequestToken) {
			params.add("udid", multirequestToken);
		}
		
		public void brandId(String multirequestToken) {
			params.add("brandId", multirequestToken);
		}
	}

	/**
	 * Generates device pin to use when adding a device to household by pin
	 * 
	 * @param udid Device UDID
	 * @param brandId Device brand identifier
	 */
    public static GeneratePinHouseholdDeviceBuilder generatePin(String udid, int brandId)  {
		return new GeneratePinHouseholdDeviceBuilder(udid, brandId);
	}
	
	public static class GetHouseholdDeviceBuilder extends RequestBuilder {
		
		public GetHouseholdDeviceBuilder() {
			super(HouseholdDevice.class, "householddevice", "get");
		}
	}

	/**
	 * Returns device registration status to the supplied household
	 */
    public static GetHouseholdDeviceBuilder get()  {
		return new GetHouseholdDeviceBuilder();
	}
	
	public static class ListHouseholdDeviceBuilder extends ListResponseRequestBuilder {
		
		public ListHouseholdDeviceBuilder(HouseholdDeviceFilter filter) {
			super(HouseholdDevice.class, "householddevice", "list");
			params.add("filter", filter);
		}
	}

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

	/**
	 * Returns the devices within the household
	 * 
	 * @param filter Household devices filter
	 */
    public static ListHouseholdDeviceBuilder list(HouseholdDeviceFilter filter)  {
		return new ListHouseholdDeviceBuilder(filter);
	}
	
	public static class UpdateHouseholdDeviceBuilder extends RequestBuilder {
		
		public UpdateHouseholdDeviceBuilder(String udid, HouseholdDevice device) {
			super(HouseholdDevice.class, "householddevice", "update");
			params.add("udid", udid);
			params.add("device", device);
		}
		
		public void udid(String multirequestToken) {
			params.add("udid", multirequestToken);
		}
	}

	/**
	 * Update the name of the device by UDID
	 * 
	 * @param udid Device UDID
	 * @param device Device object
	 */
    public static UpdateHouseholdDeviceBuilder update(String udid, HouseholdDevice device)  {
		return new UpdateHouseholdDeviceBuilder(udid, device);
	}
	
	public static class UpdateStatusHouseholdDeviceBuilder extends RequestBuilder {
		
		public UpdateStatusHouseholdDeviceBuilder(String udid, DeviceStatus status) {
			super(Boolean.class, "householddevice", "updateStatus");
			params.add("udid", udid);
			params.add("status", status);
		}
		
		public void udid(String multirequestToken) {
			params.add("udid", multirequestToken);
		}
		
		public void status(String multirequestToken) {
			params.add("status", multirequestToken);
		}
	}

	/**
	 * Update the name of the device by UDID
	 * 
	 * @param udid Device UDID
	 * @param status Device status
	 */
    public static UpdateStatusHouseholdDeviceBuilder updateStatus(String udid, DeviceStatus status)  {
		return new UpdateStatusHouseholdDeviceBuilder(udid, status);
	}
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy