BatchGetBuildBatches unicodeC Example
#include <C_CkRestW.h>
#include <C_CkAuthAwsW.h>
#include <C_CkJsonObjectW.h>
#include <C_CkStringBuilderW.h>
void ChilkatSample(void)
{
HCkRestW rest;
BOOL success;
HCkAuthAwsW authAws;
HCkJsonObjectW json;
HCkStringBuilderW sbRequestBody;
HCkStringBuilderW sbResponseBody;
int respStatusCode;
HCkJsonObjectW jResp;
const wchar_t *arn;
const wchar_t *ArtifactIdentifier;
const wchar_t *BucketOwnerAccess;
int EncryptionDisabled;
const wchar_t *Location;
const wchar_t *Md5sum;
int OverrideArtifactName;
const wchar_t *Sha256sum;
const wchar_t *BatchReportMode;
int CombineArtifacts;
int MaximumBuildsAllowed;
const wchar_t *ServiceRole;
int TimeoutInMins;
int buildBatchNumber;
const wchar_t *buildBatchStatus;
int buildTimeoutInMinutes;
const wchar_t *cacheLocation;
const wchar_t *v_Type;
int complete;
const wchar_t *currentPhase;
int debugSessionEnabled;
const wchar_t *encryptionKey;
int endTime;
const wchar_t *Certificate;
const wchar_t *ComputeType;
const wchar_t *Image;
const wchar_t *ImagePullCredentialsType;
int PrivilegedMode;
const wchar_t *Credential;
const wchar_t *CredentialProvider;
const wchar_t *environmentType;
const wchar_t *id;
const wchar_t *initiator;
const wchar_t *GroupName;
const wchar_t *Status;
const wchar_t *StreamName;
const wchar_t *S3LogsBucketOwnerAccess;
int S3LogsEncryptionDisabled;
const wchar_t *S3LogsLocation;
const wchar_t *S3LogsStatus;
const wchar_t *projectName;
int queuedTimeoutInMinutes;
const wchar_t *resolvedSourceVersion;
const wchar_t *serviceRole;
const wchar_t *Resource;
const wchar_t *AuthType;
const wchar_t *Buildspec;
const wchar_t *Context;
const wchar_t *TargetUrl;
int GitCloneDepth;
int FetchSubmodules;
int InsecureSsl;
const wchar_t *sourceLocation;
int ReportBuildStatus;
const wchar_t *SourceIdentifier;
const wchar_t *sourceType;
const wchar_t *sourceVersion;
int startTime;
const wchar_t *VpcId;
int j;
int count_j;
const wchar_t *strVal;
const wchar_t *Arn;
const wchar_t *BuildStatus;
const wchar_t *Identifier;
const wchar_t *PrimaryArtifactLocation;
const wchar_t *PrimaryArtifactType;
int RequestedOn;
const wchar_t *identifier;
int ignoreFailure;
int k;
int count_k;
const wchar_t *location;
const wchar_t *v_type;
const wchar_t *buildStatus;
const wchar_t *primaryArtifactIdentifier;
const wchar_t *primaryArtifactLocation;
const wchar_t *primaryArtifactType;
int requestedOn;
HCkJsonObjectW json1;
int i1;
int count_i1;
const wchar_t *name;
const wchar_t *value;
const wchar_t *mountOptions;
const wchar_t *mountPoint;
int durationInSeconds;
const wchar_t *phaseStatus;
const wchar_t *phaseType;
const wchar_t *message;
const wchar_t *statusCode;
const wchar_t *artifactIdentifier;
const wchar_t *bucketOwnerAccess;
int encryptionDisabled;
const wchar_t *md5sum;
int overrideArtifactName;
const wchar_t *sha256sum;
const wchar_t *authResource;
const wchar_t *authType;
const wchar_t *buildspec;
const wchar_t *buildStatusConfigContext;
const wchar_t *buildStatusConfigTargetUrl;
int gitCloneDepth;
int gitSubmodulesConfigFetchSubmodules;
int insecureSsl;
int reportBuildStatus;
const wchar_t *sourceIdentifier;
int i;
int count_i;
// This example requires the Chilkat API to have been previously unlocked.
// See Global Unlock Sample for sample code.
rest = CkRestW_Create();
authAws = CkAuthAwsW_Create();
CkAuthAwsW_putAccessKey(authAws,L"AWS_ACCESS_KEY");
CkAuthAwsW_putSecretKey(authAws,L"AWS_SECRET_KEY");
// Don't forget to change the region to your particular region. (Also make the same change in the call to Connect below.)
CkAuthAwsW_putRegion(authAws,L"us-west-2");
CkAuthAwsW_putServiceName(authAws,L"codebuild");
// SetAuthAws causes Chilkat to automatically add the following headers: Authorization, X-Amz-Date
CkRestW_SetAuthAws(rest,authAws);
// URL: https://codebuild.us-west-2.amazonaws.com/
// Use the same region as specified above.
success = CkRestW_Connect(rest,L"codebuild.us-west-2.amazonaws.com",443,TRUE,TRUE);
if (success != TRUE) {
wprintf(L"ConnectFailReason: %d\n",CkRestW_getConnectFailReason(rest));
wprintf(L"%s\n",CkRestW_lastErrorText(rest));
CkRestW_Dispose(rest);
CkAuthAwsW_Dispose(authAws);
return;
}
// The following code creates the JSON request body.
// The JSON created by this code is shown below.
// Use this online tool to generate code from sample JSON:
// Generate Code to Create JSON
json = CkJsonObjectW_Create();
CkJsonObjectW_UpdateString(json,L"ids[0]",L"string");
// The JSON request body created by the above code:
// {
// "ids": [
// "string"
// ]
// }
CkRestW_AddHeader(rest,L"Content-Type",L"application/x-amz-json-1.1");
CkRestW_AddHeader(rest,L"X-Amz-Target",L"CodeBuild_20161006.BatchGetBuildBatches");
sbRequestBody = CkStringBuilderW_Create();
CkJsonObjectW_EmitSb(json,sbRequestBody);
sbResponseBody = CkStringBuilderW_Create();
success = CkRestW_FullRequestSb(rest,L"POST",L"/",sbRequestBody,sbResponseBody);
if (success != TRUE) {
wprintf(L"%s\n",CkRestW_lastErrorText(rest));
CkRestW_Dispose(rest);
CkAuthAwsW_Dispose(authAws);
CkJsonObjectW_Dispose(json);
CkStringBuilderW_Dispose(sbRequestBody);
CkStringBuilderW_Dispose(sbResponseBody);
return;
}
respStatusCode = CkRestW_getResponseStatusCode(rest);
wprintf(L"response status code = %d\n",respStatusCode);
if (respStatusCode != 200) {
wprintf(L"Response Header:\n");
wprintf(L"%s\n",CkRestW_responseHeader(rest));
wprintf(L"Response Body:\n");
wprintf(L"%s\n",CkStringBuilderW_getAsString(sbResponseBody));
CkRestW_Dispose(rest);
CkAuthAwsW_Dispose(authAws);
CkJsonObjectW_Dispose(json);
CkStringBuilderW_Dispose(sbRequestBody);
CkStringBuilderW_Dispose(sbResponseBody);
return;
}
jResp = CkJsonObjectW_Create();
CkJsonObjectW_LoadSb(jResp,sbResponseBody);
// The following code parses the JSON response.
// A sample JSON response is shown below the sample code.
// Use this online tool to generate parsing code from sample JSON:
// Generate Parsing Code from JSON
// Chilkat functions returning "const char *" return a pointer to temporary internal memory owned and managed by Chilkat.
// See this example explaining how this memory should be used: const char * functions.
i = 0;
count_i = CkJsonObjectW_SizeOfArray(jResp,L"buildBatches");
while (i < count_i) {
CkJsonObjectW_putI(jResp,i);
arn = CkJsonObjectW_stringOf(jResp,L"buildBatches[i].arn");
ArtifactIdentifier = CkJsonObjectW_stringOf(jResp,L"buildBatches[i].artifacts.artifactIdentifier");
BucketOwnerAccess = CkJsonObjectW_stringOf(jResp,L"buildBatches[i].artifacts.bucketOwnerAccess");
EncryptionDisabled = CkJsonObjectW_IntOf(jResp,L"buildBatches[i].artifacts.encryptionDisabled");
Location = CkJsonObjectW_stringOf(jResp,L"buildBatches[i].artifacts.location");
Md5sum = CkJsonObjectW_stringOf(jResp,L"buildBatches[i].artifacts.md5sum");
OverrideArtifactName = CkJsonObjectW_IntOf(jResp,L"buildBatches[i].artifacts.overrideArtifactName");
Sha256sum = CkJsonObjectW_stringOf(jResp,L"buildBatches[i].artifacts.sha256sum");
BatchReportMode = CkJsonObjectW_stringOf(jResp,L"buildBatches[i].buildBatchConfig.batchReportMode");
CombineArtifacts = CkJsonObjectW_IntOf(jResp,L"buildBatches[i].buildBatchConfig.combineArtifacts");
MaximumBuildsAllowed = CkJsonObjectW_IntOf(jResp,L"buildBatches[i].buildBatchConfig.restrictions.maximumBuildsAllowed");
ServiceRole = CkJsonObjectW_stringOf(jResp,L"buildBatches[i].buildBatchConfig.serviceRole");
TimeoutInMins = CkJsonObjectW_IntOf(jResp,L"buildBatches[i].buildBatchConfig.timeoutInMins");
buildBatchNumber = CkJsonObjectW_IntOf(jResp,L"buildBatches[i].buildBatchNumber");
buildBatchStatus = CkJsonObjectW_stringOf(jResp,L"buildBatches[i].buildBatchStatus");
buildTimeoutInMinutes = CkJsonObjectW_IntOf(jResp,L"buildBatches[i].buildTimeoutInMinutes");
cacheLocation = CkJsonObjectW_stringOf(jResp,L"buildBatches[i].cache.location");
v_Type = CkJsonObjectW_stringOf(jResp,L"buildBatches[i].cache.type");
complete = CkJsonObjectW_IntOf(jResp,L"buildBatches[i].complete");
currentPhase = CkJsonObjectW_stringOf(jResp,L"buildBatches[i].currentPhase");
debugSessionEnabled = CkJsonObjectW_IntOf(jResp,L"buildBatches[i].debugSessionEnabled");
encryptionKey = CkJsonObjectW_stringOf(jResp,L"buildBatches[i].encryptionKey");
endTime = CkJsonObjectW_IntOf(jResp,L"buildBatches[i].endTime");
Certificate = CkJsonObjectW_stringOf(jResp,L"buildBatches[i].environment.certificate");
ComputeType = CkJsonObjectW_stringOf(jResp,L"buildBatches[i].environment.computeType");
Image = CkJsonObjectW_stringOf(jResp,L"buildBatches[i].environment.image");
ImagePullCredentialsType = CkJsonObjectW_stringOf(jResp,L"buildBatches[i].environment.imagePullCredentialsType");
PrivilegedMode = CkJsonObjectW_IntOf(jResp,L"buildBatches[i].environment.privilegedMode");
Credential = CkJsonObjectW_stringOf(jResp,L"buildBatches[i].environment.registryCredential.credential");
CredentialProvider = CkJsonObjectW_stringOf(jResp,L"buildBatches[i].environment.registryCredential.credentialProvider");
environmentType = CkJsonObjectW_stringOf(jResp,L"buildBatches[i].environment.type");
id = CkJsonObjectW_stringOf(jResp,L"buildBatches[i].id");
initiator = CkJsonObjectW_stringOf(jResp,L"buildBatches[i].initiator");
GroupName = CkJsonObjectW_stringOf(jResp,L"buildBatches[i].logConfig.cloudWatchLogs.groupName");
Status = CkJsonObjectW_stringOf(jResp,L"buildBatches[i].logConfig.cloudWatchLogs.status");
StreamName = CkJsonObjectW_stringOf(jResp,L"buildBatches[i].logConfig.cloudWatchLogs.streamName");
S3LogsBucketOwnerAccess = CkJsonObjectW_stringOf(jResp,L"buildBatches[i].logConfig.s3Logs.bucketOwnerAccess");
S3LogsEncryptionDisabled = CkJsonObjectW_IntOf(jResp,L"buildBatches[i].logConfig.s3Logs.encryptionDisabled");
S3LogsLocation = CkJsonObjectW_stringOf(jResp,L"buildBatches[i].logConfig.s3Logs.location");
S3LogsStatus = CkJsonObjectW_stringOf(jResp,L"buildBatches[i].logConfig.s3Logs.status");
projectName = CkJsonObjectW_stringOf(jResp,L"buildBatches[i].projectName");
queuedTimeoutInMinutes = CkJsonObjectW_IntOf(jResp,L"buildBatches[i].queuedTimeoutInMinutes");
resolvedSourceVersion = CkJsonObjectW_stringOf(jResp,L"buildBatches[i].resolvedSourceVersion");
serviceRole = CkJsonObjectW_stringOf(jResp,L"buildBatches[i].serviceRole");
Resource = CkJsonObjectW_stringOf(jResp,L"buildBatches[i].source.auth.resource");
AuthType = CkJsonObjectW_stringOf(jResp,L"buildBatches[i].source.auth.type");
Buildspec = CkJsonObjectW_stringOf(jResp,L"buildBatches[i].source.buildspec");
Context = CkJsonObjectW_stringOf(jResp,L"buildBatches[i].source.buildStatusConfig.context");
TargetUrl = CkJsonObjectW_stringOf(jResp,L"buildBatches[i].source.buildStatusConfig.targetUrl");
GitCloneDepth = CkJsonObjectW_IntOf(jResp,L"buildBatches[i].source.gitCloneDepth");
FetchSubmodules = CkJsonObjectW_IntOf(jResp,L"buildBatches[i].source.gitSubmodulesConfig.fetchSubmodules");
InsecureSsl = CkJsonObjectW_IntOf(jResp,L"buildBatches[i].source.insecureSsl");
sourceLocation = CkJsonObjectW_stringOf(jResp,L"buildBatches[i].source.location");
ReportBuildStatus = CkJsonObjectW_IntOf(jResp,L"buildBatches[i].source.reportBuildStatus");
SourceIdentifier = CkJsonObjectW_stringOf(jResp,L"buildBatches[i].source.sourceIdentifier");
sourceType = CkJsonObjectW_stringOf(jResp,L"buildBatches[i].source.type");
sourceVersion = CkJsonObjectW_stringOf(jResp,L"buildBatches[i].sourceVersion");
startTime = CkJsonObjectW_IntOf(jResp,L"buildBatches[i].startTime");
VpcId = CkJsonObjectW_stringOf(jResp,L"buildBatches[i].vpcConfig.vpcId");
j = 0;
count_j = CkJsonObjectW_SizeOfArray(jResp,L"buildBatches[i].buildBatchConfig.restrictions.computeTypesAllowed");
while (j < count_j) {
CkJsonObjectW_putJ(jResp,j);
strVal = CkJsonObjectW_stringOf(jResp,L"buildBatches[i].buildBatchConfig.restrictions.computeTypesAllowed[j]");
j = j + 1;
}
j = 0;
count_j = CkJsonObjectW_SizeOfArray(jResp,L"buildBatches[i].buildGroups");
while (j < count_j) {
CkJsonObjectW_putJ(jResp,j);
Arn = CkJsonObjectW_stringOf(jResp,L"buildBatches[i].buildGroups[j].currentBuildSummary.arn");
BuildStatus = CkJsonObjectW_stringOf(jResp,L"buildBatches[i].buildGroups[j].currentBuildSummary.buildStatus");
Identifier = CkJsonObjectW_stringOf(jResp,L"buildBatches[i].buildGroups[j].currentBuildSummary.primaryArtifact.identifier");
PrimaryArtifactLocation = CkJsonObjectW_stringOf(jResp,L"buildBatches[i].buildGroups[j].currentBuildSummary.primaryArtifact.location");
PrimaryArtifactType = CkJsonObjectW_stringOf(jResp,L"buildBatches[i].buildGroups[j].currentBuildSummary.primaryArtifact.type");
RequestedOn = CkJsonObjectW_IntOf(jResp,L"buildBatches[i].buildGroups[j].currentBuildSummary.requestedOn");
identifier = CkJsonObjectW_stringOf(jResp,L"buildBatches[i].buildGroups[j].identifier");
ignoreFailure = CkJsonObjectW_IntOf(jResp,L"buildBatches[i].buildGroups[j].ignoreFailure");
k = 0;
count_k = CkJsonObjectW_SizeOfArray(jResp,L"buildBatches[i].buildGroups[j].currentBuildSummary.secondaryArtifacts");
while (k < count_k) {
CkJsonObjectW_putK(jResp,k);
identifier = CkJsonObjectW_stringOf(jResp,L"buildBatches[i].buildGroups[j].currentBuildSummary.secondaryArtifacts[k].identifier");
location = CkJsonObjectW_stringOf(jResp,L"buildBatches[i].buildGroups[j].currentBuildSummary.secondaryArtifacts[k].location");
v_type = CkJsonObjectW_stringOf(jResp,L"buildBatches[i].buildGroups[j].currentBuildSummary.secondaryArtifacts[k].type");
k = k + 1;
}
k = 0;
count_k = CkJsonObjectW_SizeOfArray(jResp,L"buildBatches[i].buildGroups[j].dependsOn");
while (k < count_k) {
CkJsonObjectW_putK(jResp,k);
strVal = CkJsonObjectW_stringOf(jResp,L"buildBatches[i].buildGroups[j].dependsOn[k]");
k = k + 1;
}
k = 0;
count_k = CkJsonObjectW_SizeOfArray(jResp,L"buildBatches[i].buildGroups[j].priorBuildSummaryList");
while (k < count_k) {
CkJsonObjectW_putK(jResp,k);
arn = CkJsonObjectW_stringOf(jResp,L"buildBatches[i].buildGroups[j].priorBuildSummaryList[k].arn");
buildStatus = CkJsonObjectW_stringOf(jResp,L"buildBatches[i].buildGroups[j].priorBuildSummaryList[k].buildStatus");
primaryArtifactIdentifier = CkJsonObjectW_stringOf(jResp,L"buildBatches[i].buildGroups[j].priorBuildSummaryList[k].primaryArtifact.identifier");
primaryArtifactLocation = CkJsonObjectW_stringOf(jResp,L"buildBatches[i].buildGroups[j].priorBuildSummaryList[k].primaryArtifact.location");
primaryArtifactType = CkJsonObjectW_stringOf(jResp,L"buildBatches[i].buildGroups[j].priorBuildSummaryList[k].primaryArtifact.type");
requestedOn = CkJsonObjectW_IntOf(jResp,L"buildBatches[i].buildGroups[j].priorBuildSummaryList[k].requestedOn");
json1 = CkJsonObjectW_ObjectOf(jResp,L"buildBatches[i].buildGroups[j].priorBuildSummaryList[k]");
i1 = 0;
count_i1 = CkJsonObjectW_SizeOfArray(json1,L"secondaryArtifacts");
while (i1 < count_i1) {
CkJsonObjectW_putI(json1,i1);
identifier = CkJsonObjectW_stringOf(json1,L"secondaryArtifacts[i].identifier");
location = CkJsonObjectW_stringOf(json1,L"secondaryArtifacts[i].location");
v_type = CkJsonObjectW_stringOf(json1,L"secondaryArtifacts[i].type");
i1 = i1 + 1;
}
CkJsonObjectW_Dispose(json1);
k = k + 1;
}
j = j + 1;
}
j = 0;
count_j = CkJsonObjectW_SizeOfArray(jResp,L"buildBatches[i].cache.modes");
while (j < count_j) {
CkJsonObjectW_putJ(jResp,j);
strVal = CkJsonObjectW_stringOf(jResp,L"buildBatches[i].cache.modes[j]");
j = j + 1;
}
j = 0;
count_j = CkJsonObjectW_SizeOfArray(jResp,L"buildBatches[i].environment.environmentVariables");
while (j < count_j) {
CkJsonObjectW_putJ(jResp,j);
name = CkJsonObjectW_stringOf(jResp,L"buildBatches[i].environment.environmentVariables[j].name");
v_type = CkJsonObjectW_stringOf(jResp,L"buildBatches[i].environment.environmentVariables[j].type");
value = CkJsonObjectW_stringOf(jResp,L"buildBatches[i].environment.environmentVariables[j].value");
j = j + 1;
}
j = 0;
count_j = CkJsonObjectW_SizeOfArray(jResp,L"buildBatches[i].fileSystemLocations");
while (j < count_j) {
CkJsonObjectW_putJ(jResp,j);
identifier = CkJsonObjectW_stringOf(jResp,L"buildBatches[i].fileSystemLocations[j].identifier");
location = CkJsonObjectW_stringOf(jResp,L"buildBatches[i].fileSystemLocations[j].location");
mountOptions = CkJsonObjectW_stringOf(jResp,L"buildBatches[i].fileSystemLocations[j].mountOptions");
mountPoint = CkJsonObjectW_stringOf(jResp,L"buildBatches[i].fileSystemLocations[j].mountPoint");
v_type = CkJsonObjectW_stringOf(jResp,L"buildBatches[i].fileSystemLocations[j].type");
j = j + 1;
}
j = 0;
count_j = CkJsonObjectW_SizeOfArray(jResp,L"buildBatches[i].phases");
while (j < count_j) {
CkJsonObjectW_putJ(jResp,j);
durationInSeconds = CkJsonObjectW_IntOf(jResp,L"buildBatches[i].phases[j].durationInSeconds");
endTime = CkJsonObjectW_IntOf(jResp,L"buildBatches[i].phases[j].endTime");
phaseStatus = CkJsonObjectW_stringOf(jResp,L"buildBatches[i].phases[j].phaseStatus");
phaseType = CkJsonObjectW_stringOf(jResp,L"buildBatches[i].phases[j].phaseType");
startTime = CkJsonObjectW_IntOf(jResp,L"buildBatches[i].phases[j].startTime");
k = 0;
count_k = CkJsonObjectW_SizeOfArray(jResp,L"buildBatches[i].phases[j].contexts");
while (k < count_k) {
CkJsonObjectW_putK(jResp,k);
message = CkJsonObjectW_stringOf(jResp,L"buildBatches[i].phases[j].contexts[k].message");
statusCode = CkJsonObjectW_stringOf(jResp,L"buildBatches[i].phases[j].contexts[k].statusCode");
k = k + 1;
}
j = j + 1;
}
j = 0;
count_j = CkJsonObjectW_SizeOfArray(jResp,L"buildBatches[i].secondaryArtifacts");
while (j < count_j) {
CkJsonObjectW_putJ(jResp,j);
artifactIdentifier = CkJsonObjectW_stringOf(jResp,L"buildBatches[i].secondaryArtifacts[j].artifactIdentifier");
bucketOwnerAccess = CkJsonObjectW_stringOf(jResp,L"buildBatches[i].secondaryArtifacts[j].bucketOwnerAccess");
encryptionDisabled = CkJsonObjectW_IntOf(jResp,L"buildBatches[i].secondaryArtifacts[j].encryptionDisabled");
location = CkJsonObjectW_stringOf(jResp,L"buildBatches[i].secondaryArtifacts[j].location");
md5sum = CkJsonObjectW_stringOf(jResp,L"buildBatches[i].secondaryArtifacts[j].md5sum");
overrideArtifactName = CkJsonObjectW_IntOf(jResp,L"buildBatches[i].secondaryArtifacts[j].overrideArtifactName");
sha256sum = CkJsonObjectW_stringOf(jResp,L"buildBatches[i].secondaryArtifacts[j].sha256sum");
j = j + 1;
}
j = 0;
count_j = CkJsonObjectW_SizeOfArray(jResp,L"buildBatches[i].secondarySources");
while (j < count_j) {
CkJsonObjectW_putJ(jResp,j);
authResource = CkJsonObjectW_stringOf(jResp,L"buildBatches[i].secondarySources[j].auth.resource");
authType = CkJsonObjectW_stringOf(jResp,L"buildBatches[i].secondarySources[j].auth.type");
buildspec = CkJsonObjectW_stringOf(jResp,L"buildBatches[i].secondarySources[j].buildspec");
buildStatusConfigContext = CkJsonObjectW_stringOf(jResp,L"buildBatches[i].secondarySources[j].buildStatusConfig.context");
buildStatusConfigTargetUrl = CkJsonObjectW_stringOf(jResp,L"buildBatches[i].secondarySources[j].buildStatusConfig.targetUrl");
gitCloneDepth = CkJsonObjectW_IntOf(jResp,L"buildBatches[i].secondarySources[j].gitCloneDepth");
gitSubmodulesConfigFetchSubmodules = CkJsonObjectW_IntOf(jResp,L"buildBatches[i].secondarySources[j].gitSubmodulesConfig.fetchSubmodules");
insecureSsl = CkJsonObjectW_IntOf(jResp,L"buildBatches[i].secondarySources[j].insecureSsl");
location = CkJsonObjectW_stringOf(jResp,L"buildBatches[i].secondarySources[j].location");
reportBuildStatus = CkJsonObjectW_IntOf(jResp,L"buildBatches[i].secondarySources[j].reportBuildStatus");
sourceIdentifier = CkJsonObjectW_stringOf(jResp,L"buildBatches[i].secondarySources[j].sourceIdentifier");
v_type = CkJsonObjectW_stringOf(jResp,L"buildBatches[i].secondarySources[j].type");
j = j + 1;
}
j = 0;
count_j = CkJsonObjectW_SizeOfArray(jResp,L"buildBatches[i].secondarySourceVersions");
while (j < count_j) {
CkJsonObjectW_putJ(jResp,j);
sourceIdentifier = CkJsonObjectW_stringOf(jResp,L"buildBatches[i].secondarySourceVersions[j].sourceIdentifier");
sourceVersion = CkJsonObjectW_stringOf(jResp,L"buildBatches[i].secondarySourceVersions[j].sourceVersion");
j = j + 1;
}
j = 0;
count_j = CkJsonObjectW_SizeOfArray(jResp,L"buildBatches[i].vpcConfig.securityGroupIds");
while (j < count_j) {
CkJsonObjectW_putJ(jResp,j);
strVal = CkJsonObjectW_stringOf(jResp,L"buildBatches[i].vpcConfig.securityGroupIds[j]");
j = j + 1;
}
j = 0;
count_j = CkJsonObjectW_SizeOfArray(jResp,L"buildBatches[i].vpcConfig.subnets");
while (j < count_j) {
CkJsonObjectW_putJ(jResp,j);
strVal = CkJsonObjectW_stringOf(jResp,L"buildBatches[i].vpcConfig.subnets[j]");
j = j + 1;
}
i = i + 1;
}
i = 0;
count_i = CkJsonObjectW_SizeOfArray(jResp,L"buildBatchesNotFound");
while (i < count_i) {
CkJsonObjectW_putI(jResp,i);
strVal = CkJsonObjectW_stringOf(jResp,L"buildBatchesNotFound[i]");
i = i + 1;
}
// A sample JSON response body parsed by the above code:
// {
// "buildBatches": [
// {
// "arn": "string",
// "artifacts": {
// "artifactIdentifier": "string",
// "bucketOwnerAccess": "string",
// "encryptionDisabled": boolean,
// "location": "string",
// "md5sum": "string",
// "overrideArtifactName": boolean,
// "sha256sum": "string"
// },
// "buildBatchConfig": {
// "batchReportMode": "string",
// "combineArtifacts": boolean,
// "restrictions": {
// "computeTypesAllowed": [
// "string"
// ],
// "maximumBuildsAllowed": number
// },
// "serviceRole": "string",
// "timeoutInMins": number
// },
// "buildBatchNumber": number,
// "buildBatchStatus": "string",
// "buildGroups": [
// {
// "currentBuildSummary": {
// "arn": "string",
// "buildStatus": "string",
// "primaryArtifact": {
// "identifier": "string",
// "location": "string",
// "type": "string"
// },
// "requestedOn": number,
// "secondaryArtifacts": [
// {
// "identifier": "string",
// "location": "string",
// "type": "string"
// }
// ]
// },
// "dependsOn": [
// "string"
// ],
// "identifier": "string",
// "ignoreFailure": boolean,
// "priorBuildSummaryList": [
// {
// "arn": "string",
// "buildStatus": "string",
// "primaryArtifact": {
// "identifier": "string",
// "location": "string",
// "type": "string"
// },
// "requestedOn": number,
// "secondaryArtifacts": [
// {
// "identifier": "string",
// "location": "string",
// "type": "string"
// }
// ]
// }
// ]
// }
// ],
// "buildTimeoutInMinutes": number,
// "cache": {
// "location": "string",
// "modes": [
// "string"
// ],
// "type": "string"
// },
// "complete": boolean,
// "currentPhase": "string",
// "debugSessionEnabled": boolean,
// "encryptionKey": "string",
// "endTime": number,
// "environment": {
// "certificate": "string",
// "computeType": "string",
// "environmentVariables": [
// {
// "name": "string",
// "type": "string",
// "value": "string"
// }
// ],
// "image": "string",
// "imagePullCredentialsType": "string",
// "privilegedMode": boolean,
// "registryCredential": {
// "credential": "string",
// "credentialProvider": "string"
// },
// "type": "string"
// },
// "fileSystemLocations": [
// {
// "identifier": "string",
// "location": "string",
// "mountOptions": "string",
// "mountPoint": "string",
// "type": "string"
// }
// ],
// "id": "string",
// "initiator": "string",
// "logConfig": {
// "cloudWatchLogs": {
// "groupName": "string",
// "status": "string",
// "streamName": "string"
// },
// "s3Logs": {
// "bucketOwnerAccess": "string",
// "encryptionDisabled": boolean,
// "location": "string",
// "status": "string"
// }
// },
// "phases": [
// {
// "contexts": [
// {
// "message": "string",
// "statusCode": "string"
// }
// ],
// "durationInSeconds": number,
// "endTime": number,
// "phaseStatus": "string",
// "phaseType": "string",
// "startTime": number
// }
// ],
// "projectName": "string",
// "queuedTimeoutInMinutes": number,
// "resolvedSourceVersion": "string",
// "secondaryArtifacts": [
// {
// "artifactIdentifier": "string",
// "bucketOwnerAccess": "string",
// "encryptionDisabled": boolean,
// "location": "string",
// "md5sum": "string",
// "overrideArtifactName": boolean,
// "sha256sum": "string"
// }
// ],
// "secondarySources": [
// {
// "auth": {
// "resource": "string",
// "type": "string"
// },
// "buildspec": "string",
// "buildStatusConfig": {
// "context": "string",
// "targetUrl": "string"
// },
// "gitCloneDepth": number,
// "gitSubmodulesConfig": {
// "fetchSubmodules": boolean
// },
// "insecureSsl": boolean,
// "location": "string",
// "reportBuildStatus": boolean,
// "sourceIdentifier": "string",
// "type": "string"
// }
// ],
// "secondarySourceVersions": [
// {
// "sourceIdentifier": "string",
// "sourceVersion": "string"
// }
// ],
// "serviceRole": "string",
// "source": {
// "auth": {
// "resource": "string",
// "type": "string"
// },
// "buildspec": "string",
// "buildStatusConfig": {
// "context": "string",
// "targetUrl": "string"
// },
// "gitCloneDepth": number,
// "gitSubmodulesConfig": {
// "fetchSubmodules": boolean
// },
// "insecureSsl": boolean,
// "location": "string",
// "reportBuildStatus": boolean,
// "sourceIdentifier": "string",
// "type": "string"
// },
// "sourceVersion": "string",
// "startTime": number,
// "vpcConfig": {
// "securityGroupIds": [
// "string"
// ],
// "subnets": [
// "string"
// ],
// "vpcId": "string"
// }
// }
// ],
// "buildBatchesNotFound": [
// "string"
// ]
// }
CkRestW_Dispose(rest);
CkAuthAwsW_Dispose(authAws);
CkJsonObjectW_Dispose(json);
CkStringBuilderW_Dispose(sbRequestBody);
CkStringBuilderW_Dispose(sbResponseBody);
CkJsonObjectW_Dispose(jResp);
}