|
| 1 | +import datetime |
| 2 | +from typing import Optional, List, Any, Union |
| 3 | +from enum import Enum |
| 4 | +from .. import serde |
| 5 | + |
| 6 | + |
| 7 | +class AccessMonitorStatusType(str, Enum): |
| 8 | + """ |
| 9 | + A short description of struct |
| 10 | + """ |
| 11 | + |
| 12 | + ENABLED = 'Enabled' |
| 13 | + DISABLED = 'Disabled' |
| 14 | + |
| 15 | + |
| 16 | +class AccessMonitorConfiguration(serde.Model): |
| 17 | + """ |
| 18 | + The container that stores access monitor configuration. |
| 19 | + """ |
| 20 | + |
| 21 | + _attribute_map = { |
| 22 | + 'status': {'tag': 'xml', 'rename': 'Status', 'type': 'str'}, |
| 23 | + } |
| 24 | + |
| 25 | + _xml_map = { |
| 26 | + 'name': 'AccessMonitorConfiguration' |
| 27 | + } |
| 28 | + |
| 29 | + def __init__( |
| 30 | + self, |
| 31 | + status: Optional[Union[str, AccessMonitorStatusType]] = None, |
| 32 | + **kwargs: Any |
| 33 | + ) -> None: |
| 34 | + """ |
| 35 | + status (str | AccessMonitorStatusType, optional): The access tracking status of the bucket. Valid values:- Enabled: Access tracking is enabled.- Disabled: Access tracking is disabled. |
| 36 | + """ |
| 37 | + super().__init__(**kwargs) |
| 38 | + self.status = status |
| 39 | + |
| 40 | + |
| 41 | +class PutBucketAccessMonitorRequest(serde.RequestModel): |
| 42 | + """ |
| 43 | + The request for the PutBucketAccessMonitor operation. |
| 44 | + """ |
| 45 | + |
| 46 | + _attribute_map = { |
| 47 | + 'bucket': {'tag': 'input', 'position': 'host', 'rename': 'bucket', 'type': 'str', 'required': True}, |
| 48 | + 'access_monitor_configuration': {'tag': 'input', 'position': 'body', 'rename': 'AccessMonitorConfiguration', 'type': 'xml'}, |
| 49 | + } |
| 50 | + |
| 51 | + def __init__( |
| 52 | + self, |
| 53 | + bucket: str = None, |
| 54 | + access_monitor_configuration: Optional[AccessMonitorConfiguration] = None, |
| 55 | + **kwargs: Any |
| 56 | + ) -> None: |
| 57 | + """ |
| 58 | + bucket (str, required): The name of the bucket. |
| 59 | + access_monitor_configuration (AccessMonitorConfiguration, optional): The request body schema. |
| 60 | + """ |
| 61 | + super().__init__(**kwargs) |
| 62 | + self.bucket = bucket |
| 63 | + self.access_monitor_configuration = access_monitor_configuration |
| 64 | + |
| 65 | + |
| 66 | +class PutBucketAccessMonitorResult(serde.ResultModel): |
| 67 | + """ |
| 68 | + The request for the PutBucketAccessMonitor operation. |
| 69 | + """ |
| 70 | + |
| 71 | +class GetBucketAccessMonitorRequest(serde.RequestModel): |
| 72 | + """ |
| 73 | + The request for the GetBucketAccessMonitor operation. |
| 74 | + """ |
| 75 | + |
| 76 | + _attribute_map = { |
| 77 | + 'bucket': {'tag': 'input', 'position': 'host', 'rename': 'bucket', 'type': 'str', 'required': True}, |
| 78 | + } |
| 79 | + |
| 80 | + def __init__( |
| 81 | + self, |
| 82 | + bucket: str = None, |
| 83 | + **kwargs: Any |
| 84 | + ) -> None: |
| 85 | + """ |
| 86 | + bucket (str, required): The name of the bucket. |
| 87 | + """ |
| 88 | + super().__init__(**kwargs) |
| 89 | + self.bucket = bucket |
| 90 | + |
| 91 | + |
| 92 | +class GetBucketAccessMonitorResult(serde.ResultModel): |
| 93 | + """ |
| 94 | + The request for the GetBucketAccessMonitor operation. |
| 95 | + """ |
| 96 | + |
| 97 | + _attribute_map = { |
| 98 | + 'access_monitor_configuration': {'tag': 'output', 'position': 'body', 'rename': 'AccessMonitorConfiguration', 'type': 'AccessMonitorConfiguration,xml'}, |
| 99 | + } |
| 100 | + |
| 101 | + _dependency_map = { |
| 102 | + 'AccessMonitorConfiguration': {'new': lambda: AccessMonitorConfiguration()}, |
| 103 | + } |
| 104 | + |
| 105 | + _xml_map = { |
| 106 | + 'name': 'AccessMonitorConfiguration' |
| 107 | + } |
| 108 | + |
| 109 | + def __init__( |
| 110 | + self, |
| 111 | + access_monitor_configuration: Optional[AccessMonitorConfiguration] = None, |
| 112 | + **kwargs: Any |
| 113 | + ) -> None: |
| 114 | + """ |
| 115 | + access_monitor_configuration (AccessMonitorConfiguration, optional): The container that stores access monitor configuration. |
| 116 | + """ |
| 117 | + super().__init__(**kwargs) |
| 118 | + self.access_monitor_configuration = access_monitor_configuration |
0 commit comments