11from hcloud .core .domain import BaseDomain , DomainIdentityMixin
2+ from hcloud .deprecation .domain import DeprecationInfo
23
34
45class ServerType (BaseDomain , DomainIdentityMixin ):
@@ -25,7 +26,10 @@ class ServerType(BaseDomain, DomainIdentityMixin):
2526 :param architecture: string
2627 Architecture of cpu. Choices: `x86`, `arm`
2728 :param deprecated: bool
28- True if server type is deprecated
29+ True if server type is deprecated. This field is deprecated. Use `deprecation` instead.
30+ :param deprecation: :class:`DeprecationInfo <hcloud.deprecation.domain.DeprecationInfo>`, None
31+ Describes if, when & how the resources was deprecated. If this field is set to None the resource is not
32+ deprecated. If it has a value, it is considered deprecated.
2933 :param included_traffic: int
3034 Free traffic per month in bytes
3135 """
@@ -42,6 +46,7 @@ class ServerType(BaseDomain, DomainIdentityMixin):
4246 "cpu_type" ,
4347 "architecture" ,
4448 "deprecated" ,
49+ "deprecation" ,
4550 "included_traffic" ,
4651 )
4752
@@ -58,6 +63,7 @@ def __init__(
5863 cpu_type = None ,
5964 architecture = None ,
6065 deprecated = None ,
66+ deprecation = None ,
6167 included_traffic = None ,
6268 ):
6369 self .id = id
@@ -71,4 +77,7 @@ def __init__(
7177 self .cpu_type = cpu_type
7278 self .architecture = architecture
7379 self .deprecated = deprecated
80+ self .deprecation = (
81+ DeprecationInfo .from_dict (deprecation ) if deprecation is not None else None
82+ )
7483 self .included_traffic = included_traffic
0 commit comments