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

com.mypurecloud.sdk.api.RecordingApi Maven / Gradle / Ivy

The newest version!
package com.mypurecloud.sdk.api;

import com.fasterxml.jackson.core.type.TypeReference;

import com.mypurecloud.sdk.ApiException;
import com.mypurecloud.sdk.ApiClient;
import com.mypurecloud.sdk.ApiResponse;
import com.mypurecloud.sdk.Configuration;
import com.mypurecloud.sdk.model.*;
import com.mypurecloud.sdk.Pair;

import com.mypurecloud.sdk.model.ErrorBody;
import com.mypurecloud.sdk.model.OrphanRecording;
import com.mypurecloud.sdk.model.Recording;
import com.mypurecloud.sdk.model.Annotation;
import com.mypurecloud.sdk.model.LocalEncryptionConfigurationListing;
import com.mypurecloud.sdk.model.LocalEncryptionConfiguration;
import com.mypurecloud.sdk.model.PolicyEntityListing;
import com.mypurecloud.sdk.model.Policy;
import com.mypurecloud.sdk.model.OrphanRecordingListing;
import com.mypurecloud.sdk.model.EncryptionKeyEntityListing;
import com.mypurecloud.sdk.model.KeyRotationSchedule;
import com.mypurecloud.sdk.model.RecordingSettings;
import com.mypurecloud.sdk.model.ScreenRecordingSessionListing;
import com.mypurecloud.sdk.model.ScreenRecordingSessionRequest;
import com.mypurecloud.sdk.model.LocalEncryptionKeyRequest;
import com.mypurecloud.sdk.model.EncryptionKey;
import com.mypurecloud.sdk.model.PolicyCreate;
import com.mypurecloud.sdk.model.OrphanUpdateRequest;


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


public class RecordingApi {
  private ApiClient pcapiClient;

  public RecordingApi() {
    this(Configuration.getDefaultApiClient());
  }

  public RecordingApi(ApiClient apiClient) {
    this.pcapiClient = apiClient;
  }

  public ApiClient getApiClient() {
    return pcapiClient;
  }

  public void setApiClient(ApiClient apiClient) {
    this.pcapiClient = apiClient;
  }

  /**
   * Delete annotation
   * 
   * @param conversationId Conversation ID (required)
   * @param recordingId Recording ID (required)
   * @param annotationId Annotation ID (required)
   * @throws ApiException if fails to make API call
   */
  public void deleteConversationIdRecordingsRecordingIdAnnotationsAnnotationId(String conversationId, String recordingId, String annotationId) throws ApiException {
    deleteConversationIdRecordingsRecordingIdAnnotationsAnnotationIdWithHttpInfo(conversationId, recordingId, annotationId);
  }

  /**
   * Delete annotation
   * 
   * @param conversationId Conversation ID (required)
   * @param recordingId Recording ID (required)
   * @param annotationId Annotation ID (required)
   * @throws ApiException if fails to make API call
   */
  public ApiResponse deleteConversationIdRecordingsRecordingIdAnnotationsAnnotationIdWithHttpInfo(String conversationId, String recordingId, String annotationId) throws ApiException {
    Object pclocalVarPostBody = null;
    
    // verify the required parameter 'conversationId' is set
    if (conversationId == null) {
      throw new ApiException(400, "Missing the required parameter 'conversationId' when calling deleteConversationIdRecordingsRecordingIdAnnotationsAnnotationId");
    }
    
    // verify the required parameter 'recordingId' is set
    if (recordingId == null) {
      throw new ApiException(400, "Missing the required parameter 'recordingId' when calling deleteConversationIdRecordingsRecordingIdAnnotationsAnnotationId");
    }
    
    // verify the required parameter 'annotationId' is set
    if (annotationId == null) {
      throw new ApiException(400, "Missing the required parameter 'annotationId' when calling deleteConversationIdRecordingsRecordingIdAnnotationsAnnotationId");
    }
    
    // create path and map variables
    String pclocalVarPath = "/api/v2/conversations/{conversationId}/recordings/{recordingId}/annotations/{annotationId}".replaceAll("\\{format\\}","json")
      .replaceAll("\\{" + "conversationId" + "\\}", pcapiClient.escapeString(conversationId.toString()))
      .replaceAll("\\{" + "recordingId" + "\\}", pcapiClient.escapeString(recordingId.toString()))
      .replaceAll("\\{" + "annotationId" + "\\}", pcapiClient.escapeString(annotationId.toString()));

    // query params
    List pclocalVarQueryParams = new ArrayList();
    Map pclocalVarHeaderParams = new HashMap();
    Map pclocalVarFormParams = new HashMap();


    
    
    final String[] pclocalVarAccepts = {
      "application/json"
    };
    final String pclocalVarAccept = pcapiClient.selectHeaderAccept(pclocalVarAccepts);

    final String[] pclocalVarContentTypes = {
      "application/json"
    };
    final String pclocalVarContentType = pcapiClient.selectHeaderContentType(pclocalVarContentTypes);

    String[] pclocalVarAuthNames = new String[] { "PureCloud Auth" };

    return pcapiClient.invokeAPIVerbose(pclocalVarPath, "DELETE", pclocalVarQueryParams, pclocalVarPostBody, pclocalVarHeaderParams, pclocalVarFormParams, pclocalVarAccept, pclocalVarContentType, pclocalVarAuthNames, null);
  }
  /**
   * Delete media retention policies
   * Bulk delete of media retention policies, this will only delete the polices that match the ids specified in the query param.
   * @param ids  (required)
   * @return String
   * @throws ApiException if fails to make API call
   */
  public String deleteMediaretentionpolicies(String ids) throws ApiException {
    return deleteMediaretentionpoliciesWithHttpInfo(ids).getResponseObject();
  }

  /**
   * Delete media retention policies
   * Bulk delete of media retention policies, this will only delete the polices that match the ids specified in the query param.
   * @param ids  (required)
   * @return String
   * @throws ApiException if fails to make API call
   */
  public ApiResponse deleteMediaretentionpoliciesWithHttpInfo(String ids) throws ApiException {
    Object pclocalVarPostBody = null;
    
    // verify the required parameter 'ids' is set
    if (ids == null) {
      throw new ApiException(400, "Missing the required parameter 'ids' when calling deleteMediaretentionpolicies");
    }
    
    // create path and map variables
    String pclocalVarPath = "/api/v2/recording/mediaretentionpolicies".replaceAll("\\{format\\}","json");

    // query params
    List pclocalVarQueryParams = new ArrayList();
    Map pclocalVarHeaderParams = new HashMap();
    Map pclocalVarFormParams = new HashMap();

    pclocalVarQueryParams.addAll(pcapiClient.parameterToPairs("", "ids", ids));

    
    
    final String[] pclocalVarAccepts = {
      "application/json"
    };
    final String pclocalVarAccept = pcapiClient.selectHeaderAccept(pclocalVarAccepts);

    final String[] pclocalVarContentTypes = {
      "application/json"
    };
    final String pclocalVarContentType = pcapiClient.selectHeaderContentType(pclocalVarContentTypes);

    String[] pclocalVarAuthNames = new String[] { "PureCloud Auth" };

    return pcapiClient.invokeAPIVerbose(pclocalVarPath, "DELETE", pclocalVarQueryParams, pclocalVarPostBody, pclocalVarHeaderParams, pclocalVarFormParams, pclocalVarAccept, pclocalVarContentType, pclocalVarAuthNames, new TypeReference() {});
  }
  /**
   * Delete a media retention policy
   * 
   * @param policyId Policy ID (required)
   * @return String
   * @throws ApiException if fails to make API call
   */
  public String deleteMediaretentionpoliciesPolicyId(String policyId) throws ApiException {
    return deleteMediaretentionpoliciesPolicyIdWithHttpInfo(policyId).getResponseObject();
  }

  /**
   * Delete a media retention policy
   * 
   * @param policyId Policy ID (required)
   * @return String
   * @throws ApiException if fails to make API call
   */
  public ApiResponse deleteMediaretentionpoliciesPolicyIdWithHttpInfo(String policyId) throws ApiException {
    Object pclocalVarPostBody = null;
    
    // verify the required parameter 'policyId' is set
    if (policyId == null) {
      throw new ApiException(400, "Missing the required parameter 'policyId' when calling deleteMediaretentionpoliciesPolicyId");
    }
    
    // create path and map variables
    String pclocalVarPath = "/api/v2/recording/mediaretentionpolicies/{policyId}".replaceAll("\\{format\\}","json")
      .replaceAll("\\{" + "policyId" + "\\}", pcapiClient.escapeString(policyId.toString()));

    // query params
    List pclocalVarQueryParams = new ArrayList();
    Map pclocalVarHeaderParams = new HashMap();
    Map pclocalVarFormParams = new HashMap();


    
    
    final String[] pclocalVarAccepts = {
      "application/json"
    };
    final String pclocalVarAccept = pcapiClient.selectHeaderAccept(pclocalVarAccepts);

    final String[] pclocalVarContentTypes = {
      "application/json"
    };
    final String pclocalVarContentType = pcapiClient.selectHeaderContentType(pclocalVarContentTypes);

    String[] pclocalVarAuthNames = new String[] { "PureCloud Auth" };

    return pcapiClient.invokeAPIVerbose(pclocalVarPath, "DELETE", pclocalVarQueryParams, pclocalVarPostBody, pclocalVarHeaderParams, pclocalVarFormParams, pclocalVarAccept, pclocalVarContentType, pclocalVarAuthNames, new TypeReference() {});
  }
  /**
   * Deletes a single orphan recording
   * 
   * @param orphanId Orphan ID (required)
   * @return OrphanRecording
   * @throws ApiException if fails to make API call
   */
  public OrphanRecording deleteOrphanId(String orphanId) throws ApiException {
    return deleteOrphanIdWithHttpInfo(orphanId).getResponseObject();
  }

