methodaws 0.0.13__tar.gz → 0.0.15__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (38) hide show
  1. {methodaws-0.0.13 → methodaws-0.0.15}/PKG-INFO +1 -1
  2. {methodaws-0.0.13 → methodaws-0.0.15}/pyproject.toml +6 -2
  3. {methodaws-0.0.13/src/method-security → methodaws-0.0.15/src}/methodaws/core/__init__.py +0 -2
  4. {methodaws-0.0.13/src/method-security → methodaws-0.0.15/src}/methodaws/core/pydantic_utilities.py +82 -55
  5. {methodaws-0.0.13/src/method-security → methodaws-0.0.15/src}/methodaws/core/serialization.py +4 -1
  6. {methodaws-0.0.13/src/method-security → methodaws-0.0.15/src}/methodaws/resources/credential/credential_info.py +3 -4
  7. {methodaws-0.0.13/src/method-security → methodaws-0.0.15/src}/methodaws/resources/credential/credential_report.py +3 -4
  8. {methodaws-0.0.13/src/method-security → methodaws-0.0.15/src}/methodaws/resources/loadbalancer/certificate.py +3 -4
  9. {methodaws-0.0.13/src/method-security → methodaws-0.0.15/src}/methodaws/resources/loadbalancer/listener.py +4 -5
  10. {methodaws-0.0.13/src/method-security → methodaws-0.0.15/src}/methodaws/resources/loadbalancer/load_balancer_report.py +4 -5
  11. {methodaws-0.0.13/src/method-security → methodaws-0.0.15/src}/methodaws/resources/loadbalancer/load_balancer_v_1.py +4 -5
  12. {methodaws-0.0.13/src/method-security → methodaws-0.0.15/src}/methodaws/resources/loadbalancer/load_balancer_v_2.py +4 -5
  13. {methodaws-0.0.13/src/method-security → methodaws-0.0.15/src}/methodaws/resources/loadbalancer/target.py +3 -4
  14. {methodaws-0.0.13/src/method-security → methodaws-0.0.15/src}/methodaws/resources/loadbalancer/target_group.py +4 -5
  15. {methodaws-0.0.13/src/method-security → methodaws-0.0.15/src}/methodaws/resources/s_3/bucket.py +5 -6
  16. {methodaws-0.0.13/src/method-security → methodaws-0.0.15/src}/methodaws/resources/s_3/encryption_rule.py +3 -4
  17. {methodaws-0.0.13/src/method-security → methodaws-0.0.15/src}/methodaws/resources/s_3/external_bucket.py +3 -4
  18. {methodaws-0.0.13/src/method-security → methodaws-0.0.15/src}/methodaws/resources/s_3/external_s_3_report.py +3 -4
  19. {methodaws-0.0.13/src/method-security → methodaws-0.0.15/src}/methodaws/resources/s_3/s_3_bucket_acl.py +3 -4
  20. {methodaws-0.0.13/src/method-security → methodaws-0.0.15/src}/methodaws/resources/s_3/s_3_object_details.py +3 -4
  21. {methodaws-0.0.13/src/method-security → methodaws-0.0.15/src}/methodaws/resources/s_3/s_3_public_access_block_configuration.py +3 -4
  22. {methodaws-0.0.13/src/method-security → methodaws-0.0.15/src}/methodaws/resources/s_3/s_3_report.py +4 -4
  23. {methodaws-0.0.13 → methodaws-0.0.15}/README.md +0 -0
  24. {methodaws-0.0.13/src/method-security → methodaws-0.0.15/src}/methodaws/__init__.py +0 -0
  25. {methodaws-0.0.13/src/method-security → methodaws-0.0.15/src}/methodaws/core/datetime_utils.py +0 -0
  26. {methodaws-0.0.13/src/method-security → methodaws-0.0.15/src}/methodaws/py.typed +0 -0
  27. {methodaws-0.0.13/src/method-security → methodaws-0.0.15/src}/methodaws/resources/__init__.py +0 -0
  28. {methodaws-0.0.13/src/method-security → methodaws-0.0.15/src}/methodaws/resources/credential/__init__.py +0 -0
  29. {methodaws-0.0.13/src/method-security → methodaws-0.0.15/src}/methodaws/resources/loadbalancer/__init__.py +0 -0
  30. {methodaws-0.0.13/src/method-security → methodaws-0.0.15/src}/methodaws/resources/loadbalancer/ip_address_type.py +0 -0
  31. {methodaws-0.0.13/src/method-security → methodaws-0.0.15/src}/methodaws/resources/loadbalancer/load_balancer_state.py +0 -0
  32. {methodaws-0.0.13/src/method-security → methodaws-0.0.15/src}/methodaws/resources/loadbalancer/protocol.py +0 -0
  33. {methodaws-0.0.13/src/method-security → methodaws-0.0.15/src}/methodaws/resources/loadbalancer/target_group_ip_address_type.py +0 -0
  34. {methodaws-0.0.13/src/method-security → methodaws-0.0.15/src}/methodaws/resources/loadbalancer/target_type.py +0 -0
  35. {methodaws-0.0.13/src/method-security → methodaws-0.0.15/src}/methodaws/resources/s_3/__init__.py +0 -0
  36. {methodaws-0.0.13/src/method-security → methodaws-0.0.15/src}/methodaws/resources/s_3/bucket_versioning_status.py +0 -0
  37. {methodaws-0.0.13/src/method-security → methodaws-0.0.15/src}/methodaws/resources/s_3/s_3_mfa_delete_status.py +0 -0
  38. {methodaws-0.0.13/src/method-security → methodaws-0.0.15/src}/methodaws/resources/s_3/s_3_server_side_encryption.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: methodaws
