|
| 1 | +import datetime |
| 2 | +from typing import Optional, List, Any, Union |
| 3 | +from .. import serde |
| 4 | + |
| 5 | + |
| 6 | +class TransferAccelerationConfiguration(serde.Model): |
| 7 | + """ |
| 8 | + The container that stores the transfer acceleration configurations. |
| 9 | + """ |
| 10 | + |
| 11 | + _attribute_map = { |
| 12 | + 'enabled': {'tag': 'xml', 'rename': 'Enabled', 'type': 'bool'}, |
| 13 | + } |
| 14 | + |
| 15 | + _xml_map = { |
| 16 | + 'name': 'TransferAccelerationConfiguration' |
| 17 | + } |
| 18 | + |
| 19 | + def __init__( |
| 20 | + self, |
| 21 | + enabled: Optional[bool] = None, |
| 22 | + **kwargs: Any |
| 23 | + ) -> None: |
| 24 | + """ |
| 25 | + enabled (bool, optional): Whether the transfer acceleration is enabled for this bucket. |
| 26 | + """ |
| 27 | + super().__init__(**kwargs) |
| 28 | + self.enabled = enabled |
| 29 | + |
| 30 | + |
| 31 | + |
| 32 | + |
| 33 | +class PutBucketTransferAccelerationRequest(serde.RequestModel): |
| 34 | + """ |
| 35 | + The request for the PutBucketTransferAcceleration operation. |
| 36 | + """ |
| 37 | + |
| 38 | + _attribute_map = { |
| 39 | + 'bucket': {'tag': 'input', 'position': 'host', 'rename': 'bucket', 'type': 'str', 'required': True}, |
| 40 | + 'transfer_acceleration_configuration': {'tag': 'input', 'position': 'body', 'rename': 'TransferAccelerationConfiguration', 'type': 'xml'}, |
| 41 | + } |
| 42 | + |
| 43 | + def __init__( |
| 44 | + self, |
| 45 | + bucket: str = None, |
| 46 | + transfer_acceleration_configuration: Optional[TransferAccelerationConfiguration] = None, |
| 47 | + **kwargs: Any |
| 48 | + ) -> None: |
| 49 | + """ |
| 50 | + bucket (str, required): The name of the bucket. |
| 51 | + transfer_acceleration_configuration (TransferAccelerationConfiguration, optional): The container of the request body. |
| 52 | + """ |
| 53 | + super().__init__(**kwargs) |
| 54 | + self.bucket = bucket |
| 55 | + self.transfer_acceleration_configuration = transfer_acceleration_configuration |
| 56 | + |
| 57 | + |
| 58 | +class PutBucketTransferAccelerationResult(serde.ResultModel): |
| 59 | + """ |
| 60 | + The request for the PutBucketTransferAcceleration operation. |
| 61 | + """ |
| 62 | + |
| 63 | +class GetBucketTransferAccelerationRequest(serde.RequestModel): |
| 64 | + """ |
| 65 | + The request for the GetBucketTransferAcceleration operation. |
| 66 | + """ |
| 67 | + |
| 68 | + _attribute_map = { |
| 69 | + 'bucket': {'tag': 'input', 'position': 'host', 'rename': 'bucket', 'type': 'str', 'required': True}, |
| 70 | + } |
| 71 | + |
| 72 | + def __init__( |
| 73 | + self, |
| 74 | + bucket: str = None, |
| 75 | + **kwargs: Any |
| 76 | + ) -> None: |
| 77 | + """ |
| 78 | + bucket (str, required): The name of the bucket. |
| 79 | + """ |
| 80 | + super().__init__(**kwargs) |
| 81 | + self.bucket = bucket |
| 82 | + |
| 83 | + |
| 84 | +class GetBucketTransferAccelerationResult(serde.ResultModel): |
| 85 | + """ |
| 86 | + The request for the GetBucketTransferAcceleration operation. |
| 87 | + """ |
| 88 | + |
| 89 | + _attribute_map = { |
| 90 | + 'transfer_acceleration_configuration': {'tag': 'output', 'position': 'body', 'rename': 'TransferAccelerationConfiguration', 'type': 'TransferAccelerationConfiguration,xml'}, |
| 91 | + } |
| 92 | + |
| 93 | + _dependency_map = { |
| 94 | + 'TransferAccelerationConfiguration': {'new': lambda: TransferAccelerationConfiguration()}, |
| 95 | + } |
| 96 | + |
| 97 | + def __init__( |
| 98 | + self, |
| 99 | + transfer_acceleration_configuration: Optional[TransferAccelerationConfiguration] = None, |
| 100 | + **kwargs: Any |
| 101 | + ) -> None: |
| 102 | + """ |
| 103 | + transfer_acceleration_configuration (TransferAccelerationConfiguration, optional): The container that stores the transfer acceleration configurations. |
| 104 | + """ |
| 105 | + super().__init__(**kwargs) |
| 106 | + self.transfer_acceleration_configuration = transfer_acceleration_configuration |
0 commit comments