  /**
   * Deletes a single orphan recording
   * 
   * @param orphanId Orphan ID (required)
   * @return OrphanRecording
   * @throws ApiException if fails to make API call
   */
  public ApiResponse deleteOrphanIdWithHttpInfo(String orphanId) throws ApiException {
    Object pclocalVarPostBody = null;
    
    // verify the required parameter 'orphanId' is set
    if (orphanId == null) {
      throw new ApiException(400, "Missing the required parameter 'orphanId' when calling deleteOrphanId");
    }
    
    // create path and map variables
    String pclocalVarPath = "/api/v2/orphanrecordings/{orphanId}".replaceAll("\\{format\\}","json")
      .replaceAll("\\{" + "orphanId" + "\\}", pcapiClient.escapeString(orphanId.toString()));

    // query params
    List pclocalVarQueryParams = new ArrayList();
    Map pclocalVarHeaderParams = new HashMap();
    Map pclocalVarFormParams = new HashMap();


    
    
    final String[] pclocalVarAccepts = {
      "application/json"
    };
    final String pclocalVarAccept = pcapiClient.selectHeaderAccept(pclocalVarAccepts);

    final String[] pclocalVarContentTypes = {
      "application/json"
    };
    final String pclocalVarContentType = pcapiClient.selectHeaderContentType(pclocalVarContentTypes);

    String[] pclocalVarAuthNames = new String[] { "PureCloud Auth" };

    return pcapiClient.invokeAPIVerbose(pclocalVarPath, "DELETE", pclocalVarQueryParams, pclocalVarPostBody, pclocalVarHeaderParams, pclocalVarFormParams, pclocalVarAccept, pclocalVarContentType, pclocalVarAuthNames, new TypeReference() {});
  }
  /**
   * Get all of a Conversation's Recordings.
   * 
   * @param conversationId Conversation ID (required)
   * @param maxWaitMs The maximum number of milliseconds to wait for the recording to be ready. Must be a positive value. (optional, default to 5000)
   * @param formatId The desired media format (optional, default to WEBM)
   * @return List
   * @throws ApiException if fails to make API call
   */
  public List getConversationIdRecordings(String conversationId, Integer maxWaitMs, String formatId) throws ApiException {
    return getConversationIdRecordingsWithHttpInfo(conversationId, maxWaitMs, formatId).getResponseObject();
  }

  /**
   * Get all of a Conversation's Recordings.
   * 
   * @param conversationId Conversation ID (required)
   * @param maxWaitMs The maximum number of milliseconds to wait for the recording to be ready. Must be a positive value. (optional, default to 5000)
   * @param formatId The desired media format (optional, default to WEBM)
   * @return List
   * @throws ApiException if fails to make API call
   */
  public ApiResponse> getConversationIdRecordingsWithHttpInfo(String conversationId, Integer maxWaitMs, String formatId) throws ApiException {
    Object pclocalVarPostBody = null;
    
    // verify the required parameter 'conversationId' is set
    if (conversationId == null) {
      throw new ApiException(400, "Missing the required parameter 'conversationId' when calling getConversationIdRecordings");
    }
    
    // create path and map variables
    String pclocalVarPath = "/api/v2/conversations/{conversationId}/recordings".replaceAll("\\{format\\}","json")
      .replaceAll("\\{" + "conversationId" + "\\}", pcapiClient.escapeString(conversationId.toString()));

    // query params
    List pclocalVarQueryParams = new ArrayList();
    Map pclocalVarHeaderParams = new HashMap();
    Map pclocalVarFormParams = new HashMap();

    pclocalVarQueryParams.addAll(pcapiClient.parameterToPairs("", "maxWaitMs", maxWaitMs));
    pclocalVarQueryParams.addAll(pcapiClient.parameterToPairs("", "formatId", formatId));

    
    
    final String[] pclocalVarAccepts = {
      "application/json"
    };
    final String pclocalVarAccept = pcapiClient.selectHeaderAccept(pclocalVarAccepts);

    final String[] pclocalVarContentTypes = {
      "application/json"
    };
    final String pclocalVarContentType = pcapiClient.selectHeaderContentType(pclocalVarContentTypes);

    String[] pclocalVarAuthNames = new String[] { "PureCloud Auth" };

    return pcapiClient.invokeAPIVerbose(pclocalVarPath, "GET", pclocalVarQueryParams, pclocalVarPostBody, pclocalVarHeaderParams, pclocalVarFormParams, pclocalVarAccept, pclocalVarContentType, pclocalVarAuthNames, new TypeReference>() {});
  }
  /**
   * Gets a specific recording.
   * 
   * @param conversationId Conversation ID (required)
   * @param recordingId Recording ID (required)
   * @param formatId The desired media format. (optional, default to WEBM)
   * @param download requesting a download format of the recording (optional, default to false)
   * @param fileName the name of the downloaded fileName (optional)
   * @return Recording
   * @throws ApiException if fails to make API call
   */
  public Recording getConversationIdRecordingsRecordingId(String conversationId, String recordingId, String formatId, Boolean download, String fileName) throws ApiException {
    return getConversationIdRecordingsRecordingIdWithHttpInfo(conversationId, recordingId, formatId, download, fileName).getResponseObject();
  }

  /**
   * Gets a specific recording.
   * 
   * @param conversationId Conversation ID (required)
   * @param recordingId Recording ID (required)
   * @param formatId The desired media format. (optional, default to WEBM)
   * @param download requesting a download format of the recording (optional, default to false)
   * @param fileName the name of the downloaded fileName (optional)
   * @return Recording
   * @throws ApiException if fails to make API call
   */
  public ApiResponse getConversationIdRecordingsRecordingIdWithHttpInfo(String conversationId, String recordingId, String formatId, Boolean download, String fileName) throws ApiException {
    Object pclocalVarPostBody = null;
    
    // verify the required parameter 'conversationId' is set
    if (conversationId == null) {
      throw new ApiException(400, "Missing the required parameter 'conversationId' when calling getConversationIdRecordingsRecordingId");
    }
    
    // verify the required parameter 'recordingId' is set
    if (recordingId == null) {
      throw new ApiException(400, "Missing the required parameter 'recordingId' when calling getConversationIdRecordingsRecordingId");
    }
    
    // create path and map variables
    String pclocalVarPath = "/api/v2/conversations/{conversationId}/recordings/{recordingId}".replaceAll("\\{format\\}","json")
      .replaceAll("\\{" + "conversationId" + "\\}", pcapiClient.escapeString(conversationId.toString()))
      .replaceAll("\\{" + "recordingId" + "\\}", pcapiClient.escapeString(recordingId.toString()));

    // query params
    List pclocalVarQueryParams = new ArrayList();
    Map pclocalVarHeaderParams = new HashMap();
    Map pclocalVarFormParams = new HashMap();

    pclocalVarQueryParams.addAll(pcapiClient.parameterToPairs("", "formatId", formatId));
    pclocalVarQueryParams.addAll(pcapiClient.parameterToPairs("", "download", download));
    pclocalVarQueryParams.addAll(pcapiClient.parameterToPairs("", "fileName", fileName));

    
    
    final String[] pclocalVarAccepts = {
      "application/json"
    };
    final String pclocalVarAccept = pcapiClient.selectHeaderAccept(pclocalVarAccepts);

    final String[] pclocalVarContentTypes = {
      "application/json"
    };
    final String pclocalVarContentType = pcapiClient.selectHeaderContentType(pclocalVarContentTypes);

    String[] pclocalVarAuthNames = new String[] { "PureCloud Auth" };

    return pcapiClient.invokeAPIVerbose(pclocalVarPath, "GET", pclocalVarQueryParams, pclocalVarPostBody, pclocalVarHeaderParams, pclocalVarFormParams, pclocalVarAccept, pclocalVarContentType, pclocalVarAuthNames, new TypeReference() {});
  }
  /**
   * Get annotations for recording
   * 
   * @param conversationId Conversation ID (required)
   * @param recordingId Recording ID (required)
   * @return List
   * @throws ApiException if fails to make API call
   */
  public List getConversationIdRecordingsRecordingIdAnnotations(String conversationId, String recordingId) throws ApiException {
    return getConversationIdRecordingsRecordingIdAnnotationsWithHttpInfo(conversationId, recordingId).getResponseObject();
  }

  /**
   * Get annotations for recording
   * 
   * @param conversationId Conversation ID (required)
   * @param recordingId Recording ID (required)
   * @return List
   * @throws ApiException if fails to make API call
   */
  public ApiResponse> getConversationIdRecordingsRecordingIdAnnotationsWithHttpInfo(String conversationId, String recordingId) throws ApiException {
    Object pclocalVarPostBody = null;
    
    // verify the required parameter 'conversationId' is set
    if (conversationId == null) {
      throw new ApiException(400, "Missing the required parameter 'conversationId' when calling getConversationIdRecordingsRecordingIdAnnotations");
    }
    
    // verify the required parameter 'recordingId' is set
    if (recordingId == null) {
      throw new ApiException(400, "Missing the required parameter 'recordingId' when calling getConversationIdRecordingsRecordingIdAnnotations");
    }
    
    // create path and map variables
    String pclocalVarPath = "/api/v2/conversations/{conversationId}/recordings/{recordingId}/annotations".replaceAll("\\{format\\}","json")
      .replaceAll("\\{" + "conversationId" + "\\}", pcapiClient.escapeString(conversationId.toString()))
      .replaceAll("\\{" + "recordingId" + "\\}", pcapiClient.escapeString(recordingId.toString()));

    // query params
    List pclocalVarQueryParams = new ArrayList();
    Map pclocalVarHeaderParams = new HashMap();
    Map pclocalVarFormParams = new HashMap();


    
    
    final String[] pclocalVarAccepts = {
      "application/json"
    };
    final String pclocalVarAccept = pcapiClient.selectHeaderAccept(pclocalVarAccepts);

    final String[] pclocalVarContentTypes = {
      "application/json"
    };
    final String pclocalVarContentType = pcapiClient.selectHeaderContentType(pclocalVarContentTypes);

    String[] pclocalVarAuthNames = new String[] { "PureCloud Auth" };

    return pcapiClient.invokeAPIVerbose(pclocalVarPath, "GET", pclocalVarQueryParams, pclocalVarPostBody, pclocalVarHeaderParams, pclocalVarFormParams, pclocalVarAccept, pclocalVarContentType, pclocalVarAuthNames, new TypeReference>() {});
  }
  /**
   * Get annotation
   * 
   * @param conversationId Conversation ID (required)
   * @param recordingId Recording ID (required)
   * @param annotationId Annotation ID (required)
   * @return Annotation
   * @throws ApiException if fails to make API call
   */
  public Annotation getConversationIdRecordingsRecordingIdAnnotationsAnnotationId(String conversationId, String recordingId, String annotationId) throws ApiException {
    return getConversationIdRecordingsRecordingIdAnnotationsAnnotationIdWithHttpInfo(conversationId, recordingId, annotationId).getResponseObject();
  }

