JsonValue RepositoryTrigger::Jsonize() const { JsonValue payload; if(m_nameHasBeenSet) { payload.WithString("name", m_name); } if(m_destinationArnHasBeenSet) { payload.WithString("destinationArn", m_destinationArn); } if(m_customDataHasBeenSet) { payload.WithString("customData", m_customData); } if(m_branchesHasBeenSet) { Array<JsonValue> branchesJsonList(m_branches.size()); for(unsigned branchesIndex = 0; branchesIndex < branchesJsonList.GetLength(); ++branchesIndex) { branchesJsonList[branchesIndex].AsString(m_branches[branchesIndex]); } payload.WithArray("branches", std::move(branchesJsonList)); } if(m_eventsHasBeenSet) { Array<JsonValue> eventsJsonList(m_events.size()); for(unsigned eventsIndex = 0; eventsIndex < eventsJsonList.GetLength(); ++eventsIndex) { eventsJsonList[eventsIndex].AsString(RepositoryTriggerEventEnumMapper::GetNameForRepositoryTriggerEventEnum(m_events[eventsIndex])); } payload.WithArray("events", std::move(eventsJsonList)); } return payload; }
JsonValue Service::Jsonize() const { JsonValue payload; if(m_serviceArnHasBeenSet) { payload.WithString("serviceArn", m_serviceArn); } if(m_serviceNameHasBeenSet) { payload.WithString("serviceName", m_serviceName); } if(m_clusterArnHasBeenSet) { payload.WithString("clusterArn", m_clusterArn); } if(m_loadBalancersHasBeenSet) { Array<JsonValue> loadBalancersJsonList(m_loadBalancers.size()); for(unsigned loadBalancersIndex = 0; loadBalancersIndex < loadBalancersJsonList.GetLength(); ++loadBalancersIndex) { loadBalancersJsonList[loadBalancersIndex].AsObject(m_loadBalancers[loadBalancersIndex].Jsonize()); } payload.WithArray("loadBalancers", std::move(loadBalancersJsonList)); } if(m_statusHasBeenSet) { payload.WithString("status", m_status); } if(m_desiredCountHasBeenSet) { payload.WithInteger("desiredCount", m_desiredCount); } if(m_runningCountHasBeenSet) { payload.WithInteger("runningCount", m_runningCount); } if(m_pendingCountHasBeenSet) { payload.WithInteger("pendingCount", m_pendingCount); } if(m_taskDefinitionHasBeenSet) { payload.WithString("taskDefinition", m_taskDefinition); } if(m_deploymentConfigurationHasBeenSet) { payload.WithObject("deploymentConfiguration", m_deploymentConfiguration.Jsonize()); } if(m_deploymentsHasBeenSet) { Array<JsonValue> deploymentsJsonList(m_deployments.size()); for(unsigned deploymentsIndex = 0; deploymentsIndex < deploymentsJsonList.GetLength(); ++deploymentsIndex) { deploymentsJsonList[deploymentsIndex].AsObject(m_deployments[deploymentsIndex].Jsonize()); } payload.WithArray("deployments", std::move(deploymentsJsonList)); } if(m_roleArnHasBeenSet) { payload.WithString("roleArn", m_roleArn); } if(m_eventsHasBeenSet) { Array<JsonValue> eventsJsonList(m_events.size()); for(unsigned eventsIndex = 0; eventsIndex < eventsJsonList.GetLength(); ++eventsIndex) { eventsJsonList[eventsIndex].AsObject(m_events[eventsIndex].Jsonize()); } payload.WithArray("events", std::move(eventsJsonList)); } if(m_createdAtHasBeenSet) { payload.WithDouble("createdAt", m_createdAt.SecondsWithMSPrecision()); } return payload; }