|
| 1 | +import datetime |
| 2 | +from typing import Optional, List, Any, Union |
| 3 | +from .. import serde |
| 4 | + |
| 5 | + |
| 6 | +class PublicAccessBlockConfiguration(serde.Model): |
| 7 | + """ |
| 8 | + The container in which the Block Public Access configurations are stored. |
| 9 | + """ |
| 10 | + |
| 11 | + _attribute_map = { |
| 12 | + 'block_public_access': {'tag': 'xml', 'rename': 'BlockPublicAccess', 'type': 'bool'}, |
| 13 | + } |
| 14 | + |
| 15 | + _xml_map = { |
| 16 | + 'name': 'PublicAccessBlockConfiguration' |
| 17 | + } |
| 18 | + |
| 19 | + def __init__( |
| 20 | + self, |
| 21 | + block_public_access: Optional[bool] = None, |
| 22 | + **kwargs: Any |
| 23 | + ) -> None: |
| 24 | + """ |
| 25 | + block_public_access (bool, optional): Specifies whether to enable Block Public Access.true: enables Block Public Access.false (default): disables Block Public Access. |
| 26 | + """ |
| 27 | + super().__init__(**kwargs) |
| 28 | + self.block_public_access = block_public_access |
| 29 | + |
| 30 | + |
| 31 | +class PutAccessPointPublicAccessBlockRequest(serde.RequestModel): |
| 32 | + """ |
| 33 | + The request for the PutAccessPointPublicAccessBlock operation. |
| 34 | + """ |
| 35 | + |
| 36 | + _attribute_map = { |
| 37 | + 'bucket': {'tag': 'input', 'position': 'host', 'rename': 'bucket', 'type': 'str', 'required': True}, |
| 38 | + 'access_point_name': {'tag': 'input', 'position': 'query', 'rename': 'x-oss-access-point-name', 'type': 'str', 'required': True}, |
| 39 | + 'public_access_block_configuration': {'tag': 'input', 'position': 'body', 'rename': 'PublicAccessBlockConfiguration', 'type': 'xml'}, |
| 40 | + } |
| 41 | + |
| 42 | + def __init__( |
| 43 | + self, |
| 44 | + bucket: str = None, |
| 45 | + access_point_name: str = None, |
| 46 | + public_access_block_configuration: Optional[PublicAccessBlockConfiguration] = None, |
| 47 | + **kwargs: Any |
| 48 | + ) -> None: |
| 49 | + """ |
| 50 | + bucket (str, required): The name of the bucket. |
| 51 | + access_point_name (str, required): The name of the access point. |
| 52 | + public_access_block_configuration (PublicAccessBlockConfiguration, optional): The request body. |
| 53 | + """ |
| 54 | + super().__init__(**kwargs) |
| 55 | + self.bucket = bucket |
| 56 | + self.access_point_name = access_point_name |
| 57 | + self.public_access_block_configuration = public_access_block_configuration |
| 58 | + |
| 59 | + |
| 60 | +class PutAccessPointPublicAccessBlockResult(serde.ResultModel): |
| 61 | + """ |
| 62 | + The request for the PutAccessPointPublicAccessBlock operation. |
| 63 | + """ |
| 64 | + |
| 65 | + |
| 66 | +class GetAccessPointPublicAccessBlockRequest(serde.RequestModel): |
| 67 | + """ |
| 68 | + The request for the GetAccessPointPublicAccessBlock operation. |
| 69 | + """ |
| 70 | + |
| 71 | + _attribute_map = { |
| 72 | + 'bucket': {'tag': 'input', 'position': 'host', 'rename': 'bucket', 'type': 'str'}, |
| 73 | + 'access_point_name': {'tag': 'input', 'position': 'query', 'rename': 'x-oss-access-point-name', 'type': 'str'}, |
| 74 | + } |
| 75 | + |
| 76 | + def __init__( |
| 77 | + self, |
| 78 | + bucket: Optional[str] = None, |
| 79 | + access_point_name: Optional[str] = None, |
| 80 | + **kwargs: Any |
| 81 | + ) -> None: |
| 82 | + """ |
| 83 | + bucket (str, optional): The name of the bucket. |
| 84 | + access_point_name (str, optional): The name of the access point. |
| 85 | + """ |
| 86 | + super().__init__(**kwargs) |
| 87 | + self.bucket = bucket |
| 88 | + self.access_point_name = access_point_name |
| 89 | + |
| 90 | + |
| 91 | +class GetAccessPointPublicAccessBlockResult(serde.ResultModel): |
| 92 | + """ |
| 93 | + The request for the GetAccessPointPublicAccessBlock operation. |
| 94 | + """ |
| 95 | + |
| 96 | + _attribute_map = { |
| 97 | + 'public_access_block_configuration': {'tag': 'output', 'position': 'body', 'rename': 'PublicAccessBlockConfiguration', 'type': 'PublicAccessBlockConfiguration,xml'}, |
| 98 | + } |
| 99 | + |
| 100 | + _dependency_map = { |
| 101 | + 'PublicAccessBlockConfiguration': {'new': lambda: PublicAccessBlockConfiguration()}, |
| 102 | + } |
| 103 | + |
| 104 | + def __init__( |
| 105 | + self, |
| 106 | + public_access_block_configuration: Optional[PublicAccessBlockConfiguration] = None, |
| 107 | + **kwargs: Any |
| 108 | + ) -> None: |
| 109 | + """ |
| 110 | + public_access_block_configuration (PublicAccessBlockConfiguration, optional): The container in which the Block Public Access configurations are stored. |
| 111 | + """ |
| 112 | + super().__init__(**kwargs) |
| 113 | + self.public_access_block_configuration = public_access_block_configuration |
| 114 | + |
| 115 | + |
| 116 | +class DeleteAccessPointPublicAccessBlockRequest(serde.RequestModel): |
| 117 | + """ |
| 118 | + The request for the DeleteAccessPointPublicAccessBlock operation. |
| 119 | + """ |
| 120 | + |
| 121 | + _attribute_map = { |
| 122 | + 'bucket': {'tag': 'input', 'position': 'host', 'rename': 'bucket', 'type': 'str'}, |
| 123 | + 'access_point_name': {'tag': 'input', 'position': 'query', 'rename': 'x-oss-access-point-name', 'type': 'str'}, |
| 124 | + } |
| 125 | + |
| 126 | + def __init__( |
| 127 | + self, |
| 128 | + bucket: Optional[str] = None, |
| 129 | + access_point_name: Optional[str] = None, |
| 130 | + **kwargs: Any |
| 131 | + ) -> None: |
| 132 | + """ |
| 133 | + bucket (str, optional): The name of the bucket. |
| 134 | + access_point_name (str, optional): The name of the access point. |
| 135 | + """ |
| 136 | + super().__init__(**kwargs) |
| 137 | + self.bucket = bucket |
| 138 | + self.access_point_name = access_point_name |
| 139 | + |
| 140 | + |
| 141 | +class DeleteAccessPointPublicAccessBlockResult(serde.ResultModel): |
| 142 | + """ |
| 143 | + The request for the DeleteAccessPointPublicAccessBlock operation. |
| 144 | + """ |
0 commit comments