AWS IoT Device SDK C++ v2 1.44.2
AWS IoT Device SDK C++ v2
Loading...
Searching...
No Matches
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
10
12#include <aws/crt/Types.h>
14
15#include <functional>
16
17namespace 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
32namespace 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
122 const DescribeJobExecutionRequest &request,
123 const DescribeJobExecutionResultHandler &handler) = 0;
124
138 const GetPendingJobExecutionsRequest &request,
139 const GetPendingJobExecutionsResultHandler &handler) = 0;
140
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
Definition Mqtt5Client.h:361
Definition MqttConnection.h:158
Definition Optional.h:19
Definition MqttRequestResponseClient.h:499
Definition MqttRequestResponseClient.h:330
Definition MqttRequestResponseClient.h:405
Definition DescribeJobExecutionRequest.h:24
Definition GetPendingJobExecutionsRequest.h:24
Definition IotJobsClientV2.h:105
virtual std::shared_ptr< Aws::Iot::RequestResponse::IStreamingOperation > CreateNextJobExecutionChangedStream(const NextJobExecutionChangedSubscriptionRequest &request, const Aws::Iot::RequestResponse::StreamingOperationOptions< NextJobExecutionChangedEvent > &options)=0
virtual std::shared_ptr< Aws::Iot::RequestResponse::IStreamingOperation > CreateJobExecutionsChangedStream(const JobExecutionsChangedSubscriptionRequest &request, const Aws::Iot::RequestResponse::StreamingOperationOptions< JobExecutionsChangedEvent > &options)=0
virtual bool DescribeJobExecution(const DescribeJobExecutionRequest &request, const DescribeJobExecutionResultHandler &handler)=0
virtual bool UpdateJobExecution(const UpdateJobExecutionRequest &request, const UpdateJobExecutionResultHandler &handler)=0
virtual ~IClientV2()=default
virtual bool StartNextPendingJobExecution(const StartNextPendingJobExecutionRequest &request, const StartNextPendingJobExecutionResultHandler &handler)=0
virtual bool GetPendingJobExecutions(const GetPendingJobExecutionsRequest &request, const GetPendingJobExecutionsResultHandler &handler)=0
Definition JobExecutionsChangedSubscriptionRequest.h:24
Definition NextJobExecutionChangedSubscriptionRequest.h:24
bool HasModeledError() const
Definition IotJobsClientV2.h:58
ServiceErrorV2< E > & operator=(const ServiceErrorV2< E > &rhs)=default
ServiceErrorV2(int errorCode)
Definition IotJobsClientV2.h:44
ServiceErrorV2(int errorCode, E &&modeledError)
Definition IotJobsClientV2.h:46
ServiceErrorV2(ServiceErrorV2< E > &&rhs)=default
ServiceErrorV2(const ServiceErrorV2< E > &rhs)=default
ServiceErrorV2< E > & operator=(ServiceErrorV2< E > &&rhs)=default
int GetErrorCode() const
Definition IotJobsClientV2.h:56
const E & GetModeledError() const
Definition IotJobsClientV2.h:59
Definition StartNextPendingJobExecutionRequest.h:24
Definition UpdateJobExecutionRequest.h:26
#define AWS_IOTJOBS_API
Definition Exports.h:20
Definition HttpRequestResponse.h:24
Definition HttpRequestResponse.h:19
Definition Allocator.h:13
AWS_CRT_CPP_API Allocator * ApiAllocator() noexcept
Definition Allocator.cpp:24
aws_allocator Allocator
Definition Allocator.h:14
Definition DescribeJobExecutionRequest.h:17
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_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::Iot::RequestResponse::Result< UpdateJobExecutionResponse, ServiceErrorV2< V2ErrorResponse > > UpdateJobExecutionResult
Definition IotJobsClientV2.h:93
std::function< void(StartNextPendingJobExecutionResult &&)> StartNextPendingJobExecutionResultHandler
Definition IotJobsClientV2.h:91
Aws::Iot::RequestResponse::Result< GetPendingJobExecutionsResponse, ServiceErrorV2< V2ErrorResponse > > GetPendingJobExecutionsResult
Definition IotJobsClientV2.h:85
std::function< void(DescribeJobExecutionResult &&)> DescribeJobExecutionResultHandler
Definition IotJobsClientV2.h:83
Aws::Iot::RequestResponse::Result< DescribeJobExecutionResponse, ServiceErrorV2< V2ErrorResponse > > DescribeJobExecutionResult
Definition IotJobsClientV2.h:81
std::function< void(UpdateJobExecutionResult &&)> UpdateJobExecutionResultHandler
Definition IotJobsClientV2.h:95
std::function< void(GetPendingJobExecutionsResult &&)> GetPendingJobExecutionsResultHandler
Definition IotJobsClientV2.h:87
Aws::Iot::RequestResponse::Result< StartNextJobExecutionResponse, ServiceErrorV2< V2ErrorResponse > > StartNextPendingJobExecutionResult
Definition IotJobsClientV2.h:89
Definition Allocator.h:11
Definition StringView.h:862