Chilkat Online Tools

BatchGetBuildBatches delphiDll Example

AWS CodeBuild

var
rest: HCkRest;
success: Boolean;
authAws: HCkAuthAws;
json: HCkJsonObject;
sbRequestBody: HCkStringBuilder;
sbResponseBody: HCkStringBuilder;
respStatusCode: Integer;
jResp: HCkJsonObject;
arn: PWideChar;
ArtifactIdentifier: PWideChar;
BucketOwnerAccess: PWideChar;
EncryptionDisabled: Integer;
Location: PWideChar;
Md5sum: PWideChar;
OverrideArtifactName: Integer;
Sha256sum: PWideChar;
BatchReportMode: PWideChar;
CombineArtifacts: Integer;
MaximumBuildsAllowed: Integer;
ServiceRole: PWideChar;
TimeoutInMins: Integer;
buildBatchNumber: Integer;
buildBatchStatus: PWideChar;
buildTimeoutInMinutes: Integer;
cacheLocation: PWideChar;
v_Type: PWideChar;
complete: Integer;
currentPhase: PWideChar;
debugSessionEnabled: Integer;
encryptionKey: PWideChar;
endTime: Integer;
Certificate: PWideChar;
ComputeType: PWideChar;
Image: PWideChar;
ImagePullCredentialsType: PWideChar;
PrivilegedMode: Integer;
Credential: PWideChar;
CredentialProvider: PWideChar;
environmentType: PWideChar;
id: PWideChar;
initiator: PWideChar;
GroupName: PWideChar;
Status: PWideChar;
StreamName: PWideChar;
S3LogsBucketOwnerAccess: PWideChar;
S3LogsEncryptionDisabled: Integer;
S3LogsLocation: PWideChar;
S3LogsStatus: PWideChar;
projectName: PWideChar;
queuedTimeoutInMinutes: Integer;
resolvedSourceVersion: PWideChar;
serviceRole: PWideChar;
Resource: PWideChar;
AuthType: PWideChar;
Buildspec: PWideChar;
Context: PWideChar;
TargetUrl: PWideChar;
GitCloneDepth: Integer;
FetchSubmodules: Integer;
InsecureSsl: Integer;
sourceLocation: PWideChar;
ReportBuildStatus: Integer;
SourceIdentifier: PWideChar;
sourceType: PWideChar;
sourceVersion: PWideChar;
startTime: Integer;
VpcId: PWideChar;
j: Integer;
count_j: Integer;
strVal: PWideChar;
Arn: PWideChar;
BuildStatus: PWideChar;
Identifier: PWideChar;
PrimaryArtifactLocation: PWideChar;
PrimaryArtifactType: PWideChar;
RequestedOn: Integer;
identifier: PWideChar;
ignoreFailure: Integer;
k: Integer;
count_k: Integer;
location: PWideChar;
v_type: PWideChar;
buildStatus: PWideChar;
primaryArtifactIdentifier: PWideChar;
primaryArtifactLocation: PWideChar;
primaryArtifactType: PWideChar;
requestedOn: Integer;
json1: HCkJsonObject;
i1: Integer;
count_i1: Integer;
name: PWideChar;
value: PWideChar;
mountOptions: PWideChar;
mountPoint: PWideChar;
durationInSeconds: Integer;
phaseStatus: PWideChar;
phaseType: PWideChar;
message: PWideChar;
statusCode: PWideChar;
artifactIdentifier: PWideChar;
bucketOwnerAccess: PWideChar;
encryptionDisabled: Integer;
md5sum: PWideChar;
overrideArtifactName: Integer;
sha256sum: PWideChar;
authResource: PWideChar;
authType: PWideChar;
buildspec: PWideChar;
buildStatusConfigContext: PWideChar;
buildStatusConfigTargetUrl: PWideChar;
gitCloneDepth: Integer;
gitSubmodulesConfigFetchSubmodules: Integer;
insecureSsl: Integer;
reportBuildStatus: Integer;
sourceIdentifier: PWideChar;
i: Integer;
count_i: Integer;

begin
// This example requires the Chilkat API to have been previously unlocked.
// See Global Unlock Sample for sample code.

rest := CkRest_Create();