  /**
   * Get annotation
   * 
   * @param conversationId Conversation ID (required)
   * @param recordingId Recording ID (required)
   * @param annotationId Annotation ID (required)
   * @return Annotation
   * @throws ApiException if fails to make API call
   */
  public ApiResponse getConversationIdRecordingsRecordingIdAnnotationsAnnotationIdWithHttpInfo(String conversationId, String recordingId, String annotationId) throws ApiException {
    Object pclocalVarPostBody = null;
    
    // verify the required parameter 'conversationId' is set
    if (conversationId == null) {
      throw new ApiException(400, "Missing the required parameter 'conversationId' when calling getConversationIdRecordingsRecordingIdAnnotationsAnnotationId");
    }
    
    // verify the required parameter 'recordingId' is set
    if (recordingId == null) {
      throw new ApiException(400, "Missing the required parameter 'recordingId' when calling getConversationIdRecordingsRecordingIdAnnotationsAnnotationId");
    }
    
    // verify the required parameter 'annotationId' is set
    if (annotationId == null) {
      throw new ApiException(400, "Missing the required parameter 'annotationId' when calling getConversationIdRecordingsRecordingIdAnnotationsAnnotationId");
    }
    
    // create path and map variables
    String pclocalVarPath = "/api/v2/conversations/{conversationId}/recordings/{recordingId}/annotations/{annotationId}".replaceAll("\\{format\\}","json")
      .replaceAll("\\{" + "conversationId" + "\\}", pcapiClient.escapeString(conversationId.toString()))
      .replaceAll("\\{" + "recordingId" + "\\}", pcapiClient.escapeString(recordingId.toString()))
      .replaceAll("\\{" + "annotationId" + "\\}", pcapiClient.escapeString(annotationId.toString()));

    // query params
    List pclocalVarQueryParams = new ArrayList();
    Map pclocalVarHeaderParams = new HashMap();
    Map pclocalVarFormParams = new HashMap();


    
    
    final String[] pclocalVarAccepts = {
      "application/json"
    };
    final String pclocalVarAccept = pcapiClient.selectHeaderAccept(pclocalVarAccepts);

    final String[] pclocalVarContentTypes = {
      "application/json"
    };
    final String pclocalVarContentType = pcapiClient.selectHeaderContentType(pclocalVarContentTypes);

    String[] pclocalVarAuthNames = new String[] { "PureCloud Auth" };

    return pcapiClient.invokeAPIVerbose(pclocalVarPath, "GET", pclocalVarQueryParams, pclocalVarPostBody, pclocalVarHeaderParams, pclocalVarFormParams, pclocalVarAccept, pclocalVarContentType, pclocalVarAuthNames, new TypeReference() {});
  }
  /**
   * gets a list local key settings data
   * 
   * @return LocalEncryptionConfigurationListing
   * @throws ApiException if fails to make API call
   */
  public LocalEncryptionConfigurationListing getLocalkeysSettings() throws ApiException {
    return getLocalkeysSettingsWithHttpInfo().getResponseObject();
  }

  /**
   * gets a list local key settings data
   * 
   * @return LocalEncryptionConfigurationListing
   * @throws ApiException if fails to make API call
   */
  public ApiResponse getLocalkeysSettingsWithHttpInfo() throws ApiException {
    Object pclocalVarPostBody = null;
    
    // create path and map variables
    String pclocalVarPath = "/api/v2/recording/localkeys/settings".replaceAll("\\{format\\}","json");

    // query params
    List pclocalVarQueryParams = new ArrayList();
    Map pclocalVarHeaderParams = new HashMap();
    Map pclocalVarFormParams = new HashMap();


    
    
    final String[] pclocalVarAccepts = {
      "application/json"
    };
    final String pclocalVarAccept = pcapiClient.selectHeaderAccept(pclocalVarAccepts);

    final String[] pclocalVarContentTypes = {
      "application/json"
    };
    final String pclocalVarContentType = pcapiClient.selectHeaderContentType(pclocalVarContentTypes);

    String[] pclocalVarAuthNames = new String[] { "PureCloud Auth" };

    return pcapiClient.invokeAPIVerbose(pclocalVarPath, "GET", pclocalVarQueryParams, pclocalVarPostBody, pclocalVarHeaderParams, pclocalVarFormParams, pclocalVarAccept, pclocalVarContentType, pclocalVarAuthNames, new TypeReference() {});
  }
  /**
   * Get the local encryption settings
   * 
   * @param settingsId Settings Id (required)
   * @return LocalEncryptionConfiguration
   * @throws ApiException if fails to make API call
   */
  public LocalEncryptionConfiguration getLocalkeysSettingsSettingsId(String settingsId) throws ApiException {
    return getLocalkeysSettingsSettingsIdWithHttpInfo(settingsId).getResponseObject();
  }

  /**
   * Get the local encryption settings
   * 
   * @param settingsId Settings Id (required)
   * @return LocalEncryptionConfiguration
   * @throws ApiException if fails to make API call
   */
  public ApiResponse getLocalkeysSettingsSettingsIdWithHttpInfo(String settingsId) throws ApiException {
    Object pclocalVarPostBody = null;
    
    // verify the required parameter 'settingsId' is set
    if (settingsId == null) {
      throw new ApiException(400, "Missing the required parameter 'settingsId' when calling getLocalkeysSettingsSettingsId");
    }
    
    // create path and map variables
    String pclocalVarPath = "/api/v2/recording/localkeys/settings/{settingsId}".replaceAll("\\{format\\}","json")
      .replaceAll("\\{" + "settingsId" + "\\}", pcapiClient.escapeString(settingsId.toString()));

    // query params
    List pclocalVarQueryParams = new ArrayList();
    Map pclocalVarHeaderParams = new HashMap();
    Map pclocalVarFormParams = new HashMap();


    
    
    final String[] pclocalVarAccepts = {
      "application/json"
    };
    final String pclocalVarAccept = pcapiClient.selectHeaderAccept(pclocalVarAccepts);

    final String[] pclocalVarContentTypes = {
      "application/json"
    };
    final String pclocalVarContentType = pcapiClient.selectHeaderContentType(pclocalVarContentTypes);

    String[] pclocalVarAuthNames = new String[] { "PureCloud Auth" };

    return pcapiClient.invokeAPIVerbose(pclocalVarPath, "GET", pclocalVarQueryParams, pclocalVarPostBody, pclocalVarHeaderParams, pclocalVarFormParams, pclocalVarAccept, pclocalVarContentType, pclocalVarAuthNames, new TypeReference() {});
  }
  /**
   * Gets media retention policy list with query options to filter on name and enabled.
   * for a less verbose response, add summary=true to this endpoint
   * @param pageSize The total page size requested (optional, default to 25)
   * @param pageNumber The page number requested (optional, default to 1)
   * @param sortBy variable name requested to sort by (optional)
   * @param expand variable name requested by expand list (optional)
   * @param nextPage next page token (optional)
   * @param previousPage Previous page token (optional)
   * @param name the policy name - used for filtering results in searches. (optional)
   * @param enabled checks to see if policy is enabled - use enabled = true or enabled = false (optional)
   * @param summary provides a less verbose response of policy lists. (optional, default to false)
   * @param hasErrors provides a way to fetch all policies with errors or policies that do not have errors (optional)
   * @return PolicyEntityListing
   * @throws ApiException if fails to make API call
   */
  public PolicyEntityListing getMediaretentionpolicies(Integer pageSize, Integer pageNumber, String sortBy, List expand, String nextPage, String previousPage, String name, Boolean enabled, Boolean summary, Boolean hasErrors) throws ApiException {
    return getMediaretentionpoliciesWithHttpInfo(pageSize, pageNumber, sortBy, expand, nextPage, previousPage, name, enabled, summary, hasErrors).getResponseObject();
  }

  /**
   * Gets media retention policy list with query options to filter on name and enabled.
   * for a less verbose response, add summary=true to this endpoint
   * @param pageSize The total page size requested (optional, default to 25)
   * @param pageNumber The page number requested (optional, default to 1)
   * @param sortBy variable name requested to sort by (optional)
   * @param expand variable name requested by expand list (optional)
   * @param nextPage next page token (optional)
   * @param previousPage Previous page token (optional)
   * @param name the policy name - used for filtering results in searches. (optional)
   * @param enabled checks to see if policy is enabled - use enabled = true or enabled = false (optional)
   * @param summary provides a less verbose response of policy lists. (optional, default to false)
   * @param hasErrors provides a way to fetch all policies with errors or policies that do not have errors (optional)
   * @return PolicyEntityListing
   * @throws ApiException if fails to make API call
   */
  public ApiResponse getMediaretentionpoliciesWithHttpInfo(Integer pageSize, Integer pageNumber, String sortBy, List expand, String nextPage, String previousPage, String name, Boolean enabled, Boolean summary, Boolean hasErrors) throws ApiException {
    Object pclocalVarPostBody = null;
    
    // create path and map variables
    String pclocalVarPath = "/api/v2/recording/mediaretentionpolicies".replaceAll("\\{format\\}","json");

    // query params
    List pclocalVarQueryParams = new ArrayList();
    Map pclocalVarHeaderParams = new HashMap();
    Map pclocalVarFormParams = new HashMap();

    pclocalVarQueryParams.addAll(pcapiClient.parameterToPairs("", "pageSize", pageSize));
    pclocalVarQueryParams.addAll(pcapiClient.parameterToPairs("", "pageNumber", pageNumber));
    pclocalVarQueryParams.addAll(pcapiClient.parameterToPairs("", "sortBy", sortBy));
    pclocalVarQueryParams.addAll(pcapiClient.parameterToPairs("multi", "expand", expand));
    pclocalVarQueryParams.addAll(pcapiClient.parameterToPairs("", "nextPage", nextPage));
    pclocalVarQueryParams.addAll(pcapiClient.parameterToPairs("", "previousPage", previousPage));
    pclocalVarQueryParams.addAll(pcapiClient.parameterToPairs("", "name", name));
    pclocalVarQueryParams.addAll(pcapiClient.parameterToPairs("", "enabled", enabled));
    pclocalVarQueryParams.addAll(pcapiClient.parameterToPairs("", "summary", summary));
    pclocalVarQueryParams.addAll(pcapiClient.parameterToPairs("", "hasErrors", hasErrors));

    
    
    final String[] pclocalVarAccepts = {
      "application/json"
    };
    final String pclocalVarAccept = pcapiClient.selectHeaderAccept(pclocalVarAccepts);

    final String[] pclocalVarContentTypes = {
      "application/json"
    };
    final String pclocalVarContentType = pcapiClient.selectHeaderContentType(pclocalVarContentTypes);

    String[] pclocalVarAuthNames = new String[] { "PureCloud Auth" };

    return pcapiClient.invokeAPIVerbose(pclocalVarPath, "GET", pclocalVarQueryParams, pclocalVarPostBody, pclocalVarHeaderParams, pclocalVarFormParams, pclocalVarAccept, pclocalVarContentType, pclocalVarAuthNames, new TypeReference() {});
  }
  /**
   * Get a media retention policy
   * 
   * @param policyId Policy ID (required)
   * @return Policy
   * @throws ApiException if fails to make API call
   */
  public Policy getMediaretentionpoliciesPolicyId(String policyId) throws ApiException {
    return getMediaretentionpoliciesPolicyIdWithHttpInfo(policyId).getResponseObject();
  }

