AWS IoT Device SDK C++ v2  1.36.0
AWS IoT Device SDK C++ v2
IotJobsClientV2.h
Go to the documentation of this file.
1 #pragma once
2 
3 /* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
4  * SPDX-License-Identifier: Apache-2.0.
5  *
6  * This file is generated
7  */
8 
9 #include <aws/iotjobs/Exports.h>
10 
11 #include <aws/crt/StlAllocator.h>
12 #include <aws/crt/Types.h>
14 
15 #include <functional>
16 
17 namespace Aws
18 {
19  namespace Crt
20  {
21  namespace Mqtt
22  {
23  class MqttConnection;
24  }
25  namespace Mqtt5
26  {
27  class Mqtt5Client;
28  }
29  } // namespace Crt
30 } // namespace Aws
31 
32 namespace Aws
33 {
34  namespace Iotjobs
35  {
36 
37  template <typename E> class ServiceErrorV2
38  {
39  public:
40  ServiceErrorV2() = delete;
41  ServiceErrorV2(const ServiceErrorV2<E> &rhs) = default;
43 
44  explicit ServiceErrorV2(int errorCode) : m_errorCode(errorCode), m_modeledError() {}
45 
46  ServiceErrorV2(int errorCode, E &&modeledError)
47  : m_errorCode(errorCode), m_modeledError(std::move(modeledError))
48  {
49  }
50 
51  ~ServiceErrorV2() = default;
52 
55 
56  int GetErrorCode() const { return m_errorCode; }
57 
58  bool HasModeledError() const { return m_modeledError.has_value(); }
59  const E &GetModeledError() const { return m_modeledError.value(); }
60 
61  private:
62  int m_errorCode;
63 
64  Aws::Crt::Optional<E> m_modeledError;
65  };
66 
67  class DescribeJobExecutionRequest;
68  class DescribeJobExecutionResponse;
69  class GetPendingJobExecutionsRequest;
70  class GetPendingJobExecutionsResponse;
71  class JobExecutionsChangedEvent;
72  class JobExecutionsChangedSubscriptionRequest;
73  class NextJobExecutionChangedEvent;
74  class NextJobExecutionChangedSubscriptionRequest;
75  class StartNextJobExecutionResponse;
76  class StartNextPendingJobExecutionRequest;
77  class UpdateJobExecutionRequest;
78  class UpdateJobExecutionResponse;
79  class V2ErrorResponse;
80 
84 
88 
92 
96 
105  {
106  public:
107  virtual ~IClientV2() = default;
108 
121  virtual bool DescribeJobExecution(
122  const DescribeJobExecutionRequest &request,
123  const DescribeJobExecutionResultHandler &handler) = 0;
124 
138  const GetPendingJobExecutionsRequest &request,
139  const GetPendingJobExecutionsResultHandler &handler) = 0;
140 
155  const StartNextPendingJobExecutionResultHandler &handler) = 0;
156 
171  virtual bool UpdateJobExecution(
172  const UpdateJobExecutionRequest &request,
173  const UpdateJobExecutionResultHandler &handler) = 0;
174 
188  virtual std::shared_ptr<Aws::Iot::RequestResponse::IStreamingOperation> CreateJobExecutionsChangedStream(
191 
205  virtual std::shared_ptr<Aws::Iot::RequestResponse::IStreamingOperation> CreateNextJobExecutionChangedStream(
208  };
209 
219  AWS_IOTJOBS_API std::shared_ptr<IClientV2> NewClientFrom5(
220  const Aws::Crt::Mqtt5::Mqtt5Client &protocolClient,
223 
233  AWS_IOTJOBS_API std::shared_ptr<IClientV2> NewClientFrom311(
234  const Aws::Crt::Mqtt::MqttConnection &protocolClient,
237 
238  } // namespace Iotjobs
239 } // namespace Aws
AWS_IOTJOBS_API
#define AWS_IOTJOBS_API
Definition: Exports.h:20
Aws::Iotjobs::ServiceErrorV2::operator=
ServiceErrorV2< E > & operator=(const ServiceErrorV2< E > &rhs)=default
Aws::Iotjobs::IClientV2
Definition: IotJobsClientV2.h:105
Aws::Iotjobs::GetPendingJobExecutionsResultHandler
std::function< void(GetPendingJobExecutionsResult &&)> GetPendingJobExecutionsResultHandler
Definition: IotJobsClientV2.h:87
Aws::Iotjobs::UpdateJobExecutionResultHandler
std::function< void(UpdateJobExecutionResult &&)> UpdateJobExecutionResultHandler
Definition: IotJobsClientV2.h:95
Aws::Crt::ApiAllocator
AWS_CRT_CPP_API Allocator * ApiAllocator() noexcept
Definition: Allocator.cpp:24
Aws::Iotjobs::ServiceErrorV2::~ServiceErrorV2
~ServiceErrorV2()=default
Aws::Iotjobs::DescribeJobExecutionResultHandler
std::function< void(DescribeJobExecutionResult &&)> DescribeJobExecutionResultHandler
Definition: IotJobsClientV2.h:83
Aws::Iotjobs::NewClientFrom311
AWS_IOTJOBS_API std::shared_ptr< IClientV2 > NewClientFrom311(const Aws::Crt::Mqtt::MqttConnection &protocolClient, const Aws::Iot::RequestResponse::RequestResponseClientOptions &options, Aws::Crt::Allocator *allocator=Aws::Crt::ApiAllocator())
Definition: IotJobsClientV2.cpp:641
Aws::Iotjobs::IClientV2::GetPendingJobExecutions
virtual bool GetPendingJobExecutions(const GetPendingJobExecutionsRequest &request, const GetPendingJobExecutionsResultHandler &handler)=0
Aws::Iotjobs::StartNextPendingJobExecutionRequest
Definition: StartNextPendingJobExecutionRequest.h:24
StlAllocator.h
Aws::Iotjobs::ServiceErrorV2::HasModeledError
bool HasModeledError() const
Definition: IotJobsClientV2.h:58
Exports.h
Aws::Iotjobs::IClientV2::CreateNextJobExecutionChangedStream
virtual std::shared_ptr< Aws::Iot::RequestResponse::IStreamingOperation > CreateNextJobExecutionChangedStream(const NextJobExecutionChangedSubscriptionRequest &request, const Aws::Iot::RequestResponse::StreamingOperationOptions< NextJobExecutionChangedEvent > &options)=0
Aws::Crt::Mqtt::MqttConnection
Definition: MqttConnection.h:158
Aws::Crt::Mqtt5::Mqtt5Client
Definition: Mqtt5Client.h:332
Aws::Crt::Optional::has_value
bool has_value() const noexcept
Definition: Optional.h:122
Aws::Iotjobs::DescribeJobExecutionRequest
Definition: DescribeJobExecutionRequest.h:24
Aws::Iot::RequestResponse::RequestResponseClientOptions
Definition: MqttRequestResponseClient.h:499
Aws::Iotjobs::IClientV2::~IClientV2
virtual ~IClientV2()=default
Aws::Iotjobs::ServiceErrorV2::ServiceErrorV2
ServiceErrorV2(int errorCode)
Definition: IotJobsClientV2.h:44
Aws::Crt::Optional< E >
Aws::Iot::RequestResponse::Result
Definition: MqttRequestResponseClient.h:330
Aws::Iotjobs::IClientV2::StartNextPendingJobExecution
virtual bool StartNextPendingJobExecution(const StartNextPendingJobExecutionRequest &request, const StartNextPendingJobExecutionResultHandler &handler)=0
Aws::Crt::Optional::value
T & value() &
Definition: Optional.h:124
Aws::Iotjobs::NewClientFrom5
AWS_IOTJOBS_API std::shared_ptr< IClientV2 > NewClientFrom5(const Aws::Crt::Mqtt5::Mqtt5Client &protocolClient, const Aws::Iot::RequestResponse::RequestResponseClientOptions &options, Aws::Crt::Allocator *allocator=Aws::Crt::ApiAllocator())
Definition: IotJobsClientV2.cpp:625
Aws::Iotjobs::ServiceErrorV2
Definition: IotJobsClientV2.h:38
Aws::Iotjobs::IClientV2::DescribeJobExecution
virtual bool DescribeJobExecution(const DescribeJobExecutionRequest &request, const DescribeJobExecutionResultHandler &handler)=0
Types.h
Aws::Iotjobs::ServiceErrorV2::ServiceErrorV2
ServiceErrorV2(int errorCode, E &&modeledError)
Definition: IotJobsClientV2.h:46
Aws::Iotjobs::GetPendingJobExecutionsRequest
Definition: GetPendingJobExecutionsRequest.h:24
Aws::Iotjobs::NextJobExecutionChangedSubscriptionRequest
Definition: NextJobExecutionChangedSubscriptionRequest.h:24
Aws::Iotjobs::ServiceErrorV2::GetModeledError
const E & GetModeledError() const
Definition: IotJobsClientV2.h:59
std
Definition: StringView.h:862
Aws
Definition: Allocator.h:11
Aws::Iotjobs::ServiceErrorV2::GetErrorCode
int GetErrorCode() const
Definition: IotJobsClientV2.h:56
Aws::Crt::Allocator
aws_allocator Allocator
Definition: Allocator.h:14
Aws::Iot::RequestResponse::StreamingOperationOptions
Definition: MqttRequestResponseClient.h:405
Aws::Iotjobs::StartNextPendingJobExecutionResultHandler
std::function< void(StartNextPendingJobExecutionResult &&)> StartNextPendingJobExecutionResultHandler
Definition: IotJobsClientV2.h:91
Aws::Iotjobs::ServiceErrorV2::ServiceErrorV2
ServiceErrorV2()=delete
Aws::Iotjobs::IClientV2::CreateJobExecutionsChangedStream
virtual std::shared_ptr< Aws::Iot::RequestResponse::IStreamingOperation > CreateJobExecutionsChangedStream(const JobExecutionsChangedSubscriptionRequest &request, const Aws::Iot::RequestResponse::StreamingOperationOptions< JobExecutionsChangedEvent > &options)=0
Aws::Iotjobs::ServiceErrorV2::ServiceErrorV2
ServiceErrorV2(const ServiceErrorV2< E > &rhs)=default
Aws::Iotjobs::ServiceErrorV2::ServiceErrorV2
ServiceErrorV2(ServiceErrorV2< E > &&rhs)=default
Aws::Iotjobs::JobExecutionsChangedSubscriptionRequest
Definition: JobExecutionsChangedSubscriptionRequest.h:24
MqttRequestResponseClient.h
Aws::Iotjobs::IClientV2::UpdateJobExecution
virtual bool UpdateJobExecution(const UpdateJobExecutionRequest &request, const UpdateJobExecutionResultHandler &handler)=0
Aws::Iotjobs::UpdateJobExecutionRequest
Definition: UpdateJobExecutionRequest.h:26
Aws::Iotjobs::ServiceErrorV2::operator=
ServiceErrorV2< E > & operator=(ServiceErrorV2< E > &&rhs)=default