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)); } 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; }
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; }