addRequest -- add a new record request.
@param request Request record
508047
public void addRequest(RecordRequest request) {
        if (request.getRequestSize() + getRequestSize() > 248) {
            throw new IllegalArgumentException();
        }

        if (records == null) {
            records = new RecordRequest[1];
        }
        else {
            RecordRequest old[] = records;
            records = new RecordRequest[old.length + 1];

            System.arraycopy(old, 0, records, 0, old.length);
        }
        records[records.length - 1] = request;

        setDataLength(getRequestSize());
    }
867091
private void addPostParams(final Request request) {
        if (to != null) {
            request.addPostParam("To", to.getEndpoint());
        }

        if (from != null) {
            request.addPostParam("From", from.toString());
        }

        if (url != null) {
            request.addPostParam("Url", url.toString());
        }

        if (applicationSid != null) {
            request.addPostParam("ApplicationSid", applicationSid);
        }

        if (method != null) {
            request.addPostParam("Method", method.toString());
        }

        if (fallbackUrl != null) {
            request.addPostParam("FallbackUrl", fallbackUrl.toString());
        }

        if (fallbackMethod != null) {
            request.addPostParam("FallbackMethod", fallbackMethod.toString());
        }

        if (statusCallback != null) {
            request.addPostParam("StatusCallback", statusCallback.toString());
        }

        if (statusCallbackEvent != null) {
            for (String prop : statusCallbackEvent) {
                request.addPostParam("StatusCallbackEvent", prop);
            }
        }

        if (statusCallbackMethod != null) {
            request.addPostParam("StatusCallbackMethod", statusCallbackMethod.toString());
        }

        if (sendDigits != null) {
            request.addPostParam("SendDigits", sendDigits);
        }

        if (timeout != null) {
            request.addPostParam("Timeout", timeout.toString());
        }

        if (record != null) {
            request.addPostParam("Record", record.toString());
        }

        if (recordingChannels != null) {
            request.addPostParam("RecordingChannels", recordingChannels);
        }

        if (recordingStatusCallback != null) {
            request.addPostParam("RecordingStatusCallback", recordingStatusCallback);
        }

        if (recordingStatusCallbackMethod != null) {
            request.addPostParam("RecordingStatusCallbackMethod", recordingStatusCallbackMethod.toString());
        }

        if (sipAuthUsername != null) {
            request.addPostParam("SipAuthUsername", sipAuthUsername);
        }

        if (sipAuthPassword != null) {
            request.addPostParam("SipAuthPassword", sipAuthPassword);
        }

        if (machineDetection != null) {
            request.addPostParam("MachineDetection", machineDetection);
        }

        if (machineDetectionTimeout != null) {
            request.addPostParam("MachineDetectionTimeout", machineDetectionTimeout.toString());
        }

        if (recordingStatusCallbackEvent != null) {
            for (String prop : recordingStatusCallbackEvent) {
                request.addPostParam("RecordingStatusCallbackEvent", prop);
            }
        }

        if (trim != null) {
            request.addPostParam("Trim", trim);
        }

        if (callerId != null) {
            request.addPostParam("CallerId", callerId);
        }

        if (machineDetectionSpeechThreshold != null) {
            request.addPostParam("MachineDetectionSpeechThreshold", machineDetectionSpeechThreshold.toString());
        }

        if (machineDetectionSpeechEndThreshold != null) {
            request.addPostParam("MachineDetectionSpeechEndThreshold", machineDetectionSpeechEndThreshold.toString());
        }

        if (machineDetectionSilenceTimeout != null) {
            request.addPostParam("MachineDetectionSilenceTimeout", machineDetectionSilenceTimeout.toString());
        }
    }
117556
private void addPostParams(final Request request) {
        if (callbackMethod != null) {
            request.addPostParam("CallbackMethod", callbackMethod.toString());
        }

        if (callbackUrl != null) {
            request.addPostParam("CallbackUrl", callbackUrl.toString());
        }

        if (friendlyName != null) {
            request.addPostParam("FriendlyName", friendlyName);
        }
    }
1216005
private void addPostParams(final Request request) {
        if (code != null) {
            request.addPostParam("Code", code);
        }

        if (to != null) {
            request.addPostParam("To", to);
        }

        if (verificationSid != null) {
            request.addPostParam("VerificationSid", verificationSid);
        }

        if (amount != null) {
            request.addPostParam("Amount", amount);
        }

        if (payee != null) {
            request.addPostParam("Payee", payee);
        }
    }
929236
private void addPostParams(final Request request) {
        if (friendlyName != null) {
            request.addPostParam("FriendlyName", friendlyName);
        }

        if (available != null) {
            request.addPostParam("Available", available.toString());
        }
    }
