1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
|
# File 'lib/schema.rb', line 1655
def self.from_dynamic!(d)
d = Types::Hash[d]
new(
agents: d["agents"] ? Agents.from_dynamic!(d["agents"]) : nil,
allow_dependency_failure: d["allow_dependency_failure"] ? AllowDependencyFailureUnion.from_dynamic!(d["allow_dependency_failure"]) : nil,
artifact_paths: d["artifact_paths"] ? Branches.from_dynamic!(d["artifact_paths"]) : nil,
branches: d["branches"] ? Branches.from_dynamic!(d["branches"]) : nil,
cache: d["cache"] ? Cache.from_dynamic!(d["cache"]) : nil,
cancel_on_build_failing: d["cancel_on_build_failing"] ? AllowDependencyFailureUnion.from_dynamic!(d["cancel_on_build_failing"]) : nil,
command: d["command"] ? Branches.from_dynamic!(d["command"]) : nil,
commands: d["commands"] ? Branches.from_dynamic!(d["commands"]) : nil,
concurrency: d["concurrency"],
concurrency_group: d["concurrency_group"],
concurrency_method: d["concurrency_method"],
depends_on: d["depends_on"] ? DependsOn.from_dynamic!(d["depends_on"]) : nil,
env: Types::Hash.optional[d["env"]]&.transform_values { |v| Types::Any[v] },
id: d["id"],
identifier: d["identifier"],
command_step_if: d["if"],
key: d["key"],
label: d["label"],
matrix: d["matrix"] ? MatrixUnion.from_dynamic!(d["matrix"]) : nil,
command_step_name: d["name"],
notify: d["notify"]&.map { |x| NotifyElement.from_dynamic!(x) },
parallelism: d["parallelism"],
plugins: d["plugins"] ? Plugins.from_dynamic!(d["plugins"]) : nil,
priority: d["priority"],
command_step_retry: d["retry"] ? Retry.from_dynamic!(d["retry"]) : nil,
signature: d["signature"] ? Signature.from_dynamic!(d["signature"]) : nil,
skip: d["skip"] ? Skip.from_dynamic!(d["skip"]) : nil,
soft_fail: d["soft_fail"] ? SoftFail.from_dynamic!(d["soft_fail"]) : nil,
timeout_in_minutes: d["timeout_in_minutes"],
command_step_type: d["type"]
)
end
|