001package com.plivo.api.models.recording; 002 003import com.plivo.api.models.base.ListResponse; 004import com.plivo.api.models.base.Lister; 005import com.plivo.api.util.PropertyFilter; 006import java.util.Date; 007import retrofit2.Call; 008 009public class RecordingLister extends Lister<Recording> { 010 011 private String subaccount; 012 private String callUuid; 013 private PropertyFilter<Date> addTime; 014 015 public String subaccount() { 016 return this.subaccount; 017 } 018 019 public String callUuid() { 020 return this.callUuid; 021 } 022 023 public PropertyFilter<Date> addTime() { 024 return this.addTime; 025 } 026 027 /** 028 * @param subaccount auth_id of the subaccount. Lists only those recordings of the main accounts 029 * which are tied to the specified subaccount. 030 */ 031 public RecordingLister subaccount(final String subaccount) { 032 this.subaccount = subaccount; 033 return this; 034 } 035 036 /** 037 * @param callUuid Used to filter recordings for a specific call. 038 */ 039 public RecordingLister callUuid(final String callUuid) { 040 this.callUuid = callUuid; 041 return this; 042 } 043 044 /** 045 * @param addTime Used to filter out recordings according to the time they were added. 046 */ 047 public RecordingLister addTime(final PropertyFilter<Date> addTime) { 048 this.addTime = addTime; 049 return this; 050 } 051 052 @Override 053 protected Call<ListResponse<Recording>> obtainCall() { 054 return client().getApiService().recordingList(client().getAuthId(), toMap()); 055 } 056}