Skip to content

Commit

Permalink
NamedShadow import (#123)
Browse files Browse the repository at this point in the history
* NamedShadow import

* clang-format
  • Loading branch information
Justin Boswell authored Jun 11, 2020
1 parent 536b66e commit 7fa9d62
Show file tree
Hide file tree
Showing 65 changed files with 1,772 additions and 308 deletions.
2 changes: 1 addition & 1 deletion aws-common-runtime/aws-crt-cpp
Submodule aws-crt-cpp updated 752 files
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,9 @@ namespace Aws
void SerializeToObject(Crt::JsonObject &doc) const;

Aws::Crt::Optional<Aws::Crt::String> CertificateId;
Aws::Crt::Optional<Aws::Crt::String> PrivateKey;
Aws::Crt::Optional<Aws::Crt::String> CertificateOwnershipToken;
Aws::Crt::Optional<Aws::Crt::String> CertificatePem;
Aws::Crt::Optional<Aws::Crt::String> PrivateKey;

private:
static void LoadFromObject(CreateKeysAndCertificateResponse &obj, const Crt::JsonView &doc);
Expand Down
2 changes: 1 addition & 1 deletion identity/include/aws/iotidentity/ErrorResponse.h
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,9 @@ namespace Aws

void SerializeToObject(Crt::JsonObject &doc) const;

Aws::Crt::Optional<Aws::Crt::String> ErrorCode;
Aws::Crt::Optional<int32_t> StatusCode;
Aws::Crt::Optional<Aws::Crt::String> ErrorMessage;
Aws::Crt::Optional<Aws::Crt::String> ErrorCode;

private:
static void LoadFromObject(ErrorResponse &obj, const Crt::JsonView &doc);
Expand Down
2 changes: 1 addition & 1 deletion identity/include/aws/iotidentity/RegisterThingRequest.h
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,8 @@ namespace Aws

void SerializeToObject(Crt::JsonObject &doc) const;

Aws::Crt::Optional<Aws::Crt::Map<Aws::Crt::String, Aws::Crt::String>> Parameters;
Aws::Crt::Optional<Aws::Crt::String> TemplateName;
Aws::Crt::Optional<Aws::Crt::Map<Aws::Crt::String, Aws::Crt::String>> Parameters;
Aws::Crt::Optional<Aws::Crt::String> CertificateOwnershipToken;

private:
Expand Down
2 changes: 1 addition & 1 deletion identity/include/aws/iotidentity/RegisterThingResponse.h
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,8 @@ namespace Aws

void SerializeToObject(Crt::JsonObject &doc) const;

Aws::Crt::Optional<Aws::Crt::Map<Aws::Crt::String, Aws::Crt::String>> DeviceConfiguration;
Aws::Crt::Optional<Aws::Crt::String> ThingName;
Aws::Crt::Optional<Aws::Crt::Map<Aws::Crt::String, Aws::Crt::String>> DeviceConfiguration;

private:
static void LoadFromObject(RegisterThingResponse &obj, const Crt::JsonView &doc);
Expand Down
20 changes: 10 additions & 10 deletions identity/source/CreateKeysAndCertificateResponse.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,6 @@ namespace Aws
val.CertificateId = doc.GetString("certificateId");
}

if (doc.ValueExists("privateKey"))
{
val.PrivateKey = doc.GetString("privateKey");
}

if (doc.ValueExists("certificateOwnershipToken"))
{
val.CertificateOwnershipToken = doc.GetString("certificateOwnershipToken");
Expand All @@ -46,6 +41,11 @@ namespace Aws
{
val.CertificatePem = doc.GetString("certificatePem");
}

if (doc.ValueExists("privateKey"))
{
val.PrivateKey = doc.GetString("privateKey");
}
}

void CreateKeysAndCertificateResponse::SerializeToObject(Aws::Crt::JsonObject &object) const
Expand All @@ -57,11 +57,6 @@ namespace Aws
object.WithString("certificateId", *CertificateId);
}

if (PrivateKey)
{
object.WithString("privateKey", *PrivateKey);
}

if (CertificateOwnershipToken)
{
object.WithString("certificateOwnershipToken", *CertificateOwnershipToken);
Expand All @@ -71,6 +66,11 @@ namespace Aws
{
object.WithString("certificatePem", *CertificatePem);
}

if (PrivateKey)
{
object.WithString("privateKey", *PrivateKey);
}
}

