Chilkat Online Tools

BatchGetBuildBatches Objective-C Example

AWS CodeBuild

#import <CkoRest.h>
#import <CkoAuthAws.h>
#import <CkoJsonObject.h>
#import <CkoStringBuilder.h>
#import <NSString.h>

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

CkoRest *rest = [[CkoRest alloc] init];
BOOL success;

CkoAuthAws *authAws = [[CkoAuthAws alloc] init];
authAws.AccessKey = @"AWS_ACCESS_KEY";
authAws.SecretKey = @"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.)
authAws.Region = @"us-west-2";
authAws.ServiceName = @"codebuild";
// SetAuthAws causes Chilkat to automatically add the following headers: Authorization, X-Amz-Date
[rest SetAuthAws: authAws];

// URL: https://codebuild.us-west-2.amazonaws.com/
// Use the same region as specified above.
success = [rest Connect: @"codebuild.us-west-2.amazonaws.com" port: [NSNumber numberWithInt: 443] tls: YES autoReconnect: YES];
if (success != YES) {
    NSLog(@"%@%d",@"ConnectFailReason: ",[rest.ConnectFailReason intValue]);
    NSLog(@"%@",rest.LastErrorText);
    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

CkoJsonObject *json = [[CkoJsonObject alloc] init];
[json UpdateString: @"ids[0]" value: @"string"];

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

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

[rest AddHeader: @"Content-Type" value: @"application/x-amz-json-1.1"];
[rest AddHeader: @"X-Amz-Target" value: @"CodeBuild_20161006.BatchGetBuildBatches"];

CkoStringBuilder *sbRequestBody = [[CkoStringBuilder alloc] init];
[json EmitSb: sbRequestBody];
CkoStringBuilder *sbResponseBody = [[CkoStringBuilder alloc] init];
success = [rest FullRequestSb: @"POST" uriPath: @"/" requestBody: sbRequestBody responseBody: sbResponseBody];
if (success != YES) {
    NSLog(@"%@",rest.LastErrorText);
    return;
}

int respStatusCode = [rest.ResponseStatusCode intValue];
NSLog(@"%@%d",@"response status code = ",respStatusCode);
if (respStatusCode != 200) {
    NSLog(@"%@",@"Response Header:");
    NSLog(@"%@",rest.ResponseHeader);
    NSLog(@"%@",@"Response Body:");
    NSLog(@"%@",[sbResponseBody GetAsString]);
    return;
}

CkoJsonObject *jResp = [[CkoJsonObject alloc] init];
[jResp LoadSb: 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

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

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

    j = 0;
    count_j = [[jResp SizeOfArray: @"buildBatches[i].buildGroups"] intValue];
    while (j < count_j) {
        jResp.J = [NSNumber numberWithInt: j];
        Arn = [jResp StringOf: @"buildBatches[i].buildGroups[j].currentBuildSummary.arn"];
        BuildStatus = [jResp StringOf: @"buildBatches[i].buildGroups[j].currentBuildSummary.buildStatus"];
        Identifier = [jResp StringOf: @"buildBatches[i].buildGroups[j].currentBuildSummary.primaryArtifact.identifier"];
        PrimaryArtifactLocation = [jResp StringOf: @"buildBatches[i].buildGroups[j].currentBuildSummary.primaryArtifact.location"];
        PrimaryArtifactType = [jResp StringOf: @"buildBatches[i].buildGroups[j].currentBuildSummary.primaryArtifact.type"];
        RequestedOn = [[jResp IntOf: @"buildBatches[i].buildGroups[j].currentBuildSummary.requestedOn"] intValue];
        identifier = [jResp StringOf: @"buildBatches[i].buildGroups[j].identifier"];
        ignoreFailure = [[jResp IntOf: @"buildBatches[i].buildGroups[j].ignoreFailure"] intValue];
        k = 0;
        count_k = [[jResp SizeOfArray: @"buildBatches[i].buildGroups[j].currentBuildSummary.secondaryArtifacts"] intValue];
        while (k < count_k) {
            jResp.K = [NSNumber numberWithInt: k];
            identifier = [jResp StringOf: @"buildBatches[i].buildGroups[j].currentBuildSummary.secondaryArtifacts[k].identifier"];
            location = [jResp StringOf: @"buildBatches[i].buildGroups[j].currentBuildSummary.secondaryArtifacts[k].location"];
            v_type = [jResp StringOf: @"buildBatches[i].buildGroups[j].currentBuildSummary.secondaryArtifacts[k].type"];
            k = k + 1;
        }

        k = 0;
        count_k = [[jResp SizeOfArray: @"buildBatches[i].buildGroups[j].dependsOn"] intValue];
        while (k < count_k) {
            jResp.K = [NSNumber numberWithInt: k];
            strVal = [jResp StringOf: @"buildBatches[i].buildGroups[j].dependsOn[k]"];
            k = k + 1;
        }

        k = 0;
        count_k = [[jResp SizeOfArray: @"buildBatches[i].buildGroups[j].priorBuildSummaryList"] intValue];
        while (k < count_k) {
            jResp.K = [NSNumber numberWithInt: k];
            arn = [jResp StringOf: @"buildBatches[i].buildGroups[j].priorBuildSummaryList[k].arn"];
            buildStatus = [jResp StringOf: @"buildBatches[i].buildGroups[j].priorBuildSummaryList[k].buildStatus"];
            primaryArtifactIdentifier = [jResp StringOf: @"buildBatches[i].buildGroups[j].priorBuildSummaryList[k].primaryArtifact.identifier"];
            primaryArtifactLocation = [jResp StringOf: @"buildBatches[i].buildGroups[j].priorBuildSummaryList[k].primaryArtifact.location"];
            primaryArtifactType = [jResp StringOf: @"buildBatches[i].buildGroups[j].priorBuildSummaryList[k].primaryArtifact.type"];
            requestedOn = [[jResp IntOf: @"buildBatches[i].buildGroups[j].priorBuildSummaryList[k].requestedOn"] intValue];

            json1 = [jResp ObjectOf: @"buildBatches[i].buildGroups[j].priorBuildSummaryList[k]"];
            i1 = 0;
            count_i1 = [[json1 SizeOfArray: @"secondaryArtifacts"] intValue];
            while (i1 < count_i1) {
                json1.I = [NSNumber numberWithInt: i1];
                identifier = [json1 StringOf: @"secondaryArtifacts[i].identifier"];
                location = [json1 StringOf: @"secondaryArtifacts[i].location"];
                v_type = [json1 StringOf: @"secondaryArtifacts[i].type"];
                i1 = i1 + 1;
            }

            k = k + 1;
        }

        j = j + 1;
    }

    j = 0;
    count_j = [[jResp SizeOfArray: @"buildBatches[i].cache.modes"] intValue];
    while (j < count_j) {
        jResp.J = [NSNumber numberWithInt: j];
        strVal = [jResp StringOf: @"buildBatches[i].cache.modes[j]"];
        j = j + 1;
    }

    j = 0;
    count_j = [[jResp SizeOfArray: @"buildBatches[i].environment.environmentVariables"] intValue];
    while (j < count_j) {
        jResp.J = [NSNumber numberWithInt: j];
        name = [jResp StringOf: @"buildBatches[i].environment.environmentVariables[j].name"];
        v_type = [jResp StringOf: @"buildBatches[i].environment.environmentVariables[j].type"];
        value = [jResp StringOf: @"buildBatches[i].environment.environmentVariables[j].value"];
        j = j + 1;
    }

    j = 0;
    count_j = [[jResp SizeOfArray: @"buildBatches[i].fileSystemLocations"] intValue];
    while (j < count_j) {
        jResp.J = [NSNumber numberWithInt: j];
        identifier = [jResp StringOf: @"buildBatches[i].fileSystemLocations[j].identifier"];
        location = [jResp StringOf: @"buildBatches[i].fileSystemLocations[j].location"];
        mountOptions = [jResp StringOf: @"buildBatches[i].fileSystemLocations[j].mountOptions"];
        mountPoint = [jResp StringOf: @"buildBatches[i].fileSystemLocations[j].mountPoint"];
        v_type = [jResp StringOf: @"buildBatches[i].fileSystemLocations[j].type"];
        j = j + 1;
    }

    j = 0;
    count_j = [[jResp SizeOfArray: @"buildBatches[i].phases"] intValue];
    while (j < count_j) {
        jResp.J = [NSNumber numberWithInt: j];
        durationInSeconds = [[jResp IntOf: @"buildBatches[i].phases[j].durationInSeconds"] intValue];
        endTime = [[jResp IntOf: @"buildBatches[i].phases[j].endTime"] intValue];
        phaseStatus = [jResp StringOf: @"buildBatches[i].phases[j].phaseStatus"];
        phaseType = [jResp StringOf: @"buildBatches[i].phases[j].phaseType"];
        startTime = [[jResp IntOf: @"buildBatches[i].phases[j].startTime"] intValue];
        k = 0;
        count_k = [[jResp SizeOfArray: @"buildBatches[i].phases[j].contexts"] intValue];
        while (k < count_k) {
            jResp.K = [NSNumber numberWithInt: k];
            message = [jResp StringOf: @"buildBatches[i].phases[j].contexts[k].message"];
            statusCode = [jResp StringOf: @"buildBatches[i].phases[j].contexts[k].statusCode"];
            k = k + 1;
        }

        j = j + 1;
    }

    j = 0;
    count_j = [[jResp SizeOfArray: @"buildBatches[i].secondaryArtifacts"] intValue];
    while (j < count_j) {
        jResp.J = [NSNumber numberWithInt: j];
        artifactIdentifier = [jResp StringOf: @"buildBatches[i].secondaryArtifacts[j].artifactIdentifier"];
        bucketOwnerAccess = [jResp StringOf: @"buildBatches[i].secondaryArtifacts[j].bucketOwnerAccess"];
        encryptionDisabled = [[jResp IntOf: @"buildBatches[i].secondaryArtifacts[j].encryptionDisabled"] intValue];
        location = [jResp StringOf: @"buildBatches[i].secondaryArtifacts[j].location"];
        md5sum = [jResp StringOf: @"buildBatches[i].secondaryArtifacts[j].md5sum"];
        overrideArtifactName = [[jResp IntOf: @"buildBatches[i].secondaryArtifacts[j].overrideArtifactName"] intValue];
        sha256sum = [jResp StringOf: @"buildBatches[i].secondaryArtifacts[j].sha256sum"];
        j = j + 1;
    }

    j = 0;
    count_j = [[jResp SizeOfArray: @"buildBatches[i].secondarySources"] intValue];
    while (j < count_j) {
        jResp.J = [NSNumber numberWithInt: j];
        authResource = [jResp StringOf: @"buildBatches[i].secondarySources[j].auth.resource"];
        authType = [jResp StringOf: @"buildBatches[i].secondarySources[j].auth.type"];
        buildspec = [jResp StringOf: @"buildBatches[i].secondarySources[j].buildspec"];
        buildStatusConfigContext = [jResp StringOf: @"buildBatches[i].secondarySources[j].buildStatusConfig.context"];
        buildStatusConfigTargetUrl = [jResp StringOf: @"buildBatches[i].secondarySources[j].buildStatusConfig.targetUrl"];
        gitCloneDepth = [[jResp IntOf: @"buildBatches[i].secondarySources[j].gitCloneDepth"] intValue];
        gitSubmodulesConfigFetchSubmodules = [[jResp IntOf: @"buildBatches[i].secondarySources[j].gitSubmodulesConfig.fetchSubmodules"] intValue];
        insecureSsl = [[jResp IntOf: @"buildBatches[i].secondarySources[j].insecureSsl"] intValue];
        location = [jResp StringOf: @"buildBatches[i].secondarySources[j].location"];
        reportBuildStatus = [[jResp IntOf: @"buildBatches[i].secondarySources[j].reportBuildStatus"] intValue];
        sourceIdentifier = [jResp StringOf: @"buildBatches[i].secondarySources[j].sourceIdentifier"];
        v_type = [jResp StringOf: @"buildBatches[i].secondarySources[j].type"];
        j = j + 1;
    }

    j = 0;
    count_j = [[jResp SizeOfArray: @"buildBatches[i].secondarySourceVersions"] intValue];
    while (j < count_j) {
        jResp.J = [NSNumber numberWithInt: j];
        sourceIdentifier = [jResp StringOf: @"buildBatches[i].secondarySourceVersions[j].sourceIdentifier"];
        sourceVersion = [jResp StringOf: @"buildBatches[i].secondarySourceVersions[j].sourceVersion"];
        j = j + 1;
    }

    j = 0;
    count_j = [[jResp SizeOfArray: @"buildBatches[i].vpcConfig.securityGroupIds"] intValue];
    while (j < count_j) {
        jResp.J = [NSNumber numberWithInt: j];
        strVal = [jResp StringOf: @"buildBatches[i].vpcConfig.securityGroupIds[j]"];
        j = j + 1;
    }

    j = 0;
    count_j = [[jResp SizeOfArray: @"buildBatches[i].vpcConfig.subnets"] intValue];
    while (j < count_j) {
        jResp.J = [NSNumber numberWithInt: j];
        strVal = [jResp StringOf: @"buildBatches[i].vpcConfig.subnets[j]"];
        j = j + 1;
    }

    i = i + 1;
}

i = 0;
count_i = [[jResp SizeOfArray: @"buildBatchesNotFound"] intValue];
while (i < count_i) {
    jResp.I = [NSNumber numberWithInt: i];
    strVal = [jResp StringOf: @"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"
//   ]
// }