|
| 1 | +from typing import Optional, List, Any, Union |
| 2 | +from .. import serde |
| 3 | + |
| 4 | + |
| 5 | +class PolicyStatus(serde.Model): |
| 6 | + """ |
| 7 | + The container that stores public access information. |
| 8 | + """ |
| 9 | + |
| 10 | + _attribute_map = { |
| 11 | + 'is_public': {'tag': 'xml', 'rename': 'IsPublic', 'type': 'bool'}, |
| 12 | + } |
| 13 | + |
| 14 | + _xml_map = { |
| 15 | + 'name': 'PolicyStatus' |
| 16 | + } |
| 17 | + |
| 18 | + def __init__( |
| 19 | + self, |
| 20 | + is_public: Optional[bool] = None, |
| 21 | + **kwargs: Any |
| 22 | + ) -> None: |
| 23 | + """ |
| 24 | + is_public (bool, optional): Indicates whether the current bucket policy allows public access.truefalse |
| 25 | + """ |
| 26 | + super().__init__(**kwargs) |
| 27 | + self.is_public = is_public |
| 28 | + |
| 29 | + |
| 30 | + |
| 31 | + |
| 32 | +class PutBucketPolicyRequest(serde.RequestModel): |
| 33 | + """ |
| 34 | + The request for the PutBucketPolicy operation. |
| 35 | + """ |
| 36 | + |
| 37 | + _attribute_map = { |
| 38 | + 'bucket': {'tag': 'input', 'position': 'host', 'rename': 'bucket', 'type': 'str', 'required': True}, |
| 39 | + 'body': {'tag': 'input', 'position': 'body', 'rename': 'nop', 'type': 'str', 'required': True}, |
| 40 | + } |
| 41 | + |
| 42 | + def __init__( |
| 43 | + self, |
| 44 | + bucket: str = None, |
| 45 | + body: Optional[str] = None, |
| 46 | + **kwargs: Any |
| 47 | + ) -> None: |
| 48 | + """ |
| 49 | + bucket (str, required): The name of the bucket. |
| 50 | + body (str, required): The request parameters. |
| 51 | + """ |
| 52 | + super().__init__(**kwargs) |
| 53 | + self.bucket = bucket |
| 54 | + self.body = body |
| 55 | + |
| 56 | + |
| 57 | +class PutBucketPolicyResult(serde.ResultModel): |
| 58 | + """ |
| 59 | + The request for the PutBucketPolicy operation. |
| 60 | + """ |
| 61 | + |
| 62 | +class GetBucketPolicyRequest(serde.RequestModel): |
| 63 | + """ |
| 64 | + The request for the GetBucketPolicy operation. |
| 65 | + """ |
| 66 | + |
| 67 | + _attribute_map = { |
| 68 | + 'bucket': {'tag': 'input', 'position': 'host', 'rename': 'bucket', 'type': 'str', 'required': True}, |
| 69 | + } |
| 70 | + |
| 71 | + def __init__( |
| 72 | + self, |
| 73 | + bucket: str = None, |
| 74 | + **kwargs: Any |
| 75 | + ) -> None: |
| 76 | + """ |
| 77 | + bucket (str, required): The name of the bucket. |
| 78 | + """ |
| 79 | + super().__init__(**kwargs) |
| 80 | + self.bucket = bucket |
| 81 | + |
| 82 | + |
| 83 | +class GetBucketPolicyResult(serde.ResultModel): |
| 84 | + """ |
| 85 | + The request for the GetBucketPolicy operation. |
| 86 | + """ |
| 87 | + |
| 88 | + _attribute_map = { |
| 89 | + 'body': {'tag': 'output', 'position': 'body', 'type': 'str'}, |
| 90 | + } |
| 91 | + |
| 92 | + def __init__( |
| 93 | + self, |
| 94 | + body: Optional[str] = None, |
| 95 | + **kwargs: Any |
| 96 | + ) -> None: |
| 97 | + """ |
| 98 | + body (io.ReadCloser, optional): <no value> |
| 99 | + """ |
| 100 | + super().__init__(**kwargs) |
| 101 | + self.body = body |
| 102 | + |
| 103 | +class DeleteBucketPolicyRequest(serde.RequestModel): |
| 104 | + """ |
| 105 | + The request for the DeleteBucketPolicy operation. |
| 106 | + """ |
| 107 | + |
| 108 | + _attribute_map = { |
| 109 | + 'bucket': {'tag': 'input', 'position': 'host', 'rename': 'bucket', 'type': 'str', 'required': True}, |
| 110 | + } |
| 111 | + |
| 112 | + def __init__( |
| 113 | + self, |
| 114 | + bucket: str = None, |
| 115 | + **kwargs: Any |
| 116 | + ) -> None: |
| 117 | + """ |
| 118 | + bucket (str, required): The name of the bucket. |
| 119 | + """ |
| 120 | + super().__init__(**kwargs) |
| 121 | + self.bucket = bucket |
| 122 | + |
| 123 | + |
| 124 | +class DeleteBucketPolicyResult(serde.ResultModel): |
| 125 | + """ |
| 126 | + The request for the DeleteBucketPolicy operation. |
| 127 | + """ |
| 128 | + |
| 129 | +class GetBucketPolicyStatusRequest(serde.RequestModel): |
| 130 | + """ |
| 131 | + The request for the GetBucketPolicyStatus operation. |
| 132 | + """ |
| 133 | + |
| 134 | + _attribute_map = { |
| 135 | + 'bucket': {'tag': 'input', 'position': 'host', 'rename': 'bucket', 'type': 'str'}, |
| 136 | + } |
| 137 | + |
| 138 | + def __init__( |
| 139 | + self, |
| 140 | + bucket: Optional[str] = None, |
| 141 | + **kwargs: Any |
| 142 | + ) -> None: |
| 143 | + """ |
| 144 | + bucket (str, optional): The name of the bucket. |
| 145 | + """ |
| 146 | + super().__init__(**kwargs) |
| 147 | + self.bucket = bucket |
| 148 | + |
| 149 | + |
| 150 | +class GetBucketPolicyStatusResult(serde.ResultModel): |
| 151 | + """ |
| 152 | + The request for the GetBucketPolicyStatus operation. |
| 153 | + """ |
| 154 | + |
| 155 | + _attribute_map = { |
| 156 | + 'policy_status': {'tag': 'output', 'position': 'body', 'rename': 'PolicyStatus', 'type': 'PolicyStatus,xml'}, |
| 157 | + } |
| 158 | + |
| 159 | + _dependency_map = { |
| 160 | + 'PolicyStatus': {'new': lambda: PolicyStatus()}, |
| 161 | + } |
| 162 | + |
| 163 | + def __init__( |
| 164 | + self, |
| 165 | + policy_status: Optional[PolicyStatus] = None, |
| 166 | + **kwargs: Any |
| 167 | + ) -> None: |
| 168 | + """ |
| 169 | + policy_status (PolicyStatus, optional): The container that stores public access information. |
| 170 | + """ |
| 171 | + super().__init__(**kwargs) |
| 172 | + self.policy_status = policy_status |
0 commit comments