3
- Version: 0.0.13
3
+ Version: 0.0.15
4
4
  Summary:
5
5
  Requires-Python: >=3.8,<4.0
6
6
  Classifier: Intended Audience :: Developers
@@ -1,6 +1,6 @@
1
1
  [tool.poetry]
2
2
  name = "methodaws"
3
- version = "v0.0.13"
3
+ version = "v0.0.15"
4
4
  description = ""
5
5
  readme = "README.md"
6
6
  authors = []
@@ -24,7 +24,7 @@ classifiers = [
24
24
  "Typing :: Typed"
25
25
  ]
26
26
  packages = [
27
- { include = "method-security/methodaws", from = "src"}
27
+ { include = "methodaws", from = "src"}
28
28
  ]
29
29
 
30
30
  [tool.poetry.dependencies]
@@ -38,6 +38,7 @@ pytest = "^7.4.0"
38
38
  pytest-asyncio = "^0.23.5"
39
39
  python-dateutil = "^2.9.0"
40
40
  types-python-dateutil = "^2.9.0.20240316"
41
+ ruff = "^0.5.6"
41
42
 
42
43
  [tool.pytest.ini_options]
43
44
  testpaths = [ "tests" ]
@@ -46,6 +47,9 @@ asyncio_mode = "auto"
46
47
  [tool.mypy]
47
48
  plugins = ["pydantic.mypy"]
48
49
 
50
+ [tool.ruff]
51
+ line-length = 120
52
+
49
53
 
50
54
  [build-system]
51
55
  requires = ["poetry-core"]
