UploadPartInterface.php 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. <?php
  2. /**
  3. * Copyright 2010-2013 Amazon.com, Inc. or its affiliates. All Rights Reserved.
  4. *
  5. * Licensed under the Apache License, Version 2.0 (the "License").
  6. * You may not use this file except in compliance with the License.
  7. * A copy of the License is located at
  8. *
  9. * http://aws.amazon.com/apache2.0
  10. *
  11. * or in the "license" file accompanying this file. This file is distributed
  12. * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
  13. * express or implied. See the License for the specific language governing
  14. * permissions and limitations under the License.
  15. */
  16. namespace Aws\Common\Model\MultipartUpload;
  17. /**
  18. * An object that encapsulates the data for an upload part
  19. */
  20. interface UploadPartInterface extends \Serializable
  21. {
  22. /**
  23. * Create an upload part from an array
  24. *
  25. * @param array|\Traversable $data Data representing the upload part
  26. *
  27. * @return self
  28. */
  29. public static function fromArray($data);
  30. /**
  31. * Returns the part number of the upload part which is used as an identifier
  32. *
  33. * @return int
  34. */
  35. public function getPartNumber();
  36. /**
  37. * Returns the array form of the upload part
  38. *
  39. * @return array
  40. */
  41. public function toArray();
  42. }