AWS SDK for C++

AWS SDK for C++ Version 1.11.795

Loading...
Searching...
No Matches
GroundStationWaiter.h
1
6#pragma once
7#include <aws/core/utils/Waiter.h>
8#include <aws/core/utils/memory/AWSMemory.h>
9#include <aws/groundstation/GroundStationClient.h>
10#include <aws/groundstation/model/ContactStatus.h>
11#include <aws/groundstation/model/DescribeContactRequest.h>
12#include <aws/groundstation/model/DescribeContactResult.h>
13#include <aws/groundstation/model/DescribeContactVersionRequest.h>
14#include <aws/groundstation/model/DescribeContactVersionResult.h>
15#include <aws/groundstation/model/VersionStatus.h>
16
17#include <algorithm>
18
19namespace Aws {
20namespace GroundStation {
21
22template <typename DerivedClient = GroundStationClient>
24 public:
26 using OutcomeT = Model::DescribeContactOutcome;
27 using RequestT = Model::DescribeContactRequest;
30 "ContactScheduledWaiter", Aws::Utils::WaiterState::FAILURE, Aws::String("FAILED_TO_SCHEDULE"),
31 [](const Model::DescribeContactOutcome& outcome, const Aws::Utils::ExpectedValue& expected) -> bool {
32 if (!outcome.IsSuccess()) return false;
33 const auto& result = outcome.GetResult();
34 return Model::ContactStatusMapper::GetNameForContactStatus(result.GetContactStatus()) == expected.get<Aws::String>();
35 }));
37 "ContactScheduledWaiter", Aws::Utils::WaiterState::SUCCESS, Aws::String("SCHEDULED"),
38 [](const Model::DescribeContactOutcome& outcome, const Aws::Utils::ExpectedValue& expected) -> bool {
39 if (!outcome.IsSuccess()) return false;
40 const auto& result = outcome.GetResult();
41 return Model::ContactStatusMapper::GetNameForContactStatus(result.GetContactStatus()) == expected.get<Aws::String>();
42 }));
43
44 auto operation = [this](const RequestT& req) { return static_cast<DerivedClient*>(this)->DescribeContact(req); };
45 Aws::Utils::Waiter<RequestT, OutcomeT> waiter(5, 180, std::move(acceptors), operation, "WaitUntilContactScheduled");
46 return waiter.Wait(request);
47 }
48
55 "ContactUpdatedWaiter", Aws::Utils::WaiterState::FAILURE, Aws::String("FAILED_TO_UPDATE"),
56 [](const Model::DescribeContactVersionOutcome& outcome, const Aws::Utils::ExpectedValue& expected) -> bool {
57 if (!outcome.IsSuccess()) return false;
58 const auto& result = outcome.GetResult();
59 return Model::VersionStatusMapper::GetNameForVersionStatus(result.GetVersion().GetStatus()) == expected.get<Aws::String>();
60 }));
62 "ContactUpdatedWaiter", Aws::Utils::WaiterState::SUCCESS, Aws::String("ACTIVE"),
63 [](const Model::DescribeContactVersionOutcome& outcome, const Aws::Utils::ExpectedValue& expected) -> bool {
64 if (!outcome.IsSuccess()) return false;
65 const auto& result = outcome.GetResult();
66 return Model::VersionStatusMapper::GetNameForVersionStatus(result.GetVersion().GetStatus()) == expected.get<Aws::String>();
67 }));
68
69 auto operation = [this](const RequestT& req) { return static_cast<DerivedClient*>(this)->DescribeContactVersion(req); };
70 Aws::Utils::Waiter<RequestT, OutcomeT> waiter(5, 180, std::move(acceptors), operation, "WaitUntilContactUpdated");
71 return waiter.Wait(request);
72 }
73};
74} // namespace GroundStation
75} // namespace Aws
Aws::Utils::WaiterOutcome< Model::DescribeContactVersionOutcome > WaitUntilContactUpdated(const Model::DescribeContactVersionRequest &request)
Aws::Utils::WaiterOutcome< Model::DescribeContactOutcome > WaitUntilContactScheduled(const Model::DescribeContactRequest &request)
bool IsSuccess() const
const R & GetResult() const
WaiterOutcome< OutcomeT > Wait(const RequestT &request)
AWS_GROUNDSTATION_API Aws::String GetNameForContactStatus(ContactStatus value)
AWS_GROUNDSTATION_API Aws::String GetNameForVersionStatus(VersionStatus value)
Aws::Utils::Outcome< DescribeContactVersionResult, GroundStationError > DescribeContactVersionOutcome
Aws::Utils::Outcome< DescribeContactResult, GroundStationError > DescribeContactOutcome
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