  /**
   * Get a media retention policy
   * 
   * @param policyId Policy ID (required)
   * @return Policy
   * @throws ApiException if fails to make API call
   */
  public ApiResponse getMediaretentionpoliciesPolicyIdWithHttpInfo(String policyId) throws ApiException {
    Object pclocalVarPostBody = null;
    
    // verify the required parameter 'policyId' is set
    if (policyId == null) {
      throw new ApiException(400, "Missing the required parameter 'policyId' when calling getMediaretentionpoliciesPolicyId");
    }
    
    // create path and map variables
    String pclocalVarPath = "/api/v2/recording/mediaretentionpolicies/{policyId}".replaceAll("\\{format\\}","json")
      .replaceAll("\\{" + "policyId" + "\\}", pcapiClient.escapeString(policyId.toString()));

    // query params
    List pclocalVarQueryParams = new ArrayList();
    Map pclocalVarHeaderParams = new HashMap();
    Map pclocalVarFormParams = new HashMap();


    
    
    final String[] pclocalVarAccepts = {
      "application/json"
    };
    final String pclocalVarAccept = pcapiClient.selectHeaderAccept(pclocalVarAccepts);

    final String[] pclocalVarContentTypes = {
      "application/json"
    };
    final String pclocalVarContentType = pcapiClient.selectHeaderContentType(pclocalVarContentTypes);

    String[] pclocalVarAuthNames = new String[] { "PureCloud Auth" };

    return pcapiClient.invokeAPIVerbose(pclocalVarPath, "GET", pclocalVarQueryParams, pclocalVarPostBody, pclocalVarHeaderParams, pclocalVarFormParams, pclocalVarAccept, pclocalVarContentType, pclocalVarAuthNames, new TypeReference() {});
  }
  /**
   * Gets a single orphan recording
   * 
   * @param orphanId Orphan ID (required)
   * @return OrphanRecording
   * @throws ApiException if fails to make API call
   */
  public OrphanRecording getOrphanId(String orphanId) throws ApiException {
    return getOrphanIdWithHttpInfo(orphanId).getResponseObject();
  }

  /**
   * Gets a single orphan recording
   * 
   * @param orphanId Orphan ID (required)
   * @return OrphanRecording
   * @throws ApiException if fails to make API call
   */
  public ApiResponse getOrphanIdWithHttpInfo(String orphanId) throws ApiException {
    Object pclocalVarPostBody = null;
    
    // verify the required parameter 'orphanId' is set
    if (orphanId == null) {
      throw new ApiException(400, "Missing the required parameter 'orphanId' when calling getOrphanId");
    }
    
    // create path and map variables
    String pclocalVarPath = "/api/v2/orphanrecordings/{orphanId}".replaceAll("\\{format\\}","json")
      .replaceAll("\\{" + "orphanId" + "\\}", pcapiClient.escapeString(orphanId.toString()));

    // query params
    List pclocalVarQueryParams = new ArrayList();
    Map pclocalVarHeaderParams = new HashMap();
    Map pclocalVarFormParams = new HashMap();


    
    
    final String[] pclocalVarAccepts = {
      "application/json"
    };
    final String pclocalVarAccept = pcapiClient.selectHeaderAccept(pclocalVarAccepts);

    final String[] pclocalVarContentTypes = {
      "application/json"
    };
    final String pclocalVarContentType = pcapiClient.selectHeaderContentType(pclocalVarContentTypes);

    String[] pclocalVarAuthNames = new String[] { "PureCloud Auth" };

    return pcapiClient.invokeAPIVerbose(pclocalVarPath, "GET", pclocalVarQueryParams, pclocalVarPostBody, pclocalVarHeaderParams, pclocalVarFormParams, pclocalVarAccept, pclocalVarContentType, pclocalVarAuthNames, new TypeReference() {});
  }
  /**
   * Gets the media of a single orphan recording
   * A 202 response means the orphaned media is currently transcoding and will be available shortly.A 200 response denotes the transcoded orphan media is available now and is contained in the response body.
   * @param orphanId Orphan ID (required)
   * @param formatId The desired media format. (optional, default to WEBM)
   * @param download requesting a download format of the recording (optional, default to false)
   * @param fileName the name of the downloaded fileName (optional)
   * @return Recording
   * @throws ApiException if fails to make API call
   */
  public Recording getOrphanIdMedia(String orphanId, String formatId, Boolean download, String fileName) throws ApiException {
    return getOrphanIdMediaWithHttpInfo(orphanId, formatId, download, fileName).getResponseObject();
  }

  /**
   * Gets the media of a single orphan recording
   * A 202 response means the orphaned media is currently transcoding and will be available shortly.A 200 response denotes the transcoded orphan media is available now and is contained in the response body.
   * @param orphanId Orphan ID (required)
   * @param formatId The desired media format. (optional, default to WEBM)
   * @param download requesting a download format of the recording (optional, default to false)
   * @param fileName the name of the downloaded fileName (optional)
   * @return Recording
   * @throws ApiException if fails to make API call
   */
  public ApiResponse getOrphanIdMediaWithHttpInfo(String orphanId, String formatId, Boolean download, String fileName) throws ApiException {
    Object pclocalVarPostBody = null;
    
    // verify the required parameter 'orphanId' is set
    if (orphanId == null) {
      throw new ApiException(400, "Missing the required parameter 'orphanId' when calling getOrphanIdMedia");
    }
    
    // create path and map variables
    String pclocalVarPath = "/api/v2/orphanrecordings/{orphanId}/media".replaceAll("\\{format\\}","json")
      .replaceAll("\\{" + "orphanId" + "\\}", pcapiClient.escapeString(orphanId.toString()));

    // query params
    List pclocalVarQueryParams = new ArrayList();
    Map pclocalVarHeaderParams = new HashMap();
    Map pclocalVarFormParams = new HashMap();

    pclocalVarQueryParams.addAll(pcapiClient.parameterToPairs("", "formatId", formatId));
    pclocalVarQueryParams.addAll(pcapiClient.parameterToPairs("", "download", download));
    pclocalVarQueryParams.addAll(pcapiClient.parameterToPairs("", "fileName", fileName));

    
    
    final String[] pclocalVarAccepts = {
      "application/json"
    };
    final String pclocalVarAccept = pcapiClient.selectHeaderAccept(pclocalVarAccepts);

    final String[] pclocalVarContentTypes = {
      "application/json"
    };
    final String pclocalVarContentType = pcapiClient.selectHeaderContentType(pclocalVarContentTypes);

    String[] pclocalVarAuthNames = new String[] { "PureCloud Auth" };

    return pcapiClient.invokeAPIVerbose(pclocalVarPath, "GET", pclocalVarQueryParams, pclocalVarPostBody, pclocalVarHeaderParams, pclocalVarFormParams, pclocalVarAccept, pclocalVarContentType, pclocalVarAuthNames, new TypeReference() {});
  }
  /**
   * Gets all orphan recordings
   * 
   * @param pageSize The total page size requested (optional, default to 25)
   * @param pageNumber The page number requested (optional, default to 1)
   * @param sortBy variable name requested to sort by (optional)
   * @param expand variable name requested by expand list (optional)
   * @param nextPage next page token (optional)
   * @param previousPage Previous page token (optional)
   * @param hasConversation Filter resulting orphans by whether the conversation is known. False returns all orphans for the organization. (optional, default to false)
   * @return OrphanRecordingListing
   * @throws ApiException if fails to make API call
   */
  public OrphanRecordingListing getOrphanrecordings(Integer pageSize, Integer pageNumber, String sortBy, List expand, String nextPage, String previousPage, Boolean hasConversation) throws ApiException {
    return getOrphanrecordingsWithHttpInfo(pageSize, pageNumber, sortBy, expand, nextPage, previousPage, hasConversation).getResponseObject();
  }

  /**
   * Gets all orphan recordings
   * 
   * @param pageSize The total page size requested (optional, default to 25)
   * @param pageNumber The page number requested (optional, default to 1)
   * @param sortBy variable name requested to sort by (optional)
   * @param expand variable name requested by expand list (optional)
   * @param nextPage next page token (optional)
   * @param previousPage Previous page token (optional)
   * @param hasConversation Filter resulting orphans by whether the conversation is known. False returns all orphans for the organization. (optional, default to false)
   * @return OrphanRecordingListing
   * @throws ApiException if fails to make API call
   */
  public ApiResponse getOrphanrecordingsWithHttpInfo(Integer pageSize, Integer pageNumber, String sortBy, List expand, String nextPage, String previousPage, Boolean hasConversation) throws ApiException {
    Object pclocalVarPostBody = null;
    
    // create path and map variables
    String pclocalVarPath = "/api/v2/orphanrecordings".replaceAll("\\{format\\}","json");

    // query params
    List pclocalVarQueryParams = new ArrayList();
    Map pclocalVarHeaderParams = new HashMap();
    Map pclocalVarFormParams = new HashMap();

    pclocalVarQueryParams.addAll(pcapiClient.parameterToPairs("", "pageSize", pageSize));
    pclocalVarQueryParams.addAll(pcapiClient.parameterToPairs("", "pageNumber", pageNumber));
    pclocalVarQueryParams.addAll(pcapiClient.parameterToPairs("", "sortBy", sortBy));
    pclocalVarQueryParams.addAll(pcapiClient.parameterToPairs("multi", "expand", expand));
    pclocalVarQueryParams.addAll(pcapiClient.parameterToPairs("", "nextPage", nextPage));
    pclocalVarQueryParams.addAll(pcapiClient.parameterToPairs("", "previousPage", previousPage));
    pclocalVarQueryParams.addAll(pcapiClient.parameterToPairs("", "hasConversation", hasConversation));

    
    
    final String[] pclocalVarAccepts = {
      "application/json"
    };
    final String pclocalVarAccept = pcapiClient.selectHeaderAccept(pclocalVarAccepts);

    final String[] pclocalVarContentTypes = {
      "application/json"
    };
    final String pclocalVarContentType = pcapiClient.selectHeaderContentType(pclocalVarContentTypes);

    String[] pclocalVarAuthNames = new String[] { "PureCloud Auth" };

    return pcapiClient.invokeAPIVerbose(pclocalVarPath, "GET", pclocalVarQueryParams, pclocalVarPostBody, pclocalVarHeaderParams, pclocalVarFormParams, pclocalVarAccept, pclocalVarContentType, pclocalVarAuthNames, new TypeReference() {});
  }
  /**
   * Get encryption key list
   * 
   * @param pageSize Page size (optional, default to 25)
   * @param pageNumber Page number (optional, default to 1)
   * @return EncryptionKeyEntityListing
   * @throws ApiException if fails to make API call
   */
  public EncryptionKeyEntityListing getRecordingkeys(Integer pageSize, Integer pageNumber) throws ApiException {
    return getRecordingkeysWithHttpInfo(pageSize, pageNumber).getResponseObject();
  }

