AWS IoT Device SDK C++ v2: Aws::Iotdevicedefenderv1::ReportTaskBuilder Class Reference

AWS IoT Device SDK C++ v2 1.14.0 AWS IoT Device SDK C++ v2

Public Member Functions | List of all members
Aws::Iotdevicedefenderv1::ReportTaskBuilder Class Referencefinal

`#include <DeviceDefender.h>`

## Public Member Functions
| ReportTaskBuilder (Crt::Allocator *allocator, std::shared_ptr< Crt::Mqtt::MqttConnection > mqttConnection, Crt::Io::EventLoopGroup &eventLoopGroup, const Crt::String &thingName)
ReportTaskBuilder & | WithReportFormat (ReportFormat reportFormat) noexcept
ReportTaskBuilder & | WithTaskPeriodSeconds (uint32_t taskPeriodSeconds) noexcept
ReportTaskBuilder & | WithNetworkConnectionSamplePeriodSeconds (uint32_t networkConnectionSamplePeriodSeconds) noexcept
ReportTaskBuilder & | WithTaskCancelledHandler (OnTaskCancelledHandler &&onCancelled) noexcept
ReportTaskBuilder & | WithTaskCancellationUserData (void *cancellationUserdata) noexcept
std::shared_ptr< ReportTask > | Build () noexcept

## Detailed Description

Represents a builder for creating a ReportTask object.

## Constructor & Destructor Documentation

## ◆ ReportTaskBuilder()

Aws::Iotdevicedefenderv1::ReportTaskBuilder::ReportTaskBuilder | ( | Crt::Allocator * | allocator,
|  | std::shared_ptr< Crt::Mqtt::MqttConnection > | mqttConnection,
|  | Crt::Io::EventLoopGroup & | eventLoopGroup,
|  | const Crt::String & | thingName
| ) |  |

## Member Function Documentation

## ◆ Build()

std::shared_ptr< ReportTask > Aws::Iotdevicedefenderv1::ReportTaskBuilder::Build | ( |  | ) |
| noexcept

Builds a device defender v1 task object from the set options.

## ◆ WithNetworkConnectionSamplePeriodSeconds()

ReportTaskBuilder & Aws::Iotdevicedefenderv1::ReportTaskBuilder::WithNetworkConnectionSamplePeriodSeconds | ( | uint32_t | networkConnectionSamplePeriodSeconds | ) |
| noexcept

Sets the network connection sample period seconds. Defaults to 5 minutes.

## ◆ WithReportFormat()

ReportTaskBuilder & Aws::Iotdevicedefenderv1::ReportTaskBuilder::WithReportFormat | ( | ReportFormat | reportFormat | ) |
| noexcept

Sets the device defender report format, or defaults to AWS_IDDRF_JSON.

## ◆ WithTaskCancellationUserData()

ReportTaskBuilder & Aws::Iotdevicedefenderv1::ReportTaskBuilder::WithTaskCancellationUserData | ( | void * | cancellationUserdata | ) |
| noexcept

Sets the user data for the task cancelled handler function.

## ◆ WithTaskCancelledHandler()

ReportTaskBuilder & Aws::Iotdevicedefenderv1::ReportTaskBuilder::WithTaskCancelledHandler | ( | OnTaskCancelledHandler && | onCancelled | ) |
| noexcept

Sets the task cancelled handler function.

## ◆ WithTaskPeriodSeconds()

ReportTaskBuilder & Aws::Iotdevicedefenderv1::ReportTaskBuilder::WithTaskPeriodSeconds | ( | uint32_t | taskPeriodSeconds | ) |
| noexcept

Sets the task period seconds. Defaults to 5 minutes.

The documentation for this class was generated from the following files:

- devicedefender/include/aws/iotdevicedefender/DeviceDefender.h
- devicedefender/source/DeviceDefender.cpp