File tree Expand file tree Collapse file tree 6 files changed +114
-6
lines changed
scaleway-async/scaleway_async/audit_trail/v1alpha1
scaleway/scaleway/audit_trail/v1alpha1 Expand file tree Collapse file tree 6 files changed +114
-6
lines changed Original file line number Diff line number Diff line change 55from .types import AuthenticationEventMethod
66from .types import AuthenticationEventOrigin
77from .types import AuthenticationEventResult
8+ from .types import ExportJobStatusCode
89from .types import ListAuthenticationEventsRequestOrderBy
910from .types import ListCombinedEventsRequestOrderBy
1011from .types import ListEventsRequestOrderBy
3940from .types import Event
4041from .types import SystemEvent
4142from .types import ExportJobS3
43+ from .types import ExportJobStatus
4244from .types import ProductService
4345from .types import ListCombinedEventsResponseCombinedEvent
4446from .types import ExportJob
6365 "AuthenticationEventMethod" ,
6466 "AuthenticationEventOrigin" ,
6567 "AuthenticationEventResult" ,
68+ "ExportJobStatusCode" ,
6669 "ListAuthenticationEventsRequestOrderBy" ,
6770 "ListCombinedEventsRequestOrderBy" ,
6871 "ListEventsRequestOrderBy" ,
97100 "Event" ,
98101 "SystemEvent" ,
99102 "ExportJobS3" ,
103+ "ExportJobStatus" ,
100104 "ProductService" ,
101105 "ListCombinedEventsResponseCombinedEvent" ,
102106 "ExportJob" ,
Original file line number Diff line number Diff line change 1616 AuthenticationEventOrigin ,
1717 AuthenticationEventResult ,
1818 ExportJobS3 ,
19+ ExportJobStatus ,
1920 ExportJob ,
2021 AccountOrganizationInfo ,
2122 AccountProjectInfo ,
@@ -94,6 +95,29 @@ def unmarshal_ExportJobS3(data: Any) -> ExportJobS3:
9495 return ExportJobS3 (** args )
9596
9697
98+ def unmarshal_ExportJobStatus (data : Any ) -> ExportJobStatus :
99+ if not isinstance (data , dict ):
100+ raise TypeError (
101+ "Unmarshalling the type 'ExportJobStatus' failed as data isn't a dictionary."
102+ )
103+
104+ args : dict [str , Any ] = {}
105+
106+ field = data .get ("code" , None )
107+ if field is not None :
108+ args ["code" ] = field
109+ else :
110+ args ["code" ] = None
111+
112+ field = data .get ("message" , None )
113+ if field is not None :
114+ args ["message" ] = field
115+ else :
116+ args ["message" ] = None
117+
118+ return ExportJobStatus (** args )
119+
120+
97121def unmarshal_ExportJob (data : Any ) -> ExportJob :
98122 if not isinstance (data , dict ):
99123 raise TypeError (
@@ -146,6 +170,12 @@ def unmarshal_ExportJob(data: Any) -> ExportJob:
146170 else :
147171 args ["last_run_at" ] = None
148172
173+ field = data .get ("last_status" , None )
174+ if field is not None :
175+ args ["last_status" ] = unmarshal_ExportJobStatus (field )
176+ else :
177+ args ["last_status" ] = None
178+
149179 return ExportJob (** args )
150180
151181
Original file line number Diff line number Diff line change @@ -65,6 +65,15 @@ def __str__(self) -> str:
6565 return str (self .value )
6666
6767
68+ class ExportJobStatusCode (str , Enum , metaclass = StrEnumMeta ):
69+ UNKNOWN_CODE = "unknown_code"
70+ SUCCESS = "success"
71+ FAILURE = "failure"
72+
73+ def __str__ (self ) -> str :
74+ return str (self .value )
75+
76+
6877class ListAuthenticationEventsRequestOrderBy (str , Enum , metaclass = StrEnumMeta ):
6978 RECORDED_AT_DESC = "recorded_at_desc"
7079 RECORDED_AT_ASC = "recorded_at_asc"
@@ -511,6 +520,12 @@ class ExportJobS3:
511520 project_id : Optional [str ] = None
512521
513522
523+ @dataclass
524+ class ExportJobStatus :
525+ code : ExportJobStatusCode
526+ message : Optional [str ] = None
527+
528+
514529@dataclass
515530class ProductService :
516531 name : str
@@ -540,12 +555,12 @@ class ExportJob:
540555
541556 name : str
542557 """
543- Name of the export.
558+ Name of the export job .
544559 """
545560
546561 tags : dict [str , str ]
547562 """
548- Tags of the export.
563+ Tags of the export job .
549564 """
550565
551566 created_at : Optional [datetime ] = None
@@ -555,7 +570,12 @@ class ExportJob:
555570
556571 last_run_at : Optional [datetime ] = None
557572 """
558- Last export date.
573+ Last run of export job.
574+ """
575+
576+ last_status : Optional [ExportJobStatus ] = None
577+ """
578+ Status of last export job.
559579 """
560580
561581 s3 : Optional [ExportJobS3 ] = None
Original file line number Diff line number Diff line change 55from .types import AuthenticationEventMethod
66from .types import AuthenticationEventOrigin
77from .types import AuthenticationEventResult
8+ from .types import ExportJobStatusCode
89from .types import ListAuthenticationEventsRequestOrderBy
910from .types import ListCombinedEventsRequestOrderBy
1011from .types import ListEventsRequestOrderBy
3940from .types import Event
4041from .types import SystemEvent
4142from .types import ExportJobS3
43+ from .types import ExportJobStatus
4244from .types import ProductService
4345from .types import ListCombinedEventsResponseCombinedEvent
4446from .types import ExportJob
6365 "AuthenticationEventMethod" ,
6466 "AuthenticationEventOrigin" ,
6567 "AuthenticationEventResult" ,
68+ "ExportJobStatusCode" ,
6669 "ListAuthenticationEventsRequestOrderBy" ,
6770 "ListCombinedEventsRequestOrderBy" ,
6871 "ListEventsRequestOrderBy" ,
97100 "Event" ,
98101 "SystemEvent" ,
99102 "ExportJobS3" ,
103+ "ExportJobStatus" ,
100104 "ProductService" ,
101105 "ListCombinedEventsResponseCombinedEvent" ,
102106 "ExportJob" ,
Original file line number Diff line number Diff line change 1616 AuthenticationEventOrigin ,
1717 AuthenticationEventResult ,
1818 ExportJobS3 ,
19+ ExportJobStatus ,
1920 ExportJob ,
2021 AccountOrganizationInfo ,
2122 AccountProjectInfo ,
@@ -94,6 +95,29 @@ def unmarshal_ExportJobS3(data: Any) -> ExportJobS3:
9495 return ExportJobS3 (** args )
9596
9697
98+ def unmarshal_ExportJobStatus (data : Any ) -> ExportJobStatus :
99+ if not isinstance (data , dict ):
100+ raise TypeError (
101+ "Unmarshalling the type 'ExportJobStatus' failed as data isn't a dictionary."
102+ )
103+
104+ args : dict [str , Any ] = {}
105+
106+ field = data .get ("code" , None )
107+ if field is not None :
108+ args ["code" ] = field
109+ else :
110+ args ["code" ] = None
111+
112+ field = data .get ("message" , None )
113+ if field is not None :
114+ args ["message" ] = field
115+ else :
116+ args ["message" ] = None
117+
118+ return ExportJobStatus (** args )
119+
120+
97121def unmarshal_ExportJob (data : Any ) -> ExportJob :
98122 if not isinstance (data , dict ):
99123 raise TypeError (
@@ -146,6 +170,12 @@ def unmarshal_ExportJob(data: Any) -> ExportJob:
146170 else :
147171 args ["last_run_at" ] = None
148172
173+ field = data .get ("last_status" , None )
174+ if field is not None :
175+ args ["last_status" ] = unmarshal_ExportJobStatus (field )
176+ else :
177+ args ["last_status" ] = None
178+
149179 return ExportJob (** args )
150180
151181
Original file line number Diff line number Diff line change @@ -65,6 +65,15 @@ def __str__(self) -> str:
6565 return str (self .value )
6666
6767
68+ class ExportJobStatusCode (str , Enum , metaclass = StrEnumMeta ):
69+ UNKNOWN_CODE = "unknown_code"
70+ SUCCESS = "success"
71+ FAILURE = "failure"
72+
73+ def __str__ (self ) -> str :
74+ return str (self .value )
75+
76+
6877class ListAuthenticationEventsRequestOrderBy (str , Enum , metaclass = StrEnumMeta ):
6978 RECORDED_AT_DESC = "recorded_at_desc"
7079 RECORDED_AT_ASC = "recorded_at_asc"
@@ -511,6 +520,12 @@ class ExportJobS3:
511520 project_id : Optional [str ] = None
512521
513522
523+ @dataclass
524+ class ExportJobStatus :
525+ code : ExportJobStatusCode
526+ message : Optional [str ] = None
527+
528+
514529@dataclass
515530class ProductService :
516531 name : str
@@ -540,12 +555,12 @@ class ExportJob:
540555
541556 name : str
542557 """
543- Name of the export.
558+ Name of the export job .
544559 """
545560
546561 tags : dict [str , str ]
547562 """
548- Tags of the export.
563+ Tags of the export job .
549564 """
550565
551566 created_at : Optional [datetime ] = None
@@ -555,7 +570,12 @@ class ExportJob:
555570
556571 last_run_at : Optional [datetime ] = None
557572 """
558- Last export date.
573+ Last run of export job.
574+ """
575+
576+ last_status : Optional [ExportJobStatus ] = None
577+ """
578+ Status of last export job.
559579 """
560580
561581 s3 : Optional [ExportJobS3 ] = None
You can’t perform that action at this time.
0 commit comments