authAws := CkAuthAws_Create();
CkAuthAws_putAccessKey(authAws,'AWS_ACCESS_KEY');
CkAuthAws_putSecretKey(authAws,'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.)
CkAuthAws_putRegion(authAws,'us-west-2');
CkAuthAws_putServiceName(authAws,'codebuild');
// SetAuthAws causes Chilkat to automatically add the following headers: Authorization, X-Amz-Date
CkRest_SetAuthAws(rest,authAws);

// URL: https://codebuild.us-west-2.amazonaws.com/
// Use the same region as specified above.
success := CkRest_Connect(rest,'codebuild.us-west-2.amazonaws.com',443,True,True);
if (success <> True) then
  begin
    Memo1.Lines.Add('ConnectFailReason: ' + IntToStr(CkRest_getConnectFailReason(rest)));
    Memo1.Lines.Add(CkRest__lastErrorText(rest));
    Exit;
  end;

// 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 := CkJsonObject_Create();
CkJsonObject_UpdateString(json,'ids[0]','string');

// The JSON request body created by the above code:

// {
//   "ids": [
//     "string"
//   ]
// }

CkRest_AddHeader(rest,'Content-Type','application/x-amz-json-1.1');
CkRest_AddHeader(rest,'X-Amz-Target','CodeBuild_20161006.BatchGetBuildBatches');

sbRequestBody := CkStringBuilder_Create();
CkJsonObject_EmitSb(json,sbRequestBody);
sbResponseBody := CkStringBuilder_Create();
success := CkRest_FullRequestSb(rest,'POST','/',sbRequestBody,sbResponseBody);
if (success <> True) then
  begin
    Memo1.Lines.Add(CkRest__lastErrorText(rest));
    Exit;
  end;
respStatusCode := CkRest_getResponseStatusCode(rest);
Memo1.Lines.Add('response status code = ' + IntToStr(respStatusCode));
if (respStatusCode <> 200) then
  begin
    Memo1.Lines.Add('Response Header:');
    Memo1.Lines.Add(CkRest__responseHeader(rest));
    Memo1.Lines.Add('Response Body:');
    Memo1.Lines.Add(CkStringBuilder__getAsString(sbResponseBody));
    Exit;
  end;

jResp := CkJsonObject_Create();
CkJsonObject_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

i := 0;
count_i := CkJsonObject_SizeOfArray(jResp,'buildBatches');
while i < count_i do
  begin
    CkJsonObject_putI(jResp,i);
    arn := CkJsonObject__stringOf(jResp,'buildBatches[i].arn');
    ArtifactIdentifier := CkJsonObject__stringOf(jResp,'buildBatches[i].artifacts.artifactIdentifier');
    BucketOwnerAccess := CkJsonObject__stringOf(jResp,'buildBatches[i].artifacts.bucketOwnerAccess');
    EncryptionDisabled := CkJsonObject_IntOf(jResp,'buildBatches[i].artifacts.encryptionDisabled');
    Location := CkJsonObject__stringOf(jResp,'buildBatches[i].artifacts.location');
    Md5sum := CkJsonObject__stringOf(jResp,'buildBatches[i].artifacts.md5sum');
    OverrideArtifactName := CkJsonObject_IntOf(jResp,'buildBatches[i].artifacts.overrideArtifactName');
    Sha256sum := CkJsonObject__stringOf(jResp,'buildBatches[i].artifacts.sha256sum');
    BatchReportMode := CkJsonObject__stringOf(jResp,'buildBatches[i].buildBatchConfig.batchReportMode');
    CombineArtifacts := CkJsonObject_IntOf(jResp,'buildBatches[i].buildBatchConfig.combineArtifacts');
    MaximumBuildsAllowed := CkJsonObject_IntOf(jResp,'buildBatches[i].buildBatchConfig.restrictions.maximumBuildsAllowed');
    ServiceRole := CkJsonObject__stringOf(jResp,'buildBatches[i].buildBatchConfig.serviceRole');
    TimeoutInMins := CkJsonObject_IntOf(jResp,'buildBatches[i].buildBatchConfig.timeoutInMins');
    buildBatchNumber := CkJsonObject_IntOf(jResp,'buildBatches[i].buildBatchNumber');
    buildBatchStatus := CkJsonObject__stringOf(jResp,'buildBatches[i].buildBatchStatus');
    buildTimeoutInMinutes := CkJsonObject_IntOf(jResp,'buildBatches[i].buildTimeoutInMinutes');
    cacheLocation := CkJsonObject__stringOf(jResp,'buildBatches[i].cache.location');
    v_Type := CkJsonObject__stringOf(jResp,'buildBatches[i].cache.type');
    complete := CkJsonObject_IntOf(jResp,'buildBatches[i].complete');
    currentPhase := CkJsonObject__stringOf(jResp,'buildBatches[i].currentPhase');
    debugSessionEnabled := CkJsonObject_IntOf(jResp,'buildBatches[i].debugSessionEnabled');
    encryptionKey := CkJsonObject__stringOf(jResp,'buildBatches[i].encryptionKey');
    endTime := CkJsonObject_IntOf(jResp,'buildBatches[i].endTime');
    Certificate := CkJsonObject__stringOf(jResp,'buildBatches[i].environment.certificate');
    ComputeType := CkJsonObject__stringOf(jResp,'buildBatches[i].environment.computeType');
    Image := CkJsonObject__stringOf(jResp,'buildBatches[i].environment.image');
    ImagePullCredentialsType := CkJsonObject__stringOf(jResp,'buildBatches[i].environment.imagePullCredentialsType');
    PrivilegedMode := CkJsonObject_IntOf(jResp,'buildBatches[i].environment.privilegedMode');
    Credential := CkJsonObject__stringOf(jResp,'buildBatches[i].environment.registryCredential.credential');
    CredentialProvider := CkJsonObject__stringOf(jResp,'buildBatches[i].environment.registryCredential.credentialProvider');
    environmentType := CkJsonObject__stringOf(jResp,'buildBatches[i].environment.type');
    id := CkJsonObject__stringOf(jResp,'buildBatches[i].id');
    initiator := CkJsonObject__stringOf(jResp,'buildBatches[i].initiator');
    GroupName := CkJsonObject__stringOf(jResp,'buildBatches[i].logConfig.cloudWatchLogs.groupName');
    Status := CkJsonObject__stringOf(jResp,'buildBatches[i].logConfig.cloudWatchLogs.status');
    StreamName := CkJsonObject__stringOf(jResp,'buildBatches[i].logConfig.cloudWatchLogs.streamName');
    S3LogsBucketOwnerAccess := CkJsonObject__stringOf(jResp,'buildBatches[i].logConfig.s3Logs.bucketOwnerAccess');
    S3LogsEncryptionDisabled := CkJsonObject_IntOf(jResp,'buildBatches[i].logConfig.s3Logs.encryptionDisabled');
    S3LogsLocation := CkJsonObject__stringOf(jResp,'buildBatches[i].logConfig.s3Logs.location');
    S3LogsStatus := CkJsonObject__stringOf(jResp,'buildBatches[i].logConfig.s3Logs.status');
    projectName := CkJsonObject__stringOf(jResp,'buildBatches[i].projectName');
    queuedTimeoutInMinutes := CkJsonObject_IntOf(jResp,'buildBatches[i].queuedTimeoutInMinutes');
    resolvedSourceVersion := CkJsonObject__stringOf(jResp,'buildBatches[i].resolvedSourceVersion');
    serviceRole := CkJsonObject__stringOf(jResp,'buildBatches[i].serviceRole');
    Resource := CkJsonObject__stringOf(jResp,'buildBatches[i].source.auth.resource');
    AuthType := CkJsonObject__stringOf(jResp,'buildBatches[i].source.auth.type');
    Buildspec := CkJsonObject__stringOf(jResp,'buildBatches[i].source.buildspec');
    Context := CkJsonObject__stringOf(jResp,'buildBatches[i].source.buildStatusConfig.context');
    TargetUrl := CkJsonObject__stringOf(jResp,'buildBatches[i].source.buildStatusConfig.targetUrl');
    GitCloneDepth := CkJsonObject_IntOf(jResp,'buildBatches[i].source.gitCloneDepth');
    FetchSubmodules := CkJsonObject_IntOf(jResp,'buildBatches[i].source.gitSubmodulesConfig.fetchSubmodules');
    InsecureSsl := CkJsonObject_IntOf(jResp,'buildBatches[i].source.insecureSsl');
    sourceLocation := CkJsonObject__stringOf(jResp,'buildBatches[i].source.location');
    ReportBuildStatus := CkJsonObject_IntOf(jResp,'buildBatches[i].source.reportBuildStatus');
    SourceIdentifier := CkJsonObject__stringOf(jResp,'buildBatches[i].source.sourceIdentifier');
    sourceType := CkJsonObject__stringOf(jResp,'buildBatches[i].source.type');
    sourceVersion := CkJsonObject__stringOf(jResp,'buildBatches[i].sourceVersion');
    startTime := CkJsonObject_IntOf(jResp,'buildBatches[i].startTime');
    VpcId := CkJsonObject__stringOf(jResp,'buildBatches[i].vpcConfig.vpcId');
    j := 0;
    count_j := CkJsonObject_SizeOfArray(jResp,'buildBatches[i].buildBatchConfig.restrictions.computeTypesAllowed');
    while j < count_j do
      begin
        CkJsonObject_putJ(jResp,j);
        strVal := CkJsonObject__stringOf(jResp,'buildBatches[i].buildBatchConfig.restrictions.computeTypesAllowed[j]');
        j := j + 1;
      end;

    j := 0;
    count_j := CkJsonObject_SizeOfArray(jResp,'buildBatches[i].buildGroups');
    while j < count_j do
      begin
        CkJsonObject_putJ(jResp,j);
        Arn := CkJsonObject__stringOf(jResp,'buildBatches[i].buildGroups[j].currentBuildSummary.arn');
        BuildStatus := CkJsonObject__stringOf(jResp,'buildBatches[i].buildGroups[j].currentBuildSummary.buildStatus');
        Identifier := CkJsonObject__stringOf(jResp,'buildBatches[i].buildGroups[j].currentBuildSummary.primaryArtifact.identifier');
        PrimaryArtifactLocation := CkJsonObject__stringOf(jResp,'buildBatches[i].buildGroups[j].currentBuildSummary.primaryArtifact.location');
        PrimaryArtifactType := CkJsonObject__stringOf(jResp,'buildBatches[i].buildGroups[j].currentBuildSummary.primaryArtifact.type');
        RequestedOn := CkJsonObject_IntOf(jResp,'buildBatches[i].buildGroups[j].currentBuildSummary.requestedOn');
        identifier := CkJsonObject__stringOf(jResp,'buildBatches[i].buildGroups[j].identifier');
        ignoreFailure := CkJsonObject_IntOf(jResp,'buildBatches[i].buildGroups[j].ignoreFailure');
        k := 0;
        count_k := CkJsonObject_SizeOfArray(jResp,'buildBatches[i].buildGroups[j].currentBuildSummary.secondaryArtifacts');
        while k < count_k do
          begin
            CkJsonObject_putK(jResp,k);
            identifier := CkJsonObject__stringOf(jResp,'buildBatches[i].buildGroups[j].currentBuildSummary.secondaryArtifacts[k].identifier');
            location := CkJsonObject__stringOf(jResp,'buildBatches[i].buildGroups[j].currentBuildSummary.secondaryArtifacts[k].location');
            v_type := CkJsonObject__stringOf(jResp,'buildBatches[i].buildGroups[j].currentBuildSummary.secondaryArtifacts[k].type');
            k := k + 1;
          end;

        k := 0;
        count_k := CkJsonObject_SizeOfArray(jResp,'buildBatches[i].buildGroups[j].dependsOn');
        while k < count_k do
          begin
            CkJsonObject_putK(jResp,k);
            strVal := CkJsonObject__stringOf(jResp,'buildBatches[i].buildGroups[j].dependsOn[k]');
            k := k + 1;
          end;

        k := 0;
        count_k := CkJsonObject_SizeOfArray(jResp,'buildBatches[i].buildGroups[j].priorBuildSummaryList');
        while k < count_k do
          begin
            CkJsonObject_putK(jResp,k);
            arn := CkJsonObject__stringOf(jResp,'buildBatches[i].buildGroups[j].priorBuildSummaryList[k].arn');
            buildStatus := CkJsonObject__stringOf(jResp,'buildBatches[i].buildGroups[j].priorBuildSummaryList[k].buildStatus');
            primaryArtifactIdentifier := CkJsonObject__stringOf(jResp,'buildBatches[i].buildGroups[j].priorBuildSummaryList[k].primaryArtifact.identifier');
            primaryArtifactLocation := CkJsonObject__stringOf(jResp,'buildBatches[i].buildGroups[j].priorBuildSummaryList[k].primaryArtifact.location');
            primaryArtifactType := CkJsonObject__stringOf(jResp,'buildBatches[i].buildGroups[j].priorBuildSummaryList[k].primaryArtifact.type');
            requestedOn := CkJsonObject_IntOf(jResp,'buildBatches[i].buildGroups[j].priorBuildSummaryList[k].requestedOn');

            json1 := CkJsonObject_ObjectOf(jResp,'buildBatches[i].buildGroups[j].priorBuildSummaryList[k]');
            i1 := 0;
            count_i1 := CkJsonObject_SizeOfArray(json1,'secondaryArtifacts');
            while i1 < count_i1 do
              begin
                CkJsonObject_putI(json1,i1);
                identifier := CkJsonObject__stringOf(json1,'secondaryArtifacts[i].identifier');
                location := CkJsonObject__stringOf(json1,'secondaryArtifacts[i].location');
                v_type := CkJsonObject__stringOf(json1,'secondaryArtifacts[i].type');
                i1 := i1 + 1;
              end;

            CkJsonObject_Dispose(json1);
            k := k + 1;
          end;

        j := j + 1;
      end;

    j := 0;
    count_j := CkJsonObject_SizeOfArray(jResp,'buildBatches[i].cache.modes');
    while j < count_j do
      begin
        CkJsonObject_putJ(jResp,j);
        strVal := CkJsonObject__stringOf(jResp,'buildBatches[i].cache.modes[j]');
        j := j + 1;
      end;

    j := 0;
    count_j := CkJsonObject_SizeOfArray(jResp,'buildBatches[i].environment.environmentVariables');
    while j < count_j do
      begin
        CkJsonObject_putJ(jResp,j);
        name := CkJsonObject__stringOf(jResp,'buildBatches[i].environment.environmentVariables[j].name');
        v_type := CkJsonObject__stringOf(jResp,'buildBatches[i].environment.environmentVariables[j].type');
        value := CkJsonObject__stringOf(jResp,'buildBatches[i].environment.environmentVariables[j].value');
        j := j + 1;
      end;

    j := 0;
    count_j := CkJsonObject_SizeOfArray(jResp,'buildBatches[i].fileSystemLocations');
    while j < count_j do
      begin
        CkJsonObject_putJ(jResp,j);
        identifier := CkJsonObject__stringOf(jResp,'buildBatches[i].fileSystemLocations[j].identifier');
        location := CkJsonObject__stringOf(jResp,'buildBatches[i].fileSystemLocations[j].location');
        mountOptions := CkJsonObject__stringOf(jResp,'buildBatches[i].fileSystemLocations[j].mountOptions');
        mountPoint := CkJsonObject__stringOf(jResp,'buildBatches[i].fileSystemLocations[j].mountPoint');
        v_type := CkJsonObject__stringOf(jResp,'buildBatches[i].fileSystemLocations[j].type');
        j := j + 1;
      end;

    j := 0;
    count_j := CkJsonObject_SizeOfArray(jResp,'buildBatches[i].phases');
    while j < count_j do
      begin
        CkJsonObject_putJ(jResp,j);
        durationInSeconds := CkJsonObject_IntOf(jResp,'buildBatches[i].phases[j].durationInSeconds');
        endTime := CkJsonObject_IntOf(jResp,'buildBatches[i].phases[j].endTime');
        phaseStatus := CkJsonObject__stringOf(jResp,'buildBatches[i].phases[j].phaseStatus');
        phaseType := CkJsonObject__stringOf(jResp,'buildBatches[i].phases[j].phaseType');
        startTime := CkJsonObject_IntOf(jResp,'buildBatches[i].phases[j].startTime');
        k := 0;
        count_k := CkJsonObject_SizeOfArray(jResp,'buildBatches[i].phases[j].contexts');
        while k < count_k do
          begin
            CkJsonObject_putK(jResp,k);
            message := CkJsonObject__stringOf(jResp,'buildBatches[i].phases[j].contexts[k].message');
            statusCode := CkJsonObject__stringOf(jResp,'buildBatches[i].phases[j].contexts[k].statusCode');
            k := k + 1;
          end;

        j := j + 1;
      end;

    j := 0;
    count_j := CkJsonObject_SizeOfArray(jResp,'buildBatches[i].secondaryArtifacts');
    while j < count_j do
      begin
        CkJsonObject_putJ(jResp,j);
        artifactIdentifier := CkJsonObject__stringOf(jResp,'buildBatches[i].secondaryArtifacts[j].artifactIdentifier');
        bucketOwnerAccess := CkJsonObject__stringOf(jResp,'buildBatches[i].secondaryArtifacts[j].bucketOwnerAccess');
        encryptionDisabled := CkJsonObject_IntOf(jResp,'buildBatches[i].secondaryArtifacts[j].encryptionDisabled');
        location := CkJsonObject__stringOf(jResp,'buildBatches[i].secondaryArtifacts[j].location');
        md5sum := CkJsonObject__stringOf(jResp,'buildBatches[i].secondaryArtifacts[j].md5sum');
        overrideArtifactName := CkJsonObject_IntOf(jResp,'buildBatches[i].secondaryArtifacts[j].overrideArtifactName');
        sha256sum := CkJsonObject__stringOf(jResp,'buildBatches[i].secondaryArtifacts[j].sha256sum');
        j := j + 1;
      end;

    j := 0;
    count_j := CkJsonObject_SizeOfArray(jResp,'buildBatches[i].secondarySources');
    while j < count_j do
      begin
        CkJsonObject_putJ(jResp,j);
        authResource := CkJsonObject__stringOf(jResp,'buildBatches[i].secondarySources[j].auth.resource');
        authType := CkJsonObject__stringOf(jResp,'buildBatches[i].secondarySources[j].auth.type');
        buildspec := CkJsonObject__stringOf(jResp,'buildBatches[i].secondarySources[j].buildspec');
        buildStatusConfigContext := CkJsonObject__stringOf(jResp,'buildBatches[i].secondarySources[j].buildStatusConfig.context');
        buildStatusConfigTargetUrl := CkJsonObject__stringOf(jResp,'buildBatches[i].secondarySources[j].buildStatusConfig.targetUrl');
        gitCloneDepth := CkJsonObject_IntOf(jResp,'buildBatches[i].secondarySources[j].gitCloneDepth');
        gitSubmodulesConfigFetchSubmodules := CkJsonObject_IntOf(jResp,'buildBatches[i].secondarySources[j].gitSubmodulesConfig.fetchSubmodules');
        insecureSsl := CkJsonObject_IntOf(jResp,'buildBatches[i].secondarySources[j].insecureSsl');
        location := CkJsonObject__stringOf(jResp,'buildBatches[i].secondarySources[j].location');
        reportBuildStatus := CkJsonObject_IntOf(jResp,'buildBatches[i].secondarySources[j].reportBuildStatus');
        sourceIdentifier := CkJsonObject__stringOf(jResp,'buildBatches[i].secondarySources[j].sourceIdentifier');
        v_type := CkJsonObject__stringOf(jResp,'buildBatches[i].secondarySources[j].type');
        j := j + 1;
      end;

    j := 0;
    count_j := CkJsonObject_SizeOfArray(jResp,'buildBatches[i].secondarySourceVersions');
    while j < count_j do
      begin
        CkJsonObject_putJ(jResp,j);
        sourceIdentifier := CkJsonObject__stringOf(jResp,'buildBatches[i].secondarySourceVersions[j].sourceIdentifier');
        sourceVersion := CkJsonObject__stringOf(jResp,'buildBatches[i].secondarySourceVersions[j].sourceVersion');
        j := j + 1;
      end;

    j := 0;
    count_j := CkJsonObject_SizeOfArray(jResp,'buildBatches[i].vpcConfig.securityGroupIds');
    while j < count_j do
      begin
        CkJsonObject_putJ(jResp,j);
        strVal := CkJsonObject__stringOf(jResp,'buildBatches[i].vpcConfig.securityGroupIds[j]');
        j := j + 1;
      end;

    j := 0;
    count_j := CkJsonObject_SizeOfArray(jResp,'buildBatches[i].vpcConfig.subnets');
    while j < count_j do
      begin
        CkJsonObject_putJ(jResp,j);
        strVal := CkJsonObject__stringOf(jResp,'buildBatches[i].vpcConfig.subnets[j]');
        j := j + 1;
      end;

    i := i + 1;
  end;

i := 0;
count_i := CkJsonObject_SizeOfArray(jResp,'buildBatchesNotFound');
while i < count_i do
  begin
    CkJsonObject_putI(jResp,i);
    strVal := CkJsonObject__stringOf(jResp,'buildBatchesNotFound[i]');
    i := i + 1;
  end;

// 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"
//   ]
// }

CkRest_Dispose(rest);
CkAuthAws_Dispose(authAws);
CkJsonObject_Dispose(json);
CkStringBuilder_Dispose(sbRequestBody);
CkStringBuilder_Dispose(sbResponseBody);
CkJsonObject_Dispose(jResp);