CreateKeysAndCertificateResponse::CreateKeysAndCertificateResponse(const Crt::JsonView &doc)
Expand Down
20 changes: 10 additions & 10 deletions identity/source/ErrorResponse.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,6 @@ namespace Aws
(void)val;
(void)doc;

if (doc.ValueExists("errorCode"))
{
val.ErrorCode = doc.GetString("errorCode");
}

if (doc.ValueExists("statusCode"))
{
val.StatusCode = doc.GetInteger("statusCode");
Expand All @@ -39,17 +34,17 @@ namespace Aws
{
val.ErrorMessage = doc.GetString("errorMessage");
}

if (doc.ValueExists("errorCode"))
{
val.ErrorCode = doc.GetString("errorCode");
}
}

void ErrorResponse::SerializeToObject(Aws::Crt::JsonObject &object) const
{
(void)object;

if (ErrorCode)
{
object.WithString("errorCode", *ErrorCode);
}

if (StatusCode)
{
object.WithInteger("statusCode", *StatusCode);
Expand All @@ -59,6 +54,11 @@ namespace Aws
{
object.WithString("errorMessage", *ErrorMessage);
}

if (ErrorCode)
{
object.WithString("errorCode", *ErrorCode);
}
}

ErrorResponse::ErrorResponse(const Crt::JsonView &doc) { LoadFromObject(*this, doc); }
Expand Down
20 changes: 10 additions & 10 deletions identity/source/RegisterThingResponse.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,11 @@ namespace Aws
(void)val;
(void)doc;

if (doc.ValueExists("thingName"))
{
val.ThingName = doc.GetString("thingName");
}

if (doc.ValueExists("deviceConfiguration"))
{
auto deviceConfigurationMap = doc.GetJsonObject("deviceConfiguration");
Expand All @@ -37,17 +42,17 @@ namespace Aws
deviceConfigurationMapMember.first, std::move(deviceConfigurationMapValMember));
}
}

if (doc.ValueExists("thingName"))
{
val.ThingName = doc.GetString("thingName");
}
}

void RegisterThingResponse::SerializeToObject(Aws::Crt::JsonObject &object) const
{
(void)object;

if (ThingName)
{
object.WithString("thingName", *ThingName);
}

if (DeviceConfiguration)
{
Aws::Crt::JsonObject deviceConfigurationMap;
Expand All @@ -60,11 +65,6 @@ namespace Aws
}
object.WithObject("deviceConfiguration", std::move(deviceConfigurationMap));
}

if (ThingName)
{
object.WithString("thingName", *ThingName);
}
}

RegisterThingResponse::RegisterThingResponse(const Crt::JsonView &doc) { LoadFromObject(*this, doc); }
Expand Down
4 changes: 2 additions & 2 deletions jobs/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -99,9 +99,9 @@ target_link_libraries(IotJobs-cpp ${DEP_AWS_LIBS})
install(FILES ${AWS_IOTJOBS_HEADERS} DESTINATION "include/aws/iotjobs/" COMPONENT Development)

if (BUILD_SHARED_LIBS)
set(TARGET_DIR "shared")
set(TARGET_DIR "shared")
else()
set(TARGET_DIR "static")
set(TARGET_DIR "static")
endif()