  /**
   * Get encryption key list
   * 
   * @param pageSize Page size (optional, default to 25)
   * @param pageNumber Page number (optional, default to 1)
   * @return EncryptionKeyEntityListing
   * @throws ApiException if fails to make API call
   */
  public ApiResponse getRecordingkeysWithHttpInfo(Integer pageSize, Integer pageNumber) throws ApiException {
    Object pclocalVarPostBody = null;
    
    // create path and map variables
    String pclocalVarPath = "/api/v2/recording/recordingkeys".replaceAll("\\{format\\}","json");

    // query params
    List pclocalVarQueryParams = new ArrayList();
    Map pclocalVarHeaderParams = new HashMap();
    Map pclocalVarFormParams = new HashMap();

    pclocalVarQueryParams.addAll(pcapiClient.parameterToPairs("", "pageSize", pageSize));
    pclocalVarQueryParams.addAll(pcapiClient.parameterToPairs("", "pageNumber", pageNumber));

    
    
    final String[] pclocalVarAccepts = {
      "application/json"
    };
    final String pclocalVarAccept = pcapiClient.selectHeaderAccept(pclocalVarAccepts);

    final String[] pclocalVarContentTypes = {
      "application/json"
    };
    final String pclocalVarContentType = pcapiClient.selectHeaderContentType(pclocalVarContentTypes);

    String[] pclocalVarAuthNames = new String[] { "PureCloud Auth" };

    return pcapiClient.invokeAPIVerbose(pclocalVarPath, "GET", pclocalVarQueryParams, pclocalVarPostBody, pclocalVarHeaderParams, pclocalVarFormParams, pclocalVarAccept, pclocalVarContentType, pclocalVarAuthNames, new TypeReference() {});
  }
  /**
   * Get key rotation schedule
   * 
   * @return KeyRotationSchedule
   * @throws ApiException if fails to make API call
   */
  public KeyRotationSchedule getRecordingkeysRotationschedule() throws ApiException {
    return getRecordingkeysRotationscheduleWithHttpInfo().getResponseObject();
  }

  /**
   * Get key rotation schedule
   * 
   * @return KeyRotationSchedule
   * @throws ApiException if fails to make API call
   */
  public ApiResponse getRecordingkeysRotationscheduleWithHttpInfo() throws ApiException {
    Object pclocalVarPostBody = null;
    
    // create path and map variables
    String pclocalVarPath = "/api/v2/recording/recordingkeys/rotationschedule".replaceAll("\\{format\\}","json");

    // query params
    List pclocalVarQueryParams = new ArrayList();
    Map pclocalVarHeaderParams = new HashMap();
    Map pclocalVarFormParams = new HashMap();


    
    
    final String[] pclocalVarAccepts = {
      "application/json"
    };
    final String pclocalVarAccept = pcapiClient.selectHeaderAccept(pclocalVarAccepts);

    final String[] pclocalVarContentTypes = {
      "application/json"
    };
    final String pclocalVarContentType = pcapiClient.selectHeaderContentType(pclocalVarContentTypes);

    String[] pclocalVarAuthNames = new String[] { "PureCloud Auth" };

    return pcapiClient.invokeAPIVerbose(pclocalVarPath, "GET", pclocalVarQueryParams, pclocalVarPostBody, pclocalVarHeaderParams, pclocalVarFormParams, pclocalVarAccept, pclocalVarContentType, pclocalVarAuthNames, new TypeReference() {});
  }
  /**
   * Get the Recording Settings for the Organization
   * 
   * @param createDefault If no settings are found, a new one is created with default values (optional, default to false)
   * @return RecordingSettings
   * @throws ApiException if fails to make API call
   */
  public RecordingSettings getSettings(Boolean createDefault) throws ApiException {
    return getSettingsWithHttpInfo(createDefault).getResponseObject();
  }

  /**
   * Get the Recording Settings for the Organization
   * 
   * @param createDefault If no settings are found, a new one is created with default values (optional, default to false)
   * @return RecordingSettings
   * @throws ApiException if fails to make API call
   */
  public ApiResponse getSettingsWithHttpInfo(Boolean createDefault) throws ApiException {
    Object pclocalVarPostBody = null;
    
    // create path and map variables
    String pclocalVarPath = "/api/v2/recording/settings".replaceAll("\\{format\\}","json");

    // query params
    List pclocalVarQueryParams = new ArrayList();
    Map pclocalVarHeaderParams = new HashMap();
    Map pclocalVarFormParams = new HashMap();

    pclocalVarQueryParams.addAll(pcapiClient.parameterToPairs("", "createDefault", createDefault));

    
    
    final String[] pclocalVarAccepts = {
      "application/json"
    };
    final String pclocalVarAccept = pcapiClient.selectHeaderAccept(pclocalVarAccepts);

    final String[] pclocalVarContentTypes = {
      "application/json"
    };
    final String pclocalVarContentType = pcapiClient.selectHeaderContentType(pclocalVarContentTypes);

    String[] pclocalVarAuthNames = new String[] { "PureCloud Auth" };

    return pcapiClient.invokeAPIVerbose(pclocalVarPath, "GET", pclocalVarQueryParams, pclocalVarPostBody, pclocalVarHeaderParams, pclocalVarFormParams, pclocalVarAccept, pclocalVarContentType, pclocalVarAuthNames, new TypeReference() {});
  }
  /**
   * Retrieves a paged listing of screen recording sessions
   * 
   * @param pageSize Page size (optional, default to 25)
   * @param pageNumber Page number (optional, default to 1)
   * @return ScreenRecordingSessionListing
   * @throws ApiException if fails to make API call
   */
  public ScreenRecordingSessionListing getsScreensessions(Integer pageSize, Integer pageNumber) throws ApiException {
    return getsScreensessionsWithHttpInfo(pageSize, pageNumber).getResponseObject();
  }

  /**
   * Retrieves a paged listing of screen recording sessions
   * 
   * @param pageSize Page size (optional, default to 25)
   * @param pageNumber Page number (optional, default to 1)
   * @return ScreenRecordingSessionListing
   * @throws ApiException if fails to make API call
   */
  public ApiResponse getsScreensessionsWithHttpInfo(Integer pageSize, Integer pageNumber) throws ApiException {
    Object pclocalVarPostBody = null;
    
    // create path and map variables
    String pclocalVarPath = "/api/v2/recordings/screensessions".replaceAll("\\{format\\}","json");

    // query params
    List pclocalVarQueryParams = new ArrayList();
    Map pclocalVarHeaderParams = new HashMap();
    Map pclocalVarFormParams = new HashMap();

    pclocalVarQueryParams.addAll(pcapiClient.parameterToPairs("", "pageSize", pageSize));
    pclocalVarQueryParams.addAll(pcapiClient.parameterToPairs("", "pageNumber", pageNumber));

    
    
    final String[] pclocalVarAccepts = {
      "application/json"
    };
    final String pclocalVarAccept = pcapiClient.selectHeaderAccept(pclocalVarAccepts);

    final String[] pclocalVarContentTypes = {
      "application/json"
    };
    final String pclocalVarContentType = pcapiClient.selectHeaderContentType(pclocalVarContentTypes);

    String[] pclocalVarAuthNames = new String[] { "PureCloud Auth" };

    return pcapiClient.invokeAPIVerbose(pclocalVarPath, "GET", pclocalVarQueryParams, pclocalVarPostBody, pclocalVarHeaderParams, pclocalVarFormParams, pclocalVarAccept, pclocalVarContentType, pclocalVarAuthNames, new TypeReference() {});
  }
  /**
   * Patch a media retention policy
   * 
   * @param policyId Policy ID (required)
   * @param body Policy (required)
   * @return Policy
   * @throws ApiException if fails to make API call
   */
  public Policy patchMediaretentionpoliciesPolicyId(String policyId, Policy body) throws ApiException {
    return patchMediaretentionpoliciesPolicyIdWithHttpInfo(policyId, body).getResponseObject();
  }

