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

com.kaltura.client.services.PinService 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.EntityReferenceBy;
import com.kaltura.client.enums.PinType;
import com.kaltura.client.types.Pin;
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 PinService {
	
	public static class GetPinBuilder extends RequestBuilder {
		
		public GetPinBuilder(EntityReferenceBy by, PinType type, int ruleId) {
			super(Pin.class, "pin", "get");
			params.add("by", by);
			params.add("type", type);
			params.add("ruleId", ruleId);
		}
		
		public void by(String multirequestToken) {
			params.add("by", multirequestToken);
		}
		
		public void type(String multirequestToken) {
			params.add("type", multirequestToken);
		}
		
		public void ruleId(String multirequestToken) {
			params.add("ruleId", multirequestToken);
		}
	}

	public static GetPinBuilder get(EntityReferenceBy by, PinType type)  {
		return get(by, type, Integer.MIN_VALUE);
	}

	/**
	 * Retrieve the parental or purchase PIN that applies for the household or user.
	  Includes specification of where the PIN was defined at – account, household or
	  user  level
	 * 
	 * @param by Reference type to filter by
	 * @param type The PIN type to retrieve
	 * @param ruleId Rule ID - for PIN per rule (MediaCorp): BEO-1923
	 */
    public static GetPinBuilder get(EntityReferenceBy by, PinType type, int ruleId)  {
		return new GetPinBuilder(by, type, ruleId);
	}
	
	public static class UpdatePinBuilder extends RequestBuilder {
		
		public UpdatePinBuilder(EntityReferenceBy by, PinType type, Pin pin, int ruleId) {
			super(Pin.class, "pin", "update");
			params.add("by", by);
			params.add("type", type);
			params.add("pin", pin);
			params.add("ruleId", ruleId);
		}
		
		public void by(String multirequestToken) {
			params.add("by", multirequestToken);
		}
		
		public void type(String multirequestToken) {
			params.add("type", multirequestToken);
		}
		
		public void ruleId(String multirequestToken) {
			params.add("ruleId", multirequestToken);
		}
	}

	public static UpdatePinBuilder update(EntityReferenceBy by, PinType type, Pin pin)  {
		return update(by, type, pin, Integer.MIN_VALUE);
	}

	/**
	 * Set the parental or purchase PIN that applies for the user or the household.
	 * 
	 * @param by Reference type to filter by
	 * @param type The PIN type to retrieve
	 * @param pin PIN to set
	 * @param ruleId Rule ID - for PIN per rule (MediaCorp): BEO-1923
	 */
    public static UpdatePinBuilder update(EntityReferenceBy by, PinType type, Pin pin, int ruleId)  {
		return new UpdatePinBuilder(by, type, pin, ruleId);
	}
	
	public static class ValidatePinBuilder extends RequestBuilder {
		
		public ValidatePinBuilder(String pin, PinType type, int ruleId) {
			super(Boolean.class, "pin", "validate");
			params.add("pin", pin);
			params.add("type", type);
			params.add("ruleId", ruleId);
		}
		
		public void pin(String multirequestToken) {
			params.add("pin", multirequestToken);
		}
		
		public void type(String multirequestToken) {
			params.add("type", multirequestToken);
		}
		
		public void ruleId(String multirequestToken) {
			params.add("ruleId", multirequestToken);
		}
	}

	public static ValidatePinBuilder validate(String pin, PinType type)  {
		return validate(pin, type, Integer.MIN_VALUE);
	}

	/**
	 * Validate a purchase or parental PIN for a user.
	 * 
	 * @param pin PIN to validate
	 * @param type The PIN type to retrieve
	 * @param ruleId Rule ID - for PIN per rule (MediaCorp): BEO-1923
	 */
    public static ValidatePinBuilder validate(String pin, PinType type, int ruleId)  {
		return new ValidatePinBuilder(pin, type, ruleId);
	}
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy