Chilkat Online Tools

CreateProject unicodeC Example

AWS CodeBuild

#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 *strVal;
    const wchar_t *name;
    const wchar_t *v_type;
    const wchar_t *value;
    const wchar_t *identifier;
    const wchar_t *location;
    const wchar_t *mountOptions;
    const wchar_t *mountPoint;
    const wchar_t *artifactIdentifier;
    const wchar_t *bucketOwnerAccess;
    int encryptionDisabled;
    const wchar_t *namespaceType;
    int overrideArtifactName;
    const wchar_t *packaging;
    const wchar_t *path;
    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;
    const wchar_t *sourceVersion;
    const wchar_t *key;
    int j;
    int count_j;
    int excludeMatchedPattern;
    const wchar_t *pattern;
    const wchar_t *Arn;
    const wchar_t *ArtifactIdentifier;
    const wchar_t *BucketOwnerAccess;
    int EncryptionDisabled;
    const wchar_t *Location;
    const wchar_t *Name;
    const wchar_t *NamespaceType;
    int OverrideArtifactName;
    const wchar_t *Packaging;
    const wchar_t *Path;
    const wchar_t *v_Type;
    int BadgeEnabled;
    const wchar_t *BadgeRequestUrl;
    const wchar_t *BatchReportMode;
    int CombineArtifacts;
    int MaximumBuildsAllowed;
    const wchar_t *ServiceRole;
    int TimeoutInMins;
    const wchar_t *CacheLocation;
    const wchar_t *CacheType;
    int ConcurrentBuildLimit;
    int Created;
    const wchar_t *Description;
    const wchar_t *EncryptionKey;
    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;
    int LastModified;
    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;
    const wchar_t *ProjectVisibility;
    const wchar_t *PublicProjectAlias;
    int QueuedTimeoutInMinutes;
    const wchar_t *ResourceAccessRole;
    const wchar_t *projectServiceRole;
    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 TimeoutInMinutes;
    const wchar_t *VpcId;
    const wchar_t *BranchFilter;
    const wchar_t *BuildType;
    int LastModifiedSecret;
    const wchar_t *PayloadUrl;
    const wchar_t *Secret;
    const wchar_t *v_Url;
    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"artifacts.artifactIdentifier",L"string");
    CkJsonObjectW_UpdateString(json,L"artifacts.bucketOwnerAccess",L"string");
    CkJsonObjectW_UpdateInt(json,L"artifacts.encryptionDisabled",123);
    CkJsonObjectW_UpdateString(json,L"artifacts.location",L"string");
    CkJsonObjectW_UpdateString(json,L"artifacts.name",L"string");
    CkJsonObjectW_UpdateString(json,L"artifacts.namespaceType",L"string");
    CkJsonObjectW_UpdateInt(json,L"artifacts.overrideArtifactName",123);
    CkJsonObjectW_UpdateString(json,L"artifacts.packaging",L"string");
    CkJsonObjectW_UpdateString(json,L"artifacts.path",L"string");
    CkJsonObjectW_UpdateString(json,L"artifacts.type",L"string");
    CkJsonObjectW_UpdateInt(json,L"badgeEnabled",123);
    CkJsonObjectW_UpdateString(json,L"buildBatchConfig.batchReportMode",L"string");
    CkJsonObjectW_UpdateInt(json,L"buildBatchConfig.combineArtifacts",123);
    CkJsonObjectW_UpdateString(json,L"buildBatchConfig.restrictions.computeTypesAllowed[0]",L"string");
    CkJsonObjectW_UpdateInt(json,L"buildBatchConfig.restrictions.maximumBuildsAllowed",123);
    CkJsonObjectW_UpdateString(json,L"buildBatchConfig.serviceRole",L"string");
    CkJsonObjectW_UpdateInt(json,L"buildBatchConfig.timeoutInMins",123);
    CkJsonObjectW_UpdateString(json,L"cache.location",L"string");
    CkJsonObjectW_UpdateString(json,L"cache.modes[0]",L"string");
    CkJsonObjectW_UpdateString(json,L"cache.type",L"string");
    CkJsonObjectW_UpdateInt(json,L"concurrentBuildLimit",123);
    CkJsonObjectW_UpdateString(json,L"description",L"string");
    CkJsonObjectW_UpdateString(json,L"encryptionKey",L"string");
    CkJsonObjectW_UpdateString(json,L"environment.certificate",L"string");
    CkJsonObjectW_UpdateString(json,L"environment.computeType",L"string");
    CkJsonObjectW_UpdateString(json,L"environment.environmentVariables[0].name",L"string");
    CkJsonObjectW_UpdateString(json,L"environment.environmentVariables[0].type",L"string");
    CkJsonObjectW_UpdateString(json,L"environment.environmentVariables[0].value",L"string");
    CkJsonObjectW_UpdateString(json,L"environment.image",L"string");
    CkJsonObjectW_UpdateString(json,L"environment.imagePullCredentialsType",L"string");
    CkJsonObjectW_UpdateInt(json,L"environment.privilegedMode",123);
    CkJsonObjectW_UpdateString(json,L"environment.registryCredential.credential",L"string");
    CkJsonObjectW_UpdateString(json,L"environment.registryCredential.credentialProvider",L"string");
    CkJsonObjectW_UpdateString(json,L"environment.type",L"string");
    CkJsonObjectW_UpdateString(json,L"fileSystemLocations[0].identifier",L"string");
    CkJsonObjectW_UpdateString(json,L"fileSystemLocations[0].location",L"string");
    CkJsonObjectW_UpdateString(json,L"fileSystemLocations[0].mountOptions",L"string");
    CkJsonObjectW_UpdateString(json,L"fileSystemLocations[0].mountPoint",L"string");
    CkJsonObjectW_UpdateString(json,L"fileSystemLocations[0].type",L"string");
    CkJsonObjectW_UpdateString(json,L"logsConfig.cloudWatchLogs.groupName",L"string");
    CkJsonObjectW_UpdateString(json,L"logsConfig.cloudWatchLogs.status",L"string");
    CkJsonObjectW_UpdateString(json,L"logsConfig.cloudWatchLogs.streamName",L"string");
    CkJsonObjectW_UpdateString(json,L"logsConfig.s3Logs.bucketOwnerAccess",L"string");
    CkJsonObjectW_UpdateInt(json,L"logsConfig.s3Logs.encryptionDisabled",123);
    CkJsonObjectW_UpdateString(json,L"logsConfig.s3Logs.location",L"string");
    CkJsonObjectW_UpdateString(json,L"logsConfig.s3Logs.status",L"string");
    CkJsonObjectW_UpdateString(json,L"name",L"string");
    CkJsonObjectW_UpdateInt(json,L"queuedTimeoutInMinutes",123);
    CkJsonObjectW_UpdateString(json,L"secondaryArtifacts[0].artifactIdentifier",L"string");
    CkJsonObjectW_UpdateString(json,L"secondaryArtifacts[0].bucketOwnerAccess",L"string");
    CkJsonObjectW_UpdateInt(json,L"secondaryArtifacts[0].encryptionDisabled",123);
    CkJsonObjectW_UpdateString(json,L"secondaryArtifacts[0].location",L"string");
    CkJsonObjectW_UpdateString(json,L"secondaryArtifacts[0].name",L"string");
    CkJsonObjectW_UpdateString(json,L"secondaryArtifacts[0].namespaceType",L"string");
    CkJsonObjectW_UpdateInt(json,L"secondaryArtifacts[0].overrideArtifactName",123);
    CkJsonObjectW_UpdateString(json,L"secondaryArtifacts[0].packaging",L"string");
    CkJsonObjectW_UpdateString(json,L"secondaryArtifacts[0].path",L"string");
    CkJsonObjectW_UpdateString(json,L"secondaryArtifacts[0].type",L"string");
    CkJsonObjectW_UpdateString(json,L"secondarySources[0].auth.resource",L"string");
    CkJsonObjectW_UpdateString(json,L"secondarySources[0].auth.type",L"string");
    CkJsonObjectW_UpdateString(json,L"secondarySources[0].buildspec",L"string");
    CkJsonObjectW_UpdateString(json,L"secondarySources[0].buildStatusConfig.context",L"string");
    CkJsonObjectW_UpdateString(json,L"secondarySources[0].buildStatusConfig.targetUrl",L"string");
    CkJsonObjectW_UpdateInt(json,L"secondarySources[0].gitCloneDepth",123);
    CkJsonObjectW_UpdateInt(json,L"secondarySources[0].gitSubmodulesConfig.fetchSubmodules",123);
    CkJsonObjectW_UpdateInt(json,L"secondarySources[0].insecureSsl",123);
    CkJsonObjectW_UpdateString(json,L"secondarySources[0].location",L"string");
    CkJsonObjectW_UpdateInt(json,L"secondarySources[0].reportBuildStatus",123);
    CkJsonObjectW_UpdateString(json,L"secondarySources[0].sourceIdentifier",L"string");
    CkJsonObjectW_UpdateString(json,L"secondarySources[0].type",L"string");
    CkJsonObjectW_UpdateString(json,L"secondarySourceVersions[0].sourceIdentifier",L"string");
    CkJsonObjectW_UpdateString(json,L"secondarySourceVersions[0].sourceVersion",L"string");
    CkJsonObjectW_UpdateString(json,L"serviceRole",L"string");
    CkJsonObjectW_UpdateString(json,L"source.auth.resource",L"string");
    CkJsonObjectW_UpdateString(json,L"source.auth.type",L"string");
    CkJsonObjectW_UpdateString(json,L"source.buildspec",L"string");
    CkJsonObjectW_UpdateString(json,L"source.buildStatusConfig.context",L"string");
    CkJsonObjectW_UpdateString(json,L"source.buildStatusConfig.targetUrl",L"string");
    CkJsonObjectW_UpdateInt(json,L"source.gitCloneDepth",123);
    CkJsonObjectW_UpdateInt(json,L"source.gitSubmodulesConfig.fetchSubmodules",123);
    CkJsonObjectW_UpdateInt(json,L"source.insecureSsl",123);
    CkJsonObjectW_UpdateString(json,L"source.location",L"string");
    CkJsonObjectW_UpdateInt(json,L"source.reportBuildStatus",123);
    CkJsonObjectW_UpdateString(json,L"source.sourceIdentifier",L"string");
    CkJsonObjectW_UpdateString(json,L"source.type",L"string");
    CkJsonObjectW_UpdateString(json,L"sourceVersion",L"string");
    CkJsonObjectW_UpdateString(json,L"tags[0].key",L"string");
    CkJsonObjectW_UpdateString(json,L"tags[0].value",L"string");
    CkJsonObjectW_UpdateInt(json,L"timeoutInMinutes",123);
    CkJsonObjectW_UpdateString(json,L"vpcConfig.securityGroupIds[0]",L"string");
    CkJsonObjectW_UpdateString(json,L"vpcConfig.subnets[0]",L"string");
    CkJsonObjectW_UpdateString(json,L"vpcConfig.vpcId",L"string");

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

    // {
    //   "artifacts": {
    //     "artifactIdentifier": "string",
    //     "bucketOwnerAccess": "string",
    //     "encryptionDisabled": boolean,
    //     "location": "string",
    //     "name": "string",
    //     "namespaceType": "string",
    //     "overrideArtifactName": boolean,
    //     "packaging": "string",
    //     "path": "string",
    //     "type": "string"
    //   },
    //   "badgeEnabled": boolean,
    //   "buildBatchConfig": {
    //     "batchReportMode": "string",
    //     "combineArtifacts": boolean,
    //     "restrictions": {
    //       "computeTypesAllowed": [
    //         "string"
    //       ],
    //       "maximumBuildsAllowed": number
    //     },
    //     "serviceRole": "string",
    //     "timeoutInMins": number
    //   },
    //   "cache": {
    //     "location": "string",
    //     "modes": [
    //       "string"
    //     ],
    //     "type": "string"
    //   },
    //   "concurrentBuildLimit": number,
    //   "description": "string",
    //   "encryptionKey": "string",
    //   "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"
    //     }
    //   ],
    //   "logsConfig": {
    //     "cloudWatchLogs": {
    //       "groupName": "string",
    //       "status": "string",
    //       "streamName": "string"
    //     },
    //     "s3Logs": {
    //       "bucketOwnerAccess": "string",
    //       "encryptionDisabled": boolean,
    //       "location": "string",
    //       "status": "string"
    //     }
    //   },
    //   "name": "string",
    //   "queuedTimeoutInMinutes": number,
    //   "secondaryArtifacts": [
    //     {
    //       "artifactIdentifier": "string",
    //       "bucketOwnerAccess": "string",
    //       "encryptionDisabled": boolean,
    //       "location": "string",
    //       "name": "string",
    //       "namespaceType": "string",
    //       "overrideArtifactName": boolean,
    //       "packaging": "string",
    //       "path": "string",
    //       "type": "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",
    //   "tags": [
    //     {
    //       "key": "string",
    //       "value": "string"
    //     }
    //   ],
    //   "timeoutInMinutes": number,
    //   "vpcConfig": {
    //     "securityGroupIds": [
    //       "string"
    //     ],
    //     "subnets": [
    //       "string"
    //     ],
    //     "vpcId": "string"
    //   }
    // }

    CkRestW_AddHeader(rest,L"Content-Type",L"application/x-amz-json-1.1");
    CkRestW_AddHeader(rest,L"X-Amz-Target",L"CodeBuild_20161006.CreateProject");

    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.

    Arn = CkJsonObjectW_stringOf(jResp,L"project.arn");
    ArtifactIdentifier = CkJsonObjectW_stringOf(jResp,L"project.artifacts.artifactIdentifier");
    BucketOwnerAccess = CkJsonObjectW_stringOf(jResp,L"project.artifacts.bucketOwnerAccess");
    EncryptionDisabled = CkJsonObjectW_IntOf(jResp,L"project.artifacts.encryptionDisabled");
    Location = CkJsonObjectW_stringOf(jResp,L"project.artifacts.location");
    Name = CkJsonObjectW_stringOf(jResp,L"project.artifacts.name");
    NamespaceType = CkJsonObjectW_stringOf(jResp,L"project.artifacts.namespaceType");
    OverrideArtifactName = CkJsonObjectW_IntOf(jResp,L"project.artifacts.overrideArtifactName");
    Packaging = CkJsonObjectW_stringOf(jResp,L"project.artifacts.packaging");
    Path = CkJsonObjectW_stringOf(jResp,L"project.artifacts.path");
    v_Type = CkJsonObjectW_stringOf(jResp,L"project.artifacts.type");
    BadgeEnabled = CkJsonObjectW_IntOf(jResp,L"project.badge.badgeEnabled");
    BadgeRequestUrl = CkJsonObjectW_stringOf(jResp,L"project.badge.badgeRequestUrl");
    BatchReportMode = CkJsonObjectW_stringOf(jResp,L"project.buildBatchConfig.batchReportMode");
    CombineArtifacts = CkJsonObjectW_IntOf(jResp,L"project.buildBatchConfig.combineArtifacts");
    MaximumBuildsAllowed = CkJsonObjectW_IntOf(jResp,L"project.buildBatchConfig.restrictions.maximumBuildsAllowed");
    ServiceRole = CkJsonObjectW_stringOf(jResp,L"project.buildBatchConfig.serviceRole");
    TimeoutInMins = CkJsonObjectW_IntOf(jResp,L"project.buildBatchConfig.timeoutInMins");
    CacheLocation = CkJsonObjectW_stringOf(jResp,L"project.cache.location");
    CacheType = CkJsonObjectW_stringOf(jResp,L"project.cache.type");
    ConcurrentBuildLimit = CkJsonObjectW_IntOf(jResp,L"project.concurrentBuildLimit");
    Created = CkJsonObjectW_IntOf(jResp,L"project.created");
    Description = CkJsonObjectW_stringOf(jResp,L"project.description");
    EncryptionKey = CkJsonObjectW_stringOf(jResp,L"project.encryptionKey");
    Certificate = CkJsonObjectW_stringOf(jResp,L"project.environment.certificate");
    ComputeType = CkJsonObjectW_stringOf(jResp,L"project.environment.computeType");
    Image = CkJsonObjectW_stringOf(jResp,L"project.environment.image");
    ImagePullCredentialsType = CkJsonObjectW_stringOf(jResp,L"project.environment.imagePullCredentialsType");
    PrivilegedMode = CkJsonObjectW_IntOf(jResp,L"project.environment.privilegedMode");
    Credential = CkJsonObjectW_stringOf(jResp,L"project.environment.registryCredential.credential");
    CredentialProvider = CkJsonObjectW_stringOf(jResp,L"project.environment.registryCredential.credentialProvider");
    EnvironmentType = CkJsonObjectW_stringOf(jResp,L"project.environment.type");
    LastModified = CkJsonObjectW_IntOf(jResp,L"project.lastModified");
    GroupName = CkJsonObjectW_stringOf(jResp,L"project.logsConfig.cloudWatchLogs.groupName");
    Status = CkJsonObjectW_stringOf(jResp,L"project.logsConfig.cloudWatchLogs.status");
    StreamName = CkJsonObjectW_stringOf(jResp,L"project.logsConfig.cloudWatchLogs.streamName");
    S3LogsBucketOwnerAccess = CkJsonObjectW_stringOf(jResp,L"project.logsConfig.s3Logs.bucketOwnerAccess");
    S3LogsEncryptionDisabled = CkJsonObjectW_IntOf(jResp,L"project.logsConfig.s3Logs.encryptionDisabled");
    S3LogsLocation = CkJsonObjectW_stringOf(jResp,L"project.logsConfig.s3Logs.location");
    S3LogsStatus = CkJsonObjectW_stringOf(jResp,L"project.logsConfig.s3Logs.status");
    projectName = CkJsonObjectW_stringOf(jResp,L"project.name");
    ProjectVisibility = CkJsonObjectW_stringOf(jResp,L"project.projectVisibility");
    PublicProjectAlias = CkJsonObjectW_stringOf(jResp,L"project.publicProjectAlias");
    QueuedTimeoutInMinutes = CkJsonObjectW_IntOf(jResp,L"project.queuedTimeoutInMinutes");
    ResourceAccessRole = CkJsonObjectW_stringOf(jResp,L"project.resourceAccessRole");
    projectServiceRole = CkJsonObjectW_stringOf(jResp,L"project.serviceRole");
    Resource = CkJsonObjectW_stringOf(jResp,L"project.source.auth.resource");
    AuthType = CkJsonObjectW_stringOf(jResp,L"project.source.auth.type");
    Buildspec = CkJsonObjectW_stringOf(jResp,L"project.source.buildspec");
    Context = CkJsonObjectW_stringOf(jResp,L"project.source.buildStatusConfig.context");
    TargetUrl = CkJsonObjectW_stringOf(jResp,L"project.source.buildStatusConfig.targetUrl");
    GitCloneDepth = CkJsonObjectW_IntOf(jResp,L"project.source.gitCloneDepth");
    FetchSubmodules = CkJsonObjectW_IntOf(jResp,L"project.source.gitSubmodulesConfig.fetchSubmodules");
    InsecureSsl = CkJsonObjectW_IntOf(jResp,L"project.source.insecureSsl");
    SourceLocation = CkJsonObjectW_stringOf(jResp,L"project.source.location");
    ReportBuildStatus = CkJsonObjectW_IntOf(jResp,L"project.source.reportBuildStatus");
    SourceIdentifier = CkJsonObjectW_stringOf(jResp,L"project.source.sourceIdentifier");
    SourceType = CkJsonObjectW_stringOf(jResp,L"project.source.type");
    SourceVersion = CkJsonObjectW_stringOf(jResp,L"project.sourceVersion");
    TimeoutInMinutes = CkJsonObjectW_IntOf(jResp,L"project.timeoutInMinutes");
    VpcId = CkJsonObjectW_stringOf(jResp,L"project.vpcConfig.vpcId");
    BranchFilter = CkJsonObjectW_stringOf(jResp,L"project.webhook.branchFilter");
    BuildType = CkJsonObjectW_stringOf(jResp,L"project.webhook.buildType");
    LastModifiedSecret = CkJsonObjectW_IntOf(jResp,L"project.webhook.lastModifiedSecret");
    PayloadUrl = CkJsonObjectW_stringOf(jResp,L"project.webhook.payloadUrl");
    Secret = CkJsonObjectW_stringOf(jResp,L"project.webhook.secret");
    v_Url = CkJsonObjectW_stringOf(jResp,L"project.webhook.url");
    i = 0;
    count_i = CkJsonObjectW_SizeOfArray(jResp,L"project.buildBatchConfig.restrictions.computeTypesAllowed");
    while (i < count_i) {
        CkJsonObjectW_putI(jResp,i);
        strVal = CkJsonObjectW_stringOf(jResp,L"project.buildBatchConfig.restrictions.computeTypesAllowed[i]");
        i = i + 1;
    }

    i = 0;
    count_i = CkJsonObjectW_SizeOfArray(jResp,L"project.cache.modes");
    while (i < count_i) {
        CkJsonObjectW_putI(jResp,i);
        strVal = CkJsonObjectW_stringOf(jResp,L"project.cache.modes[i]");
        i = i + 1;
    }

    i = 0;
    count_i = CkJsonObjectW_SizeOfArray(jResp,L"project.environment.environmentVariables");
    while (i < count_i) {
        CkJsonObjectW_putI(jResp,i);
        name = CkJsonObjectW_stringOf(jResp,L"project.environment.environmentVariables[i].name");
        v_type = CkJsonObjectW_stringOf(jResp,L"project.environment.environmentVariables[i].type");
        value = CkJsonObjectW_stringOf(jResp,L"project.environment.environmentVariables[i].value");
        i = i + 1;
    }

    i = 0;
    count_i = CkJsonObjectW_SizeOfArray(jResp,L"project.fileSystemLocations");
    while (i < count_i) {
        CkJsonObjectW_putI(jResp,i);
        identifier = CkJsonObjectW_stringOf(jResp,L"project.fileSystemLocations[i].identifier");
        location = CkJsonObjectW_stringOf(jResp,L"project.fileSystemLocations[i].location");
        mountOptions = CkJsonObjectW_stringOf(jResp,L"project.fileSystemLocations[i].mountOptions");
        mountPoint = CkJsonObjectW_stringOf(jResp,L"project.fileSystemLocations[i].mountPoint");
        v_type = CkJsonObjectW_stringOf(jResp,L"project.fileSystemLocations[i].type");
        i = i + 1;
    }

    i = 0;
    count_i = CkJsonObjectW_SizeOfArray(jResp,L"project.secondaryArtifacts");
    while (i < count_i) {
        CkJsonObjectW_putI(jResp,i);
        artifactIdentifier = CkJsonObjectW_stringOf(jResp,L"project.secondaryArtifacts[i].artifactIdentifier");
        bucketOwnerAccess = CkJsonObjectW_stringOf(jResp,L"project.secondaryArtifacts[i].bucketOwnerAccess");
        encryptionDisabled = CkJsonObjectW_IntOf(jResp,L"project.secondaryArtifacts[i].encryptionDisabled");
        location = CkJsonObjectW_stringOf(jResp,L"project.secondaryArtifacts[i].location");
        name = CkJsonObjectW_stringOf(jResp,L"project.secondaryArtifacts[i].name");
        namespaceType = CkJsonObjectW_stringOf(jResp,L"project.secondaryArtifacts[i].namespaceType");
        overrideArtifactName = CkJsonObjectW_IntOf(jResp,L"project.secondaryArtifacts[i].overrideArtifactName");
        packaging = CkJsonObjectW_stringOf(jResp,L"project.secondaryArtifacts[i].packaging");
        path = CkJsonObjectW_stringOf(jResp,L"project.secondaryArtifacts[i].path");
        v_type = CkJsonObjectW_stringOf(jResp,L"project.secondaryArtifacts[i].type");
        i = i + 1;
    }

    i = 0;
    count_i = CkJsonObjectW_SizeOfArray(jResp,L"project.secondarySources");
    while (i < count_i) {
        CkJsonObjectW_putI(jResp,i);
        authResource = CkJsonObjectW_stringOf(jResp,L"project.secondarySources[i].auth.resource");
        authType = CkJsonObjectW_stringOf(jResp,L"project.secondarySources[i].auth.type");
        buildspec = CkJsonObjectW_stringOf(jResp,L"project.secondarySources[i].buildspec");
        buildStatusConfigContext = CkJsonObjectW_stringOf(jResp,L"project.secondarySources[i].buildStatusConfig.context");
        buildStatusConfigTargetUrl = CkJsonObjectW_stringOf(jResp,L"project.secondarySources[i].buildStatusConfig.targetUrl");
        gitCloneDepth = CkJsonObjectW_IntOf(jResp,L"project.secondarySources[i].gitCloneDepth");
        gitSubmodulesConfigFetchSubmodules = CkJsonObjectW_IntOf(jResp,L"project.secondarySources[i].gitSubmodulesConfig.fetchSubmodules");
        insecureSsl = CkJsonObjectW_IntOf(jResp,L"project.secondarySources[i].insecureSsl");
        location = CkJsonObjectW_stringOf(jResp,L"project.secondarySources[i].location");
        reportBuildStatus = CkJsonObjectW_IntOf(jResp,L"project.secondarySources[i].reportBuildStatus");
        sourceIdentifier = CkJsonObjectW_stringOf(jResp,L"project.secondarySources[i].sourceIdentifier");
        v_type = CkJsonObjectW_stringOf(jResp,L"project.secondarySources[i].type");
        i = i + 1;
    }

    i = 0;
    count_i = CkJsonObjectW_SizeOfArray(jResp,L"project.secondarySourceVersions");
    while (i < count_i) {
        CkJsonObjectW_putI(jResp,i);
        sourceIdentifier = CkJsonObjectW_stringOf(jResp,L"project.secondarySourceVersions[i].sourceIdentifier");
        sourceVersion = CkJsonObjectW_stringOf(jResp,L"project.secondarySourceVersions[i].sourceVersion");
        i = i + 1;
    }

    i = 0;
    count_i = CkJsonObjectW_SizeOfArray(jResp,L"project.tags");
    while (i < count_i) {
        CkJsonObjectW_putI(jResp,i);
        key = CkJsonObjectW_stringOf(jResp,L"project.tags[i].key");
        value = CkJsonObjectW_stringOf(jResp,L"project.tags[i].value");
        i = i + 1;
    }

    i = 0;
    count_i = CkJsonObjectW_SizeOfArray(jResp,L"project.vpcConfig.securityGroupIds");
    while (i < count_i) {
        CkJsonObjectW_putI(jResp,i);
        strVal = CkJsonObjectW_stringOf(jResp,L"project.vpcConfig.securityGroupIds[i]");
        i = i + 1;
    }

    i = 0;
    count_i = CkJsonObjectW_SizeOfArray(jResp,L"project.vpcConfig.subnets");
    while (i < count_i) {
        CkJsonObjectW_putI(jResp,i);
        strVal = CkJsonObjectW_stringOf(jResp,L"project.vpcConfig.subnets[i]");
        i = i + 1;
    }

    i = 0;
    count_i = CkJsonObjectW_SizeOfArray(jResp,L"project.webhook.filterGroups");
    while (i < count_i) {
        CkJsonObjectW_putI(jResp,i);
        j = 0;
        count_j = CkJsonObjectW_SizeOfArray(jResp,L"project.webhook.filterGroups[i]");
        while (j < count_j) {
            CkJsonObjectW_putJ(jResp,j);
            excludeMatchedPattern = CkJsonObjectW_IntOf(jResp,L"project.webhook.filterGroups[i][j].excludeMatchedPattern");
            pattern = CkJsonObjectW_stringOf(jResp,L"project.webhook.filterGroups[i][j].pattern");
            v_type = CkJsonObjectW_stringOf(jResp,L"project.webhook.filterGroups[i][j].type");
            j = j + 1;
        }

        i = i + 1;
    }

    // A sample JSON response body parsed by the above code:

    // {
    //   "project": {
    //     "arn": "string",
    //     "artifacts": {
    //       "artifactIdentifier": "string",
    //       "bucketOwnerAccess": "string",
    //       "encryptionDisabled": boolean,
    //       "location": "string",
    //       "name": "string",
    //       "namespaceType": "string",
    //       "overrideArtifactName": boolean,
    //       "packaging": "string",
    //       "path": "string",
    //       "type": "string"
    //     },
    //     "badge": {
    //       "badgeEnabled": boolean,
    //       "badgeRequestUrl": "string"
    //     },
    //     "buildBatchConfig": {
    //       "batchReportMode": "string",
    //       "combineArtifacts": boolean,
    //       "restrictions": {
    //         "computeTypesAllowed": [
    //           "string"
    //         ],
    //         "maximumBuildsAllowed": number
    //       },
    //       "serviceRole": "string",
    //       "timeoutInMins": number
    //     },
    //     "cache": {
    //       "location": "string",
    //       "modes": [
    //         "string"
    //       ],
    //       "type": "string"
    //     },
    //     "concurrentBuildLimit": number,
    //     "created": number,
    //     "description": "string",
    //     "encryptionKey": "string",
    //     "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"
    //       }
    //     ],
    //     "lastModified": number,
    //     "logsConfig": {
    //       "cloudWatchLogs": {
    //         "groupName": "string",
    //         "status": "string",
    //         "streamName": "string"
    //       },
    //       "s3Logs": {
    //         "bucketOwnerAccess": "string",
    //         "encryptionDisabled": boolean,
    //         "location": "string",
    //         "status": "string"
    //       }
    //     },
    //     "name": "string",
    //     "projectVisibility": "string",
    //     "publicProjectAlias": "string",
    //     "queuedTimeoutInMinutes": number,
    //     "resourceAccessRole": "string",
    //     "secondaryArtifacts": [
    //       {
    //         "artifactIdentifier": "string",
    //         "bucketOwnerAccess": "string",
    //         "encryptionDisabled": boolean,
    //         "location": "string",
    //         "name": "string",
    //         "namespaceType": "string",
    //         "overrideArtifactName": boolean,
    //         "packaging": "string",
    //         "path": "string",
    //         "type": "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",
    //     "tags": [
    //       {
    //         "key": "string",
    //         "value": "string"
    //       }
    //     ],
    //     "timeoutInMinutes": number,
    //     "vpcConfig": {
    //       "securityGroupIds": [
    //         "string"
    //       ],
    //       "subnets": [
    //         "string"
    //       ],
    //       "vpcId": "string"
    //     },
    //     "webhook": {
    //       "branchFilter": "string",
    //       "buildType": "string",
    //       "filterGroups": [
    //         [
    //           {
    //             "excludeMatchedPattern": boolean,
    //             "pattern": "string",
    //             "type": "string"
    //           }
    //         ]
    //       ],
    //       "lastModifiedSecret": number,
    //       "payloadUrl": "string",
    //       "secret": "string",
    //       "url": "string"
    //     }
    //   }
    // }


    CkRestW_Dispose(rest);
    CkAuthAwsW_Dispose(authAws);
    CkJsonObjectW_Dispose(json);
    CkStringBuilderW_Dispose(sbRequestBody);
    CkStringBuilderW_Dispose(sbResponseBody);
    CkJsonObjectW_Dispose(jResp);

    }