@@ -5,7 +5,6 @@ from .pydantic_utilities import (
5
5
  IS_PYDANTIC_V2,
6
6
  UniversalBaseModel,
7
7
  UniversalRootModel,
8
- deep_union_pydantic_dicts,
9
8
  parse_obj_as,
10
9
  universal_field_validator,
11
10
  universal_root_validator,
@@ -18,7 +17,6 @@ __all__ = [
18
17
  "IS_PYDANTIC_V2",
19
18
  "UniversalBaseModel",
20
19
  "UniversalRootModel",
21
- "deep_union_pydantic_dicts",
22
20
  "parse_obj_as",
23
21
  "serialize_datetime",
24
22
  "universal_field_validator",
@@ -4,7 +4,8 @@
4
4
  import datetime as dt
5
5
  import typing
6
6
  from collections import defaultdict
7
- from functools import wraps
7
+
8
+ import typing_extensions
8
9
 
9
10
  import pydantic
10
11
 
@@ -27,11 +28,15 @@ if IS_PYDANTIC_V2:
27
28
  from pydantic.v1.typing import ( # type: ignore # pyright: ignore[reportMissingImports] # Pydantic v2
28
29
  get_args as get_args,
29
30
  )
30
- from pydantic.v1.typing import get_origin as get_origin # pyright: ignore[reportMissingImports] # Pydantic v2
31
+ from pydantic.v1.typing import ( # pyright: ignore[reportMissingImports] # Pydantic v2
32
+ get_origin as get_origin,
33
+ )
31
34
  from pydantic.v1.typing import ( # pyright: ignore[reportMissingImports] # Pydantic v2
32
35
  is_literal_type as is_literal_type,
33
36
  )
34
- from pydantic.v1.typing import is_union as is_union # pyright: ignore[reportMissingImports] # Pydantic v2
37
+ from pydantic.v1.typing import ( # pyright: ignore[reportMissingImports] # Pydantic v2
38
+ is_union as is_union,
39
+ )
35
40
  from pydantic.v1.fields import ModelField as ModelField # type: ignore # pyright: ignore[reportMissingImports] # Pydantic v2
36
41
  else:
37
42
  from pydantic.datetime_parse import parse_date as parse_date # type: ignore # Pydantic v1
@@ -50,19 +55,6 @@ T = typing.TypeVar("T")
50
55
  Model = typing.TypeVar("Model", bound=pydantic.BaseModel)
51
56
 
52
57
 
53
- def deep_union_pydantic_dicts(
54
- source: typing.Dict[str, typing.Any], destination: typing.Dict[str, typing.Any]
55
- ) -> typing.Dict[str, typing.Any]:
56
- for key, value in source.items():
57
- if isinstance(value, dict):
58
- node = destination.setdefault(key, {})
59
- deep_union_pydantic_dicts(value, node)
60
- else:
61
- destination[key] = value
62
-
63
- return destination
64
-
65
-
66
58
  def parse_obj_as(type_: typing.Type[T], object_: typing.Any) -> T:
67
59
  if IS_PYDANTIC_V2:
68
60
  adapter = pydantic.TypeAdapter(type_) # type: ignore # Pydantic v2
@@ -90,42 +82,61 @@ class UniversalBaseModel(pydantic.BaseModel):
90
82
  json_encoders = {dt.datetime: serialize_datetime}
91
83
 
92
84
  def json(self, **kwargs: typing.Any) -> str:
93
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
85
+ kwargs_with_defaults: typing.Any = {
86
+ "by_alias": True,
87
+ "exclude_unset": True,
88
+ **kwargs,
89
+ }
94
90
  if IS_PYDANTIC_V2:
95
91
  return super().model_dump_json(**kwargs_with_defaults) # type: ignore # Pydantic v2
96
92
  else:
97
93
  return super().json(**kwargs_with_defaults)
98
94
 
99
95
  def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
100
- kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
101
- kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
96
+ """
97
+ Override the default dict method to `exclude_unset` by default. This function patches
98
+ `exclude_unset` to work include fields within non-None default values.
99
+ """
100
+ _fields_set = self.__fields_set__
101
+
102
+ fields = _get_model_fields(self.__class__)
103
+ for name, field in fields.items():
104
+ if name not in _fields_set:
105
+ default = _get_field_default(field)
106
+
107
+ # If the default values are non-null act like they've been set
108
+ # This effectively allows exclude_unset to work like exclude_none where
109
+ # the latter passes through intentionally set none values.
110
+ if default != None:
111
+ _fields_set.add(name)
112
+
113
+ kwargs_with_defaults_exclude_unset: typing.Any = {
114
+ "by_alias": True,
115
+ "exclude_unset": True,
116
+ "include": _fields_set,
117
+ **kwargs,
118
+ }
102
119
 
103
120
  if IS_PYDANTIC_V2:
104
- return deep_union_pydantic_dicts(
105
- super().model_dump(**kwargs_with_defaults_exclude_unset), # type: ignore # Pydantic v2
106
- super().model_dump(**kwargs_with_defaults_exclude_none), # type: ignore # Pydantic v2
107
- )
121
+ return super().model_dump(**kwargs_with_defaults_exclude_unset) # type: ignore # Pydantic v2
108
122
  else:
109
- return deep_union_pydantic_dicts(
110
- super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_none)
111
- )
123
+ return super().dict(**kwargs_with_defaults_exclude_unset)
112
124
 
113
125
 
114
- UniversalRootModel: typing.Type[pydantic.BaseModel]
115
126
  if IS_PYDANTIC_V2:
116
127
 
117
128
  class V2RootModel(UniversalBaseModel, pydantic.RootModel): # type: ignore # Pydantic v2
118
129
  pass
119
130
 
120
- UniversalRootModel = V2RootModel
131
+ UniversalRootModel: typing_extensions.TypeAlias = V2RootModel # type: ignore
121
132
  else:
122
- UniversalRootModel = UniversalBaseModel
133
+ UniversalRootModel: typing_extensions.TypeAlias = UniversalBaseModel # type: ignore
123
134
 
124
135
 
125
136
  def encode_by_type(o: typing.Any) -> typing.Any:
126
- encoders_by_class_tuples: typing.Dict[
127
- typing.Callable[[typing.Any], typing.Any], typing.Tuple[typing.Any, ...]
128
- ] = defaultdict(tuple)
137
+ encoders_by_class_tuples: typing.Dict[typing.Callable[[typing.Any], typing.Any], typing.Tuple[typing.Any, ...]] = (
138
+ defaultdict(tuple)
139
+ )
129
140
  for type_, encoder in encoders_by_type.items():
130
141
  encoders_by_class_tuples[encoder] += (type_,)
131
142
 
@@ -136,44 +147,60 @@ def encode_by_type(o: typing.Any) -> typing.Any:
136
147
  return encoder(o)
137
148
 
138
149
 
139
- def update_forward_refs(model: typing.Type["Model"], **localns: typing.Any) -> None:
150
+ def update_forward_refs(model: typing.Type["Model"]) -> None:
140
151
  if IS_PYDANTIC_V2:
141
- model.model_rebuild(force=True, raise_errors=False) # type: ignore # Pydantic v2
152
+ model.model_rebuild(raise_errors=False) # type: ignore # Pydantic v2
142
153
  else:
143
- model.update_forward_refs(**localns)
154
+ model.update_forward_refs()
144
155
 
145
156
 
146
157
  # Mirrors Pydantic's internal typing
147
158
  AnyCallable = typing.Callable[..., typing.Any]
148
159
 
149
160
 
150
- def universal_root_validator(pre: bool = False) -> typing.Callable[[AnyCallable], AnyCallable]:
161
+ def universal_root_validator(
162
+ pre: bool = False,
163
+ ) -> typing.Callable[[AnyCallable], AnyCallable]:
151
164
  def decorator(func: AnyCallable) -> AnyCallable:
152
- @wraps(func)
153
- def validate(*args: typing.Any, **kwargs: typing.Any) -> AnyCallable:
154
- if IS_PYDANTIC_V2:
155
- wrapped_func = pydantic.model_validator("before" if pre else "after")(func) # type: ignore # Pydantic v2
156
- else:
157
- wrapped_func = pydantic.root_validator(pre=pre)(func) # type: ignore # Pydantic v1
158
-
159
- return wrapped_func(*args, **kwargs)
160
-
161
- return validate
165
+ if IS_PYDANTIC_V2:
166
+ return pydantic.model_validator(mode="before" if pre else "after")(func) # type: ignore # Pydantic v2
167
+ else:
168
+ return pydantic.root_validator(pre=pre)(func) # type: ignore # Pydantic v1
162
169
 
163
170
  return decorator
164
171
 
165
172
 
166
173
  def universal_field_validator(field_name: str, pre: bool = False) -> typing.Callable[[AnyCallable], AnyCallable]:
167
174
  def decorator(func: AnyCallable) -> AnyCallable:
168
- @wraps(func)
169
- def validate(*args: typing.Any, **kwargs: typing.Any) -> AnyCallable:
170
- if IS_PYDANTIC_V2:
171
- wrapped_func = pydantic.field_validator(field_name, mode="before" if pre else "after")(func) # type: ignore # Pydantic v2
172
- else:
173
- wrapped_func = pydantic.validator(field_name, pre=pre)(func)
175
+ if IS_PYDANTIC_V2:
176
+ return pydantic.field_validator(field_name, mode="before" if pre else "after")(func) # type: ignore # Pydantic v2
177
+ else:
178
+ return pydantic.validator(field_name, pre=pre)(func) # type: ignore # Pydantic v1
174
179
 
175
- return wrapped_func(*args, **kwargs)
180
+ return decorator
176
181
 
177
- return validate
178
182
 
179
- return decorator
183
+ PydanticField = typing.Union[ModelField, pydantic.fields.FieldInfo]
184
+
185
+
186
+ def _get_model_fields(
187
+ model: typing.Type["Model"],
188
+ ) -> typing.Mapping[str, PydanticField]:
189
+ if IS_PYDANTIC_V2:
190
+ return model.model_fields # type: ignore # Pydantic v2
191
+ else:
192
+ return model.__fields__ # type: ignore # Pydantic v1
193
+
194
+
195
+ def _get_field_default(field: PydanticField) -> typing.Any:
196
+ try:
197
+ value = field.get_default() # type: ignore # Pydantic < v1.10.15
198
+ except:
199
+ value = field.default
200
+ if IS_PYDANTIC_V2:
201
+ from pydantic_core import PydanticUndefined
202
+
203
+ if value == PydanticUndefined:
204
+ return None
205
+ return value
206
+ return value
@@ -25,7 +25,10 @@ class FieldMetadata:
25
25
 
26
26
 
27
27
  def convert_and_respect_annotation_metadata(
28
- *, object_: typing.Any, annotation: typing.Any, inner_type: typing.Optional[typing.Any] = None
28
+ *,
29
+ object_: typing.Any,
30
+ annotation: typing.Any,
31
+ inner_type: typing.Optional[typing.Any] = None,
29
32
  ) -> typing.Any:
30
33
  """
31
34
  Respect the metadata annotations on a field, such as aliasing. This function effectively
@@ -1,11 +1,10 @@
1
1
  # This file was auto-generated by Fern from our API Definition.
2
2
 
3
- import datetime as dt
3
+ from ...core.pydantic_utilities import UniversalBaseModel
4
4
  import typing
5
-
6
5
  import pydantic
7
-
8
- from ...core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
6
+ import datetime as dt
7
+ from ...core.pydantic_utilities import IS_PYDANTIC_V2
9
8
 
10
9
 
11
10
  class CredentialInfo(UniversalBaseModel):
@@ -1,11 +1,10 @@
1
1
  # This file was auto-generated by Fern from our API Definition.
2
2
 
3
- import typing
4
-
3
+ from ...core.pydantic_utilities import UniversalBaseModel
5
4
  import pydantic
6
-
7
- from ...core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
5
+ import typing
8
6
  from .credential_info import CredentialInfo
7
+ from ...core.pydantic_utilities import IS_PYDANTIC_V2
9
8
 
10
9
 
11
10
  class CredentialReport(UniversalBaseModel):
@@ -1,10 +1,9 @@
1
1
  # This file was auto-generated by Fern from our API Definition.
2
2
 
3
- import typing
4
-
3
+ from ...core.pydantic_utilities import UniversalBaseModel
5
4
  import pydantic
6
-
7
- from ...core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
5
+ from ...core.pydantic_utilities import IS_PYDANTIC_V2
6
+ import typing
8
7
 
9
8
 
10
9
  class Certificate(UniversalBaseModel):
@@ -1,12 +1,11 @@
1
1
  # This file was auto-generated by Fern from our API Definition.
2
2
 
3
+ from ...core.pydantic_utilities import UniversalBaseModel
3
4
  import typing
4
-
5
- import pydantic
6
-
7
- from ...core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
8
- from .certificate import Certificate
9
5
  from .protocol import Protocol
6
+ from .certificate import Certificate
7
+ import pydantic
8
+ from ...core.pydantic_utilities import IS_PYDANTIC_V2
10
9
 
11
10
 
12
11
  class Listener(UniversalBaseModel):
@@ -1,12 +1,11 @@
1
1
  # This file was auto-generated by Fern from our API Definition.
2
2
 
3
- import typing
4
-
3
+ from ...core.pydantic_utilities import UniversalBaseModel
5
4
  import pydantic
6
-
7
- from ...core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
8
- from .load_balancer_v_1 import LoadBalancerV1
5
+ import typing
9
6
  from .load_balancer_v_2 import LoadBalancerV2
7
+ from .load_balancer_v_1 import LoadBalancerV1
8
+ from ...core.pydantic_utilities import IS_PYDANTIC_V2
10
9
 
11
10
 
12
11
  class LoadBalancerReport(UniversalBaseModel):
@@ -1,13 +1,12 @@
1
1
  # This file was auto-generated by Fern from our API Definition.
2
2
 
3
+ from ...core.pydantic_utilities import UniversalBaseModel
3
4
  import datetime as dt
4
- import typing
5
-
6
5
  import pydantic
7
-
8
- from ...core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
9
- from .listener import Listener
6
+ import typing
10
7
  from .target import Target
8
+ from .listener import Listener
9
+ from ...core.pydantic_utilities import IS_PYDANTIC_V2
11
10
 
12
11
 
13
12
  class LoadBalancerV1(UniversalBaseModel):
@@ -1,15 +1,14 @@
1
1
  # This file was auto-generated by Fern from our API Definition.
2
2
 
3
+ from ...core.pydantic_utilities import UniversalBaseModel
3
4
  import datetime as dt
4
- import typing
5
-
6
5
  import pydantic
7
-
8
- from ...core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
9
6
  from .ip_address_type import IpAddressType
10
- from .listener import Listener
7
+ import typing
11
8
  from .load_balancer_state import LoadBalancerState
9
+ from .listener import Listener
12
10
  from .target_group import TargetGroup
11
+ from ...core.pydantic_utilities import IS_PYDANTIC_V2
13
12
 
14
13
 
15
14
  class LoadBalancerV2(UniversalBaseModel):
@@ -1,11 +1,10 @@
1
1
  # This file was auto-generated by Fern from our API Definition.
2
2
 
3
+ from ...core.pydantic_utilities import UniversalBaseModel
4
+ from .target_type import TargetType
3
5
  import typing
4
-
5
6
  import pydantic
6
-
7
- from ...core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
8
- from .target_type import TargetType
7
+ from ...core.pydantic_utilities import IS_PYDANTIC_V2
9
8
 
10
9
 
11
10
  class Target(UniversalBaseModel):
@@ -1,13 +1,12 @@
1
1
  # This file was auto-generated by Fern from our API Definition.
2
2
 
3
- import typing
4
-
3
+ from ...core.pydantic_utilities import UniversalBaseModel
4
+ from .target_group_ip_address_type import TargetGroupIpAddressType
5
5
  import pydantic
6
-
7
- from ...core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
6
+ import typing
8
7
  from .protocol import Protocol
9
8
  from .target import Target
10
- from .target_group_ip_address_type import TargetGroupIpAddressType
9
+ from ...core.pydantic_utilities import IS_PYDANTIC_V2
11
10
 
12
11
 
13
12
  class TargetGroup(UniversalBaseModel):
@@ -1,15 +1,14 @@
1
1
  # This file was auto-generated by Fern from our API Definition.
2
2
 
3
+ from ...core.pydantic_utilities import UniversalBaseModel
3
4
  import datetime as dt
4
- import typing
5
-
6
5
  import pydantic
7
-
8
- from ...core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
6
+ from .s_3_public_access_block_configuration import S3PublicAccessBlockConfiguration
7
+ import typing
9
8
  from .bucket_versioning_status import BucketVersioningStatus
10
- from .encryption_rule import EncryptionRule
11
9
  from .s_3_mfa_delete_status import S3MfaDeleteStatus
12
- from .s_3_public_access_block_configuration import S3PublicAccessBlockConfiguration
10
+ from .encryption_rule import EncryptionRule
11
+ from ...core.pydantic_utilities import IS_PYDANTIC_V2
13
12
 
14
13
 
15
14
  class Bucket(UniversalBaseModel):
@@ -1,11 +1,10 @@
1
1
  # This file was auto-generated by Fern from our API Definition.
2
2
 
3
+ from ...core.pydantic_utilities import UniversalBaseModel
3
4
  import typing
4
-
5
- import pydantic
6
-
7
- from ...core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
8
5
  from .s_3_server_side_encryption import S3ServerSideEncryption
6
+ import pydantic
7
+ from ...core.pydantic_utilities import IS_PYDANTIC_V2
9
8
 
10
9
 
11
10
  class EncryptionRule(UniversalBaseModel):
@@ -1,12 +1,11 @@
1
1
  # This file was auto-generated by Fern from our API Definition.
2
2
 
3
+ from ...core.pydantic_utilities import UniversalBaseModel
3
4
  import typing
4
-
5
+ from .s_3_object_details import S3ObjectDetails
5
6
  import pydantic
6
-
7
- from ...core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
8
7
  from .s_3_bucket_acl import S3BucketAcl
9
- from .s_3_object_details import S3ObjectDetails
8
+ from ...core.pydantic_utilities import IS_PYDANTIC_V2
10
9
 
11
10
 
12
11
  class ExternalBucket(UniversalBaseModel):
@@ -1,11 +1,10 @@
1
1
  # This file was auto-generated by Fern from our API Definition.
2
2
 
3
+ from ...core.pydantic_utilities import UniversalBaseModel
3
4
  import typing
4
-
5
- import pydantic
6
-
7
- from ...core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
8
5
  from .external_bucket import ExternalBucket
6
+ import pydantic
7
+ from ...core.pydantic_utilities import IS_PYDANTIC_V2
9
8
 
10
9
 
11
10
  class ExternalS3Report(UniversalBaseModel):
@@ -1,10 +1,9 @@
1
1
  # This file was auto-generated by Fern from our API Definition.
2
2
 
3
- import typing
4
-
3
+ from ...core.pydantic_utilities import UniversalBaseModel
5
4
  import pydantic
6
-
7
- from ...core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
5
+ from ...core.pydantic_utilities import IS_PYDANTIC_V2
6
+ import typing
8
7
 
9
8
 
10
9
  class S3BucketAcl(UniversalBaseModel):
@@ -1,11 +1,10 @@
1
1
  # This file was auto-generated by Fern from our API Definition.
2
2
 
3
- import datetime as dt
3
+ from ...core.pydantic_utilities import UniversalBaseModel
4
4
  import typing
5
-
5
+ import datetime as dt
6
6
  import pydantic
7
-
8
- from ...core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
7
+ from ...core.pydantic_utilities import IS_PYDANTIC_V2
9
8
 
10
9
 
11
10
  class S3ObjectDetails(UniversalBaseModel):
@@ -1,10 +1,9 @@
1
1
  # This file was auto-generated by Fern from our API Definition.
2
2
 
3
- import typing
4
-
3
+ from ...core.pydantic_utilities import UniversalBaseModel
5
4
  import pydantic
6
-
7
- from ...core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
5
+ from ...core.pydantic_utilities import IS_PYDANTIC_V2
6
+ import typing
8
7
 
9
8
 
10
9
  class S3PublicAccessBlockConfiguration(UniversalBaseModel):
@@ -1,15 +1,15 @@
1
1
  # This file was auto-generated by Fern from our API Definition.
2
2
 
3
- import typing
4
-
3
+ from ...core.pydantic_utilities import UniversalBaseModel
5
4
  import pydantic
6
-
7
- from ...core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
5
+ import typing
8
6
  from .bucket import Bucket
7
+ from ...core.pydantic_utilities import IS_PYDANTIC_V2
9
8
 
10
9
 
11
10
  class S3Report(UniversalBaseModel):
12
11
  account_id: str = pydantic.Field(alias="accountId")
12
+ region: str
13
13
  s_3_buckets: typing.Optional[typing.List[Bucket]] = pydantic.Field(alias="s3Buckets", default=None)
14
14
  errors: typing.Optional[typing.List[str]] = None
15
15
 
File without changes