  /**
   * Patch a media retention policy
   * 
   * @param policyId Policy ID (required)
   * @param body Policy (required)
   * @return Policy
   * @throws ApiException if fails to make API call
   */
  public ApiResponse patchMediaretentionpoliciesPolicyIdWithHttpInfo(String policyId, Policy body) throws ApiException {
    Object pclocalVarPostBody = body;
    
    // verify the required parameter 'policyId' is set
    if (policyId == null) {
      throw new ApiException(400, "Missing the required parameter 'policyId' when calling patchMediaretentionpoliciesPolicyId");
    }
    
    // verify the required parameter 'body' is set
    if (body == null) {
      throw new ApiException(400, "Missing the required parameter 'body' when calling patchMediaretentionpoliciesPolicyId");
    }
    
    // create path and map variables
    String pclocalVarPath = "/api/v2/recording/mediaretentionpolicies/{policyId}".replaceAll("\\{format\\}","json")
      .replaceAll("\\{" + "policyId" + "\\}", pcapiClient.escapeString(policyId.toString()));

    // query params
    List pclocalVarQueryParams = new ArrayList();
    Map pclocalVarHeaderParams = new HashMap();
    Map pclocalVarFormParams = new HashMap();


    
    
    final String[] pclocalVarAccepts = {
      "application/json"
    };
    final String pclocalVarAccept = pcapiClient.selectHeaderAccept(pclocalVarAccepts);

    final String[] pclocalVarContentTypes = {
      "application/json"
    };
    final String pclocalVarContentType = pcapiClient.selectHeaderContentType(pclocalVarContentTypes);

    String[] pclocalVarAuthNames = new String[] { "PureCloud Auth" };

    return pcapiClient.invokeAPIVerbose(pclocalVarPath, "PATCH", pclocalVarQueryParams, pclocalVarPostBody, pclocalVarHeaderParams, pclocalVarFormParams, pclocalVarAccept, pclocalVarContentType, pclocalVarAuthNames, new TypeReference() {});
  }
  /**
   * Update a screen recording session
   * 
   * @param recordingSessionId Screen recording session ID (required)
   * @param body  (optional)
   * @throws ApiException if fails to make API call
   */
  public void patchsScreensessionsRecordingsessionId(String recordingSessionId, ScreenRecordingSessionRequest body) throws ApiException {
    patchsScreensessionsRecordingsessionIdWithHttpInfo(recordingSessionId, body);
  }

  /**
   * Update a screen recording session
   * 
   * @param recordingSessionId Screen recording session ID (required)
   * @param body  (optional)
   * @throws ApiException if fails to make API call
   */
  public ApiResponse patchsScreensessionsRecordingsessionIdWithHttpInfo(String recordingSessionId, ScreenRecordingSessionRequest body) throws ApiException {
    Object pclocalVarPostBody = body;
    
    // verify the required parameter 'recordingSessionId' is set
    if (recordingSessionId == null) {
      throw new ApiException(400, "Missing the required parameter 'recordingSessionId' when calling patchsScreensessionsRecordingsessionId");
    }
    
    // create path and map variables
    String pclocalVarPath = "/api/v2/recordings/screensessions/{recordingSessionId}".replaceAll("\\{format\\}","json")
      .replaceAll("\\{" + "recordingSessionId" + "\\}", pcapiClient.escapeString(recordingSessionId.toString()));

    // query params
    List pclocalVarQueryParams = new ArrayList();
    Map pclocalVarHeaderParams = new HashMap();
    Map pclocalVarFormParams = new HashMap();


    
    
    final String[] pclocalVarAccepts = {
      "application/json"
    };
    final String pclocalVarAccept = pcapiClient.selectHeaderAccept(pclocalVarAccepts);

    final String[] pclocalVarContentTypes = {
      "application/json"
    };
    final String pclocalVarContentType = pcapiClient.selectHeaderContentType(pclocalVarContentTypes);

    String[] pclocalVarAuthNames = new String[] { "PureCloud Auth" };

    return pcapiClient.invokeAPIVerbose(pclocalVarPath, "PATCH", pclocalVarQueryParams, pclocalVarPostBody, pclocalVarHeaderParams, pclocalVarFormParams, pclocalVarAccept, pclocalVarContentType, pclocalVarAuthNames, null);
  }
  /**
   * Create annotation
   * 
   * @param conversationId Conversation ID (required)
   * @param recordingId Recording ID (required)
   * @param body annotation (required)
   * @return Annotation
   * @throws ApiException if fails to make API call
   */
  public Annotation postConversationIdRecordingsRecordingIdAnnotations(String conversationId, String recordingId, Annotation body) throws ApiException {
    return postConversationIdRecordingsRecordingIdAnnotationsWithHttpInfo(conversationId, recordingId, body).getResponseObject();
  }

  /**
   * Create annotation
   * 
   * @param conversationId Conversation ID (required)
   * @param recordingId Recording ID (required)
   * @param body annotation (required)
   * @return Annotation
   * @throws ApiException if fails to make API call
   */
  public ApiResponse postConversationIdRecordingsRecordingIdAnnotationsWithHttpInfo(String conversationId, String recordingId, Annotation body) throws ApiException {
    Object pclocalVarPostBody = body;
    
    // verify the required parameter 'conversationId' is set
    if (conversationId == null) {
      throw new ApiException(400, "Missing the required parameter 'conversationId' when calling postConversationIdRecordingsRecordingIdAnnotations");
    }
    
    // verify the required parameter 'recordingId' is set
    if (recordingId == null) {
      throw new ApiException(400, "Missing the required parameter 'recordingId' when calling postConversationIdRecordingsRecordingIdAnnotations");
    }
    
    // verify the required parameter 'body' is set
    if (body == null) {
      throw new ApiException(400, "Missing the required parameter 'body' when calling postConversationIdRecordingsRecordingIdAnnotations");
    }
    
    // create path and map variables
    String pclocalVarPath = "/api/v2/conversations/{conversationId}/recordings/{recordingId}/annotations".replaceAll("\\{format\\}","json")
      .replaceAll("\\{" + "conversationId" + "\\}", pcapiClient.escapeString(conversationId.toString()))
      .replaceAll("\\{" + "recordingId" + "\\}", pcapiClient.escapeString(recordingId.toString()));

    // query params
    List pclocalVarQueryParams = new ArrayList();
    Map pclocalVarHeaderParams = new HashMap();
    Map pclocalVarFormParams = new HashMap();


    
    
    final String[] pclocalVarAccepts = {
      "application/json"
    };
    final String pclocalVarAccept = pcapiClient.selectHeaderAccept(pclocalVarAccepts);

    final String[] pclocalVarContentTypes = {
      "application/json"
    };
    final String pclocalVarContentType = pcapiClient.selectHeaderContentType(pclocalVarContentTypes);

    String[] pclocalVarAuthNames = new String[] { "PureCloud Auth" };

    return pcapiClient.invokeAPIVerbose(pclocalVarPath, "POST", pclocalVarQueryParams, pclocalVarPostBody, pclocalVarHeaderParams, pclocalVarFormParams, pclocalVarAccept, pclocalVarContentType, pclocalVarAuthNames, new TypeReference() {});
  }
  /**
   * create a local recording key
   * 
   * @param body Local Encryption body (required)
   * @return EncryptionKey
   * @throws ApiException if fails to make API call
   */
  public EncryptionKey postLocalkeys(LocalEncryptionKeyRequest body) throws ApiException {
    return postLocalkeysWithHttpInfo(body).getResponseObject();
  }

  /**
   * create a local recording key
   * 
   * @param body Local Encryption body (required)
   * @return EncryptionKey
   * @throws ApiException if fails to make API call
   */
  public ApiResponse postLocalkeysWithHttpInfo(LocalEncryptionKeyRequest body) throws ApiException {
    Object pclocalVarPostBody = body;
    
    // verify the required parameter 'body' is set
    if (body == null) {
      throw new ApiException(400, "Missing the required parameter 'body' when calling postLocalkeys");
    }
    
    // create path and map variables
    String pclocalVarPath = "/api/v2/recording/localkeys".replaceAll("\\{format\\}","json");

    // query params
    List pclocalVarQueryParams = new ArrayList();
    Map pclocalVarHeaderParams = new HashMap();
    Map pclocalVarFormParams = new HashMap();


    
    
    final String[] pclocalVarAccepts = {
      "application/json"
    };
    final String pclocalVarAccept = pcapiClient.selectHeaderAccept(pclocalVarAccepts);

    final String[] pclocalVarContentTypes = {
      "application/json"
    };
    final String pclocalVarContentType = pcapiClient.selectHeaderContentType(pclocalVarContentTypes);

    String[] pclocalVarAuthNames = new String[] { "PureCloud Auth" };

    return pcapiClient.invokeAPIVerbose(pclocalVarPath, "POST", pclocalVarQueryParams, pclocalVarPostBody, pclocalVarHeaderParams, pclocalVarFormParams, pclocalVarAccept, pclocalVarContentType, pclocalVarAuthNames, new TypeReference() {});
  }
  /**
   * create settings for local key creation
   * 
   * @param body Local Encryption Configuration (required)
   * @return LocalEncryptionConfiguration
   * @throws ApiException if fails to make API call
   */
  public LocalEncryptionConfiguration postLocalkeysSettings(LocalEncryptionConfiguration body) throws ApiException {
    return postLocalkeysSettingsWithHttpInfo(body).getResponseObject();
  }

  /**
   * create settings for local key creation
   * 
   * @param body Local Encryption Configuration (required)
   * @return LocalEncryptionConfiguration
   * @throws ApiException if fails to make API call
   */
  public ApiResponse postLocalkeysSettingsWithHttpInfo(LocalEncryptionConfiguration body) throws ApiException {
    Object pclocalVarPostBody = body;
    
    // verify the required parameter 'body' is set
    if (body == null) {
      throw new ApiException(400, "Missing the required parameter 'body' when calling postLocalkeysSettings");
    }
    
    // create path and map variables
    String pclocalVarPath = "/api/v2/recording/localkeys/settings".replaceAll("\\{format\\}","json");

    // query params
    List pclocalVarQueryParams = new ArrayList();
    Map pclocalVarHeaderParams = new HashMap();
    Map pclocalVarFormParams = new HashMap();


    
    
    final String[] pclocalVarAccepts = {
      "application/json"
    };
    final String pclocalVarAccept = pcapiClient.selectHeaderAccept(pclocalVarAccepts);

    final String[] pclocalVarContentTypes = {
      "application/json"
    };
    final String pclocalVarContentType = pcapiClient.selectHeaderContentType(pclocalVarContentTypes);

    String[] pclocalVarAuthNames = new String[] { "PureCloud Auth" };

    return pcapiClient.invokeAPIVerbose(pclocalVarPath, "POST", pclocalVarQueryParams, pclocalVarPostBody, pclocalVarHeaderParams, pclocalVarFormParams, pclocalVarAccept, pclocalVarContentType, pclocalVarAuthNames, new TypeReference() {});
  }
  /**
   * Create media retention policy
   * 
   * @param body Policy (required)
   * @return Policy
   * @throws ApiException if fails to make API call
   */
  public Policy postMediaretentionpolicies(PolicyCreate body) throws ApiException {
    return postMediaretentionpoliciesWithHttpInfo(body).getResponseObject();
  }

