AWS SDK for C++

AWS SDK for C++ Version 1.11.867

Loading...
Searching...
No Matches
AgentRegistryControlWaiter.h
1
6#pragma once
7#include <aws/agent-registry-control/AgentRegistryControlClient.h>
8#include <aws/agent-registry-control/model/GetRegistryRecordRequest.h>
9#include <aws/agent-registry-control/model/GetRegistryRecordResult.h>
10#include <aws/agent-registry-control/model/GetRegistryRequest.h>
11#include <aws/agent-registry-control/model/GetRegistryResult.h>
12#include <aws/agent-registry-control/model/RegistryRecordStatus.h>
13#include <aws/agent-registry-control/model/RegistryStatus.h>
14#include <aws/core/utils/Waiter.h>
15#include <aws/core/utils/memory/AWSMemory.h>
16
17#include <algorithm>
18
19namespace Aws {
20namespace AgentRegistryControl {
21
22template <typename DerivedClient = AgentRegistryControlClient>
24 public:
26 using OutcomeT = Model::GetRegistryOutcome;
27 using RequestT = Model::GetRegistryRequest;
30 "RegistryReadyWaiter", Aws::Utils::WaiterState::SUCCESS, Aws::String("READY"),
31 [](const Model::GetRegistryOutcome& outcome, const Aws::Utils::ExpectedValue& expected) -> bool {
32 if (!outcome.IsSuccess()) return false;
33 const auto& result = outcome.GetResult();
34 return Model::RegistryStatusMapper::GetNameForRegistryStatus(result.GetStatus()) == expected.get<Aws::String>();
35 }));
37 "RegistryReadyWaiter", Aws::Utils::WaiterState::FAILURE, Aws::String("CREATE_FAILED"),
38 [](const Model::GetRegistryOutcome& outcome, const Aws::Utils::ExpectedValue& expected) -> bool {
39 if (!outcome.IsSuccess()) return false;
40 const auto& result = outcome.GetResult();
41 return Model::RegistryStatusMapper::GetNameForRegistryStatus(result.GetStatus()) == expected.get<Aws::String>();
42 }));
44 "RegistryReadyWaiter", Aws::Utils::WaiterState::FAILURE, Aws::String("UPDATE_FAILED"),
45 [](const Model::GetRegistryOutcome& outcome, const Aws::Utils::ExpectedValue& expected) -> bool {
46 if (!outcome.IsSuccess()) return false;
47 const auto& result = outcome.GetResult();
48 return Model::RegistryStatusMapper::GetNameForRegistryStatus(result.GetStatus()) == expected.get<Aws::String>();
49 }));
51 "RegistryReadyWaiter", Aws::Utils::WaiterState::FAILURE, Aws::String("DELETE_FAILED"),
52 [](const Model::GetRegistryOutcome& outcome, const Aws::Utils::ExpectedValue& expected) -> bool {
53 if (!outcome.IsSuccess()) return false;
54 const auto& result = outcome.GetResult();
55 return Model::RegistryStatusMapper::GetNameForRegistryStatus(result.GetStatus()) == expected.get<Aws::String>();
56 }));
57
58 auto operation = [this](const RequestT& req) { return static_cast<DerivedClient*>(this)->GetRegistry(req); };
59 Aws::Utils::Waiter<RequestT, OutcomeT> waiter(30, 4, std::move(acceptors), operation, "WaitUntilRegistryReady");
60 return waiter.Wait(request);
61 }
62
64 const Model::GetRegistryRecordRequest& request) {
65 using OutcomeT = Model::GetRegistryRecordOutcome;
66 using RequestT = Model::GetRegistryRecordRequest;
69 "RegistryRecordApprovedWaiter", Aws::Utils::WaiterState::SUCCESS, Aws::String("APPROVED"),
70 [](const Model::GetRegistryRecordOutcome& outcome, const Aws::Utils::ExpectedValue& expected) -> bool {
71 if (!outcome.IsSuccess()) return false;
72 const auto& result = outcome.GetResult();
73 return Model::RegistryRecordStatusMapper::GetNameForRegistryRecordStatus(result.GetStatus()) == expected.get<Aws::String>();
74 }));
76 "RegistryRecordApprovedWaiter", Aws::Utils::WaiterState::FAILURE, Aws::String("REJECTED"),
77 [](const Model::GetRegistryRecordOutcome& outcome, const Aws::Utils::ExpectedValue& expected) -> bool {
78 if (!outcome.IsSuccess()) return false;
79 const auto& result = outcome.GetResult();
80 return Model::RegistryRecordStatusMapper::GetNameForRegistryRecordStatus(result.GetStatus()) == expected.get<Aws::String>();
81 }));
83 "RegistryRecordApprovedWaiter", Aws::Utils::WaiterState::FAILURE, Aws::String("CREATE_FAILED"),
84 [](const Model::GetRegistryRecordOutcome& outcome, const Aws::Utils::ExpectedValue& expected) -> bool {
85 if (!outcome.IsSuccess()) return false;
86 const auto& result = outcome.GetResult();
87 return Model::RegistryRecordStatusMapper::GetNameForRegistryRecordStatus(result.GetStatus()) == expected.get<Aws::String>();
88 }));
90 "RegistryRecordApprovedWaiter", Aws::Utils::WaiterState::FAILURE, Aws::String("UPDATE_FAILED"),
91 [](const Model::GetRegistryRecordOutcome& outcome, const Aws::Utils::ExpectedValue& expected) -> bool {
92 if (!outcome.IsSuccess()) return false;
93 const auto& result = outcome.GetResult();
94 return Model::RegistryRecordStatusMapper::GetNameForRegistryRecordStatus(result.GetStatus()) == expected.get<Aws::String>();
95 }));
96
97 auto operation = [this](const RequestT& req) { return static_cast<DerivedClient*>(this)->GetRegistryRecord(req); };
98 Aws::Utils::Waiter<RequestT, OutcomeT> waiter(30, 4, std::move(acceptors), operation, "WaitUntilRegistryRecordApproved");
99 return waiter.Wait(request);
100 }
101};
102} // namespace AgentRegistryControl
103} // namespace Aws
Aws::Utils::WaiterOutcome< Model::GetRegistryOutcome > WaitUntilRegistryReady(const Model::GetRegistryRequest &request)
Aws::Utils::WaiterOutcome< Model::GetRegistryRecordOutcome > WaitUntilRegistryRecordApproved(const Model::GetRegistryRecordRequest &request)
bool IsSuccess() const
const R & GetResult() const
WaiterOutcome< OutcomeT > Wait(const RequestT &request)
AWS_AGENTREGISTRYCONTROL_API Aws::String GetNameForRegistryRecordStatus(RegistryRecordStatus value)
AWS_AGENTREGISTRYCONTROL_API Aws::String GetNameForRegistryStatus(RegistryStatus value)
Aws::Utils::Outcome< GetRegistryResult, AgentRegistryControlError > GetRegistryOutcome
Aws::Utils::Outcome< GetRegistryRecordResult, AgentRegistryControlError > GetRegistryRecordOutcome
Crt::Variant< int, bool, Aws::String > ExpectedValue
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
UniquePtr< T > MakeUnique(const char *allocationTag, ArgTypes &&... args)
std::vector< T, Aws::Allocator< T > > Vector