JsonValue AutomationExecution::Jsonize() const { JsonValue payload; if(m_automationExecutionIdHasBeenSet) { payload.WithString("AutomationExecutionId", m_automationExecutionId); } if(m_documentNameHasBeenSet) { payload.WithString("DocumentName", m_documentName); } if(m_documentVersionHasBeenSet) { payload.WithString("DocumentVersion", m_documentVersion); } if(m_executionStartTimeHasBeenSet) { payload.WithDouble("ExecutionStartTime", m_executionStartTime.SecondsWithMSPrecision()); } if(m_executionEndTimeHasBeenSet) { payload.WithDouble("ExecutionEndTime", m_executionEndTime.SecondsWithMSPrecision()); } if(m_automationExecutionStatusHasBeenSet) { payload.WithString("AutomationExecutionStatus", AutomationExecutionStatusMapper::GetNameForAutomationExecutionStatus(m_automationExecutionStatus)); } if(m_stepExecutionsHasBeenSet) { Array<JsonValue> stepExecutionsJsonList(m_stepExecutions.size()); for(unsigned stepExecutionsIndex = 0; stepExecutionsIndex < stepExecutionsJsonList.GetLength(); ++stepExecutionsIndex) { stepExecutionsJsonList[stepExecutionsIndex].AsObject(m_stepExecutions[stepExecutionsIndex].Jsonize()); } payload.WithArray("StepExecutions", std::move(stepExecutionsJsonList)); } if(m_parametersHasBeenSet) { JsonValue parametersJsonMap; for(auto& parametersItem : m_parameters) { Array<JsonValue> automationParameterValueListJsonList(parametersItem.second.size()); for(unsigned automationParameterValueListIndex = 0; automationParameterValueListIndex < automationParameterValueListJsonList.GetLength(); ++automationParameterValueListIndex) { automationParameterValueListJsonList[automationParameterValueListIndex].AsString(parametersItem.second[automationParameterValueListIndex]); } parametersJsonMap.WithArray(parametersItem.first, std::move(automationParameterValueListJsonList)); } payload.WithObject("Parameters", std::move(parametersJsonMap)); } if(m_outputsHasBeenSet) { JsonValue outputsJsonMap; for(auto& outputsItem : m_outputs) { Array<JsonValue> automationParameterValueListJsonList(outputsItem.second.size()); for(unsigned automationParameterValueListIndex = 0; automationParameterValueListIndex < automationParameterValueListJsonList.GetLength(); ++automationParameterValueListIndex) { automationParameterValueListJsonList[automationParameterValueListIndex].AsString(outputsItem.second[automationParameterValueListIndex]); } outputsJsonMap.WithArray(outputsItem.first, std::move(automationParameterValueListJsonList)); } payload.WithObject("Outputs", std::move(outputsJsonMap)); } if(m_failureMessageHasBeenSet) { payload.WithString("FailureMessage", m_failureMessage); } return payload; }
JsonValue UserPoolClientType::Jsonize() const { JsonValue payload; if(m_userPoolIdHasBeenSet) { payload.WithString("UserPoolId", m_userPoolId); } if(m_clientNameHasBeenSet) { payload.WithString("ClientName", m_clientName); } if(m_clientIdHasBeenSet) { payload.WithString("ClientId", m_clientId); } if(m_clientSecretHasBeenSet) { payload.WithString("ClientSecret", m_clientSecret); } if(m_lastModifiedDateHasBeenSet) { payload.WithDouble("LastModifiedDate", m_lastModifiedDate.SecondsWithMSPrecision()); } if(m_creationDateHasBeenSet) { payload.WithDouble("CreationDate", m_creationDate.SecondsWithMSPrecision()); } if(m_refreshTokenValidityHasBeenSet) { payload.WithInteger("RefreshTokenValidity", m_refreshTokenValidity); } if(m_readAttributesHasBeenSet) { Array<JsonValue> readAttributesJsonList(m_readAttributes.size()); for(unsigned readAttributesIndex = 0; readAttributesIndex < readAttributesJsonList.GetLength(); ++readAttributesIndex) { readAttributesJsonList[readAttributesIndex].AsString(m_readAttributes[readAttributesIndex]); } payload.WithArray("ReadAttributes", std::move(readAttributesJsonList)); } if(m_writeAttributesHasBeenSet) { Array<JsonValue> writeAttributesJsonList(m_writeAttributes.size()); for(unsigned writeAttributesIndex = 0; writeAttributesIndex < writeAttributesJsonList.GetLength(); ++writeAttributesIndex) { writeAttributesJsonList[writeAttributesIndex].AsString(m_writeAttributes[writeAttributesIndex]); } payload.WithArray("WriteAttributes", std::move(writeAttributesJsonList)); } if(m_explicitAuthFlowsHasBeenSet) { Array<JsonValue> explicitAuthFlowsJsonList(m_explicitAuthFlows.size()); for(unsigned explicitAuthFlowsIndex = 0; explicitAuthFlowsIndex < explicitAuthFlowsJsonList.GetLength(); ++explicitAuthFlowsIndex) { explicitAuthFlowsJsonList[explicitAuthFlowsIndex].AsString(ExplicitAuthFlowsTypeMapper::GetNameForExplicitAuthFlowsType(m_explicitAuthFlows[explicitAuthFlowsIndex])); } payload.WithArray("ExplicitAuthFlows", std::move(explicitAuthFlowsJsonList)); } return payload; }
Aws::String DescribeMLModelsRequest::SerializePayload() const { JsonValue payload; if(m_filterVariableHasBeenSet) { payload.WithString("FilterVariable", MLModelFilterVariableMapper::GetNameForMLModelFilterVariable(m_filterVariable)); } if(m_eQHasBeenSet) { payload.WithString("EQ", m_eQ); } if(m_gTHasBeenSet) { payload.WithString("GT", m_gT); } if(m_lTHasBeenSet) { payload.WithString("LT", m_lT); } if(m_gEHasBeenSet) { payload.WithString("GE", m_gE); } if(m_lEHasBeenSet) { payload.WithString("LE", m_lE); } if(m_nEHasBeenSet) { payload.WithString("NE", m_nE); } if(m_prefixHasBeenSet) { payload.WithString("Prefix", m_prefix); } if(m_sortOrderHasBeenSet) { payload.WithString("SortOrder", SortOrderMapper::GetNameForSortOrder(m_sortOrder)); } if(m_nextTokenHasBeenSet) { payload.WithString("NextToken", m_nextToken); } if(m_limitHasBeenSet) { payload.WithInteger("Limit", m_limit); } return payload.WriteReadable(); }
Aws::String CreateReplicationInstanceRequest::SerializePayload() const { JsonValue payload; if(m_replicationInstanceIdentifierHasBeenSet) { payload.WithString("ReplicationInstanceIdentifier", m_replicationInstanceIdentifier); } if(m_allocatedStorageHasBeenSet) { payload.WithInteger("AllocatedStorage", m_allocatedStorage); } if(m_replicationInstanceClassHasBeenSet) { payload.WithString("ReplicationInstanceClass", m_replicationInstanceClass); } if(m_vpcSecurityGroupIdsHasBeenSet) { Array<JsonValue> vpcSecurityGroupIdsJsonList(m_vpcSecurityGroupIds.size()); for(unsigned vpcSecurityGroupIdsIndex = 0; vpcSecurityGroupIdsIndex < vpcSecurityGroupIdsJsonList.GetLength(); ++vpcSecurityGroupIdsIndex) { vpcSecurityGroupIdsJsonList[vpcSecurityGroupIdsIndex].AsString(m_vpcSecurityGroupIds[vpcSecurityGroupIdsIndex]); } payload.WithArray("VpcSecurityGroupIds", std::move(vpcSecurityGroupIdsJsonList)); } if(m_availabilityZoneHasBeenSet) { payload.WithString("AvailabilityZone", m_availabilityZone); } if(m_replicationSubnetGroupIdentifierHasBeenSet) { payload.WithString("ReplicationSubnetGroupIdentifier", m_replicationSubnetGroupIdentifier); } if(m_preferredMaintenanceWindowHasBeenSet) { payload.WithString("PreferredMaintenanceWindow", m_preferredMaintenanceWindow); } if(m_multiAZHasBeenSet) { payload.WithBool("MultiAZ", m_multiAZ); } if(m_engineVersionHasBeenSet) { payload.WithString("EngineVersion", m_engineVersion); } if(m_autoMinorVersionUpgradeHasBeenSet) { payload.WithBool("AutoMinorVersionUpgrade", m_autoMinorVersionUpgrade); } if(m_tagsHasBeenSet) { Array<JsonValue> tagsJsonList(m_tags.size()); for(unsigned tagsIndex = 0; tagsIndex < tagsJsonList.GetLength(); ++tagsIndex) { tagsJsonList[tagsIndex].AsObject(m_tags[tagsIndex].Jsonize()); } payload.WithArray("Tags", std::move(tagsJsonList)); } if(m_kmsKeyIdHasBeenSet) { payload.WithString("KmsKeyId", m_kmsKeyId); } if(m_publiclyAccessibleHasBeenSet) { payload.WithBool("PubliclyAccessible", m_publiclyAccessible); } return payload.WriteReadable(); }
Aws::String UpdateProductRequest::SerializePayload() const { JsonValue payload; if(m_acceptLanguageHasBeenSet) { payload.WithString("AcceptLanguage", m_acceptLanguage); } if(m_idHasBeenSet) { payload.WithString("Id", m_id); } if(m_nameHasBeenSet) { payload.WithString("Name", m_name); } if(m_ownerHasBeenSet) { payload.WithString("Owner", m_owner); } if(m_descriptionHasBeenSet) { payload.WithString("Description", m_description); } if(m_distributorHasBeenSet) { payload.WithString("Distributor", m_distributor); } if(m_supportDescriptionHasBeenSet) { payload.WithString("SupportDescription", m_supportDescription); } if(m_supportEmailHasBeenSet) { payload.WithString("SupportEmail", m_supportEmail); } if(m_supportUrlHasBeenSet) { payload.WithString("SupportUrl", m_supportUrl); } if(m_addTagsHasBeenSet) { Array<JsonValue> addTagsJsonList(m_addTags.size()); for(unsigned addTagsIndex = 0; addTagsIndex < addTagsJsonList.GetLength(); ++addTagsIndex) { addTagsJsonList[addTagsIndex].AsObject(m_addTags[addTagsIndex].Jsonize()); } payload.WithArray("AddTags", std::move(addTagsJsonList)); } if(m_removeTagsHasBeenSet) { Array<JsonValue> removeTagsJsonList(m_removeTags.size()); for(unsigned removeTagsIndex = 0; removeTagsIndex < removeTagsJsonList.GetLength(); ++removeTagsIndex) { removeTagsJsonList[removeTagsIndex].AsString(m_removeTags[removeTagsIndex]); } payload.WithArray("RemoveTags", std::move(removeTagsJsonList)); } return payload.WriteReadable(); }
JsonValue JobFlowInstancesConfig::Jsonize() const { JsonValue payload; if(m_masterInstanceTypeHasBeenSet) { payload.WithString("MasterInstanceType", m_masterInstanceType); } if(m_slaveInstanceTypeHasBeenSet) { payload.WithString("SlaveInstanceType", m_slaveInstanceType); } if(m_instanceCountHasBeenSet) { payload.WithInteger("InstanceCount", m_instanceCount); } if(m_instanceGroupsHasBeenSet) { Array<JsonValue> instanceGroupsJsonList(m_instanceGroups.size()); for(unsigned instanceGroupsIndex = 0; instanceGroupsIndex < instanceGroupsJsonList.GetLength(); ++instanceGroupsIndex) { instanceGroupsJsonList[instanceGroupsIndex].AsObject(m_instanceGroups[instanceGroupsIndex].Jsonize()); } payload.WithArray("InstanceGroups", std::move(instanceGroupsJsonList)); } if(m_ec2KeyNameHasBeenSet) { payload.WithString("Ec2KeyName", m_ec2KeyName); } if(m_placementHasBeenSet) { payload.WithObject("Placement", m_placement.Jsonize()); } if(m_keepJobFlowAliveWhenNoStepsHasBeenSet) { payload.WithBool("KeepJobFlowAliveWhenNoSteps", m_keepJobFlowAliveWhenNoSteps); } if(m_terminationProtectedHasBeenSet) { payload.WithBool("TerminationProtected", m_terminationProtected); } if(m_hadoopVersionHasBeenSet) { payload.WithString("HadoopVersion", m_hadoopVersion); } if(m_ec2SubnetIdHasBeenSet) { payload.WithString("Ec2SubnetId", m_ec2SubnetId); } if(m_emrManagedMasterSecurityGroupHasBeenSet) { payload.WithString("EmrManagedMasterSecurityGroup", m_emrManagedMasterSecurityGroup); } if(m_emrManagedSlaveSecurityGroupHasBeenSet) { payload.WithString("EmrManagedSlaveSecurityGroup", m_emrManagedSlaveSecurityGroup); } if(m_serviceAccessSecurityGroupHasBeenSet) { payload.WithString("ServiceAccessSecurityGroup", m_serviceAccessSecurityGroup); } if(m_additionalMasterSecurityGroupsHasBeenSet) { Array<JsonValue> additionalMasterSecurityGroupsJsonList(m_additionalMasterSecurityGroups.size()); for(unsigned additionalMasterSecurityGroupsIndex = 0; additionalMasterSecurityGroupsIndex < additionalMasterSecurityGroupsJsonList.GetLength(); ++additionalMasterSecurityGroupsIndex) { additionalMasterSecurityGroupsJsonList[additionalMasterSecurityGroupsIndex].AsString(m_additionalMasterSecurityGroups[additionalMasterSecurityGroupsIndex]); } payload.WithArray("AdditionalMasterSecurityGroups", std::move(additionalMasterSecurityGroupsJsonList)); } if(m_additionalSlaveSecurityGroupsHasBeenSet) { Array<JsonValue> additionalSlaveSecurityGroupsJsonList(m_additionalSlaveSecurityGroups.size()); for(unsigned additionalSlaveSecurityGroupsIndex = 0; additionalSlaveSecurityGroupsIndex < additionalSlaveSecurityGroupsJsonList.GetLength(); ++additionalSlaveSecurityGroupsIndex) { additionalSlaveSecurityGroupsJsonList[additionalSlaveSecurityGroupsIndex].AsString(m_additionalSlaveSecurityGroups[additionalSlaveSecurityGroupsIndex]); } payload.WithArray("AdditionalSlaveSecurityGroups", std::move(additionalSlaveSecurityGroupsJsonList)); } return payload; }
Aws::String QueryRequest::SerializePayload() const { JsonValue payload; if(m_tableNameHasBeenSet) { payload.WithString("TableName", m_tableName); } if(m_indexNameHasBeenSet) { payload.WithString("IndexName", m_indexName); } if(m_selectHasBeenSet) { payload.WithString("Select", SelectMapper::GetNameForSelect(m_select)); } if(m_attributesToGetHasBeenSet) { Array<JsonValue> attributesToGetJsonList(m_attributesToGet.size()); for(unsigned attributesToGetIndex = 0; attributesToGetIndex < attributesToGetJsonList.GetLength(); ++attributesToGetIndex) { attributesToGetJsonList[attributesToGetIndex].AsString(m_attributesToGet[attributesToGetIndex]); } payload.WithArray("AttributesToGet", std::move(attributesToGetJsonList)); } if(m_limitHasBeenSet) { payload.WithInteger("Limit", m_limit); } if(m_consistentReadHasBeenSet) { payload.WithBool("ConsistentRead", m_consistentRead); } if(m_keyConditionsHasBeenSet) { JsonValue keyConditionsJsonMap; for(auto& keyConditionsItem : m_keyConditions) { keyConditionsJsonMap.WithObject(keyConditionsItem.first, keyConditionsItem.second.Jsonize()); } payload.WithObject("KeyConditions", std::move(keyConditionsJsonMap)); } if(m_queryFilterHasBeenSet) { JsonValue queryFilterJsonMap; for(auto& queryFilterItem : m_queryFilter) { queryFilterJsonMap.WithObject(queryFilterItem.first, queryFilterItem.second.Jsonize()); } payload.WithObject("QueryFilter", std::move(queryFilterJsonMap)); } if(m_conditionalOperatorHasBeenSet) { payload.WithString("ConditionalOperator", ConditionalOperatorMapper::GetNameForConditionalOperator(m_conditionalOperator)); } if(m_scanIndexForwardHasBeenSet) { payload.WithBool("ScanIndexForward", m_scanIndexForward); } if(m_exclusiveStartKeyHasBeenSet) { JsonValue exclusiveStartKeyJsonMap; for(auto& exclusiveStartKeyItem : m_exclusiveStartKey) { exclusiveStartKeyJsonMap.WithObject(exclusiveStartKeyItem.first, exclusiveStartKeyItem.second.Jsonize()); } payload.WithObject("ExclusiveStartKey", std::move(exclusiveStartKeyJsonMap)); } if(m_returnConsumedCapacityHasBeenSet) { payload.WithString("ReturnConsumedCapacity", ReturnConsumedCapacityMapper::GetNameForReturnConsumedCapacity(m_returnConsumedCapacity)); } if(m_projectionExpressionHasBeenSet) { payload.WithString("ProjectionExpression", m_projectionExpression); } if(m_filterExpressionHasBeenSet) { payload.WithString("FilterExpression", m_filterExpression); } if(m_keyConditionExpressionHasBeenSet) { payload.WithString("KeyConditionExpression", m_keyConditionExpression); } if(m_expressionAttributeNamesHasBeenSet) { JsonValue expressionAttributeNamesJsonMap; for(auto& expressionAttributeNamesItem : m_expressionAttributeNames) { expressionAttributeNamesJsonMap.WithString(expressionAttributeNamesItem.first, expressionAttributeNamesItem.second); } payload.WithObject("ExpressionAttributeNames", std::move(expressionAttributeNamesJsonMap)); } if(m_expressionAttributeValuesHasBeenSet) { JsonValue expressionAttributeValuesJsonMap; for(auto& expressionAttributeValuesItem : m_expressionAttributeValues) { expressionAttributeValuesJsonMap.WithObject(expressionAttributeValuesItem.first, expressionAttributeValuesItem.second.Jsonize()); } payload.WithObject("ExpressionAttributeValues", std::move(expressionAttributeValuesJsonMap)); } return payload.WriteReadable(); }
JsonValue InstanceGroupDetail::Jsonize() const { JsonValue payload; if(m_instanceGroupIdHasBeenSet) { payload.WithString("InstanceGroupId", m_instanceGroupId); } if(m_nameHasBeenSet) { payload.WithString("Name", m_name); } if(m_marketHasBeenSet) { payload.WithString("Market", MarketTypeMapper::GetNameForMarketType(m_market)); } if(m_instanceRoleHasBeenSet) { payload.WithString("InstanceRole", InstanceRoleTypeMapper::GetNameForInstanceRoleType(m_instanceRole)); } if(m_bidPriceHasBeenSet) { payload.WithString("BidPrice", m_bidPrice); } if(m_instanceTypeHasBeenSet) { payload.WithString("InstanceType", m_instanceType); } if(m_instanceRequestCountHasBeenSet) { payload.WithInteger("InstanceRequestCount", m_instanceRequestCount); } if(m_instanceRunningCountHasBeenSet) { payload.WithInteger("InstanceRunningCount", m_instanceRunningCount); } if(m_stateHasBeenSet) { payload.WithString("State", InstanceGroupStateMapper::GetNameForInstanceGroupState(m_state)); } if(m_lastStateChangeReasonHasBeenSet) { payload.WithString("LastStateChangeReason", m_lastStateChangeReason); } if(m_creationDateTimeHasBeenSet) { payload.WithDouble("CreationDateTime", m_creationDateTime.SecondsWithMSPrecision()); } if(m_startDateTimeHasBeenSet) { payload.WithDouble("StartDateTime", m_startDateTime.SecondsWithMSPrecision()); } if(m_readyDateTimeHasBeenSet) { payload.WithDouble("ReadyDateTime", m_readyDateTime.SecondsWithMSPrecision()); } if(m_endDateTimeHasBeenSet) { payload.WithDouble("EndDateTime", m_endDateTime.SecondsWithMSPrecision()); } return payload; }
AttributeValueByteBuffer::AttributeValueByteBuffer(const JsonValue& jsonValue) { m_b = HashingUtils::Base64Decode(jsonValue.GetString("B")); }
JsonValue ContainerInstance::Jsonize() const { JsonValue payload; if(m_containerInstanceArnHasBeenSet) { payload.WithString("containerInstanceArn", m_containerInstanceArn); } if(m_ec2InstanceIdHasBeenSet) { payload.WithString("ec2InstanceId", m_ec2InstanceId); } if(m_versionHasBeenSet) { payload.WithInt64("version", m_version); } if(m_versionInfoHasBeenSet) { payload.WithObject("versionInfo", m_versionInfo.Jsonize()); } if(m_remainingResourcesHasBeenSet) { Array<JsonValue> remainingResourcesJsonList(m_remainingResources.size()); for(unsigned remainingResourcesIndex = 0; remainingResourcesIndex < remainingResourcesJsonList.GetLength(); ++remainingResourcesIndex) { remainingResourcesJsonList[remainingResourcesIndex].AsObject(m_remainingResources[remainingResourcesIndex].Jsonize()); } payload.WithArray("remainingResources", std::move(remainingResourcesJsonList)); } if(m_registeredResourcesHasBeenSet) { Array<JsonValue> registeredResourcesJsonList(m_registeredResources.size()); for(unsigned registeredResourcesIndex = 0; registeredResourcesIndex < registeredResourcesJsonList.GetLength(); ++registeredResourcesIndex) { registeredResourcesJsonList[registeredResourcesIndex].AsObject(m_registeredResources[registeredResourcesIndex].Jsonize()); } payload.WithArray("registeredResources", std::move(registeredResourcesJsonList)); } if(m_statusHasBeenSet) { payload.WithString("status", m_status); } if(m_agentConnectedHasBeenSet) { payload.WithBool("agentConnected", m_agentConnected); } if(m_runningTasksCountHasBeenSet) { payload.WithInteger("runningTasksCount", m_runningTasksCount); } if(m_pendingTasksCountHasBeenSet) { payload.WithInteger("pendingTasksCount", m_pendingTasksCount); } if(m_agentUpdateStatusHasBeenSet) { payload.WithString("agentUpdateStatus", AgentUpdateStatusMapper::GetNameForAgentUpdateStatus(m_agentUpdateStatus)); } if(m_attributesHasBeenSet) { Array<JsonValue> attributesJsonList(m_attributes.size()); for(unsigned attributesIndex = 0; attributesIndex < attributesJsonList.GetLength(); ++attributesIndex) { attributesJsonList[attributesIndex].AsObject(m_attributes[attributesIndex].Jsonize()); } payload.WithArray("attributes", std::move(attributesJsonList)); } if(m_registeredAtHasBeenSet) { payload.WithDouble("registeredAt", m_registeredAt.SecondsWithMSPrecision()); } return payload; }
Aws::String CreateUserPoolRequest::SerializePayload() const { JsonValue payload; if(m_poolNameHasBeenSet) { payload.WithString("PoolName", m_poolName); } if(m_policiesHasBeenSet) { payload.WithObject("Policies", m_policies.Jsonize()); } if(m_lambdaConfigHasBeenSet) { payload.WithObject("LambdaConfig", m_lambdaConfig.Jsonize()); } if(m_autoVerifiedAttributesHasBeenSet) { Array<JsonValue> autoVerifiedAttributesJsonList(m_autoVerifiedAttributes.size()); for(unsigned autoVerifiedAttributesIndex = 0; autoVerifiedAttributesIndex < autoVerifiedAttributesJsonList.GetLength(); ++autoVerifiedAttributesIndex) { autoVerifiedAttributesJsonList[autoVerifiedAttributesIndex].AsString(VerifiedAttributeTypeMapper::GetNameForVerifiedAttributeType(m_autoVerifiedAttributes[autoVerifiedAttributesIndex])); } payload.WithArray("AutoVerifiedAttributes", std::move(autoVerifiedAttributesJsonList)); } if(m_aliasAttributesHasBeenSet) { Array<JsonValue> aliasAttributesJsonList(m_aliasAttributes.size()); for(unsigned aliasAttributesIndex = 0; aliasAttributesIndex < aliasAttributesJsonList.GetLength(); ++aliasAttributesIndex) { aliasAttributesJsonList[aliasAttributesIndex].AsString(AliasAttributeTypeMapper::GetNameForAliasAttributeType(m_aliasAttributes[aliasAttributesIndex])); } payload.WithArray("AliasAttributes", std::move(aliasAttributesJsonList)); } if(m_smsVerificationMessageHasBeenSet) { payload.WithString("SmsVerificationMessage", m_smsVerificationMessage); } if(m_emailVerificationMessageHasBeenSet) { payload.WithString("EmailVerificationMessage", m_emailVerificationMessage); } if(m_emailVerificationSubjectHasBeenSet) { payload.WithString("EmailVerificationSubject", m_emailVerificationSubject); } if(m_smsAuthenticationMessageHasBeenSet) { payload.WithString("SmsAuthenticationMessage", m_smsAuthenticationMessage); } if(m_mfaConfigurationHasBeenSet) { payload.WithString("MfaConfiguration", UserPoolMfaTypeMapper::GetNameForUserPoolMfaType(m_mfaConfiguration)); } if(m_deviceConfigurationHasBeenSet) { payload.WithObject("DeviceConfiguration", m_deviceConfiguration.Jsonize()); } if(m_emailConfigurationHasBeenSet) { payload.WithObject("EmailConfiguration", m_emailConfiguration.Jsonize()); } if(m_smsConfigurationHasBeenSet) { payload.WithObject("SmsConfiguration", m_smsConfiguration.Jsonize()); } if(m_adminCreateUserConfigHasBeenSet) { payload.WithObject("AdminCreateUserConfig", m_adminCreateUserConfig.Jsonize()); } if(m_schemaHasBeenSet) { Array<JsonValue> schemaJsonList(m_schema.size()); for(unsigned schemaIndex = 0; schemaIndex < schemaJsonList.GetLength(); ++schemaIndex) { schemaJsonList[schemaIndex].AsObject(m_schema[schemaIndex].Jsonize()); } payload.WithArray("Schema", std::move(schemaJsonList)); } return payload.WriteReadable(); }
Aws::String PutFileRequest::SerializePayload() const { JsonValue payload; if(m_repositoryNameHasBeenSet) { payload.WithString("repositoryName", m_repositoryName); } if(m_branchNameHasBeenSet) { payload.WithString("branchName", m_branchName); } if(m_fileContentHasBeenSet) { payload.WithString("fileContent", HashingUtils::Base64Encode(m_fileContent)); } if(m_filePathHasBeenSet) { payload.WithString("filePath", m_filePath); } if(m_fileModeHasBeenSet) { payload.WithString("fileMode", FileModeTypeEnumMapper::GetNameForFileModeTypeEnum(m_fileMode)); } if(m_parentCommitIdHasBeenSet) { payload.WithString("parentCommitId", m_parentCommitId); } if(m_commitMessageHasBeenSet) { payload.WithString("commitMessage", m_commitMessage); } if(m_nameHasBeenSet) { payload.WithString("name", m_name); } if(m_emailHasBeenSet) { payload.WithString("email", m_email); } return payload.View().WriteReadable(); }
Aws::String RegisterDomainRequest::SerializePayload() const { JsonValue payload; if(m_domainNameHasBeenSet) { payload.WithString("DomainName", m_domainName); } if(m_idnLangCodeHasBeenSet) { payload.WithString("IdnLangCode", m_idnLangCode); } if(m_durationInYearsHasBeenSet) { payload.WithInteger("DurationInYears", m_durationInYears); } if(m_autoRenewHasBeenSet) { payload.WithBool("AutoRenew", m_autoRenew); } if(m_adminContactHasBeenSet) { payload.WithObject("AdminContact", m_adminContact.Jsonize()); } if(m_registrantContactHasBeenSet) { payload.WithObject("RegistrantContact", m_registrantContact.Jsonize()); } if(m_techContactHasBeenSet) { payload.WithObject("TechContact", m_techContact.Jsonize()); } if(m_privacyProtectAdminContactHasBeenSet) { payload.WithBool("PrivacyProtectAdminContact", m_privacyProtectAdminContact); } if(m_privacyProtectRegistrantContactHasBeenSet) { payload.WithBool("PrivacyProtectRegistrantContact", m_privacyProtectRegistrantContact); } if(m_privacyProtectTechContactHasBeenSet) { payload.WithBool("PrivacyProtectTechContact", m_privacyProtectTechContact); } return payload.WriteReadable(); }
Aws::String CreateMLModelRequest::SerializePayload() const { JsonValue payload; if(m_mLModelIdHasBeenSet) { payload.WithString("MLModelId", m_mLModelId); } if(m_mLModelNameHasBeenSet) { payload.WithString("MLModelName", m_mLModelName); } if(m_mLModelTypeHasBeenSet) { payload.WithString("MLModelType", MLModelTypeMapper::GetNameForMLModelType(m_mLModelType)); } if(m_parametersHasBeenSet) { JsonValue parametersJsonMap; for(auto& parametersItem : m_parameters) { parametersJsonMap.WithString(parametersItem.first, parametersItem.second); } payload.WithObject("Parameters", std::move(parametersJsonMap)); } if(m_trainingDataSourceIdHasBeenSet) { payload.WithString("TrainingDataSourceId", m_trainingDataSourceId); } if(m_recipeHasBeenSet) { payload.WithString("Recipe", m_recipe); } if(m_recipeUriHasBeenSet) { payload.WithString("RecipeUri", m_recipeUri); } return payload.WriteReadable(); }
Aws::String CloneStackRequest::SerializePayload() const { JsonValue payload; if(m_sourceStackIdHasBeenSet) { payload.WithString("SourceStackId", m_sourceStackId); } if(m_nameHasBeenSet) { payload.WithString("Name", m_name); } if(m_regionHasBeenSet) { payload.WithString("Region", m_region); } if(m_vpcIdHasBeenSet) { payload.WithString("VpcId", m_vpcId); } if(m_attributesHasBeenSet) { JsonValue attributesJsonMap; for(auto& attributesItem : m_attributes) { attributesJsonMap.WithString(StackAttributesKeysMapper::GetNameForStackAttributesKeys(attributesItem.first), attributesItem.second); } payload.WithObject("Attributes", std::move(attributesJsonMap)); } if(m_serviceRoleArnHasBeenSet) { payload.WithString("ServiceRoleArn", m_serviceRoleArn); } if(m_defaultInstanceProfileArnHasBeenSet) { payload.WithString("DefaultInstanceProfileArn", m_defaultInstanceProfileArn); } if(m_defaultOsHasBeenSet) { payload.WithString("DefaultOs", m_defaultOs); } if(m_hostnameThemeHasBeenSet) { payload.WithString("HostnameTheme", m_hostnameTheme); } if(m_defaultAvailabilityZoneHasBeenSet) { payload.WithString("DefaultAvailabilityZone", m_defaultAvailabilityZone); } if(m_defaultSubnetIdHasBeenSet) { payload.WithString("DefaultSubnetId", m_defaultSubnetId); } if(m_customJsonHasBeenSet) { payload.WithString("CustomJson", m_customJson); } if(m_configurationManagerHasBeenSet) { payload.WithObject("ConfigurationManager", m_configurationManager.Jsonize()); } if(m_chefConfigurationHasBeenSet) { payload.WithObject("ChefConfiguration", m_chefConfiguration.Jsonize()); } if(m_useCustomCookbooksHasBeenSet) { payload.WithBool("UseCustomCookbooks", m_useCustomCookbooks); } if(m_useOpsworksSecurityGroupsHasBeenSet) { payload.WithBool("UseOpsworksSecurityGroups", m_useOpsworksSecurityGroups); } if(m_customCookbooksSourceHasBeenSet) { payload.WithObject("CustomCookbooksSource", m_customCookbooksSource.Jsonize()); } if(m_defaultSshKeyNameHasBeenSet) { payload.WithString("DefaultSshKeyName", m_defaultSshKeyName); } if(m_clonePermissionsHasBeenSet) { payload.WithBool("ClonePermissions", m_clonePermissions); } if(m_cloneAppIdsHasBeenSet) { Array<JsonValue> cloneAppIdsJsonList(m_cloneAppIds.size()); for(unsigned cloneAppIdsIndex = 0; cloneAppIdsIndex < cloneAppIdsJsonList.GetLength(); ++cloneAppIdsIndex) { cloneAppIdsJsonList[cloneAppIdsIndex].AsString(m_cloneAppIds[cloneAppIdsIndex]); } payload.WithArray("CloneAppIds", std::move(cloneAppIdsJsonList)); } if(m_defaultRootDeviceTypeHasBeenSet) { payload.WithString("DefaultRootDeviceType", RootDeviceTypeMapper::GetNameForRootDeviceType(m_defaultRootDeviceType)); } if(m_agentVersionHasBeenSet) { payload.WithString("AgentVersion", m_agentVersion); } return payload.WriteReadable(); }
JsonValue StorediSCSIVolume::Jsonize() const { JsonValue payload; if(m_volumeARNHasBeenSet) { payload.WithString("VolumeARN", m_volumeARN); } if(m_volumeIdHasBeenSet) { payload.WithString("VolumeId", m_volumeId); } if(m_volumeTypeHasBeenSet) { payload.WithString("VolumeType", m_volumeType); } if(m_volumeStatusHasBeenSet) { payload.WithString("VolumeStatus", m_volumeStatus); } if(m_volumeSizeInBytesHasBeenSet) { payload.WithInt64("VolumeSizeInBytes", m_volumeSizeInBytes); } if(m_volumeProgressHasBeenSet) { payload.WithDouble("VolumeProgress", m_volumeProgress); } if(m_volumeDiskIdHasBeenSet) { payload.WithString("VolumeDiskId", m_volumeDiskId); } if(m_sourceSnapshotIdHasBeenSet) { payload.WithString("SourceSnapshotId", m_sourceSnapshotId); } if(m_preservedExistingDataHasBeenSet) { payload.WithBool("PreservedExistingData", m_preservedExistingData); } if(m_volumeiSCSIAttributesHasBeenSet) { payload.WithObject("VolumeiSCSIAttributes", m_volumeiSCSIAttributes.Jsonize()); } return payload; }
JsonValue ConfigRuleEvaluationStatus::Jsonize() const { JsonValue payload; if(m_configRuleNameHasBeenSet) { payload.WithString("ConfigRuleName", m_configRuleName); } if(m_configRuleArnHasBeenSet) { payload.WithString("ConfigRuleArn", m_configRuleArn); } if(m_configRuleIdHasBeenSet) { payload.WithString("ConfigRuleId", m_configRuleId); } if(m_lastSuccessfulInvocationTimeHasBeenSet) { payload.WithDouble("LastSuccessfulInvocationTime", m_lastSuccessfulInvocationTime.SecondsWithMSPrecision()); } if(m_lastFailedInvocationTimeHasBeenSet) { payload.WithDouble("LastFailedInvocationTime", m_lastFailedInvocationTime.SecondsWithMSPrecision()); } if(m_lastSuccessfulEvaluationTimeHasBeenSet) { payload.WithDouble("LastSuccessfulEvaluationTime", m_lastSuccessfulEvaluationTime.SecondsWithMSPrecision()); } if(m_lastFailedEvaluationTimeHasBeenSet) { payload.WithDouble("LastFailedEvaluationTime", m_lastFailedEvaluationTime.SecondsWithMSPrecision()); } if(m_firstActivatedTimeHasBeenSet) { payload.WithDouble("FirstActivatedTime", m_firstActivatedTime.SecondsWithMSPrecision()); } if(m_lastErrorCodeHasBeenSet) { payload.WithString("LastErrorCode", m_lastErrorCode); } if(m_lastErrorMessageHasBeenSet) { payload.WithString("LastErrorMessage", m_lastErrorMessage); } if(m_firstEvaluationStartedHasBeenSet) { payload.WithBool("FirstEvaluationStarted", m_firstEvaluationStarted); } return payload; }
JsonValue Task::Jsonize() const { JsonValue payload; if(m_taskArnHasBeenSet) { payload.WithString("taskArn", m_taskArn); } if(m_clusterArnHasBeenSet) { payload.WithString("clusterArn", m_clusterArn); } if(m_taskDefinitionArnHasBeenSet) { payload.WithString("taskDefinitionArn", m_taskDefinitionArn); } if(m_containerInstanceArnHasBeenSet) { payload.WithString("containerInstanceArn", m_containerInstanceArn); } if(m_overridesHasBeenSet) { payload.WithObject("overrides", m_overrides.Jsonize()); } if(m_lastStatusHasBeenSet) { payload.WithString("lastStatus", m_lastStatus); } if(m_desiredStatusHasBeenSet) { payload.WithString("desiredStatus", m_desiredStatus); } if(m_containersHasBeenSet) { Array<JsonValue> containersJsonList(m_containers.size()); for(unsigned containersIndex = 0; containersIndex < containersJsonList.GetLength(); ++containersIndex) { containersJsonList[containersIndex].AsObject(m_containers[containersIndex].Jsonize()); } payload.WithArray("containers", std::move(containersJsonList)); } if(m_startedByHasBeenSet) { payload.WithString("startedBy", m_startedBy); } if(m_stoppedReasonHasBeenSet) { payload.WithString("stoppedReason", m_stoppedReason); } if(m_createdAtHasBeenSet) { payload.WithDouble("createdAt", m_createdAt.SecondsWithMSPrecision()); } if(m_startedAtHasBeenSet) { payload.WithDouble("startedAt", m_startedAt.SecondsWithMSPrecision()); } if(m_stoppedAtHasBeenSet) { payload.WithDouble("stoppedAt", m_stoppedAt.SecondsWithMSPrecision()); } return payload; }
JsonValue RemoteAccessSession::Jsonize() const { JsonValue payload; if(m_arnHasBeenSet) { payload.WithString("arn", m_arn); } if(m_nameHasBeenSet) { payload.WithString("name", m_name); } if(m_createdHasBeenSet) { payload.WithDouble("created", m_created.SecondsWithMSPrecision()); } if(m_statusHasBeenSet) { payload.WithString("status", ExecutionStatusMapper::GetNameForExecutionStatus(m_status)); } if(m_resultHasBeenSet) { payload.WithString("result", ExecutionResultMapper::GetNameForExecutionResult(m_result)); } if(m_messageHasBeenSet) { payload.WithString("message", m_message); } if(m_startedHasBeenSet) { payload.WithDouble("started", m_started.SecondsWithMSPrecision()); } if(m_stoppedHasBeenSet) { payload.WithDouble("stopped", m_stopped.SecondsWithMSPrecision()); } if(m_deviceHasBeenSet) { payload.WithObject("device", m_device.Jsonize()); } if(m_instanceArnHasBeenSet) { payload.WithString("instanceArn", m_instanceArn); } if(m_remoteDebugEnabledHasBeenSet) { payload.WithBool("remoteDebugEnabled", m_remoteDebugEnabled); } if(m_remoteRecordEnabledHasBeenSet) { payload.WithBool("remoteRecordEnabled", m_remoteRecordEnabled); } if(m_remoteRecordAppArnHasBeenSet) { payload.WithString("remoteRecordAppArn", m_remoteRecordAppArn); } if(m_hostAddressHasBeenSet) { payload.WithString("hostAddress", m_hostAddress); } if(m_clientIdHasBeenSet) { payload.WithString("clientId", m_clientId); } if(m_billingMethodHasBeenSet) { payload.WithString("billingMethod", BillingMethodMapper::GetNameForBillingMethod(m_billingMethod)); } if(m_deviceMinutesHasBeenSet) { payload.WithObject("deviceMinutes", m_deviceMinutes.Jsonize()); } if(m_endpointHasBeenSet) { payload.WithString("endpoint", m_endpoint); } if(m_deviceUdidHasBeenSet) { payload.WithString("deviceUdid", m_deviceUdid); } if(m_interactionModeHasBeenSet) { payload.WithString("interactionMode", InteractionModeMapper::GetNameForInteractionMode(m_interactionMode)); } if(m_skipAppResignHasBeenSet) { payload.WithBool("skipAppResign", m_skipAppResign); } return payload; }
JsonValue Integration::Jsonize() const { JsonValue payload; if(m_typeHasBeenSet) { payload.WithString("type", IntegrationTypeMapper::GetNameForIntegrationType(m_type)); } if(m_httpMethodHasBeenSet) { payload.WithString("httpMethod", m_httpMethod); } if(m_uriHasBeenSet) { payload.WithString("uri", m_uri); } if(m_credentialsHasBeenSet) { payload.WithString("credentials", m_credentials); } if(m_requestParametersHasBeenSet) { JsonValue requestParametersJsonMap; for(auto& requestParametersItem : m_requestParameters) { requestParametersJsonMap.WithString(requestParametersItem.first, requestParametersItem.second); } payload.WithObject("requestParameters", std::move(requestParametersJsonMap)); } if(m_requestTemplatesHasBeenSet) { JsonValue requestTemplatesJsonMap; for(auto& requestTemplatesItem : m_requestTemplates) { requestTemplatesJsonMap.WithString(requestTemplatesItem.first, requestTemplatesItem.second); } payload.WithObject("requestTemplates", std::move(requestTemplatesJsonMap)); } if(m_passthroughBehaviorHasBeenSet) { payload.WithString("passthroughBehavior", m_passthroughBehavior); } if(m_contentHandlingHasBeenSet) { payload.WithString("contentHandling", ContentHandlingStrategyMapper::GetNameForContentHandlingStrategy(m_contentHandling)); } if(m_cacheNamespaceHasBeenSet) { payload.WithString("cacheNamespace", m_cacheNamespace); } if(m_cacheKeyParametersHasBeenSet) { Array<JsonValue> cacheKeyParametersJsonList(m_cacheKeyParameters.size()); for(unsigned cacheKeyParametersIndex = 0; cacheKeyParametersIndex < cacheKeyParametersJsonList.GetLength(); ++cacheKeyParametersIndex) { cacheKeyParametersJsonList[cacheKeyParametersIndex].AsString(m_cacheKeyParameters[cacheKeyParametersIndex]); } payload.WithArray("cacheKeyParameters", std::move(cacheKeyParametersJsonList)); } if(m_integrationResponsesHasBeenSet) { JsonValue integrationResponsesJsonMap; for(auto& integrationResponsesItem : m_integrationResponses) { integrationResponsesJsonMap.WithObject(integrationResponsesItem.first, integrationResponsesItem.second.Jsonize()); } payload.WithObject("integrationResponses", std::move(integrationResponsesJsonMap)); } return payload; }
void LoggerManager::configure(const JsonValue& val) { std::unique_lock<std::mutex> lock(reconfigureLock); loggers.clear(); LoggerGroup::loggers.clear(); Level globalLevel; if (val.contains("globalLevel")) { auto levelVal = val("globalLevel"); if (levelVal.isInteger()) { globalLevel = static_cast<Level>(levelVal.getInteger()); } else { throw std::runtime_error("parameter globalLevel has wrong type"); } } else { globalLevel = TRACE; } std::vector<std::string> globalDisabledCategories; if (val.contains("globalDisabledCategories")) { auto globalDisabledCategoriesList = val("globalDisabledCategories"); if (globalDisabledCategoriesList.isArray()) { size_t countOfCategories = globalDisabledCategoriesList.size(); for (size_t i = 0; i < countOfCategories; ++i) { auto categoryVal = globalDisabledCategoriesList[i]; if (categoryVal.isString()) { globalDisabledCategories.push_back(categoryVal.getString()); } } } else { throw std::runtime_error("parameter globalDisabledCategories has wrong type"); } } if (val.contains("loggers")) { auto loggersList = val("loggers"); if (loggersList.isArray()) { size_t countOfLoggers = loggersList.size(); for (size_t i = 0; i < countOfLoggers; ++i) { auto loggerConfiguration = loggersList[i]; if (!loggerConfiguration.isObject()) { throw std::runtime_error("loggers element must be objects"); } Level level = INFO; if (loggerConfiguration.contains("level")) { level = static_cast<Level>(loggerConfiguration("level").getInteger()); } std::string type = loggerConfiguration("type").getString(); std::unique_ptr<Logging::CommonLogger> logger; if (type == "console") { logger.reset(new ConsoleLogger(level)); } else if (type == "file") { std::string filename = loggerConfiguration("filename").getString(); auto fileLogger = new FileLogger(level); fileLogger->init(filename); logger.reset(fileLogger); } else { throw std::runtime_error("Unknown logger type: " + type); } if (loggerConfiguration.contains("pattern")) { logger->setPattern(loggerConfiguration("pattern").getString()); } std::vector<std::string> disabledCategories; if (loggerConfiguration.contains("disabledCategories")) { auto disabledCategoriesVal = loggerConfiguration("disabledCategories"); size_t countOfCategories = disabledCategoriesVal.size(); for (size_t i = 0; i < countOfCategories; ++i) { auto categoryVal = disabledCategoriesVal[i]; if (categoryVal.isString()) { logger->disableCategory(categoryVal.getString()); } } } loggers.emplace_back(std::move(logger)); addLogger(*loggers.back()); } } else { throw std::runtime_error("loggers parameter has wrong type"); } } else { throw std::runtime_error("loggers parameter missing"); } setMaxLevel(globalLevel); for (const auto& category : globalDisabledCategories) { disableCategory(category); } }
JsonValue Job::Jsonize() const { JsonValue payload; if(m_arnHasBeenSet) { payload.WithString("arn", m_arn); } if(m_nameHasBeenSet) { payload.WithString("name", m_name); } if(m_typeHasBeenSet) { payload.WithString("type", TestTypeMapper::GetNameForTestType(m_type)); } if(m_createdHasBeenSet) { payload.WithDouble("created", m_created.SecondsWithMSPrecision()); } if(m_statusHasBeenSet) { payload.WithString("status", ExecutionStatusMapper::GetNameForExecutionStatus(m_status)); } if(m_resultHasBeenSet) { payload.WithString("result", ExecutionResultMapper::GetNameForExecutionResult(m_result)); } if(m_startedHasBeenSet) { payload.WithDouble("started", m_started.SecondsWithMSPrecision()); } if(m_stoppedHasBeenSet) { payload.WithDouble("stopped", m_stopped.SecondsWithMSPrecision()); } if(m_countersHasBeenSet) { payload.WithObject("counters", m_counters.Jsonize()); } if(m_messageHasBeenSet) { payload.WithString("message", m_message); } if(m_deviceHasBeenSet) { payload.WithObject("device", m_device.Jsonize()); } if(m_deviceMinutesHasBeenSet) { payload.WithObject("deviceMinutes", m_deviceMinutes.Jsonize()); } return payload; }
JsonValue Deployment::Jsonize() const { JsonValue payload; if(m_deploymentIdHasBeenSet) { payload.WithString("DeploymentId", m_deploymentId); } if(m_stackIdHasBeenSet) { payload.WithString("StackId", m_stackId); } if(m_appIdHasBeenSet) { payload.WithString("AppId", m_appId); } if(m_createdAtHasBeenSet) { payload.WithString("CreatedAt", m_createdAt); } if(m_completedAtHasBeenSet) { payload.WithString("CompletedAt", m_completedAt); } if(m_durationHasBeenSet) { payload.WithInteger("Duration", m_duration); } if(m_iamUserArnHasBeenSet) { payload.WithString("IamUserArn", m_iamUserArn); } if(m_commentHasBeenSet) { payload.WithString("Comment", m_comment); } if(m_commandHasBeenSet) { payload.WithObject("Command", m_command.Jsonize()); } if(m_statusHasBeenSet) { payload.WithString("Status", m_status); } if(m_customJsonHasBeenSet) { payload.WithString("CustomJson", m_customJson); } if(m_instanceIdsHasBeenSet) { Array<JsonValue> instanceIdsJsonList(m_instanceIds.size()); for(unsigned instanceIdsIndex = 0; instanceIdsIndex < instanceIdsJsonList.GetLength(); ++instanceIdsIndex) { instanceIdsJsonList[instanceIdsIndex].AsString(m_instanceIds[instanceIdsIndex]); } payload.WithArray("InstanceIds", std::move(instanceIdsJsonList)); } return payload; }
JsonValue TraceSummary::Jsonize() const { JsonValue payload; if(m_idHasBeenSet) { payload.WithString("Id", m_id); } if(m_durationHasBeenSet) { payload.WithDouble("Duration", m_duration); } if(m_responseTimeHasBeenSet) { payload.WithDouble("ResponseTime", m_responseTime); } if(m_hasFaultHasBeenSet) { payload.WithBool("HasFault", m_hasFault); } if(m_hasErrorHasBeenSet) { payload.WithBool("HasError", m_hasError); } if(m_hasThrottleHasBeenSet) { payload.WithBool("HasThrottle", m_hasThrottle); } if(m_isPartialHasBeenSet) { payload.WithBool("IsPartial", m_isPartial); } if(m_httpHasBeenSet) { payload.WithObject("Http", m_http.Jsonize()); } if(m_annotationsHasBeenSet) { JsonValue annotationsJsonMap; for(auto& annotationsItem : m_annotations) { Array<JsonValue> valuesWithServiceIdsJsonList(annotationsItem.second.size()); for(unsigned valuesWithServiceIdsIndex = 0; valuesWithServiceIdsIndex < valuesWithServiceIdsJsonList.GetLength(); ++valuesWithServiceIdsIndex) { valuesWithServiceIdsJsonList[valuesWithServiceIdsIndex].AsObject(annotationsItem.second[valuesWithServiceIdsIndex].Jsonize()); } annotationsJsonMap.WithArray(annotationsItem.first, std::move(valuesWithServiceIdsJsonList)); } payload.WithObject("Annotations", std::move(annotationsJsonMap)); } if(m_usersHasBeenSet) { Array<JsonValue> usersJsonList(m_users.size()); for(unsigned usersIndex = 0; usersIndex < usersJsonList.GetLength(); ++usersIndex) { usersJsonList[usersIndex].AsObject(m_users[usersIndex].Jsonize()); } payload.WithArray("Users", std::move(usersJsonList)); } if(m_serviceIdsHasBeenSet) { Array<JsonValue> serviceIdsJsonList(m_serviceIds.size()); for(unsigned serviceIdsIndex = 0; serviceIdsIndex < serviceIdsJsonList.GetLength(); ++serviceIdsIndex) { serviceIdsJsonList[serviceIdsIndex].AsObject(m_serviceIds[serviceIdsIndex].Jsonize()); } payload.WithArray("ServiceIds", std::move(serviceIdsJsonList)); } return payload; }
JsonValue Event::Jsonize() const { JsonValue payload; if(m_eventTypeHasBeenSet) { payload.WithString("eventType", m_eventType); } if(m_timestampHasBeenSet) { payload.WithString("timestamp", m_timestamp); } if(m_sessionHasBeenSet) { payload.WithObject("session", m_session.Jsonize()); } if(m_versionHasBeenSet) { payload.WithString("version", m_version); } if(m_attributesHasBeenSet) { JsonValue attributesJsonMap; for(auto& attributesItem : m_attributes) { attributesJsonMap.WithString(attributesItem.first, attributesItem.second); } payload.WithObject("attributes", std::move(attributesJsonMap)); } if(m_metricsHasBeenSet) { JsonValue metricsJsonMap; for(auto& metricsItem : m_metrics) { metricsJsonMap.WithDouble(metricsItem.first, metricsItem.second); } payload.WithObject("metrics", std::move(metricsJsonMap)); } return payload; }
Aws::String SubmitJobRequest::SerializePayload() const { JsonValue payload; if(m_jobNameHasBeenSet) { payload.WithString("jobName", m_jobName); } if(m_jobQueueHasBeenSet) { payload.WithString("jobQueue", m_jobQueue); } if(m_dependsOnHasBeenSet) { Array<JsonValue> dependsOnJsonList(m_dependsOn.size()); for(unsigned dependsOnIndex = 0; dependsOnIndex < dependsOnJsonList.GetLength(); ++dependsOnIndex) { dependsOnJsonList[dependsOnIndex].AsObject(m_dependsOn[dependsOnIndex].Jsonize()); } payload.WithArray("dependsOn", std::move(dependsOnJsonList)); } if(m_jobDefinitionHasBeenSet) { payload.WithString("jobDefinition", m_jobDefinition); } if(m_parametersHasBeenSet) { JsonValue parametersJsonMap; for(auto& parametersItem : m_parameters) { parametersJsonMap.WithString(parametersItem.first, parametersItem.second); } payload.WithObject("parameters", std::move(parametersJsonMap)); } if(m_containerOverridesHasBeenSet) { payload.WithObject("containerOverrides", m_containerOverrides.Jsonize()); } if(m_retryStrategyHasBeenSet) { payload.WithObject("retryStrategy", m_retryStrategy.Jsonize()); } return payload.WriteReadable(); }
static inline bool jsonToBool(const JsonValue& js) { return js.type() == JsonValue::Boolean && js.data() == "true"; }
JsonValue Stack::Jsonize() const { JsonValue payload; if(m_arnHasBeenSet) { payload.WithString("Arn", m_arn); } if(m_nameHasBeenSet) { payload.WithString("Name", m_name); } if(m_descriptionHasBeenSet) { payload.WithString("Description", m_description); } if(m_displayNameHasBeenSet) { payload.WithString("DisplayName", m_displayName); } if(m_createdTimeHasBeenSet) { payload.WithDouble("CreatedTime", m_createdTime.SecondsWithMSPrecision()); } if(m_storageConnectorsHasBeenSet) { Array<JsonValue> storageConnectorsJsonList(m_storageConnectors.size()); for(unsigned storageConnectorsIndex = 0; storageConnectorsIndex < storageConnectorsJsonList.GetLength(); ++storageConnectorsIndex) { storageConnectorsJsonList[storageConnectorsIndex].AsObject(m_storageConnectors[storageConnectorsIndex].Jsonize()); } payload.WithArray("StorageConnectors", std::move(storageConnectorsJsonList)); } if(m_redirectURLHasBeenSet) { payload.WithString("RedirectURL", m_redirectURL); } if(m_feedbackURLHasBeenSet) { payload.WithString("FeedbackURL", m_feedbackURL); } if(m_stackErrorsHasBeenSet) { Array<JsonValue> stackErrorsJsonList(m_stackErrors.size()); for(unsigned stackErrorsIndex = 0; stackErrorsIndex < stackErrorsJsonList.GetLength(); ++stackErrorsIndex) { stackErrorsJsonList[stackErrorsIndex].AsObject(m_stackErrors[stackErrorsIndex].Jsonize()); } payload.WithArray("StackErrors", std::move(stackErrorsJsonList)); } if(m_userSettingsHasBeenSet) { Array<JsonValue> userSettingsJsonList(m_userSettings.size()); for(unsigned userSettingsIndex = 0; userSettingsIndex < userSettingsJsonList.GetLength(); ++userSettingsIndex) { userSettingsJsonList[userSettingsIndex].AsObject(m_userSettings[userSettingsIndex].Jsonize()); } payload.WithArray("UserSettings", std::move(userSettingsJsonList)); } if(m_applicationSettingsHasBeenSet) { payload.WithObject("ApplicationSettings", m_applicationSettings.Jsonize()); } return payload; }
Aws::String CreateUserPoolClientRequest::SerializePayload() const { JsonValue payload; if(m_userPoolIdHasBeenSet) { payload.WithString("UserPoolId", m_userPoolId); } if(m_clientNameHasBeenSet) { payload.WithString("ClientName", m_clientName); } if(m_generateSecretHasBeenSet) { payload.WithBool("GenerateSecret", m_generateSecret); } if(m_refreshTokenValidityHasBeenSet) { payload.WithInteger("RefreshTokenValidity", m_refreshTokenValidity); } if(m_readAttributesHasBeenSet) { Array<JsonValue> readAttributesJsonList(m_readAttributes.size()); for(unsigned readAttributesIndex = 0; readAttributesIndex < readAttributesJsonList.GetLength(); ++readAttributesIndex) { readAttributesJsonList[readAttributesIndex].AsString(m_readAttributes[readAttributesIndex]); } payload.WithArray("ReadAttributes", std::move(readAttributesJsonList)); } if(m_writeAttributesHasBeenSet) { Array<JsonValue> writeAttributesJsonList(m_writeAttributes.size()); for(unsigned writeAttributesIndex = 0; writeAttributesIndex < writeAttributesJsonList.GetLength(); ++writeAttributesIndex) { writeAttributesJsonList[writeAttributesIndex].AsString(m_writeAttributes[writeAttributesIndex]); } payload.WithArray("WriteAttributes", std::move(writeAttributesJsonList)); } if(m_explicitAuthFlowsHasBeenSet) { Array<JsonValue> explicitAuthFlowsJsonList(m_explicitAuthFlows.size()); for(unsigned explicitAuthFlowsIndex = 0; explicitAuthFlowsIndex < explicitAuthFlowsJsonList.GetLength(); ++explicitAuthFlowsIndex) { explicitAuthFlowsJsonList[explicitAuthFlowsIndex].AsString(ExplicitAuthFlowsTypeMapper::GetNameForExplicitAuthFlowsType(m_explicitAuthFlows[explicitAuthFlowsIndex])); } payload.WithArray("ExplicitAuthFlows", std::move(explicitAuthFlowsJsonList)); } if(m_supportedIdentityProvidersHasBeenSet) { Array<JsonValue> supportedIdentityProvidersJsonList(m_supportedIdentityProviders.size()); for(unsigned supportedIdentityProvidersIndex = 0; supportedIdentityProvidersIndex < supportedIdentityProvidersJsonList.GetLength(); ++supportedIdentityProvidersIndex) { supportedIdentityProvidersJsonList[supportedIdentityProvidersIndex].AsString(m_supportedIdentityProviders[supportedIdentityProvidersIndex]); } payload.WithArray("SupportedIdentityProviders", std::move(supportedIdentityProvidersJsonList)); } if(m_callbackURLsHasBeenSet) { Array<JsonValue> callbackURLsJsonList(m_callbackURLs.size()); for(unsigned callbackURLsIndex = 0; callbackURLsIndex < callbackURLsJsonList.GetLength(); ++callbackURLsIndex) { callbackURLsJsonList[callbackURLsIndex].AsString(m_callbackURLs[callbackURLsIndex]); } payload.WithArray("CallbackURLs", std::move(callbackURLsJsonList)); } if(m_logoutURLsHasBeenSet) { Array<JsonValue> logoutURLsJsonList(m_logoutURLs.size()); for(unsigned logoutURLsIndex = 0; logoutURLsIndex < logoutURLsJsonList.GetLength(); ++logoutURLsIndex) { logoutURLsJsonList[logoutURLsIndex].AsString(m_logoutURLs[logoutURLsIndex]); } payload.WithArray("LogoutURLs", std::move(logoutURLsJsonList)); } if(m_defaultRedirectURIHasBeenSet) { payload.WithString("DefaultRedirectURI", m_defaultRedirectURI); } if(m_allowedOAuthFlowsHasBeenSet) { Array<JsonValue> allowedOAuthFlowsJsonList(m_allowedOAuthFlows.size()); for(unsigned allowedOAuthFlowsIndex = 0; allowedOAuthFlowsIndex < allowedOAuthFlowsJsonList.GetLength(); ++allowedOAuthFlowsIndex) { allowedOAuthFlowsJsonList[allowedOAuthFlowsIndex].AsString(OAuthFlowTypeMapper::GetNameForOAuthFlowType(m_allowedOAuthFlows[allowedOAuthFlowsIndex])); } payload.WithArray("AllowedOAuthFlows", std::move(allowedOAuthFlowsJsonList)); } if(m_allowedOAuthScopesHasBeenSet) { Array<JsonValue> allowedOAuthScopesJsonList(m_allowedOAuthScopes.size()); for(unsigned allowedOAuthScopesIndex = 0; allowedOAuthScopesIndex < allowedOAuthScopesJsonList.GetLength(); ++allowedOAuthScopesIndex) { allowedOAuthScopesJsonList[allowedOAuthScopesIndex].AsString(m_allowedOAuthScopes[allowedOAuthScopesIndex]); } payload.WithArray("AllowedOAuthScopes", std::move(allowedOAuthScopesJsonList)); } if(m_allowedOAuthFlowsUserPoolClientHasBeenSet) { payload.WithBool("AllowedOAuthFlowsUserPoolClient", m_allowedOAuthFlowsUserPoolClient); } if(m_analyticsConfigurationHasBeenSet) { payload.WithObject("AnalyticsConfiguration", m_analyticsConfiguration.Jsonize()); } return payload.View().WriteReadable(); }
Aws::String TransferDomainRequest::SerializePayload() const { JsonValue payload; if(m_domainNameHasBeenSet) { payload.WithString("DomainName", m_domainName); } if(m_idnLangCodeHasBeenSet) { payload.WithString("IdnLangCode", m_idnLangCode); } if(m_durationInYearsHasBeenSet) { payload.WithInteger("DurationInYears", m_durationInYears); } if(m_nameserversHasBeenSet) { Array<JsonValue> nameserversJsonList(m_nameservers.size()); for(unsigned nameserversIndex = 0; nameserversIndex < nameserversJsonList.GetLength(); ++nameserversIndex) { nameserversJsonList[nameserversIndex].AsObject(m_nameservers[nameserversIndex].Jsonize()); } payload.WithArray("Nameservers", std::move(nameserversJsonList)); } if(m_authCodeHasBeenSet) { payload.WithString("AuthCode", m_authCode); } if(m_autoRenewHasBeenSet) { payload.WithBool("AutoRenew", m_autoRenew); } if(m_adminContactHasBeenSet) { payload.WithObject("AdminContact", m_adminContact.Jsonize()); } if(m_registrantContactHasBeenSet) { payload.WithObject("RegistrantContact", m_registrantContact.Jsonize()); } if(m_techContactHasBeenSet) { payload.WithObject("TechContact", m_techContact.Jsonize()); } if(m_privacyProtectAdminContactHasBeenSet) { payload.WithBool("PrivacyProtectAdminContact", m_privacyProtectAdminContact); } if(m_privacyProtectRegistrantContactHasBeenSet) { payload.WithBool("PrivacyProtectRegistrantContact", m_privacyProtectRegistrantContact); } if(m_privacyProtectTechContactHasBeenSet) { payload.WithBool("PrivacyProtectTechContact", m_privacyProtectTechContact); } return payload.WriteReadable(); }