  /**
   * Create media retention policy
   * 
   * @param body Policy (required)
   * @return Policy
   * @throws ApiException if fails to make API call
   */
  public ApiResponse postMediaretentionpoliciesWithHttpInfo(PolicyCreate body) throws ApiException {
    Object pclocalVarPostBody = body;
    
    // verify the required parameter 'body' is set
    if (body == null) {
      throw new ApiException(400, "Missing the required parameter 'body' when calling postMediaretentionpolicies");
    }
    
    // create path and map variables
    String pclocalVarPath = "/api/v2/recording/mediaretentionpolicies".replaceAll("\\{format\\}","json");

    // query params
    List pclocalVarQueryParams = new ArrayList();
    Map pclocalVarHeaderParams = new HashMap();
    Map pclocalVarFormParams = new HashMap();


    
    
    final String[] pclocalVarAccepts = {
      "application/json"
    };
    final String pclocalVarAccept = pcapiClient.selectHeaderAccept(pclocalVarAccepts);

    final String[] pclocalVarContentTypes = {
      "application/json"
    };
    final String pclocalVarContentType = pcapiClient.selectHeaderContentType(pclocalVarContentTypes);

    String[] pclocalVarAuthNames = new String[] { "PureCloud Auth" };

    return pcapiClient.invokeAPIVerbose(pclocalVarPath, "POST", pclocalVarQueryParams, pclocalVarPostBody, pclocalVarHeaderParams, pclocalVarFormParams, pclocalVarAccept, pclocalVarContentType, pclocalVarAuthNames, new TypeReference() {});
  }
  /**
   * Create encryption key
   * 
   * @return EncryptionKey
   * @throws ApiException if fails to make API call
   */
  public EncryptionKey postRecordingkeys() throws ApiException {
    return postRecordingkeysWithHttpInfo().getResponseObject();
  }

  /**
   * Create encryption key
   * 
   * @return EncryptionKey
   * @throws ApiException if fails to make API call
   */
  public ApiResponse postRecordingkeysWithHttpInfo() throws ApiException {
    Object pclocalVarPostBody = null;
    
    // create path and map variables
    String pclocalVarPath = "/api/v2/recording/recordingkeys".replaceAll("\\{format\\}","json");

    // query params
    List pclocalVarQueryParams = new ArrayList();
    Map pclocalVarHeaderParams = new HashMap();
    Map pclocalVarFormParams = new HashMap();


    
    
    final String[] pclocalVarAccepts = {
      "application/json"
    };
    final String pclocalVarAccept = pcapiClient.selectHeaderAccept(pclocalVarAccepts);

    final String[] pclocalVarContentTypes = {
      "application/json"
    };
    final String pclocalVarContentType = pcapiClient.selectHeaderContentType(pclocalVarContentTypes);

    String[] pclocalVarAuthNames = new String[] { "PureCloud Auth" };

    return pcapiClient.invokeAPIVerbose(pclocalVarPath, "POST", pclocalVarQueryParams, pclocalVarPostBody, pclocalVarHeaderParams, pclocalVarFormParams, pclocalVarAccept, pclocalVarContentType, pclocalVarAuthNames, new TypeReference() {});
  }
  /**
   * Updates the retention records on a recording.
   * Currently supports updating and removing both archive and delete dates for eligible recordings. A request to change the archival date of an archived recording will result in a restoration of the recording until the new date set. 
   * @param conversationId Conversation ID (required)
   * @param recordingId Recording ID (required)
   * @param body recording (required)
   * @return Recording
   * @throws ApiException if fails to make API call
   */
  public Recording putConversationIdRecordingsRecordingId(String conversationId, String recordingId, Recording body) throws ApiException {
    return putConversationIdRecordingsRecordingIdWithHttpInfo(conversationId, recordingId, body).getResponseObject();
  }

  /**
   * Updates the retention records on a recording.
   * Currently supports updating and removing both archive and delete dates for eligible recordings. A request to change the archival date of an archived recording will result in a restoration of the recording until the new date set. 
   * @param conversationId Conversation ID (required)
   * @param recordingId Recording ID (required)
   * @param body recording (required)
   * @return Recording
   * @throws ApiException if fails to make API call
   */
  public ApiResponse putConversationIdRecordingsRecordingIdWithHttpInfo(String conversationId, String recordingId, Recording body) throws ApiException {
    Object pclocalVarPostBody = body;
    
    // verify the required parameter 'conversationId' is set
    if (conversationId == null) {
      throw new ApiException(400, "Missing the required parameter 'conversationId' when calling putConversationIdRecordingsRecordingId");
    }
    
    // verify the required parameter 'recordingId' is set
    if (recordingId == null) {
      throw new ApiException(400, "Missing the required parameter 'recordingId' when calling putConversationIdRecordingsRecordingId");
    }
    
    // verify the required parameter 'body' is set
    if (body == null) {
      throw new ApiException(400, "Missing the required parameter 'body' when calling putConversationIdRecordingsRecordingId");
    }
    
    // create path and map variables
    String pclocalVarPath = "/api/v2/conversations/{conversationId}/recordings/{recordingId}".replaceAll("\\{format\\}","json")
      .replaceAll("\\{" + "conversationId" + "\\}", pcapiClient.escapeString(conversationId.toString()))
      .replaceAll("\\{" + "recordingId" + "\\}", pcapiClient.escapeString(recordingId.toString()));

    // query params
    List pclocalVarQueryParams = new ArrayList();
    Map pclocalVarHeaderParams = new HashMap();
    Map pclocalVarFormParams = new HashMap();


    
    
    final String[] pclocalVarAccepts = {
      "application/json"
    };
    final String pclocalVarAccept = pcapiClient.selectHeaderAccept(pclocalVarAccepts);

    final String[] pclocalVarContentTypes = {
      "application/json"
    };
    final String pclocalVarContentType = pcapiClient.selectHeaderContentType(pclocalVarContentTypes);

    String[] pclocalVarAuthNames = new String[] { "PureCloud Auth" };

    return pcapiClient.invokeAPIVerbose(pclocalVarPath, "PUT", pclocalVarQueryParams, pclocalVarPostBody, pclocalVarHeaderParams, pclocalVarFormParams, pclocalVarAccept, pclocalVarContentType, pclocalVarAuthNames, new TypeReference() {});
  }
  /**
   * Update annotation
   * 
   * @param conversationId Conversation ID (required)
   * @param recordingId Recording ID (required)
   * @param annotationId Annotation ID (required)
   * @param body annotation (required)
   * @return Annotation
   * @throws ApiException if fails to make API call
   */
  public Annotation putConversationIdRecordingsRecordingIdAnnotationsAnnotationId(String conversationId, String recordingId, String annotationId, Annotation body) throws ApiException {
    return putConversationIdRecordingsRecordingIdAnnotationsAnnotationIdWithHttpInfo(conversationId, recordingId, annotationId, body).getResponseObject();
  }

  /**
   * Update annotation
   * 
   * @param conversationId Conversation ID (required)
   * @param recordingId Recording ID (required)
   * @param annotationId Annotation ID (required)
   * @param body annotation (required)
   * @return Annotation
   * @throws ApiException if fails to make API call
   */
  public ApiResponse putConversationIdRecordingsRecordingIdAnnotationsAnnotationIdWithHttpInfo(String conversationId, String recordingId, String annotationId, Annotation body) throws ApiException {
    Object pclocalVarPostBody = body;
    
    // verify the required parameter 'conversationId' is set
    if (conversationId == null) {
      throw new ApiException(400, "Missing the required parameter 'conversationId' when calling putConversationIdRecordingsRecordingIdAnnotationsAnnotationId");
    }
    
    // verify the required parameter 'recordingId' is set
    if (recordingId == null) {
      throw new ApiException(400, "Missing the required parameter 'recordingId' when calling putConversationIdRecordingsRecordingIdAnnotationsAnnotationId");
    }
    
    // verify the required parameter 'annotationId' is set
    if (annotationId == null) {
      throw new ApiException(400, "Missing the required parameter 'annotationId' when calling putConversationIdRecordingsRecordingIdAnnotationsAnnotationId");
    }
    
    // verify the required parameter 'body' is set
    if (body == null) {
      throw new ApiException(400, "Missing the required parameter 'body' when calling putConversationIdRecordingsRecordingIdAnnotationsAnnotationId");
    }
    
    // create path and map variables
    String pclocalVarPath = "/api/v2/conversations/{conversationId}/recordings/{recordingId}/annotations/{annotationId}".replaceAll("\\{format\\}","json")
      .replaceAll("\\{" + "conversationId" + "\\}", pcapiClient.escapeString(conversationId.toString()))
      .replaceAll("\\{" + "recordingId" + "\\}", pcapiClient.escapeString(recordingId.toString()))
      .replaceAll("\\{" + "annotationId" + "\\}", pcapiClient.escapeString(annotationId.toString()));

    // query params
    List pclocalVarQueryParams = new ArrayList();
    Map pclocalVarHeaderParams = new HashMap();
    Map pclocalVarFormParams = new HashMap();


    
    
    final String[] pclocalVarAccepts = {
      "application/json"
    };
    final String pclocalVarAccept = pcapiClient.selectHeaderAccept(pclocalVarAccepts);

    final String[] pclocalVarContentTypes = {
      "application/json"
    };
    final String pclocalVarContentType = pcapiClient.selectHeaderContentType(pclocalVarContentTypes);

    String[] pclocalVarAuthNames = new String[] { "PureCloud Auth" };

    return pcapiClient.invokeAPIVerbose(pclocalVarPath, "PUT", pclocalVarQueryParams, pclocalVarPostBody, pclocalVarHeaderParams, pclocalVarFormParams, pclocalVarAccept, pclocalVarContentType, pclocalVarAuthNames, new TypeReference() {});
  }
  /**
   * Update the local encryption settings
   * 
   * @param settingsId Settings Id (required)
   * @param body Local Encryption metadata (required)
   * @return LocalEncryptionConfiguration
   * @throws ApiException if fails to make API call
   */
  public LocalEncryptionConfiguration putLocalkeysSettingsSettingsId(String settingsId, LocalEncryptionConfiguration body) throws ApiException {
    return putLocalkeysSettingsSettingsIdWithHttpInfo(settingsId, body).getResponseObject();
  }

