diff --git a/moto/stepfunctions/parser/asl/component/state/state_choice/__init__.py b/moto/stepfunctions/parser/asl/component/state/choice/__init__.py similarity index 100% rename from moto/stepfunctions/parser/asl/component/state/state_choice/__init__.py rename to moto/stepfunctions/parser/asl/component/state/choice/__init__.py diff --git a/moto/stepfunctions/parser/asl/component/state/state_choice/choice_rule.py b/moto/stepfunctions/parser/asl/component/state/choice/choice_rule.py similarity index 87% rename from moto/stepfunctions/parser/asl/component/state/state_choice/choice_rule.py rename to moto/stepfunctions/parser/asl/component/state/choice/choice_rule.py index 295802f13791..10bc96d96271 100644 --- a/moto/stepfunctions/parser/asl/component/state/state_choice/choice_rule.py +++ b/moto/stepfunctions/parser/asl/component/state/choice/choice_rule.py @@ -2,7 +2,7 @@ from moto.stepfunctions.parser.asl.component.common.flow.next import Next from moto.stepfunctions.parser.asl.component.eval_component import EvalComponent -from moto.stepfunctions.parser.asl.component.state.state_choice.comparison.comparison import ( +from moto.stepfunctions.parser.asl.component.state.choice.comparison.comparison import ( Comparison, ) from moto.stepfunctions.parser.asl.eval.environment import Environment diff --git a/moto/stepfunctions/parser/asl/component/state/state_choice/choices_decl.py b/moto/stepfunctions/parser/asl/component/state/choice/choices_decl.py similarity index 75% rename from moto/stepfunctions/parser/asl/component/state/state_choice/choices_decl.py rename to moto/stepfunctions/parser/asl/component/state/choice/choices_decl.py index dbd3d0e8f3d5..df837a1230c6 100644 --- a/moto/stepfunctions/parser/asl/component/state/state_choice/choices_decl.py +++ b/moto/stepfunctions/parser/asl/component/state/choice/choices_decl.py @@ -1,7 +1,7 @@ from typing import Final, List from moto.stepfunctions.parser.asl.component.component import Component -from moto.stepfunctions.parser.asl.component.state.state_choice.choice_rule import ( +from moto.stepfunctions.parser.asl.component.state.choice.choice_rule import ( ChoiceRule, ) diff --git a/moto/stepfunctions/parser/asl/component/state/state_choice/comparison/__init__.py b/moto/stepfunctions/parser/asl/component/state/choice/comparison/__init__.py similarity index 100% rename from moto/stepfunctions/parser/asl/component/state/state_choice/comparison/__init__.py rename to moto/stepfunctions/parser/asl/component/state/choice/comparison/__init__.py diff --git a/moto/stepfunctions/parser/asl/component/state/state_choice/comparison/comparison.py b/moto/stepfunctions/parser/asl/component/state/choice/comparison/comparison.py similarity index 100% rename from moto/stepfunctions/parser/asl/component/state/state_choice/comparison/comparison.py rename to moto/stepfunctions/parser/asl/component/state/choice/comparison/comparison.py diff --git a/moto/stepfunctions/parser/asl/component/state/state_choice/comparison/comparison_composite.py b/moto/stepfunctions/parser/asl/component/state/choice/comparison/comparison_composite.py similarity index 94% rename from moto/stepfunctions/parser/asl/component/state/state_choice/comparison/comparison_composite.py rename to moto/stepfunctions/parser/asl/component/state/choice/comparison/comparison_composite.py index 5328db52d316..9b46ac8e5edf 100644 --- a/moto/stepfunctions/parser/asl/component/state/state_choice/comparison/comparison_composite.py +++ b/moto/stepfunctions/parser/asl/component/state/choice/comparison/comparison_composite.py @@ -5,10 +5,10 @@ from typing import Any, Final, List from moto.stepfunctions.parser.asl.antlr.runtime.ASLLexer import ASLLexer -from moto.stepfunctions.parser.asl.component.state.state_choice.choice_rule import ( +from moto.stepfunctions.parser.asl.component.state.choice.choice_rule import ( ChoiceRule, ) -from moto.stepfunctions.parser.asl.component.state.state_choice.comparison.comparison import ( +from moto.stepfunctions.parser.asl.component.state.choice.comparison.comparison import ( Comparison, ) from moto.stepfunctions.parser.asl.eval.environment import Environment diff --git a/moto/stepfunctions/parser/asl/component/state/state_choice/comparison/comparison_func.py b/moto/stepfunctions/parser/asl/component/state/choice/comparison/comparison_func.py similarity index 73% rename from moto/stepfunctions/parser/asl/component/state/state_choice/comparison/comparison_func.py rename to moto/stepfunctions/parser/asl/component/state/choice/comparison/comparison_func.py index c823cf6d3549..f1c455029daa 100644 --- a/moto/stepfunctions/parser/asl/component/state/state_choice/comparison/comparison_func.py +++ b/moto/stepfunctions/parser/asl/component/state/choice/comparison/comparison_func.py @@ -4,13 +4,13 @@ from typing import Final from moto.stepfunctions.parser.asl.component.eval_component import EvalComponent -from moto.stepfunctions.parser.asl.component.state.state_choice.comparison.comparison_operator_type import ( +from moto.stepfunctions.parser.asl.component.state.choice.comparison.comparison_operator_type import ( ComparisonOperatorType, ) -from moto.stepfunctions.parser.asl.component.state.state_choice.comparison.operator.factory import ( +from moto.stepfunctions.parser.asl.component.state.choice.comparison.operator.factory import ( OperatorFactory, ) -from moto.stepfunctions.parser.asl.component.state.state_choice.comparison.operator.operator import ( +from moto.stepfunctions.parser.asl.component.state.choice.comparison.operator.operator import ( Operator, ) from moto.stepfunctions.parser.asl.eval.environment import Environment diff --git a/moto/stepfunctions/parser/asl/component/state/state_choice/comparison/comparison_operator_type.py b/moto/stepfunctions/parser/asl/component/state/choice/comparison/comparison_operator_type.py similarity index 100% rename from moto/stepfunctions/parser/asl/component/state/state_choice/comparison/comparison_operator_type.py rename to moto/stepfunctions/parser/asl/component/state/choice/comparison/comparison_operator_type.py diff --git a/moto/stepfunctions/parser/asl/component/state/state_choice/comparison/comparison_variable.py b/moto/stepfunctions/parser/asl/component/state/choice/comparison/comparison_variable.py similarity index 69% rename from moto/stepfunctions/parser/asl/component/state/state_choice/comparison/comparison_variable.py rename to moto/stepfunctions/parser/asl/component/state/choice/comparison/comparison_variable.py index 842bcf9490ed..58b0c8f33fad 100644 --- a/moto/stepfunctions/parser/asl/component/state/state_choice/comparison/comparison_variable.py +++ b/moto/stepfunctions/parser/asl/component/state/choice/comparison/comparison_variable.py @@ -1,12 +1,12 @@ from typing import Final -from moto.stepfunctions.parser.asl.component.state.state_choice.comparison.comparison import ( +from moto.stepfunctions.parser.asl.component.state.choice.comparison.comparison import ( Comparison, ) -from moto.stepfunctions.parser.asl.component.state.state_choice.comparison.comparison_func import ( +from moto.stepfunctions.parser.asl.component.state.choice.comparison.comparison_func import ( ComparisonFunc, ) -from moto.stepfunctions.parser.asl.component.state.state_choice.comparison.variable import ( +from moto.stepfunctions.parser.asl.component.state.choice.comparison.variable import ( Variable, ) from moto.stepfunctions.parser.asl.eval.environment import Environment diff --git a/moto/stepfunctions/parser/asl/component/state/state_choice/comparison/operator/__init__.py b/moto/stepfunctions/parser/asl/component/state/choice/comparison/operator/__init__.py similarity index 100% rename from moto/stepfunctions/parser/asl/component/state/state_choice/comparison/operator/__init__.py rename to moto/stepfunctions/parser/asl/component/state/choice/comparison/operator/__init__.py diff --git a/moto/stepfunctions/parser/asl/component/state/choice/comparison/operator/factory.py b/moto/stepfunctions/parser/asl/component/state/choice/comparison/operator/factory.py new file mode 100644 index 000000000000..8e9146c17e95 --- /dev/null +++ b/moto/stepfunctions/parser/asl/component/state/choice/comparison/operator/factory.py @@ -0,0 +1,20 @@ +from moto.stepfunctions.parser.asl.component.state.choice.comparison.comparison_operator_type import ( + ComparisonOperatorType, +) +from moto.stepfunctions.parser.asl.component.state.choice.comparison.operator.implementations.boolean_equals import * # noqa +from moto.stepfunctions.parser.asl.component.state.choice.comparison.operator.implementations.is_operator import * # noqa +from moto.stepfunctions.parser.asl.component.state.choice.comparison.operator.implementations.numeric import * # noqa +from moto.stepfunctions.parser.asl.component.state.choice.comparison.operator.implementations.string_operators import * # noqa +from moto.stepfunctions.parser.asl.component.state.choice.comparison.operator.implementations.timestamp_operators import * # noqa +from moto.stepfunctions.parser.asl.component.state.choice.comparison.operator.operator import ( + Operator, +) + + +class OperatorFactory: + @staticmethod + def get(typ: ComparisonOperatorType) -> Operator: + op = Operator.get((str(typ))) + if op is None: + raise NotImplementedError(f"{typ} is not supported.") + return op diff --git a/moto/stepfunctions/parser/asl/component/state/state_choice/comparison/operator/implementations/__init__.py b/moto/stepfunctions/parser/asl/component/state/choice/comparison/operator/implementations/__init__.py similarity index 100% rename from moto/stepfunctions/parser/asl/component/state/state_choice/comparison/operator/implementations/__init__.py rename to moto/stepfunctions/parser/asl/component/state/choice/comparison/operator/implementations/__init__.py diff --git a/moto/stepfunctions/parser/asl/component/state/state_choice/comparison/operator/implementations/boolean_equals.py b/moto/stepfunctions/parser/asl/component/state/choice/comparison/operator/implementations/boolean_equals.py similarity index 85% rename from moto/stepfunctions/parser/asl/component/state/state_choice/comparison/operator/implementations/boolean_equals.py rename to moto/stepfunctions/parser/asl/component/state/choice/comparison/operator/implementations/boolean_equals.py index 92f88c3ce9bc..bafe16af2ad8 100644 --- a/moto/stepfunctions/parser/asl/component/state/state_choice/comparison/operator/implementations/boolean_equals.py +++ b/moto/stepfunctions/parser/asl/component/state/choice/comparison/operator/implementations/boolean_equals.py @@ -1,9 +1,9 @@ from typing import Any -from moto.stepfunctions.parser.asl.component.state.state_choice.comparison.comparison_operator_type import ( +from moto.stepfunctions.parser.asl.component.state.choice.comparison.comparison_operator_type import ( ComparisonOperatorType, ) -from moto.stepfunctions.parser.asl.component.state.state_choice.comparison.operator.operator import ( +from moto.stepfunctions.parser.asl.component.state.choice.comparison.operator.operator import ( Operator, ) from moto.stepfunctions.parser.asl.eval.environment import Environment diff --git a/moto/stepfunctions/parser/asl/component/state/state_choice/comparison/operator/implementations/is_operator.py b/moto/stepfunctions/parser/asl/component/state/choice/comparison/operator/implementations/is_operator.py similarity index 91% rename from moto/stepfunctions/parser/asl/component/state/state_choice/comparison/operator/implementations/is_operator.py rename to moto/stepfunctions/parser/asl/component/state/choice/comparison/operator/implementations/is_operator.py index e5ec4d7fc768..82f30f67d7b6 100644 --- a/moto/stepfunctions/parser/asl/component/state/state_choice/comparison/operator/implementations/is_operator.py +++ b/moto/stepfunctions/parser/asl/component/state/choice/comparison/operator/implementations/is_operator.py @@ -2,13 +2,13 @@ import logging from typing import Any, Final, Optional -from moto.stepfunctions.parser.asl.component.state.state_choice.comparison.comparison_operator_type import ( +from moto.stepfunctions.parser.asl.component.state.choice.comparison.comparison_operator_type import ( ComparisonOperatorType, ) -from moto.stepfunctions.parser.asl.component.state.state_choice.comparison.operator.operator import ( +from moto.stepfunctions.parser.asl.component.state.choice.comparison.operator.operator import ( Operator, ) -from moto.stepfunctions.parser.asl.component.state.state_choice.comparison.variable import ( +from moto.stepfunctions.parser.asl.component.state.choice.comparison.variable import ( NoSuchVariable, ) from moto.stepfunctions.parser.asl.eval.environment import Environment diff --git a/moto/stepfunctions/parser/asl/component/state/state_choice/comparison/operator/implementations/numeric.py b/moto/stepfunctions/parser/asl/component/state/choice/comparison/operator/implementations/numeric.py similarity index 96% rename from moto/stepfunctions/parser/asl/component/state/state_choice/comparison/operator/implementations/numeric.py rename to moto/stepfunctions/parser/asl/component/state/choice/comparison/operator/implementations/numeric.py index 05d0420e9953..9201fa46ceb4 100644 --- a/moto/stepfunctions/parser/asl/component/state/state_choice/comparison/operator/implementations/numeric.py +++ b/moto/stepfunctions/parser/asl/component/state/choice/comparison/operator/implementations/numeric.py @@ -1,9 +1,9 @@ from typing import Any -from moto.stepfunctions.parser.asl.component.state.state_choice.comparison.comparison_operator_type import ( +from moto.stepfunctions.parser.asl.component.state.choice.comparison.comparison_operator_type import ( ComparisonOperatorType, ) -from moto.stepfunctions.parser.asl.component.state.state_choice.comparison.operator.operator import ( +from moto.stepfunctions.parser.asl.component.state.choice.comparison.operator.operator import ( Operator, ) from moto.stepfunctions.parser.asl.eval.environment import Environment diff --git a/moto/stepfunctions/parser/asl/component/state/state_choice/comparison/operator/implementations/string_operators.py b/moto/stepfunctions/parser/asl/component/state/choice/comparison/operator/implementations/string_operators.py similarity index 96% rename from moto/stepfunctions/parser/asl/component/state/state_choice/comparison/operator/implementations/string_operators.py rename to moto/stepfunctions/parser/asl/component/state/choice/comparison/operator/implementations/string_operators.py index a0b1d4e1fb62..5a02bc0b3fbe 100644 --- a/moto/stepfunctions/parser/asl/component/state/state_choice/comparison/operator/implementations/string_operators.py +++ b/moto/stepfunctions/parser/asl/component/state/choice/comparison/operator/implementations/string_operators.py @@ -1,10 +1,10 @@ import fnmatch from typing import Any -from moto.stepfunctions.parser.asl.component.state.state_choice.comparison.comparison_operator_type import ( +from moto.stepfunctions.parser.asl.component.state.choice.comparison.comparison_operator_type import ( ComparisonOperatorType, ) -from moto.stepfunctions.parser.asl.component.state.state_choice.comparison.operator.operator import ( +from moto.stepfunctions.parser.asl.component.state.choice.comparison.operator.operator import ( Operator, ) from moto.stepfunctions.parser.asl.eval.environment import Environment diff --git a/moto/stepfunctions/parser/asl/component/state/state_choice/comparison/operator/implementations/timestamp_operators.py b/moto/stepfunctions/parser/asl/component/state/choice/comparison/operator/implementations/timestamp_operators.py similarity index 94% rename from moto/stepfunctions/parser/asl/component/state/state_choice/comparison/operator/implementations/timestamp_operators.py rename to moto/stepfunctions/parser/asl/component/state/choice/comparison/operator/implementations/timestamp_operators.py index af3af1a76df2..7d32fdfcd528 100644 --- a/moto/stepfunctions/parser/asl/component/state/state_choice/comparison/operator/implementations/timestamp_operators.py +++ b/moto/stepfunctions/parser/asl/component/state/choice/comparison/operator/implementations/timestamp_operators.py @@ -1,12 +1,12 @@ from typing import Any -from moto.stepfunctions.parser.asl.component.state.state_choice.comparison.comparison_operator_type import ( +from moto.stepfunctions.parser.asl.component.state.choice.comparison.comparison_operator_type import ( ComparisonOperatorType, ) -from moto.stepfunctions.parser.asl.component.state.state_choice.comparison.operator.implementations.is_operator import ( +from moto.stepfunctions.parser.asl.component.state.choice.comparison.operator.implementations.is_operator import ( IsTimestamp, ) -from moto.stepfunctions.parser.asl.component.state.state_choice.comparison.operator.operator import ( +from moto.stepfunctions.parser.asl.component.state.choice.comparison.operator.operator import ( Operator, ) from moto.stepfunctions.parser.asl.eval.environment import Environment diff --git a/moto/stepfunctions/parser/asl/component/state/state_choice/comparison/operator/operator.py b/moto/stepfunctions/parser/asl/component/state/choice/comparison/operator/operator.py similarity index 100% rename from moto/stepfunctions/parser/asl/component/state/state_choice/comparison/operator/operator.py rename to moto/stepfunctions/parser/asl/component/state/choice/comparison/operator/operator.py diff --git a/moto/stepfunctions/parser/asl/component/state/state_choice/comparison/variable.py b/moto/stepfunctions/parser/asl/component/state/choice/comparison/variable.py similarity index 100% rename from moto/stepfunctions/parser/asl/component/state/state_choice/comparison/variable.py rename to moto/stepfunctions/parser/asl/component/state/choice/comparison/variable.py diff --git a/moto/stepfunctions/parser/asl/component/state/state_choice/default_decl.py b/moto/stepfunctions/parser/asl/component/state/choice/default_decl.py similarity index 100% rename from moto/stepfunctions/parser/asl/component/state/state_choice/default_decl.py rename to moto/stepfunctions/parser/asl/component/state/choice/default_decl.py diff --git a/moto/stepfunctions/parser/asl/component/state/state_choice/state_choice.py b/moto/stepfunctions/parser/asl/component/state/choice/state_choice.py similarity index 92% rename from moto/stepfunctions/parser/asl/component/state/state_choice/state_choice.py rename to moto/stepfunctions/parser/asl/component/state/choice/state_choice.py index 4df4396c712d..eef4e9613b28 100644 --- a/moto/stepfunctions/parser/asl/component/state/state_choice/state_choice.py +++ b/moto/stepfunctions/parser/asl/component/state/choice/state_choice.py @@ -3,13 +3,13 @@ from moto.stepfunctions.parser.api import HistoryEventType from moto.stepfunctions.parser.asl.component.common.flow.end import End from moto.stepfunctions.parser.asl.component.common.flow.next import Next -from moto.stepfunctions.parser.asl.component.state.state import CommonStateField -from moto.stepfunctions.parser.asl.component.state.state_choice.choices_decl import ( +from moto.stepfunctions.parser.asl.component.state.choice.choices_decl import ( ChoicesDecl, ) -from moto.stepfunctions.parser.asl.component.state.state_choice.default_decl import ( +from moto.stepfunctions.parser.asl.component.state.choice.default_decl import ( DefaultDecl, ) +from moto.stepfunctions.parser.asl.component.state.state import CommonStateField from moto.stepfunctions.parser.asl.component.state.state_props import StateProps from moto.stepfunctions.parser.asl.eval.environment import Environment diff --git a/moto/stepfunctions/parser/asl/component/state/state_execution/__init__.py b/moto/stepfunctions/parser/asl/component/state/exec/__init__.py similarity index 100% rename from moto/stepfunctions/parser/asl/component/state/state_execution/__init__.py rename to moto/stepfunctions/parser/asl/component/state/exec/__init__.py diff --git a/moto/stepfunctions/parser/asl/component/state/state_execution/execute_state.py b/moto/stepfunctions/parser/asl/component/state/exec/execute_state.py similarity index 100% rename from moto/stepfunctions/parser/asl/component/state/state_execution/execute_state.py rename to moto/stepfunctions/parser/asl/component/state/exec/execute_state.py diff --git a/moto/stepfunctions/parser/asl/component/state/state_execution/state_map/__init__.py b/moto/stepfunctions/parser/asl/component/state/exec/state_map/__init__.py similarity index 100% rename from moto/stepfunctions/parser/asl/component/state/state_execution/state_map/__init__.py rename to moto/stepfunctions/parser/asl/component/state/exec/state_map/__init__.py diff --git a/moto/stepfunctions/parser/asl/component/state/state_execution/state_map/execution_type.py b/moto/stepfunctions/parser/asl/component/state/exec/state_map/execution_type.py similarity index 100% rename from moto/stepfunctions/parser/asl/component/state/state_execution/state_map/execution_type.py rename to moto/stepfunctions/parser/asl/component/state/exec/state_map/execution_type.py diff --git a/moto/stepfunctions/parser/asl/component/state/state_execution/state_map/item_reader/__init__.py b/moto/stepfunctions/parser/asl/component/state/exec/state_map/item_reader/__init__.py similarity index 100% rename from moto/stepfunctions/parser/asl/component/state/state_execution/state_map/item_reader/__init__.py rename to moto/stepfunctions/parser/asl/component/state/exec/state_map/item_reader/__init__.py diff --git a/moto/stepfunctions/parser/asl/component/state/state_execution/state_map/item_reader/reader_config/__init__.py b/moto/stepfunctions/parser/asl/component/state/exec/state_map/item_reader/eval/__init__.py similarity index 100% rename from moto/stepfunctions/parser/asl/component/state/state_execution/state_map/item_reader/reader_config/__init__.py rename to moto/stepfunctions/parser/asl/component/state/exec/state_map/item_reader/eval/__init__.py diff --git a/moto/stepfunctions/parser/asl/component/state/state_execution/state_map/item_reader/resource_eval/resource_eval.py b/moto/stepfunctions/parser/asl/component/state/exec/state_map/item_reader/eval/resource_eval.py similarity index 76% rename from moto/stepfunctions/parser/asl/component/state/state_execution/state_map/item_reader/resource_eval/resource_eval.py rename to moto/stepfunctions/parser/asl/component/state/exec/state_map/item_reader/eval/resource_eval.py index e005262d6695..72e320065614 100644 --- a/moto/stepfunctions/parser/asl/component/state/state_execution/state_map/item_reader/resource_eval/resource_eval.py +++ b/moto/stepfunctions/parser/asl/component/state/exec/state_map/item_reader/eval/resource_eval.py @@ -1,7 +1,7 @@ import abc from typing import Final -from moto.stepfunctions.parser.asl.component.state.state_execution.state_task.service.resource import ( +from moto.stepfunctions.parser.asl.component.state.exec.state_task.service.resource import ( ServiceResource, ) from moto.stepfunctions.parser.asl.eval.environment import Environment diff --git a/moto/stepfunctions/parser/asl/component/state/state_execution/state_map/item_reader/resource_eval/resource_eval_factory.py b/moto/stepfunctions/parser/asl/component/state/exec/state_map/item_reader/eval/resource_eval_factory.py similarity index 53% rename from moto/stepfunctions/parser/asl/component/state/state_execution/state_map/item_reader/resource_eval/resource_eval_factory.py rename to moto/stepfunctions/parser/asl/component/state/exec/state_map/item_reader/eval/resource_eval_factory.py index c6428917a982..4bd51c8a8ab9 100644 --- a/moto/stepfunctions/parser/asl/component/state/state_execution/state_map/item_reader/resource_eval/resource_eval_factory.py +++ b/moto/stepfunctions/parser/asl/component/state/exec/state_map/item_reader/eval/resource_eval_factory.py @@ -1,10 +1,10 @@ -from moto.stepfunctions.parser.asl.component.state.state_execution.state_map.item_reader.resource_eval.resource_eval import ( +from moto.stepfunctions.parser.asl.component.state.exec.state_map.item_reader.eval.resource_eval import ( ResourceEval, ) -from moto.stepfunctions.parser.asl.component.state.state_execution.state_map.item_reader.resource_eval.resource_eval_s3 import ( +from moto.stepfunctions.parser.asl.component.state.exec.state_map.item_reader.eval.resource_eval_s3 import ( ResourceEvalS3, ) -from moto.stepfunctions.parser.asl.component.state.state_execution.state_task.service.resource import ( +from moto.stepfunctions.parser.asl.component.state.exec.state_task.service.resource import ( Resource, ServiceResource, ) diff --git a/moto/stepfunctions/parser/asl/component/state/state_execution/state_map/item_reader/resource_eval/resource_eval_s3.py b/moto/stepfunctions/parser/asl/component/state/exec/state_map/item_reader/eval/resource_eval_s3.py similarity index 90% rename from moto/stepfunctions/parser/asl/component/state/state_execution/state_map/item_reader/resource_eval/resource_eval_s3.py rename to moto/stepfunctions/parser/asl/component/state/exec/state_map/item_reader/eval/resource_eval_s3.py index c98e3261dd49..0a2ed17898d6 100644 --- a/moto/stepfunctions/parser/asl/component/state/state_execution/state_map/item_reader/resource_eval/resource_eval_s3.py +++ b/moto/stepfunctions/parser/asl/component/state/exec/state_map/item_reader/eval/resource_eval_s3.py @@ -2,10 +2,10 @@ from typing import Callable, Final -from moto.stepfunctions.parser.asl.component.state.state_execution.state_map.item_reader.resource_eval.resource_eval import ( +from moto.stepfunctions.parser.asl.component.state.exec.state_map.item_reader.eval.resource_eval import ( ResourceEval, ) -from moto.stepfunctions.parser.asl.component.state.state_execution.state_task.service.resource import ( +from moto.stepfunctions.parser.asl.component.state.exec.state_task.service.resource import ( ResourceRuntimePart, ) from moto.stepfunctions.parser.asl.eval.environment import Environment diff --git a/moto/stepfunctions/parser/asl/component/state/state_execution/state_map/item_reader/resource_eval/__init__.py b/moto/stepfunctions/parser/asl/component/state/exec/state_map/item_reader/eval/resource_output_transformer/__init__.py similarity index 100% rename from moto/stepfunctions/parser/asl/component/state/state_execution/state_map/item_reader/resource_eval/__init__.py rename to moto/stepfunctions/parser/asl/component/state/exec/state_map/item_reader/eval/resource_output_transformer/__init__.py diff --git a/moto/stepfunctions/parser/asl/component/state/state_execution/state_map/item_reader/resource_eval/resource_output_transformer/resource_output_transformer.py b/moto/stepfunctions/parser/asl/component/state/exec/state_map/item_reader/eval/resource_output_transformer/transformer.py similarity index 100% rename from moto/stepfunctions/parser/asl/component/state/state_execution/state_map/item_reader/resource_eval/resource_output_transformer/resource_output_transformer.py rename to moto/stepfunctions/parser/asl/component/state/exec/state_map/item_reader/eval/resource_output_transformer/transformer.py diff --git a/moto/stepfunctions/parser/asl/component/state/state_execution/state_map/item_reader/resource_eval/resource_output_transformer/resource_output_transformer_csv.py b/moto/stepfunctions/parser/asl/component/state/exec/state_map/item_reader/eval/resource_output_transformer/transformer_csv.py similarity index 89% rename from moto/stepfunctions/parser/asl/component/state/state_execution/state_map/item_reader/resource_eval/resource_output_transformer/resource_output_transformer_csv.py rename to moto/stepfunctions/parser/asl/component/state/exec/state_map/item_reader/eval/resource_output_transformer/transformer_csv.py index 69baeb10c506..65204794e6ff 100644 --- a/moto/stepfunctions/parser/asl/component/state/state_execution/state_map/item_reader/resource_eval/resource_output_transformer/resource_output_transformer_csv.py +++ b/moto/stepfunctions/parser/asl/component/state/exec/state_map/item_reader/eval/resource_output_transformer/transformer_csv.py @@ -13,13 +13,13 @@ from moto.stepfunctions.parser.asl.component.common.error_name.states_error_name_type import ( StatesErrorNameType, ) -from moto.stepfunctions.parser.asl.component.state.state_execution.state_map.item_reader.reader_config.reader_config_decl import ( +from moto.stepfunctions.parser.asl.component.state.exec.state_map.item_reader.eval.resource_output_transformer.transformer import ( + ResourceOutputTransformer, +) +from moto.stepfunctions.parser.asl.component.state.exec.state_map.item_reader.reader_config.reader_config_decl import ( CSVHeaderLocationOutput, ReaderConfigOutput, ) -from moto.stepfunctions.parser.asl.component.state.state_execution.state_map.item_reader.resource_eval.resource_output_transformer.resource_output_transformer import ( - ResourceOutputTransformer, -) from moto.stepfunctions.parser.asl.eval.environment import Environment from moto.stepfunctions.parser.asl.eval.event.event_detail import EventDetails diff --git a/moto/stepfunctions/parser/asl/component/state/exec/state_map/item_reader/eval/resource_output_transformer/transformer_factory.py b/moto/stepfunctions/parser/asl/component/state/exec/state_map/item_reader/eval/resource_output_transformer/transformer_factory.py new file mode 100644 index 000000000000..162a988bb444 --- /dev/null +++ b/moto/stepfunctions/parser/asl/component/state/exec/state_map/item_reader/eval/resource_output_transformer/transformer_factory.py @@ -0,0 +1,22 @@ +from moto.stepfunctions.parser.asl.component.state.exec.state_map.item_reader.eval.resource_output_transformer.transformer import ( + ResourceOutputTransformer, +) +from moto.stepfunctions.parser.asl.component.state.exec.state_map.item_reader.eval.resource_output_transformer.transformer_csv import ( + ResourceOutputTransformerCSV, +) +from moto.stepfunctions.parser.asl.component.state.exec.state_map.item_reader.eval.resource_output_transformer.transformer_json import ( + ResourceOutputTransformerJson, +) +from moto.stepfunctions.parser.asl.component.state.exec.state_map.item_reader.reader_config.input_type import ( + InputType, + InputTypeValue, +) + + +def resource_output_transformer_for(input_type: InputType) -> ResourceOutputTransformer: + if input_type.input_type_value == InputTypeValue.CSV: + return ResourceOutputTransformerCSV() + elif input_type.input_type_value == InputTypeValue.JSON: + return ResourceOutputTransformerJson() + else: + raise ValueError(f"Unknown InputType value: '{input_type.input_type_value}'.") diff --git a/moto/stepfunctions/parser/asl/component/state/state_execution/state_map/item_reader/resource_eval/resource_output_transformer/resource_output_transformer_json.py b/moto/stepfunctions/parser/asl/component/state/exec/state_map/item_reader/eval/resource_output_transformer/transformer_json.py similarity index 85% rename from moto/stepfunctions/parser/asl/component/state/state_execution/state_map/item_reader/resource_eval/resource_output_transformer/resource_output_transformer_json.py rename to moto/stepfunctions/parser/asl/component/state/exec/state_map/item_reader/eval/resource_output_transformer/transformer_json.py index d164d31cedc5..e03ce9c7b38a 100644 --- a/moto/stepfunctions/parser/asl/component/state/state_execution/state_map/item_reader/resource_eval/resource_output_transformer/resource_output_transformer_json.py +++ b/moto/stepfunctions/parser/asl/component/state/exec/state_map/item_reader/eval/resource_output_transformer/transformer_json.py @@ -11,12 +11,12 @@ from moto.stepfunctions.parser.asl.component.common.error_name.states_error_name_type import ( StatesErrorNameType, ) -from moto.stepfunctions.parser.asl.component.state.state_execution.state_map.item_reader.reader_config.reader_config_decl import ( - ReaderConfigOutput, -) -from moto.stepfunctions.parser.asl.component.state.state_execution.state_map.item_reader.resource_eval.resource_output_transformer.resource_output_transformer import ( +from moto.stepfunctions.parser.asl.component.state.exec.state_map.item_reader.eval.resource_output_transformer.transformer import ( ResourceOutputTransformer, ) +from moto.stepfunctions.parser.asl.component.state.exec.state_map.item_reader.reader_config.reader_config_decl import ( + ReaderConfigOutput, +) from moto.stepfunctions.parser.asl.eval.environment import Environment from moto.stepfunctions.parser.asl.eval.event.event_detail import EventDetails diff --git a/moto/stepfunctions/parser/asl/component/state/state_execution/state_map/item_reader/item_reader_decl.py b/moto/stepfunctions/parser/asl/component/state/exec/state_map/item_reader/item_reader_decl.py similarity index 69% rename from moto/stepfunctions/parser/asl/component/state/state_execution/state_map/item_reader/item_reader_decl.py rename to moto/stepfunctions/parser/asl/component/state/exec/state_map/item_reader/item_reader_decl.py index dc30b2b685a6..ce4bb16ef3a9 100644 --- a/moto/stepfunctions/parser/asl/component/state/state_execution/state_map/item_reader/item_reader_decl.py +++ b/moto/stepfunctions/parser/asl/component/state/exec/state_map/item_reader/item_reader_decl.py @@ -3,22 +3,22 @@ from moto.stepfunctions.parser.asl.component.common.parameters import Parameters from moto.stepfunctions.parser.asl.component.eval_component import EvalComponent -from moto.stepfunctions.parser.asl.component.state.state_execution.state_map.item_reader.reader_config.reader_config_decl import ( - ReaderConfig, -) -from moto.stepfunctions.parser.asl.component.state.state_execution.state_map.item_reader.resource_eval.resource_eval import ( +from moto.stepfunctions.parser.asl.component.state.exec.state_map.item_reader.eval.resource_eval import ( ResourceEval, ) -from moto.stepfunctions.parser.asl.component.state.state_execution.state_map.item_reader.resource_eval.resource_eval_factory import ( +from moto.stepfunctions.parser.asl.component.state.exec.state_map.item_reader.eval.resource_eval_factory import ( resource_eval_for, ) -from moto.stepfunctions.parser.asl.component.state.state_execution.state_map.item_reader.resource_eval.resource_output_transformer.resource_output_transformer import ( +from moto.stepfunctions.parser.asl.component.state.exec.state_map.item_reader.eval.resource_output_transformer.transformer import ( ResourceOutputTransformer, ) -from moto.stepfunctions.parser.asl.component.state.state_execution.state_map.item_reader.resource_eval.resource_output_transformer.resource_output_transformer_factory import ( +from moto.stepfunctions.parser.asl.component.state.exec.state_map.item_reader.eval.resource_output_transformer.transformer_factory import ( resource_output_transformer_for, ) -from moto.stepfunctions.parser.asl.component.state.state_execution.state_task.service.resource import ( +from moto.stepfunctions.parser.asl.component.state.exec.state_map.item_reader.reader_config.reader_config_decl import ( + ReaderConfig, +) +from moto.stepfunctions.parser.asl.component.state.exec.state_task.service.resource import ( Resource, ) from moto.stepfunctions.parser.asl.eval.environment import Environment diff --git a/moto/stepfunctions/parser/asl/component/state/state_execution/state_map/item_reader/resource_eval/resource_output_transformer/__init__.py b/moto/stepfunctions/parser/asl/component/state/exec/state_map/item_reader/reader_config/__init__.py similarity index 100% rename from moto/stepfunctions/parser/asl/component/state/state_execution/state_map/item_reader/resource_eval/resource_output_transformer/__init__.py rename to moto/stepfunctions/parser/asl/component/state/exec/state_map/item_reader/reader_config/__init__.py diff --git a/moto/stepfunctions/parser/asl/component/state/state_execution/state_map/item_reader/reader_config/csv_header_location.py b/moto/stepfunctions/parser/asl/component/state/exec/state_map/item_reader/reader_config/csv_header_location.py similarity index 100% rename from moto/stepfunctions/parser/asl/component/state/state_execution/state_map/item_reader/reader_config/csv_header_location.py rename to moto/stepfunctions/parser/asl/component/state/exec/state_map/item_reader/reader_config/csv_header_location.py diff --git a/moto/stepfunctions/parser/asl/component/state/state_execution/state_map/item_reader/reader_config/csv_headers.py b/moto/stepfunctions/parser/asl/component/state/exec/state_map/item_reader/reader_config/csv_headers.py similarity index 100% rename from moto/stepfunctions/parser/asl/component/state/state_execution/state_map/item_reader/reader_config/csv_headers.py rename to moto/stepfunctions/parser/asl/component/state/exec/state_map/item_reader/reader_config/csv_headers.py diff --git a/moto/stepfunctions/parser/asl/component/state/state_execution/state_map/item_reader/reader_config/input_type.py b/moto/stepfunctions/parser/asl/component/state/exec/state_map/item_reader/reader_config/input_type.py similarity index 100% rename from moto/stepfunctions/parser/asl/component/state/state_execution/state_map/item_reader/reader_config/input_type.py rename to moto/stepfunctions/parser/asl/component/state/exec/state_map/item_reader/reader_config/input_type.py diff --git a/moto/stepfunctions/parser/asl/component/state/state_execution/state_map/item_reader/reader_config/max_items_decl.py b/moto/stepfunctions/parser/asl/component/state/exec/state_map/item_reader/reader_config/max_items_decl.py similarity index 100% rename from moto/stepfunctions/parser/asl/component/state/state_execution/state_map/item_reader/reader_config/max_items_decl.py rename to moto/stepfunctions/parser/asl/component/state/exec/state_map/item_reader/reader_config/max_items_decl.py diff --git a/moto/stepfunctions/parser/asl/component/state/state_execution/state_map/item_reader/reader_config/reader_config_decl.py b/moto/stepfunctions/parser/asl/component/state/exec/state_map/item_reader/reader_config/reader_config_decl.py similarity index 80% rename from moto/stepfunctions/parser/asl/component/state/state_execution/state_map/item_reader/reader_config/reader_config_decl.py rename to moto/stepfunctions/parser/asl/component/state/exec/state_map/item_reader/reader_config/reader_config_decl.py index e1d2a7e28c21..b7c01de3a812 100644 --- a/moto/stepfunctions/parser/asl/component/state/state_execution/state_map/item_reader/reader_config/reader_config_decl.py +++ b/moto/stepfunctions/parser/asl/component/state/exec/state_map/item_reader/reader_config/reader_config_decl.py @@ -1,16 +1,16 @@ from typing import Final, List, Optional, TypedDict from moto.stepfunctions.parser.asl.component.eval_component import EvalComponent -from moto.stepfunctions.parser.asl.component.state.state_execution.state_map.item_reader.reader_config.csv_header_location import ( +from moto.stepfunctions.parser.asl.component.state.exec.state_map.item_reader.reader_config.csv_header_location import ( CSVHeaderLocation, ) -from moto.stepfunctions.parser.asl.component.state.state_execution.state_map.item_reader.reader_config.csv_headers import ( +from moto.stepfunctions.parser.asl.component.state.exec.state_map.item_reader.reader_config.csv_headers import ( CSVHeaders, ) -from moto.stepfunctions.parser.asl.component.state.state_execution.state_map.item_reader.reader_config.input_type import ( +from moto.stepfunctions.parser.asl.component.state.exec.state_map.item_reader.reader_config.input_type import ( InputType, ) -from moto.stepfunctions.parser.asl.component.state.state_execution.state_map.item_reader.reader_config.max_items_decl import ( +from moto.stepfunctions.parser.asl.component.state.exec.state_map.item_reader.reader_config.max_items_decl import ( MaxItems, MaxItemsDecl, ) diff --git a/moto/stepfunctions/parser/asl/component/state/state_execution/state_map/item_selector.py b/moto/stepfunctions/parser/asl/component/state/exec/state_map/item_selector.py similarity index 100% rename from moto/stepfunctions/parser/asl/component/state/state_execution/state_map/item_selector.py rename to moto/stepfunctions/parser/asl/component/state/exec/state_map/item_selector.py diff --git a/moto/stepfunctions/parser/asl/component/state/state_execution/state_map/iteration/__init__.py b/moto/stepfunctions/parser/asl/component/state/exec/state_map/iteration/__init__.py similarity index 100% rename from moto/stepfunctions/parser/asl/component/state/state_execution/state_map/iteration/__init__.py rename to moto/stepfunctions/parser/asl/component/state/exec/state_map/iteration/__init__.py diff --git a/moto/stepfunctions/parser/asl/component/state/state_execution/state_map/iteration/distributed_iteration_component.py b/moto/stepfunctions/parser/asl/component/state/exec/state_map/iteration/distributed_iteration_component.py similarity index 91% rename from moto/stepfunctions/parser/asl/component/state/state_execution/state_map/iteration/distributed_iteration_component.py rename to moto/stepfunctions/parser/asl/component/state/exec/state_map/iteration/distributed_iteration_component.py index 8afe928e2169..e494c5d73e1e 100644 --- a/moto/stepfunctions/parser/asl/component/state/state_execution/state_map/iteration/distributed_iteration_component.py +++ b/moto/stepfunctions/parser/asl/component/state/exec/state_map/iteration/distributed_iteration_component.py @@ -17,23 +17,23 @@ ) from moto.stepfunctions.parser.asl.component.common.flow.start_at import StartAt from moto.stepfunctions.parser.asl.component.program.program import Program -from moto.stepfunctions.parser.asl.component.state.state_execution.state_map.item_reader.item_reader_decl import ( +from moto.stepfunctions.parser.asl.component.state.exec.state_map.item_reader.item_reader_decl import ( ItemReader, ) -from moto.stepfunctions.parser.asl.component.state.state_execution.state_map.iteration.inline_iteration_component import ( +from moto.stepfunctions.parser.asl.component.state.exec.state_map.iteration.inline_iteration_component import ( InlineIterationComponent, ) -from moto.stepfunctions.parser.asl.component.state.state_execution.state_map.iteration.itemprocessor.map_run_record import ( +from moto.stepfunctions.parser.asl.component.state.exec.state_map.iteration.itemprocessor.map_run_record import ( MapRunRecord, ) -from moto.stepfunctions.parser.asl.component.state.state_execution.state_map.iteration.iteration_worker import ( +from moto.stepfunctions.parser.asl.component.state.exec.state_map.iteration.iteration_worker import ( IterationWorker, ) -from moto.stepfunctions.parser.asl.component.state.state_execution.state_map.iteration.job import ( +from moto.stepfunctions.parser.asl.component.state.exec.state_map.iteration.job import ( Job, JobPool, ) -from moto.stepfunctions.parser.asl.component.state.state_execution.state_map.max_concurrency import ( +from moto.stepfunctions.parser.asl.component.state.exec.state_map.max_concurrency import ( MaxConcurrency, ) from moto.stepfunctions.parser.asl.component.states import States diff --git a/moto/stepfunctions/parser/asl/component/state/state_execution/state_map/iteration/inline_iteration_component.py b/moto/stepfunctions/parser/asl/component/state/exec/state_map/iteration/inline_iteration_component.py similarity index 87% rename from moto/stepfunctions/parser/asl/component/state/state_execution/state_map/iteration/inline_iteration_component.py rename to moto/stepfunctions/parser/asl/component/state/exec/state_map/iteration/inline_iteration_component.py index 35b43e6d1fc0..4b7f3f81b520 100644 --- a/moto/stepfunctions/parser/asl/component/state/state_execution/state_map/iteration/inline_iteration_component.py +++ b/moto/stepfunctions/parser/asl/component/state/exec/state_map/iteration/inline_iteration_component.py @@ -8,17 +8,17 @@ from moto.stepfunctions.parser.asl.component.common.comment import Comment from moto.stepfunctions.parser.asl.component.common.flow.start_at import StartAt from moto.stepfunctions.parser.asl.component.program.program import Program -from moto.stepfunctions.parser.asl.component.state.state_execution.state_map.iteration.iteration_component import ( +from moto.stepfunctions.parser.asl.component.state.exec.state_map.iteration.iteration_component import ( IterationComponent, ) -from moto.stepfunctions.parser.asl.component.state.state_execution.state_map.iteration.iteration_worker import ( +from moto.stepfunctions.parser.asl.component.state.exec.state_map.iteration.iteration_worker import ( IterationWorker, ) -from moto.stepfunctions.parser.asl.component.state.state_execution.state_map.iteration.job import ( +from moto.stepfunctions.parser.asl.component.state.exec.state_map.iteration.job import ( Job, JobPool, ) -from moto.stepfunctions.parser.asl.component.state.state_execution.state_map.max_concurrency import ( +from moto.stepfunctions.parser.asl.component.state.exec.state_map.max_concurrency import ( MaxConcurrency, ) from moto.stepfunctions.parser.asl.component.states import States diff --git a/moto/stepfunctions/parser/asl/component/state/state_execution/state_map/iteration/itemprocessor/__init__.py b/moto/stepfunctions/parser/asl/component/state/exec/state_map/iteration/itemprocessor/__init__.py similarity index 100% rename from moto/stepfunctions/parser/asl/component/state/state_execution/state_map/iteration/itemprocessor/__init__.py rename to moto/stepfunctions/parser/asl/component/state/exec/state_map/iteration/itemprocessor/__init__.py diff --git a/moto/stepfunctions/parser/asl/component/state/state_execution/state_map/iteration/itemprocessor/distributed_item_processor.py b/moto/stepfunctions/parser/asl/component/state/exec/state_map/iteration/itemprocessor/distributed_item_processor.py similarity index 81% rename from moto/stepfunctions/parser/asl/component/state/state_execution/state_map/iteration/itemprocessor/distributed_item_processor.py rename to moto/stepfunctions/parser/asl/component/state/exec/state_map/iteration/itemprocessor/distributed_item_processor.py index 79c0e2cb2c14..beca31b46b25 100644 --- a/moto/stepfunctions/parser/asl/component/state/state_execution/state_map/iteration/itemprocessor/distributed_item_processor.py +++ b/moto/stepfunctions/parser/asl/component/state/exec/state_map/iteration/itemprocessor/distributed_item_processor.py @@ -4,20 +4,20 @@ from moto.stepfunctions.parser.asl.component.common.comment import Comment from moto.stepfunctions.parser.asl.component.common.flow.start_at import StartAt -from moto.stepfunctions.parser.asl.component.state.state_execution.state_map.item_reader.item_reader_decl import ( +from moto.stepfunctions.parser.asl.component.state.exec.state_map.item_reader.item_reader_decl import ( ItemReader, ) -from moto.stepfunctions.parser.asl.component.state.state_execution.state_map.item_selector import ( +from moto.stepfunctions.parser.asl.component.state.exec.state_map.item_selector import ( ItemSelector, ) -from moto.stepfunctions.parser.asl.component.state.state_execution.state_map.iteration.distributed_iteration_component import ( +from moto.stepfunctions.parser.asl.component.state.exec.state_map.iteration.distributed_iteration_component import ( DistributedIterationComponent, DistributedIterationComponentEvalInput, ) -from moto.stepfunctions.parser.asl.component.state.state_execution.state_map.iteration.itemprocessor.distributed_item_processor_worker import ( +from moto.stepfunctions.parser.asl.component.state.exec.state_map.iteration.itemprocessor.distributed_item_processor_worker import ( DistributedItemProcessorWorker, ) -from moto.stepfunctions.parser.asl.component.state.state_execution.state_map.iteration.itemprocessor.processor_config import ( +from moto.stepfunctions.parser.asl.component.state.exec.state_map.iteration.itemprocessor.processor_config import ( ProcessorConfig, ) from moto.stepfunctions.parser.asl.component.states import States diff --git a/moto/stepfunctions/parser/asl/component/state/state_execution/state_map/iteration/itemprocessor/distributed_item_processor_worker.py b/moto/stepfunctions/parser/asl/component/state/exec/state_map/iteration/itemprocessor/distributed_item_processor_worker.py similarity index 88% rename from moto/stepfunctions/parser/asl/component/state/state_execution/state_map/iteration/itemprocessor/distributed_item_processor_worker.py rename to moto/stepfunctions/parser/asl/component/state/exec/state_map/iteration/itemprocessor/distributed_item_processor_worker.py index 2869634a86d2..a94ce1f073d9 100644 --- a/moto/stepfunctions/parser/asl/component/state/state_execution/state_map/iteration/itemprocessor/distributed_item_processor_worker.py +++ b/moto/stepfunctions/parser/asl/component/state/exec/state_map/iteration/itemprocessor/distributed_item_processor_worker.py @@ -6,19 +6,19 @@ from moto.stepfunctions.parser.asl.component.common.timeouts.timeout import ( EvalTimeoutError, ) -from moto.stepfunctions.parser.asl.component.state.state_execution.state_map.item_reader.item_reader_decl import ( +from moto.stepfunctions.parser.asl.component.state.exec.state_map.item_reader.item_reader_decl import ( ItemReader, ) -from moto.stepfunctions.parser.asl.component.state.state_execution.state_map.item_selector import ( +from moto.stepfunctions.parser.asl.component.state.exec.state_map.item_selector import ( ItemSelector, ) -from moto.stepfunctions.parser.asl.component.state.state_execution.state_map.iteration.itemprocessor.inline_item_processor_worker import ( +from moto.stepfunctions.parser.asl.component.state.exec.state_map.iteration.itemprocessor.inline_item_processor_worker import ( InlineItemProcessorWorker, ) -from moto.stepfunctions.parser.asl.component.state.state_execution.state_map.iteration.itemprocessor.map_run_record import ( +from moto.stepfunctions.parser.asl.component.state.exec.state_map.iteration.itemprocessor.map_run_record import ( MapRunRecord, ) -from moto.stepfunctions.parser.asl.component.state.state_execution.state_map.iteration.job import ( +from moto.stepfunctions.parser.asl.component.state.exec.state_map.iteration.job import ( Job, JobPool, ) diff --git a/moto/stepfunctions/parser/asl/component/state/state_execution/state_map/iteration/itemprocessor/inline_item_processor.py b/moto/stepfunctions/parser/asl/component/state/exec/state_map/iteration/itemprocessor/inline_item_processor.py similarity index 83% rename from moto/stepfunctions/parser/asl/component/state/state_execution/state_map/iteration/itemprocessor/inline_item_processor.py rename to moto/stepfunctions/parser/asl/component/state/exec/state_map/iteration/itemprocessor/inline_item_processor.py index 809aaa968f1f..2ad7613f5006 100644 --- a/moto/stepfunctions/parser/asl/component/state/state_execution/state_map/iteration/itemprocessor/inline_item_processor.py +++ b/moto/stepfunctions/parser/asl/component/state/exec/state_map/iteration/itemprocessor/inline_item_processor.py @@ -6,17 +6,17 @@ from moto.stepfunctions.parser.asl.component.common.comment import Comment from moto.stepfunctions.parser.asl.component.common.flow.start_at import StartAt -from moto.stepfunctions.parser.asl.component.state.state_execution.state_map.item_selector import ( +from moto.stepfunctions.parser.asl.component.state.exec.state_map.item_selector import ( ItemSelector, ) -from moto.stepfunctions.parser.asl.component.state.state_execution.state_map.iteration.inline_iteration_component import ( +from moto.stepfunctions.parser.asl.component.state.exec.state_map.iteration.inline_iteration_component import ( InlineIterationComponent, InlineIterationComponentEvalInput, ) -from moto.stepfunctions.parser.asl.component.state.state_execution.state_map.iteration.itemprocessor.inline_item_processor_worker import ( +from moto.stepfunctions.parser.asl.component.state.exec.state_map.iteration.itemprocessor.inline_item_processor_worker import ( InlineItemProcessorWorker, ) -from moto.stepfunctions.parser.asl.component.state.state_execution.state_map.iteration.itemprocessor.processor_config import ( +from moto.stepfunctions.parser.asl.component.state.exec.state_map.iteration.itemprocessor.processor_config import ( ProcessorConfig, ) from moto.stepfunctions.parser.asl.component.states import States diff --git a/moto/stepfunctions/parser/asl/component/state/state_execution/state_map/iteration/itemprocessor/inline_item_processor_worker.py b/moto/stepfunctions/parser/asl/component/state/exec/state_map/iteration/itemprocessor/inline_item_processor_worker.py similarity index 76% rename from moto/stepfunctions/parser/asl/component/state/state_execution/state_map/iteration/itemprocessor/inline_item_processor_worker.py rename to moto/stepfunctions/parser/asl/component/state/exec/state_map/iteration/itemprocessor/inline_item_processor_worker.py index 5efa7c1b47d5..1efb7e91214b 100644 --- a/moto/stepfunctions/parser/asl/component/state/state_execution/state_map/iteration/itemprocessor/inline_item_processor_worker.py +++ b/moto/stepfunctions/parser/asl/component/state/exec/state_map/iteration/itemprocessor/inline_item_processor_worker.py @@ -2,13 +2,13 @@ import logging from typing import Final, Optional -from moto.stepfunctions.parser.asl.component.state.state_execution.state_map.item_selector import ( +from moto.stepfunctions.parser.asl.component.state.exec.state_map.item_selector import ( ItemSelector, ) -from moto.stepfunctions.parser.asl.component.state.state_execution.state_map.iteration.iteration_worker import ( +from moto.stepfunctions.parser.asl.component.state.exec.state_map.iteration.iteration_worker import ( IterationWorker, ) -from moto.stepfunctions.parser.asl.component.state.state_execution.state_map.iteration.job import ( +from moto.stepfunctions.parser.asl.component.state.exec.state_map.iteration.job import ( JobPool, ) from moto.stepfunctions.parser.asl.eval.environment import Environment diff --git a/moto/stepfunctions/parser/asl/component/state/state_execution/state_map/iteration/itemprocessor/item_processor_decl.py b/moto/stepfunctions/parser/asl/component/state/exec/state_map/iteration/itemprocessor/item_processor_decl.py similarity index 74% rename from moto/stepfunctions/parser/asl/component/state/state_execution/state_map/iteration/itemprocessor/item_processor_decl.py rename to moto/stepfunctions/parser/asl/component/state/exec/state_map/iteration/itemprocessor/item_processor_decl.py index 5d194fd8c475..31f97a0813e1 100644 --- a/moto/stepfunctions/parser/asl/component/state/state_execution/state_map/iteration/itemprocessor/item_processor_decl.py +++ b/moto/stepfunctions/parser/asl/component/state/exec/state_map/iteration/itemprocessor/item_processor_decl.py @@ -2,10 +2,10 @@ from moto.stepfunctions.parser.asl.component.common.comment import Comment from moto.stepfunctions.parser.asl.component.common.flow.start_at import StartAt -from moto.stepfunctions.parser.asl.component.state.state_execution.state_map.iteration.itemprocessor.processor_config import ( +from moto.stepfunctions.parser.asl.component.state.exec.state_map.iteration.itemprocessor.processor_config import ( ProcessorConfig, ) -from moto.stepfunctions.parser.asl.component.state.state_execution.state_map.iteration.iteration_declaration import ( +from moto.stepfunctions.parser.asl.component.state.exec.state_map.iteration.iteration_declaration import ( IterationDecl, ) from moto.stepfunctions.parser.asl.component.states import States diff --git a/moto/stepfunctions/parser/asl/component/state/state_execution/state_map/iteration/itemprocessor/item_processor_factory.py b/moto/stepfunctions/parser/asl/component/state/exec/state_map/iteration/itemprocessor/item_processor_factory.py similarity index 62% rename from moto/stepfunctions/parser/asl/component/state/state_execution/state_map/iteration/itemprocessor/item_processor_factory.py rename to moto/stepfunctions/parser/asl/component/state/exec/state_map/iteration/itemprocessor/item_processor_factory.py index 9b3c15f8e30b..0a229c22f693 100644 --- a/moto/stepfunctions/parser/asl/component/state/state_execution/state_map/iteration/itemprocessor/item_processor_factory.py +++ b/moto/stepfunctions/parser/asl/component/state/exec/state_map/iteration/itemprocessor/item_processor_factory.py @@ -1,16 +1,16 @@ -from moto.stepfunctions.parser.asl.component.state.state_execution.state_map.iteration.itemprocessor.distributed_item_processor import ( +from moto.stepfunctions.parser.asl.component.state.exec.state_map.iteration.itemprocessor.distributed_item_processor import ( DistributedItemProcessor, ) -from moto.stepfunctions.parser.asl.component.state.state_execution.state_map.iteration.itemprocessor.inline_item_processor import ( +from moto.stepfunctions.parser.asl.component.state.exec.state_map.iteration.itemprocessor.inline_item_processor import ( InlineItemProcessor, ) -from moto.stepfunctions.parser.asl.component.state.state_execution.state_map.iteration.itemprocessor.item_processor_decl import ( +from moto.stepfunctions.parser.asl.component.state.exec.state_map.iteration.itemprocessor.item_processor_decl import ( ItemProcessorDecl, ) -from moto.stepfunctions.parser.asl.component.state.state_execution.state_map.iteration.iteration_component import ( +from moto.stepfunctions.parser.asl.component.state.exec.state_map.iteration.iteration_component import ( IterationComponent, ) -from moto.stepfunctions.parser.asl.component.state.state_execution.state_map.mode import ( +from moto.stepfunctions.parser.asl.component.state.exec.state_map.mode import ( Mode, ) diff --git a/moto/stepfunctions/parser/asl/component/state/state_execution/state_map/iteration/itemprocessor/map_run_record.py b/moto/stepfunctions/parser/asl/component/state/exec/state_map/iteration/itemprocessor/map_run_record.py similarity index 100% rename from moto/stepfunctions/parser/asl/component/state/state_execution/state_map/iteration/itemprocessor/map_run_record.py rename to moto/stepfunctions/parser/asl/component/state/exec/state_map/iteration/itemprocessor/map_run_record.py diff --git a/moto/stepfunctions/parser/asl/component/state/state_execution/state_map/iteration/itemprocessor/processor_config.py b/moto/stepfunctions/parser/asl/component/state/exec/state_map/iteration/itemprocessor/processor_config.py similarity index 76% rename from moto/stepfunctions/parser/asl/component/state/state_execution/state_map/iteration/itemprocessor/processor_config.py rename to moto/stepfunctions/parser/asl/component/state/exec/state_map/iteration/itemprocessor/processor_config.py index 329602959f32..6b0505d47432 100644 --- a/moto/stepfunctions/parser/asl/component/state/state_execution/state_map/iteration/itemprocessor/processor_config.py +++ b/moto/stepfunctions/parser/asl/component/state/exec/state_map/iteration/itemprocessor/processor_config.py @@ -3,10 +3,10 @@ from typing import Final from moto.stepfunctions.parser.asl.component.component import Component -from moto.stepfunctions.parser.asl.component.state.state_execution.state_map.execution_type import ( +from moto.stepfunctions.parser.asl.component.state.exec.state_map.execution_type import ( ExecutionType, ) -from moto.stepfunctions.parser.asl.component.state.state_execution.state_map.mode import ( +from moto.stepfunctions.parser.asl.component.state.exec.state_map.mode import ( Mode, ) diff --git a/moto/stepfunctions/parser/asl/component/state/state_execution/state_map/iteration/iteration_component.py b/moto/stepfunctions/parser/asl/component/state/exec/state_map/iteration/iteration_component.py similarity index 100% rename from moto/stepfunctions/parser/asl/component/state/state_execution/state_map/iteration/iteration_component.py rename to moto/stepfunctions/parser/asl/component/state/exec/state_map/iteration/iteration_component.py diff --git a/moto/stepfunctions/parser/asl/component/state/state_execution/state_map/iteration/iteration_declaration.py b/moto/stepfunctions/parser/asl/component/state/exec/state_map/iteration/iteration_declaration.py similarity index 100% rename from moto/stepfunctions/parser/asl/component/state/state_execution/state_map/iteration/iteration_declaration.py rename to moto/stepfunctions/parser/asl/component/state/exec/state_map/iteration/iteration_declaration.py diff --git a/moto/stepfunctions/parser/asl/component/state/state_execution/state_map/iteration/iteration_worker.py b/moto/stepfunctions/parser/asl/component/state/exec/state_map/iteration/iteration_worker.py similarity index 98% rename from moto/stepfunctions/parser/asl/component/state/state_execution/state_map/iteration/iteration_worker.py rename to moto/stepfunctions/parser/asl/component/state/exec/state_map/iteration/iteration_worker.py index 9bd11af37ce8..c89a36932c27 100644 --- a/moto/stepfunctions/parser/asl/component/state/state_execution/state_map/iteration/iteration_worker.py +++ b/moto/stepfunctions/parser/asl/component/state/exec/state_map/iteration/iteration_worker.py @@ -10,7 +10,7 @@ FailureEvent, FailureEventException, ) -from moto.stepfunctions.parser.asl.component.state.state_execution.state_map.iteration.job import ( +from moto.stepfunctions.parser.asl.component.state.exec.state_map.iteration.job import ( Job, JobPool, ) diff --git a/moto/stepfunctions/parser/asl/component/state/state_execution/state_map/iteration/iterator/__init__.py b/moto/stepfunctions/parser/asl/component/state/exec/state_map/iteration/iterator/__init__.py similarity index 100% rename from moto/stepfunctions/parser/asl/component/state/state_execution/state_map/iteration/iterator/__init__.py rename to moto/stepfunctions/parser/asl/component/state/exec/state_map/iteration/iterator/__init__.py diff --git a/moto/stepfunctions/parser/asl/component/state/state_execution/state_map/iteration/iterator/iterator.py b/moto/stepfunctions/parser/asl/component/state/exec/state_map/iteration/iterator/iterator.py similarity index 76% rename from moto/stepfunctions/parser/asl/component/state/state_execution/state_map/iteration/iterator/iterator.py rename to moto/stepfunctions/parser/asl/component/state/exec/state_map/iteration/iterator/iterator.py index 2f7b0aa1f573..642d71b5bbd4 100644 --- a/moto/stepfunctions/parser/asl/component/state/state_execution/state_map/iteration/iterator/iterator.py +++ b/moto/stepfunctions/parser/asl/component/state/exec/state_map/iteration/iterator/iterator.py @@ -5,17 +5,17 @@ from typing import Final, List, Optional from moto.stepfunctions.parser.asl.component.common.parameters import Parameters -from moto.stepfunctions.parser.asl.component.state.state_execution.state_map.item_selector import ( +from moto.stepfunctions.parser.asl.component.state.exec.state_map.item_selector import ( ItemSelector, ) -from moto.stepfunctions.parser.asl.component.state.state_execution.state_map.iteration.inline_iteration_component import ( +from moto.stepfunctions.parser.asl.component.state.exec.state_map.iteration.inline_iteration_component import ( InlineIterationComponent, InlineIterationComponentEvalInput, ) -from moto.stepfunctions.parser.asl.component.state.state_execution.state_map.iteration.iterator.iterator_decl import ( +from moto.stepfunctions.parser.asl.component.state.exec.state_map.iteration.iterator.iterator_decl import ( IteratorDecl, ) -from moto.stepfunctions.parser.asl.component.state.state_execution.state_map.iteration.iterator.iterator_worker import ( +from moto.stepfunctions.parser.asl.component.state.exec.state_map.iteration.iterator.iterator_worker import ( IteratorWorker, ) from moto.stepfunctions.parser.asl.eval.environment import Environment diff --git a/moto/stepfunctions/parser/asl/component/state/exec/state_map/iteration/iterator/iterator_decl.py b/moto/stepfunctions/parser/asl/component/state/exec/state_map/iteration/iterator/iterator_decl.py new file mode 100644 index 000000000000..cb6d53c2400e --- /dev/null +++ b/moto/stepfunctions/parser/asl/component/state/exec/state_map/iteration/iterator/iterator_decl.py @@ -0,0 +1,7 @@ +from moto.stepfunctions.parser.asl.component.state.exec.state_map.iteration.iteration_declaration import ( + IterationDecl, +) + + +class IteratorDecl(IterationDecl): + pass diff --git a/moto/stepfunctions/parser/asl/component/state/state_execution/state_map/iteration/iterator/iterator_worker.py b/moto/stepfunctions/parser/asl/component/state/exec/state_map/iteration/iterator/iterator_worker.py similarity index 82% rename from moto/stepfunctions/parser/asl/component/state/state_execution/state_map/iteration/iterator/iterator_worker.py rename to moto/stepfunctions/parser/asl/component/state/exec/state_map/iteration/iterator/iterator_worker.py index ebe0276b4bd5..0666ec816767 100644 --- a/moto/stepfunctions/parser/asl/component/state/state_execution/state_map/iteration/iterator/iterator_worker.py +++ b/moto/stepfunctions/parser/asl/component/state/exec/state_map/iteration/iterator/iterator_worker.py @@ -3,10 +3,10 @@ from typing import Final, Optional from moto.stepfunctions.parser.asl.component.common.parameters import Parameters -from moto.stepfunctions.parser.asl.component.state.state_execution.state_map.iteration.iteration_worker import ( +from moto.stepfunctions.parser.asl.component.state.exec.state_map.iteration.iteration_worker import ( IterationWorker, ) -from moto.stepfunctions.parser.asl.component.state.state_execution.state_map.iteration.job import ( +from moto.stepfunctions.parser.asl.component.state.exec.state_map.iteration.job import ( JobPool, ) from moto.stepfunctions.parser.asl.eval.environment import Environment diff --git a/moto/stepfunctions/parser/asl/component/state/state_execution/state_map/iteration/job.py b/moto/stepfunctions/parser/asl/component/state/exec/state_map/iteration/job.py similarity index 100% rename from moto/stepfunctions/parser/asl/component/state/state_execution/state_map/iteration/job.py rename to moto/stepfunctions/parser/asl/component/state/exec/state_map/iteration/job.py diff --git a/moto/stepfunctions/parser/asl/component/state/state_execution/state_map/max_concurrency.py b/moto/stepfunctions/parser/asl/component/state/exec/state_map/max_concurrency.py similarity index 100% rename from moto/stepfunctions/parser/asl/component/state/state_execution/state_map/max_concurrency.py rename to moto/stepfunctions/parser/asl/component/state/exec/state_map/max_concurrency.py diff --git a/moto/stepfunctions/parser/asl/component/state/state_execution/state_map/mode.py b/moto/stepfunctions/parser/asl/component/state/exec/state_map/mode.py similarity index 100% rename from moto/stepfunctions/parser/asl/component/state/state_execution/state_map/mode.py rename to moto/stepfunctions/parser/asl/component/state/exec/state_map/mode.py diff --git a/moto/stepfunctions/parser/asl/component/state/state_execution/state_map/state_map.py b/moto/stepfunctions/parser/asl/component/state/exec/state_map/state_map.py similarity index 85% rename from moto/stepfunctions/parser/asl/component/state/state_execution/state_map/state_map.py rename to moto/stepfunctions/parser/asl/component/state/exec/state_map/state_map.py index d9759b1e8350..46ab8b97a6d6 100644 --- a/moto/stepfunctions/parser/asl/component/state/state_execution/state_map/state_map.py +++ b/moto/stepfunctions/parser/asl/component/state/exec/state_map/state_map.py @@ -18,40 +18,40 @@ from moto.stepfunctions.parser.asl.component.common.retry.retry_outcome import ( RetryOutcome, ) -from moto.stepfunctions.parser.asl.component.state.state_execution.execute_state import ( +from moto.stepfunctions.parser.asl.component.state.exec.execute_state import ( ExecutionState, ) -from moto.stepfunctions.parser.asl.component.state.state_execution.state_map.item_reader.item_reader_decl import ( +from moto.stepfunctions.parser.asl.component.state.exec.state_map.item_reader.item_reader_decl import ( ItemReader, ) -from moto.stepfunctions.parser.asl.component.state.state_execution.state_map.item_selector import ( +from moto.stepfunctions.parser.asl.component.state.exec.state_map.item_selector import ( ItemSelector, ) -from moto.stepfunctions.parser.asl.component.state.state_execution.state_map.iteration.itemprocessor.distributed_item_processor import ( +from moto.stepfunctions.parser.asl.component.state.exec.state_map.iteration.itemprocessor.distributed_item_processor import ( DistributedItemProcessor, DistributedItemProcessorEvalInput, ) -from moto.stepfunctions.parser.asl.component.state.state_execution.state_map.iteration.itemprocessor.inline_item_processor import ( +from moto.stepfunctions.parser.asl.component.state.exec.state_map.iteration.itemprocessor.inline_item_processor import ( InlineItemProcessor, InlineItemProcessorEvalInput, ) -from moto.stepfunctions.parser.asl.component.state.state_execution.state_map.iteration.itemprocessor.item_processor_decl import ( +from moto.stepfunctions.parser.asl.component.state.exec.state_map.iteration.itemprocessor.item_processor_decl import ( ItemProcessorDecl, ) -from moto.stepfunctions.parser.asl.component.state.state_execution.state_map.iteration.itemprocessor.item_processor_factory import ( +from moto.stepfunctions.parser.asl.component.state.exec.state_map.iteration.itemprocessor.item_processor_factory import ( from_item_processor_decl, ) -from moto.stepfunctions.parser.asl.component.state.state_execution.state_map.iteration.iteration_component import ( +from moto.stepfunctions.parser.asl.component.state.exec.state_map.iteration.iteration_component import ( IterationComponent, ) -from moto.stepfunctions.parser.asl.component.state.state_execution.state_map.iteration.iterator.iterator import ( +from moto.stepfunctions.parser.asl.component.state.exec.state_map.iteration.iterator.iterator import ( Iterator, IteratorEvalInput, ) -from moto.stepfunctions.parser.asl.component.state.state_execution.state_map.iteration.iterator.iterator_decl import ( +from moto.stepfunctions.parser.asl.component.state.exec.state_map.iteration.iterator.iterator_decl import ( IteratorDecl, ) -from moto.stepfunctions.parser.asl.component.state.state_execution.state_map.max_concurrency import ( +from moto.stepfunctions.parser.asl.component.state.exec.state_map.max_concurrency import ( MaxConcurrency, ) from moto.stepfunctions.parser.asl.component.state.state_props import StateProps diff --git a/moto/stepfunctions/parser/asl/component/state/state_execution/state_parallel/__init__.py b/moto/stepfunctions/parser/asl/component/state/exec/state_parallel/__init__.py similarity index 100% rename from moto/stepfunctions/parser/asl/component/state/state_execution/state_parallel/__init__.py rename to moto/stepfunctions/parser/asl/component/state/exec/state_parallel/__init__.py diff --git a/moto/stepfunctions/parser/asl/component/state/state_execution/state_parallel/branch_worker.py b/moto/stepfunctions/parser/asl/component/state/exec/state_parallel/branch_worker.py similarity index 100% rename from moto/stepfunctions/parser/asl/component/state/state_execution/state_parallel/branch_worker.py rename to moto/stepfunctions/parser/asl/component/state/exec/state_parallel/branch_worker.py diff --git a/moto/stepfunctions/parser/asl/component/state/state_execution/state_parallel/branches_decl.py b/moto/stepfunctions/parser/asl/component/state/exec/state_parallel/branches_decl.py similarity index 97% rename from moto/stepfunctions/parser/asl/component/state/state_execution/state_parallel/branches_decl.py rename to moto/stepfunctions/parser/asl/component/state/exec/state_parallel/branches_decl.py index b6a362cfb1a6..81e6bafa31c4 100644 --- a/moto/stepfunctions/parser/asl/component/state/state_execution/state_parallel/branches_decl.py +++ b/moto/stepfunctions/parser/asl/component/state/exec/state_parallel/branches_decl.py @@ -13,7 +13,7 @@ ) from moto.stepfunctions.parser.asl.component.eval_component import EvalComponent from moto.stepfunctions.parser.asl.component.program.program import Program -from moto.stepfunctions.parser.asl.component.state.state_execution.state_parallel.branch_worker import ( +from moto.stepfunctions.parser.asl.component.state.exec.state_parallel.branch_worker import ( BranchWorker, ) from moto.stepfunctions.parser.asl.eval.environment import Environment diff --git a/moto/stepfunctions/parser/asl/component/state/state_execution/state_parallel/state_parallel.py b/moto/stepfunctions/parser/asl/component/state/exec/state_parallel/state_parallel.py similarity index 94% rename from moto/stepfunctions/parser/asl/component/state/state_execution/state_parallel/state_parallel.py rename to moto/stepfunctions/parser/asl/component/state/exec/state_parallel/state_parallel.py index 1f51ea27b13f..852d4fe89ae6 100644 --- a/moto/stepfunctions/parser/asl/component/state/state_execution/state_parallel/state_parallel.py +++ b/moto/stepfunctions/parser/asl/component/state/exec/state_parallel/state_parallel.py @@ -11,10 +11,10 @@ from moto.stepfunctions.parser.asl.component.common.retry.retry_outcome import ( RetryOutcome, ) -from moto.stepfunctions.parser.asl.component.state.state_execution.execute_state import ( +from moto.stepfunctions.parser.asl.component.state.exec.execute_state import ( ExecutionState, ) -from moto.stepfunctions.parser.asl.component.state.state_execution.state_parallel.branches_decl import ( +from moto.stepfunctions.parser.asl.component.state.exec.state_parallel.branches_decl import ( BranchesDecl, ) from moto.stepfunctions.parser.asl.component.state.state_props import StateProps diff --git a/moto/stepfunctions/parser/asl/component/state/state_execution/state_task/__init__.py b/moto/stepfunctions/parser/asl/component/state/exec/state_task/__init__.py similarity index 100% rename from moto/stepfunctions/parser/asl/component/state/state_execution/state_task/__init__.py rename to moto/stepfunctions/parser/asl/component/state/exec/state_task/__init__.py diff --git a/moto/stepfunctions/parser/asl/component/state/state_execution/state_task/lambda_eval_utils.py b/moto/stepfunctions/parser/asl/component/state/exec/state_task/lambda_eval_utils.py similarity index 100% rename from moto/stepfunctions/parser/asl/component/state/state_execution/state_task/lambda_eval_utils.py rename to moto/stepfunctions/parser/asl/component/state/exec/state_task/lambda_eval_utils.py diff --git a/moto/stepfunctions/parser/asl/component/state/state_execution/state_task/service/__init__.py b/moto/stepfunctions/parser/asl/component/state/exec/state_task/service/__init__.py similarity index 100% rename from moto/stepfunctions/parser/asl/component/state/state_execution/state_task/service/__init__.py rename to moto/stepfunctions/parser/asl/component/state/exec/state_task/service/__init__.py diff --git a/moto/stepfunctions/parser/asl/component/state/state_execution/state_task/service/resource.py b/moto/stepfunctions/parser/asl/component/state/exec/state_task/service/resource.py similarity index 100% rename from moto/stepfunctions/parser/asl/component/state/state_execution/state_task/service/resource.py rename to moto/stepfunctions/parser/asl/component/state/exec/state_task/service/resource.py diff --git a/moto/stepfunctions/parser/asl/component/state/state_execution/state_task/service/state_task_service.py b/moto/stepfunctions/parser/asl/component/state/exec/state_task/service/state_task_service.py similarity index 97% rename from moto/stepfunctions/parser/asl/component/state/state_execution/state_task/service/state_task_service.py rename to moto/stepfunctions/parser/asl/component/state/exec/state_task/service/state_task_service.py index c4cb47602ee7..ad535d16c876 100644 --- a/moto/stepfunctions/parser/asl/component/state/state_execution/state_task/service/state_task_service.py +++ b/moto/stepfunctions/parser/asl/component/state/exec/state_task/service/state_task_service.py @@ -23,11 +23,11 @@ from moto.stepfunctions.parser.asl.component.common.error_name.states_error_name_type import ( StatesErrorNameType, ) -from moto.stepfunctions.parser.asl.component.state.state_execution.state_task.service.resource import ( +from moto.stepfunctions.parser.asl.component.state.exec.state_task.service.resource import ( ResourceRuntimePart, ServiceResource, ) -from moto.stepfunctions.parser.asl.component.state.state_execution.state_task.state_task import ( +from moto.stepfunctions.parser.asl.component.state.exec.state_task.state_task import ( StateTask, ) from moto.stepfunctions.parser.asl.eval.environment import Environment diff --git a/moto/stepfunctions/parser/asl/component/state/state_execution/state_task/service/state_task_service_api_gateway.py b/moto/stepfunctions/parser/asl/component/state/exec/state_task/service/state_task_service_api_gateway.py similarity index 97% rename from moto/stepfunctions/parser/asl/component/state/state_execution/state_task/service/state_task_service_api_gateway.py rename to moto/stepfunctions/parser/asl/component/state/exec/state_task/service/state_task_service_api_gateway.py index b5557b1456c8..4d27aa330e39 100644 --- a/moto/stepfunctions/parser/asl/component/state/state_execution/state_task/service/state_task_service_api_gateway.py +++ b/moto/stepfunctions/parser/asl/component/state/exec/state_task/service/state_task_service_api_gateway.py @@ -18,10 +18,10 @@ from moto.stepfunctions.parser.asl.component.common.error_name.failure_event import ( FailureEvent, ) -from moto.stepfunctions.parser.asl.component.state.state_execution.state_task.service.resource import ( +from moto.stepfunctions.parser.asl.component.state.exec.state_task.service.resource import ( ResourceRuntimePart, ) -from moto.stepfunctions.parser.asl.component.state.state_execution.state_task.service.state_task_service_callback import ( +from moto.stepfunctions.parser.asl.component.state.exec.state_task.service.state_task_service_callback import ( StateTaskServiceCallback, ) from moto.stepfunctions.parser.asl.eval.environment import Environment diff --git a/moto/stepfunctions/parser/asl/component/state/state_execution/state_task/service/state_task_service_aws_sdk.py b/moto/stepfunctions/parser/asl/component/state/exec/state_task/service/state_task_service_aws_sdk.py similarity index 94% rename from moto/stepfunctions/parser/asl/component/state/state_execution/state_task/service/state_task_service_aws_sdk.py rename to moto/stepfunctions/parser/asl/component/state/exec/state_task/service/state_task_service_aws_sdk.py index 80c6908b5a3f..e5268bc497c9 100644 --- a/moto/stepfunctions/parser/asl/component/state/state_execution/state_task/service/state_task_service_aws_sdk.py +++ b/moto/stepfunctions/parser/asl/component/state/exec/state_task/service/state_task_service_aws_sdk.py @@ -10,10 +10,10 @@ from moto.stepfunctions.parser.asl.component.common.error_name.states_error_name_type import ( StatesErrorNameType, ) -from moto.stepfunctions.parser.asl.component.state.state_execution.state_task.service.resource import ( +from moto.stepfunctions.parser.asl.component.state.exec.state_task.service.resource import ( ResourceRuntimePart, ) -from moto.stepfunctions.parser.asl.component.state.state_execution.state_task.service.state_task_service_callback import ( +from moto.stepfunctions.parser.asl.component.state.exec.state_task.service.state_task_service_callback import ( StateTaskServiceCallback, ) from moto.stepfunctions.parser.asl.component.state.state_props import StateProps diff --git a/moto/stepfunctions/parser/asl/component/state/state_execution/state_task/service/state_task_service_callback.py b/moto/stepfunctions/parser/asl/component/state/exec/state_task/service/state_task_service_callback.py similarity index 97% rename from moto/stepfunctions/parser/asl/component/state/state_execution/state_task/service/state_task_service_callback.py rename to moto/stepfunctions/parser/asl/component/state/exec/state_task/service/state_task_service_callback.py index 3d87e913b6b1..f1eb7af9b4df 100644 --- a/moto/stepfunctions/parser/asl/component/state/state_execution/state_task/service/state_task_service_callback.py +++ b/moto/stepfunctions/parser/asl/component/state/exec/state_task/service/state_task_service_callback.py @@ -13,11 +13,11 @@ from moto.stepfunctions.parser.asl.component.common.error_name.failure_event import ( FailureEvent, ) -from moto.stepfunctions.parser.asl.component.state.state_execution.state_task.service.resource import ( +from moto.stepfunctions.parser.asl.component.state.exec.state_task.service.resource import ( ResourceCondition, ResourceRuntimePart, ) -from moto.stepfunctions.parser.asl.component.state.state_execution.state_task.service.state_task_service import ( +from moto.stepfunctions.parser.asl.component.state.exec.state_task.service.state_task_service import ( StateTaskService, ) from moto.stepfunctions.parser.asl.eval.callback.callback import ( diff --git a/moto/stepfunctions/parser/asl/component/state/state_execution/state_task/service/state_task_service_dynamodb.py b/moto/stepfunctions/parser/asl/component/state/exec/state_task/service/state_task_service_dynamodb.py similarity index 95% rename from moto/stepfunctions/parser/asl/component/state/state_execution/state_task/service/state_task_service_dynamodb.py rename to moto/stepfunctions/parser/asl/component/state/exec/state_task/service/state_task_service_dynamodb.py index 3570ebc1a85d..7051edee636a 100644 --- a/moto/stepfunctions/parser/asl/component/state/state_execution/state_task/service/state_task_service_dynamodb.py +++ b/moto/stepfunctions/parser/asl/component/state/exec/state_task/service/state_task_service_dynamodb.py @@ -9,10 +9,10 @@ from moto.stepfunctions.parser.asl.component.common.error_name.failure_event import ( FailureEvent, ) -from moto.stepfunctions.parser.asl.component.state.state_execution.state_task.service.resource import ( +from moto.stepfunctions.parser.asl.component.state.exec.state_task.service.resource import ( ResourceRuntimePart, ) -from moto.stepfunctions.parser.asl.component.state.state_execution.state_task.service.state_task_service import ( +from moto.stepfunctions.parser.asl.component.state.exec.state_task.service.state_task_service import ( StateTaskService, ) from moto.stepfunctions.parser.asl.eval.environment import Environment diff --git a/moto/stepfunctions/parser/asl/component/state/state_execution/state_task/service/state_task_service_events.py b/moto/stepfunctions/parser/asl/component/state/exec/state_task/service/state_task_service_events.py similarity index 95% rename from moto/stepfunctions/parser/asl/component/state/state_execution/state_task/service/state_task_service_events.py rename to moto/stepfunctions/parser/asl/component/state/exec/state_task/service/state_task_service_events.py index 48c48f174438..9c6d78f235de 100644 --- a/moto/stepfunctions/parser/asl/component/state/state_execution/state_task/service/state_task_service_events.py +++ b/moto/stepfunctions/parser/asl/component/state/exec/state_task/service/state_task_service_events.py @@ -11,10 +11,10 @@ from moto.stepfunctions.parser.asl.component.common.error_name.failure_event import ( FailureEvent, ) -from moto.stepfunctions.parser.asl.component.state.state_execution.state_task.service.resource import ( +from moto.stepfunctions.parser.asl.component.state.exec.state_task.service.resource import ( ResourceRuntimePart, ) -from moto.stepfunctions.parser.asl.component.state.state_execution.state_task.service.state_task_service_callback import ( +from moto.stepfunctions.parser.asl.component.state.exec.state_task.service.state_task_service_callback import ( StateTaskServiceCallback, ) from moto.stepfunctions.parser.asl.eval.environment import Environment diff --git a/moto/stepfunctions/parser/asl/component/state/state_execution/state_task/service/state_task_service_factory.py b/moto/stepfunctions/parser/asl/component/state/exec/state_task/service/state_task_service_factory.py similarity index 51% rename from moto/stepfunctions/parser/asl/component/state/state_execution/state_task/service/state_task_service_factory.py rename to moto/stepfunctions/parser/asl/component/state/exec/state_task/service/state_task_service_factory.py index 9b8cb0739699..292c78c0d7e3 100644 --- a/moto/stepfunctions/parser/asl/component/state/state_execution/state_task/service/state_task_service_factory.py +++ b/moto/stepfunctions/parser/asl/component/state/exec/state_task/service/state_task_service_factory.py @@ -1,30 +1,30 @@ from __future__ import annotations -from moto.stepfunctions.parser.asl.component.state.state_execution.state_task.service.state_task_service import ( +from moto.stepfunctions.parser.asl.component.state.exec.state_task.service.state_task_service import ( StateTaskService, ) -from moto.stepfunctions.parser.asl.component.state.state_execution.state_task.service.state_task_service_api_gateway import ( +from moto.stepfunctions.parser.asl.component.state.exec.state_task.service.state_task_service_api_gateway import ( StateTaskServiceApiGateway, ) -from moto.stepfunctions.parser.asl.component.state.state_execution.state_task.service.state_task_service_aws_sdk import ( +from moto.stepfunctions.parser.asl.component.state.exec.state_task.service.state_task_service_aws_sdk import ( StateTaskServiceAwsSdk, ) -from moto.stepfunctions.parser.asl.component.state.state_execution.state_task.service.state_task_service_dynamodb import ( +from moto.stepfunctions.parser.asl.component.state.exec.state_task.service.state_task_service_dynamodb import ( StateTaskServiceDynamoDB, ) -from moto.stepfunctions.parser.asl.component.state.state_execution.state_task.service.state_task_service_events import ( +from moto.stepfunctions.parser.asl.component.state.exec.state_task.service.state_task_service_events import ( StateTaskServiceEvents, ) -from moto.stepfunctions.parser.asl.component.state.state_execution.state_task.service.state_task_service_lambda import ( +from moto.stepfunctions.parser.asl.component.state.exec.state_task.service.state_task_service_lambda import ( StateTaskServiceLambda, ) -from moto.stepfunctions.parser.asl.component.state.state_execution.state_task.service.state_task_service_sfn import ( +from moto.stepfunctions.parser.asl.component.state.exec.state_task.service.state_task_service_sfn import ( StateTaskServiceSfn, ) -from moto.stepfunctions.parser.asl.component.state.state_execution.state_task.service.state_task_service_sns import ( +from moto.stepfunctions.parser.asl.component.state.exec.state_task.service.state_task_service_sns import ( StateTaskServiceSns, ) -from moto.stepfunctions.parser.asl.component.state.state_execution.state_task.service.state_task_service_sqs import ( +from moto.stepfunctions.parser.asl.component.state.exec.state_task.service.state_task_service_sqs import ( StateTaskServiceSqs, ) diff --git a/moto/stepfunctions/parser/asl/component/state/state_execution/state_task/service/state_task_service_lambda.py b/moto/stepfunctions/parser/asl/component/state/exec/state_task/service/state_task_service_lambda.py similarity index 91% rename from moto/stepfunctions/parser/asl/component/state/state_execution/state_task/service/state_task_service_lambda.py rename to moto/stepfunctions/parser/asl/component/state/exec/state_task/service/state_task_service_lambda.py index 4b0a7ee031c5..7e3d0f8b57f1 100644 --- a/moto/stepfunctions/parser/asl/component/state/state_execution/state_task/service/state_task_service_lambda.py +++ b/moto/stepfunctions/parser/asl/component/state/exec/state_task/service/state_task_service_lambda.py @@ -9,13 +9,13 @@ from moto.stepfunctions.parser.asl.component.common.error_name.failure_event import ( FailureEvent, ) -from moto.stepfunctions.parser.asl.component.state.state_execution.state_task import ( +from moto.stepfunctions.parser.asl.component.state.exec.state_task import ( lambda_eval_utils, ) -from moto.stepfunctions.parser.asl.component.state.state_execution.state_task.service.resource import ( +from moto.stepfunctions.parser.asl.component.state.exec.state_task.service.resource import ( ResourceRuntimePart, ) -from moto.stepfunctions.parser.asl.component.state.state_execution.state_task.service.state_task_service_callback import ( +from moto.stepfunctions.parser.asl.component.state.exec.state_task.service.state_task_service_callback import ( StateTaskServiceCallback, ) from moto.stepfunctions.parser.asl.eval.environment import Environment diff --git a/moto/stepfunctions/parser/asl/component/state/state_execution/state_task/service/state_task_service_sfn.py b/moto/stepfunctions/parser/asl/component/state/exec/state_task/service/state_task_service_sfn.py similarity index 97% rename from moto/stepfunctions/parser/asl/component/state/state_execution/state_task/service/state_task_service_sfn.py rename to moto/stepfunctions/parser/asl/component/state/exec/state_task/service/state_task_service_sfn.py index c2eaa4cd519d..df7ecaa7bf87 100644 --- a/moto/stepfunctions/parser/asl/component/state/state_execution/state_task/service/state_task_service_sfn.py +++ b/moto/stepfunctions/parser/asl/component/state/exec/state_task/service/state_task_service_sfn.py @@ -22,10 +22,10 @@ from moto.stepfunctions.parser.asl.component.common.error_name.states_error_name_type import ( StatesErrorNameType, ) -from moto.stepfunctions.parser.asl.component.state.state_execution.state_task.service.resource import ( +from moto.stepfunctions.parser.asl.component.state.exec.state_task.service.resource import ( ResourceRuntimePart, ) -from moto.stepfunctions.parser.asl.component.state.state_execution.state_task.service.state_task_service_callback import ( +from moto.stepfunctions.parser.asl.component.state.exec.state_task.service.state_task_service_callback import ( StateTaskServiceCallback, ) from moto.stepfunctions.parser.asl.eval.environment import Environment diff --git a/moto/stepfunctions/parser/asl/component/state/state_execution/state_task/service/state_task_service_sns.py b/moto/stepfunctions/parser/asl/component/state/exec/state_task/service/state_task_service_sns.py similarity index 94% rename from moto/stepfunctions/parser/asl/component/state/state_execution/state_task/service/state_task_service_sns.py rename to moto/stepfunctions/parser/asl/component/state/exec/state_task/service/state_task_service_sns.py index aaa5e717e0c2..da9d4985ee89 100644 --- a/moto/stepfunctions/parser/asl/component/state/state_execution/state_task/service/state_task_service_sns.py +++ b/moto/stepfunctions/parser/asl/component/state/exec/state_task/service/state_task_service_sns.py @@ -9,10 +9,10 @@ from moto.stepfunctions.parser.asl.component.common.error_name.failure_event import ( FailureEvent, ) -from moto.stepfunctions.parser.asl.component.state.state_execution.state_task.service.resource import ( +from moto.stepfunctions.parser.asl.component.state.exec.state_task.service.resource import ( ResourceRuntimePart, ) -from moto.stepfunctions.parser.asl.component.state.state_execution.state_task.service.state_task_service_callback import ( +from moto.stepfunctions.parser.asl.component.state.exec.state_task.service.state_task_service_callback import ( StateTaskServiceCallback, ) from moto.stepfunctions.parser.asl.eval.environment import Environment diff --git a/moto/stepfunctions/parser/asl/component/state/state_execution/state_task/service/state_task_service_sqs.py b/moto/stepfunctions/parser/asl/component/state/exec/state_task/service/state_task_service_sqs.py similarity index 94% rename from moto/stepfunctions/parser/asl/component/state/state_execution/state_task/service/state_task_service_sqs.py rename to moto/stepfunctions/parser/asl/component/state/exec/state_task/service/state_task_service_sqs.py index eb1548a9015c..3a55c884c00c 100644 --- a/moto/stepfunctions/parser/asl/component/state/state_execution/state_task/service/state_task_service_sqs.py +++ b/moto/stepfunctions/parser/asl/component/state/exec/state_task/service/state_task_service_sqs.py @@ -9,10 +9,10 @@ from moto.stepfunctions.parser.asl.component.common.error_name.failure_event import ( FailureEvent, ) -from moto.stepfunctions.parser.asl.component.state.state_execution.state_task.service.resource import ( +from moto.stepfunctions.parser.asl.component.state.exec.state_task.service.resource import ( ResourceRuntimePart, ) -from moto.stepfunctions.parser.asl.component.state.state_execution.state_task.service.state_task_service_callback import ( +from moto.stepfunctions.parser.asl.component.state.exec.state_task.service.state_task_service_callback import ( StateTaskServiceCallback, ) from moto.stepfunctions.parser.asl.eval.environment import Environment diff --git a/moto/stepfunctions/parser/asl/component/state/state_execution/state_task/state_task.py b/moto/stepfunctions/parser/asl/component/state/exec/state_task/state_task.py similarity index 94% rename from moto/stepfunctions/parser/asl/component/state/state_execution/state_task/state_task.py rename to moto/stepfunctions/parser/asl/component/state/exec/state_task/state_task.py index f076d9250ac0..4c3defc6b841 100644 --- a/moto/stepfunctions/parser/asl/component/state/state_execution/state_task/state_task.py +++ b/moto/stepfunctions/parser/asl/component/state/exec/state_task/state_task.py @@ -14,10 +14,10 @@ StatesErrorNameType, ) from moto.stepfunctions.parser.asl.component.common.parameters import Parameters -from moto.stepfunctions.parser.asl.component.state.state_execution.execute_state import ( +from moto.stepfunctions.parser.asl.component.state.exec.execute_state import ( ExecutionState, ) -from moto.stepfunctions.parser.asl.component.state.state_execution.state_task.service.resource import ( +from moto.stepfunctions.parser.asl.component.state.exec.state_task.service.resource import ( Resource, ) from moto.stepfunctions.parser.asl.component.state.state_props import StateProps diff --git a/moto/stepfunctions/parser/asl/component/state/state_execution/state_task/state_task_factory.py b/moto/stepfunctions/parser/asl/component/state/exec/state_task/state_task_factory.py similarity index 59% rename from moto/stepfunctions/parser/asl/component/state/state_execution/state_task/state_task_factory.py rename to moto/stepfunctions/parser/asl/component/state/exec/state_task/state_task_factory.py index 226ffb77edc4..8a30686f5f1a 100644 --- a/moto/stepfunctions/parser/asl/component/state/state_execution/state_task/state_task_factory.py +++ b/moto/stepfunctions/parser/asl/component/state/exec/state_task/state_task_factory.py @@ -1,15 +1,15 @@ -from moto.stepfunctions.parser.asl.component.state.state_execution.state_task.service.resource import ( +from moto.stepfunctions.parser.asl.component.state.exec.state_task.service.resource import ( LambdaResource, Resource, ServiceResource, ) -from moto.stepfunctions.parser.asl.component.state.state_execution.state_task.service.state_task_service_factory import ( +from moto.stepfunctions.parser.asl.component.state.exec.state_task.service.state_task_service_factory import ( state_task_service_for, ) -from moto.stepfunctions.parser.asl.component.state.state_execution.state_task.state_task import ( +from moto.stepfunctions.parser.asl.component.state.exec.state_task.state_task import ( StateTask, ) -from moto.stepfunctions.parser.asl.component.state.state_execution.state_task.state_task_lambda import ( +from moto.stepfunctions.parser.asl.component.state.exec.state_task.state_task_lambda import ( StateTaskLambda, ) diff --git a/moto/stepfunctions/parser/asl/component/state/state_execution/state_task/state_task_lambda.py b/moto/stepfunctions/parser/asl/component/state/exec/state_task/state_task_lambda.py similarity index 94% rename from moto/stepfunctions/parser/asl/component/state/state_execution/state_task/state_task_lambda.py rename to moto/stepfunctions/parser/asl/component/state/exec/state_task/state_task_lambda.py index 2cb265f9fa9e..1d8c1060ea82 100644 --- a/moto/stepfunctions/parser/asl/component/state/state_execution/state_task/state_task_lambda.py +++ b/moto/stepfunctions/parser/asl/component/state/exec/state_task/state_task_lambda.py @@ -20,14 +20,14 @@ from moto.stepfunctions.parser.asl.component.common.error_name.states_error_name_type import ( StatesErrorNameType, ) -from moto.stepfunctions.parser.asl.component.state.state_execution.state_task import ( +from moto.stepfunctions.parser.asl.component.state.exec.state_task import ( lambda_eval_utils, ) -from moto.stepfunctions.parser.asl.component.state.state_execution.state_task.service.resource import ( +from moto.stepfunctions.parser.asl.component.state.exec.state_task.service.resource import ( LambdaResource, ResourceRuntimePart, ) -from moto.stepfunctions.parser.asl.component.state.state_execution.state_task.state_task import ( +from moto.stepfunctions.parser.asl.component.state.exec.state_task.state_task import ( StateTask, ) from moto.stepfunctions.parser.asl.eval.environment import Environment diff --git a/moto/stepfunctions/parser/asl/component/state/state_fail/__init__.py b/moto/stepfunctions/parser/asl/component/state/fail/__init__.py similarity index 100% rename from moto/stepfunctions/parser/asl/component/state/state_fail/__init__.py rename to moto/stepfunctions/parser/asl/component/state/fail/__init__.py diff --git a/moto/stepfunctions/parser/asl/component/state/state_fail/state_fail.py b/moto/stepfunctions/parser/asl/component/state/fail/state_fail.py similarity index 100% rename from moto/stepfunctions/parser/asl/component/state/state_fail/state_fail.py rename to moto/stepfunctions/parser/asl/component/state/fail/state_fail.py diff --git a/moto/stepfunctions/parser/asl/component/state/state_choice/comparison/operator/factory.py b/moto/stepfunctions/parser/asl/component/state/state_choice/comparison/operator/factory.py deleted file mode 100644 index 2a0e0fc62921..000000000000 --- a/moto/stepfunctions/parser/asl/component/state/state_choice/comparison/operator/factory.py +++ /dev/null @@ -1,20 +0,0 @@ -from moto.stepfunctions.parser.asl.component.state.state_choice.comparison.comparison_operator_type import ( - ComparisonOperatorType, -) -from moto.stepfunctions.parser.asl.component.state.state_choice.comparison.operator.implementations.boolean_equals import * # noqa -from moto.stepfunctions.parser.asl.component.state.state_choice.comparison.operator.implementations.is_operator import * # noqa -from moto.stepfunctions.parser.asl.component.state.state_choice.comparison.operator.implementations.numeric import * # noqa -from moto.stepfunctions.parser.asl.component.state.state_choice.comparison.operator.implementations.string_operators import * # noqa -from moto.stepfunctions.parser.asl.component.state.state_choice.comparison.operator.implementations.timestamp_operators import * # noqa -from moto.stepfunctions.parser.asl.component.state.state_choice.comparison.operator.operator import ( - Operator, -) - - -class OperatorFactory: - @staticmethod - def get(typ: ComparisonOperatorType) -> Operator: - op = Operator.get((str(typ))) - if op is None: - raise NotImplementedError(f"{typ} is not supported.") - return op diff --git a/moto/stepfunctions/parser/asl/component/state/state_execution/state_map/item_reader/resource_eval/resource_output_transformer/resource_output_transformer_factory.py b/moto/stepfunctions/parser/asl/component/state/state_execution/state_map/item_reader/resource_eval/resource_output_transformer/resource_output_transformer_factory.py deleted file mode 100644 index 33d78bac123f..000000000000 --- a/moto/stepfunctions/parser/asl/component/state/state_execution/state_map/item_reader/resource_eval/resource_output_transformer/resource_output_transformer_factory.py +++ /dev/null @@ -1,22 +0,0 @@ -from moto.stepfunctions.parser.asl.component.state.state_execution.state_map.item_reader.reader_config.input_type import ( - InputType, - InputTypeValue, -) -from moto.stepfunctions.parser.asl.component.state.state_execution.state_map.item_reader.resource_eval.resource_output_transformer.resource_output_transformer import ( - ResourceOutputTransformer, -) -from moto.stepfunctions.parser.asl.component.state.state_execution.state_map.item_reader.resource_eval.resource_output_transformer.resource_output_transformer_csv import ( - ResourceOutputTransformerCSV, -) -from moto.stepfunctions.parser.asl.component.state.state_execution.state_map.item_reader.resource_eval.resource_output_transformer.resource_output_transformer_json import ( - ResourceOutputTransformerJson, -) - - -def resource_output_transformer_for(input_type: InputType) -> ResourceOutputTransformer: - if input_type.input_type_value == InputTypeValue.CSV: - return ResourceOutputTransformerCSV() - elif input_type.input_type_value == InputTypeValue.JSON: - return ResourceOutputTransformerJson() - else: - raise ValueError(f"Unknown InputType value: '{input_type.input_type_value}'.") diff --git a/moto/stepfunctions/parser/asl/component/state/state_execution/state_map/iteration/iterator/iterator_decl.py b/moto/stepfunctions/parser/asl/component/state/state_execution/state_map/iteration/iterator/iterator_decl.py deleted file mode 100644 index fa29ca56ee35..000000000000 --- a/moto/stepfunctions/parser/asl/component/state/state_execution/state_map/iteration/iterator/iterator_decl.py +++ /dev/null @@ -1,7 +0,0 @@ -from moto.stepfunctions.parser.asl.component.state.state_execution.state_map.iteration.iteration_declaration import ( - IterationDecl, -) - - -class IteratorDecl(IterationDecl): - pass diff --git a/moto/stepfunctions/parser/asl/component/state/state_props.py b/moto/stepfunctions/parser/asl/component/state/state_props.py index 6980f22268ed..a9586aebd776 100644 --- a/moto/stepfunctions/parser/asl/component/state/state_props.py +++ b/moto/stepfunctions/parser/asl/component/state/state_props.py @@ -4,13 +4,13 @@ from moto.stepfunctions.parser.asl.component.common.flow.next import Next from moto.stepfunctions.parser.asl.component.common.timeouts.heartbeat import Heartbeat from moto.stepfunctions.parser.asl.component.common.timeouts.timeout import Timeout -from moto.stepfunctions.parser.asl.component.state.state_execution.state_map.item_reader.reader_config.max_items_decl import ( +from moto.stepfunctions.parser.asl.component.state.exec.state_map.item_reader.reader_config.max_items_decl import ( MaxItemsDecl, ) -from moto.stepfunctions.parser.asl.component.state.state_execution.state_task.service.resource import ( +from moto.stepfunctions.parser.asl.component.state.exec.state_task.service.resource import ( Resource, ) -from moto.stepfunctions.parser.asl.component.state.state_wait.wait_function.wait_function import ( +from moto.stepfunctions.parser.asl.component.state.wait.wait_function.wait_function import ( WaitFunction, ) from moto.stepfunctions.parser.asl.parse.typed_props import TypedProps diff --git a/moto/stepfunctions/parser/asl/component/state/state_succeed/state_succeed.py b/moto/stepfunctions/parser/asl/component/state/state_succeed.py similarity index 100% rename from moto/stepfunctions/parser/asl/component/state/state_succeed/state_succeed.py rename to moto/stepfunctions/parser/asl/component/state/state_succeed.py diff --git a/moto/stepfunctions/parser/asl/component/state/state_wait/wait_function/__init__.py b/moto/stepfunctions/parser/asl/component/state/state_wait/wait_function/__init__.py deleted file mode 100644 index e69de29bb2d1..000000000000 diff --git a/moto/stepfunctions/parser/asl/component/state/state_succeed/__init__.py b/moto/stepfunctions/parser/asl/component/state/wait/__init__.py similarity index 100% rename from moto/stepfunctions/parser/asl/component/state/state_succeed/__init__.py rename to moto/stepfunctions/parser/asl/component/state/wait/__init__.py diff --git a/moto/stepfunctions/parser/asl/component/state/state_wait/state_wait.py b/moto/stepfunctions/parser/asl/component/state/wait/state_wait.py similarity index 91% rename from moto/stepfunctions/parser/asl/component/state/state_wait/state_wait.py rename to moto/stepfunctions/parser/asl/component/state/wait/state_wait.py index 94a4333bf72d..03c294e94c7a 100644 --- a/moto/stepfunctions/parser/asl/component/state/state_wait/state_wait.py +++ b/moto/stepfunctions/parser/asl/component/state/wait/state_wait.py @@ -3,7 +3,7 @@ from moto.stepfunctions.parser.api import HistoryEventType from moto.stepfunctions.parser.asl.component.state.state import CommonStateField from moto.stepfunctions.parser.asl.component.state.state_props import StateProps -from moto.stepfunctions.parser.asl.component.state.state_wait.wait_function.wait_function import ( +from moto.stepfunctions.parser.asl.component.state.wait.wait_function.wait_function import ( WaitFunction, ) from moto.stepfunctions.parser.asl.eval.environment import Environment diff --git a/moto/stepfunctions/parser/asl/component/state/state_wait/__init__.py b/moto/stepfunctions/parser/asl/component/state/wait/wait_function/__init__.py similarity index 100% rename from moto/stepfunctions/parser/asl/component/state/state_wait/__init__.py rename to moto/stepfunctions/parser/asl/component/state/wait/wait_function/__init__.py diff --git a/moto/stepfunctions/parser/asl/component/state/state_wait/wait_function/seconds.py b/moto/stepfunctions/parser/asl/component/state/wait/wait_function/seconds.py similarity index 83% rename from moto/stepfunctions/parser/asl/component/state/state_wait/wait_function/seconds.py rename to moto/stepfunctions/parser/asl/component/state/wait/wait_function/seconds.py index 67138c61712b..42dca9159768 100644 --- a/moto/stepfunctions/parser/asl/component/state/state_wait/wait_function/seconds.py +++ b/moto/stepfunctions/parser/asl/component/state/wait/wait_function/seconds.py @@ -1,6 +1,6 @@ from typing import Final -from moto.stepfunctions.parser.asl.component.state.state_wait.wait_function.wait_function import ( +from moto.stepfunctions.parser.asl.component.state.wait.wait_function.wait_function import ( WaitFunction, ) from moto.stepfunctions.parser.asl.eval.environment import Environment diff --git a/moto/stepfunctions/parser/asl/component/state/state_wait/wait_function/seconds_path.py b/moto/stepfunctions/parser/asl/component/state/wait/wait_function/seconds_path.py similarity index 86% rename from moto/stepfunctions/parser/asl/component/state/state_wait/wait_function/seconds_path.py rename to moto/stepfunctions/parser/asl/component/state/wait/wait_function/seconds_path.py index 620856bcec4e..766fd97eca4c 100644 --- a/moto/stepfunctions/parser/asl/component/state/state_wait/wait_function/seconds_path.py +++ b/moto/stepfunctions/parser/asl/component/state/wait/wait_function/seconds_path.py @@ -2,7 +2,7 @@ from jsonpath_ng import parse -from moto.stepfunctions.parser.asl.component.state.state_wait.wait_function.wait_function import ( +from moto.stepfunctions.parser.asl.component.state.wait.wait_function.wait_function import ( WaitFunction, ) from moto.stepfunctions.parser.asl.eval.environment import Environment diff --git a/moto/stepfunctions/parser/asl/component/state/state_wait/wait_function/timestamp.py b/moto/stepfunctions/parser/asl/component/state/wait/wait_function/timestamp.py similarity index 92% rename from moto/stepfunctions/parser/asl/component/state/state_wait/wait_function/timestamp.py rename to moto/stepfunctions/parser/asl/component/state/wait/wait_function/timestamp.py index df6c240e6f68..7b3bc0fed7f7 100644 --- a/moto/stepfunctions/parser/asl/component/state/state_wait/wait_function/timestamp.py +++ b/moto/stepfunctions/parser/asl/component/state/wait/wait_function/timestamp.py @@ -1,7 +1,7 @@ import datetime from typing import Final -from moto.stepfunctions.parser.asl.component.state.state_wait.wait_function.wait_function import ( +from moto.stepfunctions.parser.asl.component.state.wait.wait_function.wait_function import ( WaitFunction, ) from moto.stepfunctions.parser.asl.eval.environment import Environment diff --git a/moto/stepfunctions/parser/asl/component/state/state_wait/wait_function/timestamp_path.py b/moto/stepfunctions/parser/asl/component/state/wait/wait_function/timestamp_path.py similarity index 82% rename from moto/stepfunctions/parser/asl/component/state/state_wait/wait_function/timestamp_path.py rename to moto/stepfunctions/parser/asl/component/state/wait/wait_function/timestamp_path.py index 08777511b701..578a220b7e3d 100644 --- a/moto/stepfunctions/parser/asl/component/state/state_wait/wait_function/timestamp_path.py +++ b/moto/stepfunctions/parser/asl/component/state/wait/wait_function/timestamp_path.py @@ -1,10 +1,10 @@ import datetime from typing import Final -from moto.stepfunctions.parser.asl.component.state.state_wait.wait_function.timestamp import ( +from moto.stepfunctions.parser.asl.component.state.wait.wait_function.timestamp import ( Timestamp, ) -from moto.stepfunctions.parser.asl.component.state.state_wait.wait_function.wait_function import ( +from moto.stepfunctions.parser.asl.component.state.wait.wait_function.wait_function import ( WaitFunction, ) from moto.stepfunctions.parser.asl.eval.environment import Environment diff --git a/moto/stepfunctions/parser/asl/component/state/state_wait/wait_function/wait_function.py b/moto/stepfunctions/parser/asl/component/state/wait/wait_function/wait_function.py similarity index 100% rename from moto/stepfunctions/parser/asl/component/state/state_wait/wait_function/wait_function.py rename to moto/stepfunctions/parser/asl/component/state/wait/wait_function/wait_function.py diff --git a/moto/stepfunctions/parser/asl/eval/environment.py b/moto/stepfunctions/parser/asl/eval/environment.py index 1992449aabeb..cf56ab77fee0 100644 --- a/moto/stepfunctions/parser/asl/eval/environment.py +++ b/moto/stepfunctions/parser/asl/eval/environment.py @@ -6,7 +6,7 @@ from typing import Any, Dict, Final, List, Optional from moto.stepfunctions.parser.api import ExecutionFailedEventDetails, Timestamp -from moto.stepfunctions.parser.asl.component.state.state_execution.state_map.iteration.itemprocessor.map_run_record import ( +from moto.stepfunctions.parser.asl.component.state.exec.state_map.iteration.itemprocessor.map_run_record import ( MapRunRecordPoolManager, ) from moto.stepfunctions.parser.asl.eval.aws_execution_details import AWSExecutionDetails diff --git a/moto/stepfunctions/parser/asl/parse/preprocessor.py b/moto/stepfunctions/parser/asl/parse/preprocessor.py index 590e5e187be5..041ae0a56e81 100644 --- a/moto/stepfunctions/parser/asl/parse/preprocessor.py +++ b/moto/stepfunctions/parser/asl/parse/preprocessor.py @@ -112,119 +112,119 @@ from moto.stepfunctions.parser.asl.component.common.version import Version from moto.stepfunctions.parser.asl.component.component import Component from moto.stepfunctions.parser.asl.component.program.program import Program -from moto.stepfunctions.parser.asl.component.state.state import CommonStateField -from moto.stepfunctions.parser.asl.component.state.state_choice.choice_rule import ( +from moto.stepfunctions.parser.asl.component.state.choice.choice_rule import ( ChoiceRule, ) -from moto.stepfunctions.parser.asl.component.state.state_choice.choices_decl import ( +from moto.stepfunctions.parser.asl.component.state.choice.choices_decl import ( ChoicesDecl, ) -from moto.stepfunctions.parser.asl.component.state.state_choice.comparison.comparison_composite import ( +from moto.stepfunctions.parser.asl.component.state.choice.comparison.comparison_composite import ( ComparisonComposite, ComparisonCompositeAnd, ComparisonCompositeNot, ComparisonCompositeOr, ComparisonCompositeProps, ) -from moto.stepfunctions.parser.asl.component.state.state_choice.comparison.comparison_func import ( +from moto.stepfunctions.parser.asl.component.state.choice.comparison.comparison_func import ( ComparisonFunc, ) -from moto.stepfunctions.parser.asl.component.state.state_choice.comparison.comparison_operator_type import ( +from moto.stepfunctions.parser.asl.component.state.choice.comparison.comparison_operator_type import ( ComparisonOperatorType, ) -from moto.stepfunctions.parser.asl.component.state.state_choice.comparison.comparison_variable import ( +from moto.stepfunctions.parser.asl.component.state.choice.comparison.comparison_variable import ( ComparisonVariable, ) -from moto.stepfunctions.parser.asl.component.state.state_choice.comparison.variable import ( +from moto.stepfunctions.parser.asl.component.state.choice.comparison.variable import ( Variable, ) -from moto.stepfunctions.parser.asl.component.state.state_choice.default_decl import ( +from moto.stepfunctions.parser.asl.component.state.choice.default_decl import ( DefaultDecl, ) -from moto.stepfunctions.parser.asl.component.state.state_choice.state_choice import ( +from moto.stepfunctions.parser.asl.component.state.choice.state_choice import ( StateChoice, ) -from moto.stepfunctions.parser.asl.component.state.state_execution.state_map.execution_type import ( +from moto.stepfunctions.parser.asl.component.state.exec.state_map.execution_type import ( ExecutionType, ) -from moto.stepfunctions.parser.asl.component.state.state_execution.state_map.item_reader.item_reader_decl import ( +from moto.stepfunctions.parser.asl.component.state.exec.state_map.item_reader.item_reader_decl import ( ItemReader, ) -from moto.stepfunctions.parser.asl.component.state.state_execution.state_map.item_reader.reader_config.csv_header_location import ( +from moto.stepfunctions.parser.asl.component.state.exec.state_map.item_reader.reader_config.csv_header_location import ( CSVHeaderLocation, ) -from moto.stepfunctions.parser.asl.component.state.state_execution.state_map.item_reader.reader_config.csv_headers import ( +from moto.stepfunctions.parser.asl.component.state.exec.state_map.item_reader.reader_config.csv_headers import ( CSVHeaders, ) -from moto.stepfunctions.parser.asl.component.state.state_execution.state_map.item_reader.reader_config.input_type import ( +from moto.stepfunctions.parser.asl.component.state.exec.state_map.item_reader.reader_config.input_type import ( InputType, ) -from moto.stepfunctions.parser.asl.component.state.state_execution.state_map.item_reader.reader_config.max_items_decl import ( +from moto.stepfunctions.parser.asl.component.state.exec.state_map.item_reader.reader_config.max_items_decl import ( MaxItems, MaxItemsDecl, MaxItemsPath, ) -from moto.stepfunctions.parser.asl.component.state.state_execution.state_map.item_reader.reader_config.reader_config_decl import ( +from moto.stepfunctions.parser.asl.component.state.exec.state_map.item_reader.reader_config.reader_config_decl import ( ReaderConfig, ) -from moto.stepfunctions.parser.asl.component.state.state_execution.state_map.item_selector import ( +from moto.stepfunctions.parser.asl.component.state.exec.state_map.item_selector import ( ItemSelector, ) -from moto.stepfunctions.parser.asl.component.state.state_execution.state_map.iteration.itemprocessor.item_processor_decl import ( +from moto.stepfunctions.parser.asl.component.state.exec.state_map.iteration.itemprocessor.item_processor_decl import ( ItemProcessorDecl, ) -from moto.stepfunctions.parser.asl.component.state.state_execution.state_map.iteration.itemprocessor.processor_config import ( +from moto.stepfunctions.parser.asl.component.state.exec.state_map.iteration.itemprocessor.processor_config import ( ProcessorConfig, ) -from moto.stepfunctions.parser.asl.component.state.state_execution.state_map.iteration.iterator.iterator_decl import ( +from moto.stepfunctions.parser.asl.component.state.exec.state_map.iteration.iterator.iterator_decl import ( IteratorDecl, ) -from moto.stepfunctions.parser.asl.component.state.state_execution.state_map.max_concurrency import ( +from moto.stepfunctions.parser.asl.component.state.exec.state_map.max_concurrency import ( MaxConcurrency, ) -from moto.stepfunctions.parser.asl.component.state.state_execution.state_map.mode import ( +from moto.stepfunctions.parser.asl.component.state.exec.state_map.mode import ( Mode, ) -from moto.stepfunctions.parser.asl.component.state.state_execution.state_map.state_map import ( +from moto.stepfunctions.parser.asl.component.state.exec.state_map.state_map import ( StateMap, ) -from moto.stepfunctions.parser.asl.component.state.state_execution.state_parallel.branches_decl import ( +from moto.stepfunctions.parser.asl.component.state.exec.state_parallel.branches_decl import ( BranchesDecl, ) -from moto.stepfunctions.parser.asl.component.state.state_execution.state_parallel.state_parallel import ( +from moto.stepfunctions.parser.asl.component.state.exec.state_parallel.state_parallel import ( StateParallel, ) -from moto.stepfunctions.parser.asl.component.state.state_execution.state_task.service.resource import ( +from moto.stepfunctions.parser.asl.component.state.exec.state_task.service.resource import ( Resource, ) -from moto.stepfunctions.parser.asl.component.state.state_execution.state_task.state_task_factory import ( +from moto.stepfunctions.parser.asl.component.state.exec.state_task.state_task_factory import ( state_task_for, ) -from moto.stepfunctions.parser.asl.component.state.state_fail.state_fail import ( +from moto.stepfunctions.parser.asl.component.state.fail.state_fail import ( StateFail, ) +from moto.stepfunctions.parser.asl.component.state.state import CommonStateField from moto.stepfunctions.parser.asl.component.state.state_pass.result import Result from moto.stepfunctions.parser.asl.component.state.state_pass.state_pass import ( StatePass, ) from moto.stepfunctions.parser.asl.component.state.state_props import StateProps -from moto.stepfunctions.parser.asl.component.state.state_succeed.state_succeed import ( +from moto.stepfunctions.parser.asl.component.state.state_succeed import ( StateSucceed, ) from moto.stepfunctions.parser.asl.component.state.state_type import StateType -from moto.stepfunctions.parser.asl.component.state.state_wait.state_wait import ( +from moto.stepfunctions.parser.asl.component.state.wait.state_wait import ( StateWait, ) -from moto.stepfunctions.parser.asl.component.state.state_wait.wait_function.seconds import ( +from moto.stepfunctions.parser.asl.component.state.wait.wait_function.seconds import ( Seconds, ) -from moto.stepfunctions.parser.asl.component.state.state_wait.wait_function.seconds_path import ( +from moto.stepfunctions.parser.asl.component.state.wait.wait_function.seconds_path import ( SecondsPath, ) -from moto.stepfunctions.parser.asl.component.state.state_wait.wait_function.timestamp import ( +from moto.stepfunctions.parser.asl.component.state.wait.wait_function.timestamp import ( Timestamp, ) -from moto.stepfunctions.parser.asl.component.state.state_wait.wait_function.timestamp_path import ( +from moto.stepfunctions.parser.asl.component.state.wait.wait_function.timestamp_path import ( TimestampPath, ) from moto.stepfunctions.parser.asl.component.states import States diff --git a/moto/stepfunctions/parser/models.py b/moto/stepfunctions/parser/models.py index 833e45d2ecb3..48a95b68b3c1 100644 --- a/moto/stepfunctions/parser/models.py +++ b/moto/stepfunctions/parser/models.py @@ -29,7 +29,7 @@ TracingConfiguration, VersionDescription, ) -from moto.stepfunctions.parser.asl.component.state.state_execution.state_map.iteration.itemprocessor.map_run_record import ( +from moto.stepfunctions.parser.asl.component.state.exec.state_map.iteration.itemprocessor.map_run_record import ( MapRunRecord, ) from moto.stepfunctions.parser.asl.eval.callback.callback import (