private void validateRequest(short versionId, PartitionId partitionId, String fileName, String hostName,
      String snapshotId, long startOffset, long sizeInBytes) {
    validateVersion(versionId);
    Objects.requireNonNull(partitionId, "PartitionId cannot be null");
    Objects.requireNonNull(fileName, "FileName cannot be null");
    Objects.requireNonNull(hostName, "HostName cannot be null");
    Objects.requireNonNull(snapshotId, "SnapshotId cannot be null");
    Objects.requireNonNull(startOffset, "StartOffset cannot be null");
    Objects.requireNonNull(sizeInBytes, "SizeInBytes cannot be null");

    if (!fileName.endsWith("_log") && !fileName.endsWith("_index") && !fileName.endsWith("_bloom")) {
      throw new IllegalArgumentException("Invalid file name: " + fileName);
    }
    if (startOffset < 0) {
      throw new IllegalArgumentException("Invalid start offset: " + startOffset);
    }
    if (sizeInBytes <= 0) {
      throw new IllegalArgumentException("Invalid size in bytes: " + sizeInBytes);
    }
  }
Constructor for FileCopyGetChunkRequest

@param versionId     The version of the request.
@param correlationId The correlation id of the request.
@param clientId      The client id of the request.
@param partitionId   The partition id of the requested file.
@param fileName      The name of the requested file.
@param hostName      The hostname of requesting server.
@param snapshotId    The requested snapshotId.
@param startOffset   The start offset of the chunk.
@param sizeInBytes   The size of the chunk in bytes.
ambry-protocol/src/main/java/com/github/ambry/protocol/FileCopyGetChunkRequest.java