  /**
   * Update the local encryption settings
   * 
   * @param settingsId Settings Id (required)
   * @param body Local Encryption metadata (required)
   * @return LocalEncryptionConfiguration
   * @throws ApiException if fails to make API call
   */
  public ApiResponse putLocalkeysSettingsSettingsIdWithHttpInfo(String settingsId, LocalEncryptionConfiguration body) throws ApiException {
    Object pclocalVarPostBody = body;
    
    // verify the required parameter 'settingsId' is set
    if (settingsId == null) {
      throw new ApiException(400, "Missing the required parameter 'settingsId' when calling putLocalkeysSettingsSettingsId");
    }
    
    // verify the required parameter 'body' is set
    if (body == null) {
      throw new ApiException(400, "Missing the required parameter 'body' when calling putLocalkeysSettingsSettingsId");
    }
    
    // create path and map variables
    String pclocalVarPath = "/api/v2/recording/localkeys/settings/{settingsId}".replaceAll("\\{format\\}","json")
      .replaceAll("\\{" + "settingsId" + "\\}", pcapiClient.escapeString(settingsId.toString()));

    // query params
    List pclocalVarQueryParams = new ArrayList();
    Map pclocalVarHeaderParams = new HashMap();
    Map pclocalVarFormParams = new HashMap();


    
    
    final String[] pclocalVarAccepts = {
      "application/json"
    };
    final String pclocalVarAccept = pcapiClient.selectHeaderAccept(pclocalVarAccepts);

    final String[] pclocalVarContentTypes = {
      "application/json"
    };
    final String pclocalVarContentType = pcapiClient.selectHeaderContentType(pclocalVarContentTypes);

    String[] pclocalVarAuthNames = new String[] { "PureCloud Auth" };

    return pcapiClient.invokeAPIVerbose(pclocalVarPath, "PUT", pclocalVarQueryParams, pclocalVarPostBody, pclocalVarHeaderParams, pclocalVarFormParams, pclocalVarAccept, pclocalVarContentType, pclocalVarAuthNames, new TypeReference() {});
  }
  /**
   * Update a media retention policy
   * 
   * @param policyId Policy ID (required)
   * @param body Policy (required)
   * @return Policy
   * @throws ApiException if fails to make API call
   */
  public Policy putMediaretentionpoliciesPolicyId(String policyId, Policy body) throws ApiException {
    return putMediaretentionpoliciesPolicyIdWithHttpInfo(policyId, body).getResponseObject();
  }

  /**
   * Update a media retention policy
   * 
   * @param policyId Policy ID (required)
   * @param body Policy (required)
   * @return Policy
   * @throws ApiException if fails to make API call
   */
  public ApiResponse putMediaretentionpoliciesPolicyIdWithHttpInfo(String policyId, Policy body) throws ApiException {
    Object pclocalVarPostBody = body;
    
    // verify the required parameter 'policyId' is set
    if (policyId == null) {
      throw new ApiException(400, "Missing the required parameter 'policyId' when calling putMediaretentionpoliciesPolicyId");
    }
    
    // verify the required parameter 'body' is set
    if (body == null) {
      throw new ApiException(400, "Missing the required parameter 'body' when calling putMediaretentionpoliciesPolicyId");
    }
    
    // create path and map variables
    String pclocalVarPath = "/api/v2/recording/mediaretentionpolicies/{policyId}".replaceAll("\\{format\\}","json")
      .replaceAll("\\{" + "policyId" + "\\}", pcapiClient.escapeString(policyId.toString()));

    // query params
    List pclocalVarQueryParams = new ArrayList();
    Map pclocalVarHeaderParams = new HashMap();
    Map pclocalVarFormParams = new HashMap();


    
    
    final String[] pclocalVarAccepts = {
      "application/json"
    };
    final String pclocalVarAccept = pcapiClient.selectHeaderAccept(pclocalVarAccepts);

    final String[] pclocalVarContentTypes = {
      "application/json"
    };
    final String pclocalVarContentType = pcapiClient.selectHeaderContentType(pclocalVarContentTypes);

    String[] pclocalVarAuthNames = new String[] { "PureCloud Auth" };

    return pcapiClient.invokeAPIVerbose(pclocalVarPath, "PUT", pclocalVarQueryParams, pclocalVarPostBody, pclocalVarHeaderParams, pclocalVarFormParams, pclocalVarAccept, pclocalVarContentType, pclocalVarAuthNames, new TypeReference() {});
  }
  /**
   * Updates an orphan recording to a regular recording with retention values
   * If this operation is successful the orphan will no longer exist. It will be replaced by the resulting recording in the response. This replacement recording is accessible by the normal Recording api.
   * @param orphanId Orphan ID (required)
   * @param body  (optional)
   * @return Recording
   * @throws ApiException if fails to make API call
   */
  public Recording putOrphanId(String orphanId, OrphanUpdateRequest body) throws ApiException {
    return putOrphanIdWithHttpInfo(orphanId, body).getResponseObject();
  }

  /**
   * Updates an orphan recording to a regular recording with retention values
   * If this operation is successful the orphan will no longer exist. It will be replaced by the resulting recording in the response. This replacement recording is accessible by the normal Recording api.
   * @param orphanId Orphan ID (required)
   * @param body  (optional)
   * @return Recording
   * @throws ApiException if fails to make API call
   */
  public ApiResponse putOrphanIdWithHttpInfo(String orphanId, OrphanUpdateRequest body) throws ApiException {
    Object pclocalVarPostBody = body;
    
    // verify the required parameter 'orphanId' is set
    if (orphanId == null) {
      throw new ApiException(400, "Missing the required parameter 'orphanId' when calling putOrphanId");
    }
    
    // create path and map variables
    String pclocalVarPath = "/api/v2/orphanrecordings/{orphanId}".replaceAll("\\{format\\}","json")
      .replaceAll("\\{" + "orphanId" + "\\}", pcapiClient.escapeString(orphanId.toString()));

    // query params
    List pclocalVarQueryParams = new ArrayList();
    Map pclocalVarHeaderParams = new HashMap();
    Map pclocalVarFormParams = new HashMap();


    
    
    final String[] pclocalVarAccepts = {
      "application/json"
    };
    final String pclocalVarAccept = pcapiClient.selectHeaderAccept(pclocalVarAccepts);

    final String[] pclocalVarContentTypes = {
      "application/json"
    };
    final String pclocalVarContentType = pcapiClient.selectHeaderContentType(pclocalVarContentTypes);

    String[] pclocalVarAuthNames = new String[] { "PureCloud Auth" };

    return pcapiClient.invokeAPIVerbose(pclocalVarPath, "PUT", pclocalVarQueryParams, pclocalVarPostBody, pclocalVarHeaderParams, pclocalVarFormParams, pclocalVarAccept, pclocalVarContentType, pclocalVarAuthNames, new TypeReference() {});
  }
  /**
   * Update key rotation schedule
   * 
   * @param body KeyRotationSchedule (required)
   * @return KeyRotationSchedule
   * @throws ApiException if fails to make API call
   */
  public KeyRotationSchedule putRecordingkeysRotationschedule(KeyRotationSchedule body) throws ApiException {
    return putRecordingkeysRotationscheduleWithHttpInfo(body).getResponseObject();
  }

  /**
   * Update key rotation schedule
   * 
   * @param body KeyRotationSchedule (required)
   * @return KeyRotationSchedule
   * @throws ApiException if fails to make API call
   */
  public ApiResponse putRecordingkeysRotationscheduleWithHttpInfo(KeyRotationSchedule body) throws ApiException {
    Object pclocalVarPostBody = body;
    
    // verify the required parameter 'body' is set
    if (body == null) {
      throw new ApiException(400, "Missing the required parameter 'body' when calling putRecordingkeysRotationschedule");
    }
    
    // create path and map variables
    String pclocalVarPath = "/api/v2/recording/recordingkeys/rotationschedule".replaceAll("\\{format\\}","json");

    // query params
    List pclocalVarQueryParams = new ArrayList();
    Map pclocalVarHeaderParams = new HashMap();
    Map pclocalVarFormParams = new HashMap();


    
    
    final String[] pclocalVarAccepts = {
      "application/json"
    };
    final String pclocalVarAccept = pcapiClient.selectHeaderAccept(pclocalVarAccepts);

    final String[] pclocalVarContentTypes = {
      "application/json"
    };
    final String pclocalVarContentType = pcapiClient.selectHeaderContentType(pclocalVarContentTypes);

    String[] pclocalVarAuthNames = new String[] { "PureCloud Auth" };

    return pcapiClient.invokeAPIVerbose(pclocalVarPath, "PUT", pclocalVarQueryParams, pclocalVarPostBody, pclocalVarHeaderParams, pclocalVarFormParams, pclocalVarAccept, pclocalVarContentType, pclocalVarAuthNames, new TypeReference() {});
  }
  /**
   * Update the Recording Settings for the Organization
   * 
   * @param body Recording settings (required)
   * @return RecordingSettings
   * @throws ApiException if fails to make API call
   */
  public RecordingSettings putSettings(RecordingSettings body) throws ApiException {
    return putSettingsWithHttpInfo(body).getResponseObject();
  }

  /**
   * Update the Recording Settings for the Organization
   * 
   * @param body Recording settings (required)
   * @return RecordingSettings
   * @throws ApiException if fails to make API call
   */
  public ApiResponse putSettingsWithHttpInfo(RecordingSettings body) throws ApiException {
    Object pclocalVarPostBody = body;
    
    // verify the required parameter 'body' is set
    if (body == null) {
      throw new ApiException(400, "Missing the required parameter 'body' when calling putSettings");
    }
    
    // create path and map variables
    String pclocalVarPath = "/api/v2/recording/settings".replaceAll("\\{format\\}","json");

    // query params
    List pclocalVarQueryParams = new ArrayList();
    Map pclocalVarHeaderParams = new HashMap();
    Map pclocalVarFormParams = new HashMap();


    
    
    final String[] pclocalVarAccepts = {
      "application/json"
    };
    final String pclocalVarAccept = pcapiClient.selectHeaderAccept(pclocalVarAccepts);

    final String[] pclocalVarContentTypes = {
      "application/json"
    };
    final String pclocalVarContentType = pcapiClient.selectHeaderContentType(pclocalVarContentTypes);

    String[] pclocalVarAuthNames = new String[] { "PureCloud Auth" };

    return pcapiClient.invokeAPIVerbose(pclocalVarPath, "PUT", pclocalVarQueryParams, pclocalVarPostBody, pclocalVarHeaderParams, pclocalVarFormParams, pclocalVarAccept, pclocalVarContentType, pclocalVarAuthNames, new TypeReference() {});
  }
}