install(EXPORT "IotJobs-cpp-targets"
Expand Down
4 changes: 2 additions & 2 deletions jobs/include/aws/iotjobs/DescribeJobExecutionRequest.h
Original file line number Diff line number Diff line change
Expand Up @@ -35,11 +35,11 @@ namespace Aws

void SerializeToObject(Crt::JsonObject &doc) const;

Aws::Crt::Optional<int64_t> ExecutionNumber;
Aws::Crt::Optional<Aws::Crt::String> ThingName;
Aws::Crt::Optional<bool> IncludeJobDocument;
Aws::Crt::Optional<Aws::Crt::String> JobId;
Aws::Crt::Optional<Aws::Crt::String> ClientToken;
Aws::Crt::Optional<int64_t> ExecutionNumber;
Aws::Crt::Optional<Aws::Crt::String> ThingName;

private:
static void LoadFromObject(DescribeJobExecutionRequest &obj, const Crt::JsonView &doc);
Expand Down
2 changes: 1 addition & 1 deletion jobs/include/aws/iotjobs/GetPendingJobExecutionsResponse.h
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,9 @@ namespace Aws

void SerializeToObject(Crt::JsonObject &doc) const;

Aws::Crt::Optional<Aws::Crt::String> ClientToken;
Aws::Crt::Optional<Aws::Crt::Vector<Aws::Iotjobs::JobExecutionSummary>> QueuedJobs;
Aws::Crt::Optional<Aws::Crt::DateTime> Timestamp;
Aws::Crt::Optional<Aws::Crt::String> ClientToken;
Aws::Crt::Optional<Aws::Crt::Vector<Aws::Iotjobs::JobExecutionSummary>> InProgressJobs;

private:
Expand Down
6 changes: 3 additions & 3 deletions jobs/include/aws/iotjobs/JobExecutionData.h
Original file line number Diff line number Diff line change
Expand Up @@ -39,13 +39,13 @@ namespace Aws
void SerializeToObject(Crt::JsonObject &doc) const;

Aws::Crt::Optional<Aws::Crt::String> JobId;
Aws::Crt::Optional<Aws::Crt::String> ThingName;
Aws::Crt::Optional<Aws::Crt::JsonObject> JobDocument;
Aws::Crt::Optional<int64_t> ExecutionNumber;
Aws::Crt::Optional<Aws::Crt::Map<Aws::Crt::String, Aws::Crt::String>> StatusDetails;
Aws::Crt::Optional<Aws::Iotjobs::JobStatus> Status;
Aws::Crt::Optional<int32_t> VersionNumber;
Aws::Crt::Optional<Aws::Crt::DateTime> QueuedAt;
Aws::Crt::Optional<Aws::Crt::String> ThingName;
Aws::Crt::Optional<int64_t> ExecutionNumber;
Aws::Crt::Optional<Aws::Crt::Map<Aws::Crt::String, Aws::Crt::String>> StatusDetails;
Aws::Crt::Optional<Aws::Crt::DateTime> LastUpdatedAt;
Aws::Crt::Optional<Aws::Crt::DateTime> StartedAt;

Expand Down
2 changes: 1 addition & 1 deletion jobs/include/aws/iotjobs/JobExecutionState.h
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,8 @@ namespace Aws

void SerializeToObject(Crt::JsonObject &doc) const;

Aws::Crt::Optional<int32_t> VersionNumber;
Aws::Crt::Optional<Aws::Crt::Map<Aws::Crt::String, Aws::Crt::String>> StatusDetails;
Aws::Crt::Optional<int32_t> VersionNumber;
Aws::Crt::Optional<Aws::Iotjobs::JobStatus> Status;

private:
Expand Down
2 changes: 1 addition & 1 deletion jobs/include/aws/iotjobs/JobExecutionSummary.h
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,9 @@ namespace Aws

Aws::Crt::Optional<Aws::Crt::DateTime> LastUpdatedAt;
Aws::Crt::Optional<int64_t> ExecutionNumber;
Aws::Crt::Optional<Aws::Crt::DateTime> StartedAt;
Aws::Crt::Optional<int32_t> VersionNumber;
Aws::Crt::Optional<Aws::Crt::String> JobId;
Aws::Crt::Optional<Aws::Crt::DateTime> StartedAt;
Aws::Crt::Optional<Aws::Crt::DateTime> QueuedAt;

private:
Expand Down
4 changes: 2 additions & 2 deletions jobs/include/aws/iotjobs/RejectedError.h
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,10 @@ namespace Aws
void SerializeToObject(Crt::JsonObject &doc) const;

Aws::Crt::Optional<Aws::Crt::DateTime> Timestamp;
Aws::Crt::Optional<Aws::Crt::String> ClientToken;
Aws::Crt::Optional<Aws::Iotjobs::RejectedErrorCode> Code;
Aws::Crt::Optional<Aws::Iotjobs::JobExecutionState> ExecutionState;
Aws::Crt::Optional<Aws::Crt::String> Message;
Aws::Crt::Optional<Aws::Crt::String> ClientToken;
Aws::Crt::Optional<Aws::Iotjobs::JobExecutionState> ExecutionState;

private:
static void LoadFromObject(RejectedError &obj, const Crt::JsonView &doc);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,10 @@ namespace Aws

void SerializeToObject(Crt::JsonObject &doc) const;

Aws::Crt::Optional<Aws::Crt::String> ClientToken;
Aws::Crt::Optional<Aws::Crt::String> ThingName;
Aws::Crt::Optional<Aws::Crt::Map<Aws::Crt::String, Aws::Crt::String>> StatusDetails;
Aws::Crt::Optional<int64_t> StepTimeoutInMinutes;
Aws::Crt::Optional<Aws::Crt::String> ClientToken;
Aws::Crt::Optional<Aws::Crt::Map<Aws::Crt::String, Aws::Crt::String>> StatusDetails;

private:
static void LoadFromObject(StartNextPendingJobExecutionRequest &obj, const Crt::JsonView &doc);
Expand Down
6 changes: 3 additions & 3 deletions jobs/include/aws/iotjobs/UpdateJobExecutionRequest.h
Original file line number Diff line number Diff line change
Expand Up @@ -37,14 +37,14 @@ namespace Aws
void SerializeToObject(Crt::JsonObject &doc) const;

Aws::Crt::Optional<Aws::Crt::String> ThingName;
Aws::Crt::Optional<int32_t> ExpectedVersion;
Aws::Crt::Optional<int64_t> ExecutionNumber;
Aws::Crt::Optional<bool> IncludeJobDocument;
Aws::Crt::Optional<Aws::Crt::Map<Aws::Crt::String, Aws::Crt::String>> StatusDetails;
Aws::Crt::Optional<bool> IncludeJobExecutionState;
Aws::Crt::Optional<Aws::Crt::String> JobId;
Aws::Crt::Optional<int32_t> ExpectedVersion;
Aws::Crt::Optional<bool> IncludeJobDocument;
Aws::Crt::Optional<Aws::Iotjobs::JobStatus> Status;
Aws::Crt::Optional<int64_t> StepTimeoutInMinutes;
Aws::Crt::Optional<Aws::Crt::String> JobId;
Aws::Crt::Optional<Aws::Crt::String> ClientToken;

private:
Expand Down
2 changes: 1 addition & 1 deletion jobs/include/aws/iotjobs/UpdateJobExecutionResponse.h
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,8 @@ namespace Aws

void SerializeToObject(Crt::JsonObject &doc) const;

Aws::Crt::Optional<Aws::Crt::DateTime> Timestamp;
Aws::Crt::Optional<Aws::Crt::String> ClientToken;
Aws::Crt::Optional<Aws::Crt::DateTime> Timestamp;
Aws::Crt::Optional<Aws::Crt::JsonObject> JobDocument;
Aws::Crt::Optional<Aws::Iotjobs::JobExecutionState> ExecutionState;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,8 @@ namespace Aws

void SerializeToObject(Crt::JsonObject &doc) const;

Aws::Crt::Optional<Aws::Crt::String> ThingName;
Aws::Crt::Optional<Aws::Crt::String> JobId;
Aws::Crt::Optional<Aws::Crt::String> ThingName;

private:
static void LoadFromObject(UpdateJobExecutionSubscriptionRequest &obj, const Crt::JsonView &doc);
Expand Down
20 changes: 10 additions & 10 deletions jobs/source/DescribeJobExecutionRequest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,11 @@ namespace Aws
(void)val;
(void)doc;

if (doc.ValueExists("executionNumber"))
{
val.ExecutionNumber = doc.GetInt64("executionNumber");
}

if (doc.ValueExists("includeJobDocument"))
{
val.IncludeJobDocument = doc.GetBool("includeJobDocument");
Expand All @@ -36,17 +41,17 @@ namespace Aws
{
val.ClientToken = doc.GetString("clientToken");
}

if (doc.ValueExists("executionNumber"))
{
val.ExecutionNumber = doc.GetInt64("executionNumber");
}
}

void DescribeJobExecutionRequest::SerializeToObject(Aws::Crt::JsonObject &object) const
{
(void)object;

if (ExecutionNumber)
{
object.WithInt64("executionNumber", *ExecutionNumber);
}

if (IncludeJobDocument)
{
object.WithBool("includeJobDocument", *IncludeJobDocument);
Expand All @@ -56,11 +61,6 @@ namespace Aws
{
object.WithString("clientToken", *ClientToken);
}

if (ExecutionNumber)
{
object.WithInt64("executionNumber", *ExecutionNumber);
}
}

DescribeJobExecutionRequest::DescribeJobExecutionRequest(const Crt::JsonView &doc)
Expand Down
Loading

0 comments on commit 7fa9d62

Please sign in to comment.