1212741
private void addQueryParams(final Request request) {
        if (dateCreatedFrom != null) {
            request.addQueryParam("DateCreatedFrom", dateCreatedFrom.toString());
        }

        if (dateCreatedTo != null) {
            request.addQueryParam("DateCreatedTo", dateCreatedTo.toString());
        }

        if (getPageSize() != null) {
            request.addQueryParam("PageSize", Integer.toString(getPageSize()));
        }
    }
650421
private void addQueryParams(final Request request) {
        if (customerName != null) {
            request.addQueryParam("CustomerName", customerName);
        }

        if (friendlyName != null) {
            request.addQueryParam("FriendlyName", friendlyName);
        }

        if (isoCountry != null) {
            request.addQueryParam("IsoCountry", isoCountry);
        }

        if (getPageSize() != null) {
            request.addQueryParam("PageSize", Integer.toString(getPageSize()));
        }
    }
210118
private void addPostParams(final Request request) {
        if (roleSid != null) {
            request.addPostParam("RoleSid", roleSid);
        }

        if (lastConsumedMessageIndex != null) {
            request.addPostParam("LastConsumedMessageIndex", lastConsumedMessageIndex.toString());
        }
    }
966187
private void addPostParams(final Request request) {
        if (capacity != null) {
            request.addPostParam("Capacity", capacity.toString());
        }

        if (available != null) {
            request.addPostParam("Available", available.toString());
        }
    }
977663
private void addPostParams(final Request request) {
        if (identifier != null) {
            request.addPostParam("Identifier", identifier);
        }

        if (friendlyName != null) {
            request.addPostParam("FriendlyName", friendlyName);
        }

        if (proxyIdentifier != null) {
            request.addPostParam("ProxyIdentifier", proxyIdentifier);
        }

        if (proxyIdentifierSid != null) {
            request.addPostParam("ProxyIdentifierSid", proxyIdentifierSid);
        }
    }
632155
private void addPostParams(final Request request) {
        if (track != null) {
            request.addPostParam("Track", track.toString());
        }

        if (publisher != null) {
            request.addPostParam("Publisher", publisher.toString());
        }

        if (kind != null) {
            request.addPostParam("Kind", kind.toString());
        }

        if (status != null) {
            request.addPostParam("Status", status.toString());
        }
    }
4342
private void addPostParams(final Request request) {
        if (attributes != null) {
            request.addPostParam("Attributes", attributes);
        }

        if (assignmentStatus != null) {
            request.addPostParam("AssignmentStatus", assignmentStatus.toString());
        }

        if (reason != null) {
            request.addPostParam("Reason", reason);
        }

        if (priority != null) {
            request.addPostParam("Priority", priority.toString());
        }

        if (taskChannel != null) {
            request.addPostParam("TaskChannel", taskChannel);
        }
    }
578451
static Response<Integer> add(Request request) {
    Optional<String> t1 = request.parameter("t1");
    Optional<String> t2 = request.parameter("t2");
    if (t1.isPresent() && t2.isPresent()) {
      int result = Integer.valueOf(t1.get()) + Integer.valueOf(t2.get());
      return Response.forPayload(result);
    } else {
      return Response.forStatus(Status.BAD_REQUEST);
    }
  }
835110
private void addQueryParams(final Request request) {
        if (type != null) {
            for (Channel.ChannelType prop : type) {
                request.addQueryParam("Type", prop.toString());
            }
        }

        if (getPageSize() != null) {
            request.addQueryParam("PageSize", Integer.toString(getPageSize()));
        }
    }
1357455
private void addPostParams(final Request request) {
        if (sid != null) {
            request.addPostParam("Sid", sid);
        }

        if (phoneNumber != null) {
            request.addPostParam("PhoneNumber", phoneNumber.toString());
        }

        if (isReserved != null) {
            request.addPostParam("IsReserved", isReserved.toString());
        }
    }
791206
int add(DownloadRequest request) {
		int downloadId = getDownloadId();
		// Tag the request as belonging to this queue and add it to the set of current requests.
		request.setDownloadRequestQueue(this);

		synchronized (mCurrentRequests) {
			mCurrentRequests.add(request);
		}

		// Process requests in the order they are added.
		request.setDownloadId(downloadId);
		mDownloadQueue.add(request);

		return downloadId;
	}
1268628
private void addPostParams(final Request request) {
        if (author != null) {
            request.addPostParam("Author", author);
        }

        if (attributes != null) {
            request.addPostParam("Attributes", attributes);
        }

        if (dateCreated != null) {
            request.addPostParam("DateCreated", dateCreated.toString());
        }

        if (dateUpdated != null) {
            request.addPostParam("DateUpdated", dateUpdated.toString());
        }

        if (body != null) {
            request.addPostParam("Body", body);
        }
    }