Chilkat Online Tools

UpdateProject PureBasic Example

AWS CodeBuild

IncludeFile "CkJsonObject.pb"
IncludeFile "CkStringBuilder.pb"
IncludeFile "CkRest.pb"
IncludeFile "CkAuthAws.pb"

Procedure ChilkatExample()

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

    rest.i = CkRest::ckCreate()
    If rest.i = 0
        Debug "Failed to create object."
        ProcedureReturn
    EndIf

    success.i

    authAws.i = CkAuthAws::ckCreate()
    If authAws.i = 0
        Debug "Failed to create object."
        ProcedureReturn
    EndIf

    CkAuthAws::setCkAccessKey(authAws, "AWS_ACCESS_KEY")
    CkAuthAws::setCkSecretKey(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::setCkRegion(authAws, "us-west-2")
    CkAuthAws::setCkServiceName(authAws, "codebuild")
    ; SetAuthAws causes Chilkat to automatically add the following headers: Authorization, X-Amz-Date
    CkRest::ckSetAuthAws(rest,authAws)

    ; URL: https://codebuild.us-west-2.amazonaws.com/
    ; Use the same region as specified above.
    success = CkRest::ckConnect(rest,"codebuild.us-west-2.amazonaws.com",443,1,1)
    If success <> 1
        Debug "ConnectFailReason: " + Str(CkRest::ckConnectFailReason(rest))
        Debug CkRest::ckLastErrorText(rest)
        CkRest::ckDispose(rest)
        CkAuthAws::ckDispose(authAws)
        ProcedureReturn
    EndIf

    ; 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.i = CkJsonObject::ckCreate()
    If json.i = 0
        Debug "Failed to create object."
        ProcedureReturn
    EndIf

    CkJsonObject::ckUpdateString(json,"artifacts.artifactIdentifier","string")
    CkJsonObject::ckUpdateString(json,"artifacts.bucketOwnerAccess","string")
    CkJsonObject::ckUpdateInt(json,"artifacts.encryptionDisabled",123)
    CkJsonObject::ckUpdateString(json,"artifacts.location","string")
    CkJsonObject::ckUpdateString(json,"artifacts.name","string")
    CkJsonObject::ckUpdateString(json,"artifacts.namespaceType","string")
    CkJsonObject::ckUpdateInt(json,"artifacts.overrideArtifactName",123)
    CkJsonObject::ckUpdateString(json,"artifacts.packaging","string")
    CkJsonObject::ckUpdateString(json,"artifacts.path","string")
    CkJsonObject::ckUpdateString(json,"artifacts.type","string")
    CkJsonObject::ckUpdateInt(json,"badgeEnabled",123)
    CkJsonObject::ckUpdateString(json,"buildBatchConfig.batchReportMode","string")
    CkJsonObject::ckUpdateInt(json,"buildBatchConfig.combineArtifacts",123)
    CkJsonObject::ckUpdateString(json,"buildBatchConfig.restrictions.computeTypesAllowed[0]","string")
    CkJsonObject::ckUpdateInt(json,"buildBatchConfig.restrictions.maximumBuildsAllowed",123)
    CkJsonObject::ckUpdateString(json,"buildBatchConfig.serviceRole","string")
    CkJsonObject::ckUpdateInt(json,"buildBatchConfig.timeoutInMins",123)
    CkJsonObject::ckUpdateString(json,"cache.location","string")
    CkJsonObject::ckUpdateString(json,"cache.modes[0]","string")
    CkJsonObject::ckUpdateString(json,"cache.type","string")
    CkJsonObject::ckUpdateInt(json,"concurrentBuildLimit",123)
    CkJsonObject::ckUpdateString(json,"description","string")
    CkJsonObject::ckUpdateString(json,"encryptionKey","string")
    CkJsonObject::ckUpdateString(json,"environment.certificate","string")
    CkJsonObject::ckUpdateString(json,"environment.computeType","string")
    CkJsonObject::ckUpdateString(json,"environment.environmentVariables[0].name","string")
    CkJsonObject::ckUpdateString(json,"environment.environmentVariables[0].type","string")
    CkJsonObject::ckUpdateString(json,"environment.environmentVariables[0].value","string")
    CkJsonObject::ckUpdateString(json,"environment.image","string")
    CkJsonObject::ckUpdateString(json,"environment.imagePullCredentialsType","string")
    CkJsonObject::ckUpdateInt(json,"environment.privilegedMode",123)
    CkJsonObject::ckUpdateString(json,"environment.registryCredential.credential","string")
    CkJsonObject::ckUpdateString(json,"environment.registryCredential.credentialProvider","string")
    CkJsonObject::ckUpdateString(json,"environment.type","string")
    CkJsonObject::ckUpdateString(json,"fileSystemLocations[0].identifier","string")
    CkJsonObject::ckUpdateString(json,"fileSystemLocations[0].location","string")
    CkJsonObject::ckUpdateString(json,"fileSystemLocations[0].mountOptions","string")
    CkJsonObject::ckUpdateString(json,"fileSystemLocations[0].mountPoint","string")
    CkJsonObject::ckUpdateString(json,"fileSystemLocations[0].type","string")
    CkJsonObject::ckUpdateString(json,"logsConfig.cloudWatchLogs.groupName","string")
    CkJsonObject::ckUpdateString(json,"logsConfig.cloudWatchLogs.status","string")
    CkJsonObject::ckUpdateString(json,"logsConfig.cloudWatchLogs.streamName","string")
    CkJsonObject::ckUpdateString(json,"logsConfig.s3Logs.bucketOwnerAccess","string")
    CkJsonObject::ckUpdateInt(json,"logsConfig.s3Logs.encryptionDisabled",123)
    CkJsonObject::ckUpdateString(json,"logsConfig.s3Logs.location","string")
    CkJsonObject::ckUpdateString(json,"logsConfig.s3Logs.status","string")
    CkJsonObject::ckUpdateString(json,"name","string")
    CkJsonObject::ckUpdateInt(json,"queuedTimeoutInMinutes",123)
    CkJsonObject::ckUpdateString(json,"secondaryArtifacts[0].artifactIdentifier","string")
    CkJsonObject::ckUpdateString(json,"secondaryArtifacts[0].bucketOwnerAccess","string")
    CkJsonObject::ckUpdateInt(json,"secondaryArtifacts[0].encryptionDisabled",123)
    CkJsonObject::ckUpdateString(json,"secondaryArtifacts[0].location","string")
    CkJsonObject::ckUpdateString(json,"secondaryArtifacts[0].name","string")
    CkJsonObject::ckUpdateString(json,"secondaryArtifacts[0].namespaceType","string")
    CkJsonObject::ckUpdateInt(json,"secondaryArtifacts[0].overrideArtifactName",123)
    CkJsonObject::ckUpdateString(json,"secondaryArtifacts[0].packaging","string")
    CkJsonObject::ckUpdateString(json,"secondaryArtifacts[0].path","string")
    CkJsonObject::ckUpdateString(json,"secondaryArtifacts[0].type","string")
    CkJsonObject::ckUpdateString(json,"secondarySources[0].auth.resource","string")
    CkJsonObject::ckUpdateString(json,"secondarySources[0].auth.type","string")
    CkJsonObject::ckUpdateString(json,"secondarySources[0].buildspec","string")
    CkJsonObject::ckUpdateString(json,"secondarySources[0].buildStatusConfig.context","string")
    CkJsonObject::ckUpdateString(json,"secondarySources[0].buildStatusConfig.targetUrl","string")
    CkJsonObject::ckUpdateInt(json,"secondarySources[0].gitCloneDepth",123)
    CkJsonObject::ckUpdateInt(json,"secondarySources[0].gitSubmodulesConfig.fetchSubmodules",123)
    CkJsonObject::ckUpdateInt(json,"secondarySources[0].insecureSsl",123)
    CkJsonObject::ckUpdateString(json,"secondarySources[0].location","string")
    CkJsonObject::ckUpdateInt(json,"secondarySources[0].reportBuildStatus",123)
    CkJsonObject::ckUpdateString(json,"secondarySources[0].sourceIdentifier","string")
    CkJsonObject::ckUpdateString(json,"secondarySources[0].type","string")
    CkJsonObject::ckUpdateString(json,"secondarySourceVersions[0].sourceIdentifier","string")
    CkJsonObject::ckUpdateString(json,"secondarySourceVersions[0].sourceVersion","string")
    CkJsonObject::ckUpdateString(json,"serviceRole","string")
    CkJsonObject::ckUpdateString(json,"source.auth.resource","string")
    CkJsonObject::ckUpdateString(json,"source.auth.type","string")
    CkJsonObject::ckUpdateString(json,"source.buildspec","string")
    CkJsonObject::ckUpdateString(json,"source.buildStatusConfig.context","string")
    CkJsonObject::ckUpdateString(json,"source.buildStatusConfig.targetUrl","string")
    CkJsonObject::ckUpdateInt(json,"source.gitCloneDepth",123)
    CkJsonObject::ckUpdateInt(json,"source.gitSubmodulesConfig.fetchSubmodules",123)
    CkJsonObject::ckUpdateInt(json,"source.insecureSsl",123)
    CkJsonObject::ckUpdateString(json,"source.location","string")
    CkJsonObject::ckUpdateInt(json,"source.reportBuildStatus",123)
    CkJsonObject::ckUpdateString(json,"source.sourceIdentifier","string")
    CkJsonObject::ckUpdateString(json,"source.type","string")
    CkJsonObject::ckUpdateString(json,"sourceVersion","string")
    CkJsonObject::ckUpdateString(json,"tags[0].key","string")
    CkJsonObject::ckUpdateString(json,"tags[0].value","string")
    CkJsonObject::ckUpdateInt(json,"timeoutInMinutes",123)
    CkJsonObject::ckUpdateString(json,"vpcConfig.securityGroupIds[0]","string")
    CkJsonObject::ckUpdateString(json,"vpcConfig.subnets[0]","string")
    CkJsonObject::ckUpdateString(json,"vpcConfig.vpcId","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"
    ;   }
    ; }

    CkRest::ckAddHeader(rest,"Content-Type","application/x-amz-json-1.1")
    CkRest::ckAddHeader(rest,"X-Amz-Target","CodeBuild_20161006.UpdateProject")

    sbRequestBody.i = CkStringBuilder::ckCreate()
    If sbRequestBody.i = 0
        Debug "Failed to create object."
        ProcedureReturn
    EndIf

    CkJsonObject::ckEmitSb(json,sbRequestBody)
    sbResponseBody.i = CkStringBuilder::ckCreate()
    If sbResponseBody.i = 0
        Debug "Failed to create object."
        ProcedureReturn
    EndIf

    success = CkRest::ckFullRequestSb(rest,"POST","/",sbRequestBody,sbResponseBody)
    If success <> 1
        Debug CkRest::ckLastErrorText(rest)
        CkRest::ckDispose(rest)
        CkAuthAws::ckDispose(authAws)
        CkJsonObject::ckDispose(json)
        CkStringBuilder::ckDispose(sbRequestBody)
        CkStringBuilder::ckDispose(sbResponseBody)
        ProcedureReturn
    EndIf

    respStatusCode.i = CkRest::ckResponseStatusCode(rest)
    Debug "response status code = " + Str(respStatusCode)
    If respStatusCode <> 200
        Debug "Response Header:"
        Debug CkRest::ckResponseHeader(rest)
        Debug "Response Body:"
        Debug CkStringBuilder::ckGetAsString(sbResponseBody)
        CkRest::ckDispose(rest)
        CkAuthAws::ckDispose(authAws)
        CkJsonObject::ckDispose(json)
        CkStringBuilder::ckDispose(sbRequestBody)
        CkStringBuilder::ckDispose(sbResponseBody)
        ProcedureReturn
    EndIf

    jResp.i = CkJsonObject::ckCreate()
    If jResp.i = 0
        Debug "Failed to create object."
        ProcedureReturn
    EndIf

    CkJsonObject::ckLoadSb(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

    strVal.s
    name.s
    v_type.s
    value.s
    identifier.s
    location.s
    mountOptions.s
    mountPoint.s
    artifactIdentifier.s
    bucketOwnerAccess.s
    encryptionDisabled.i
    namespaceType.s
    overrideArtifactName.i
    packaging.s
    path.s
    authResource.s
    authType.s
    buildspec.s
    buildStatusConfigContext.s
    buildStatusConfigTargetUrl.s
    gitCloneDepth.i
    gitSubmodulesConfigFetchSubmodules.i
    insecureSsl.i
    reportBuildStatus.i
    sourceIdentifier.s
    sourceVersion.s
    key.s
    j.i
    count_j.i
    excludeMatchedPattern.i
    pattern.s

    Arn.s = CkJsonObject::ckStringOf(jResp,"project.arn")
    ArtifactIdentifier.s = CkJsonObject::ckStringOf(jResp,"project.artifacts.artifactIdentifier")
    BucketOwnerAccess.s = CkJsonObject::ckStringOf(jResp,"project.artifacts.bucketOwnerAccess")
    EncryptionDisabled.i = CkJsonObject::ckIntOf(jResp,"project.artifacts.encryptionDisabled")
    Location.s = CkJsonObject::ckStringOf(jResp,"project.artifacts.location")
    Name.s = CkJsonObject::ckStringOf(jResp,"project.artifacts.name")
    NamespaceType.s = CkJsonObject::ckStringOf(jResp,"project.artifacts.namespaceType")
    OverrideArtifactName.i = CkJsonObject::ckIntOf(jResp,"project.artifacts.overrideArtifactName")
    Packaging.s = CkJsonObject::ckStringOf(jResp,"project.artifacts.packaging")
    Path.s = CkJsonObject::ckStringOf(jResp,"project.artifacts.path")
    v_Type.s = CkJsonObject::ckStringOf(jResp,"project.artifacts.type")
    BadgeEnabled.i = CkJsonObject::ckIntOf(jResp,"project.badge.badgeEnabled")
    BadgeRequestUrl.s = CkJsonObject::ckStringOf(jResp,"project.badge.badgeRequestUrl")
    BatchReportMode.s = CkJsonObject::ckStringOf(jResp,"project.buildBatchConfig.batchReportMode")
    CombineArtifacts.i = CkJsonObject::ckIntOf(jResp,"project.buildBatchConfig.combineArtifacts")
    MaximumBuildsAllowed.i = CkJsonObject::ckIntOf(jResp,"project.buildBatchConfig.restrictions.maximumBuildsAllowed")
    ServiceRole.s = CkJsonObject::ckStringOf(jResp,"project.buildBatchConfig.serviceRole")
    TimeoutInMins.i = CkJsonObject::ckIntOf(jResp,"project.buildBatchConfig.timeoutInMins")
    CacheLocation.s = CkJsonObject::ckStringOf(jResp,"project.cache.location")
    CacheType.s = CkJsonObject::ckStringOf(jResp,"project.cache.type")
    ConcurrentBuildLimit.i = CkJsonObject::ckIntOf(jResp,"project.concurrentBuildLimit")
    Created.i = CkJsonObject::ckIntOf(jResp,"project.created")
    Description.s = CkJsonObject::ckStringOf(jResp,"project.description")
    EncryptionKey.s = CkJsonObject::ckStringOf(jResp,"project.encryptionKey")
    Certificate.s = CkJsonObject::ckStringOf(jResp,"project.environment.certificate")
    ComputeType.s = CkJsonObject::ckStringOf(jResp,"project.environment.computeType")
    Image.s = CkJsonObject::ckStringOf(jResp,"project.environment.image")
    ImagePullCredentialsType.s = CkJsonObject::ckStringOf(jResp,"project.environment.imagePullCredentialsType")
    PrivilegedMode.i = CkJsonObject::ckIntOf(jResp,"project.environment.privilegedMode")
    Credential.s = CkJsonObject::ckStringOf(jResp,"project.environment.registryCredential.credential")
    CredentialProvider.s = CkJsonObject::ckStringOf(jResp,"project.environment.registryCredential.credentialProvider")
    EnvironmentType.s = CkJsonObject::ckStringOf(jResp,"project.environment.type")
    LastModified.i = CkJsonObject::ckIntOf(jResp,"project.lastModified")
    GroupName.s = CkJsonObject::ckStringOf(jResp,"project.logsConfig.cloudWatchLogs.groupName")
    Status.s = CkJsonObject::ckStringOf(jResp,"project.logsConfig.cloudWatchLogs.status")
    StreamName.s = CkJsonObject::ckStringOf(jResp,"project.logsConfig.cloudWatchLogs.streamName")
    S3LogsBucketOwnerAccess.s = CkJsonObject::ckStringOf(jResp,"project.logsConfig.s3Logs.bucketOwnerAccess")
    S3LogsEncryptionDisabled.i = CkJsonObject::ckIntOf(jResp,"project.logsConfig.s3Logs.encryptionDisabled")
    S3LogsLocation.s = CkJsonObject::ckStringOf(jResp,"project.logsConfig.s3Logs.location")
    S3LogsStatus.s = CkJsonObject::ckStringOf(jResp,"project.logsConfig.s3Logs.status")
    projectName.s = CkJsonObject::ckStringOf(jResp,"project.name")
    ProjectVisibility.s = CkJsonObject::ckStringOf(jResp,"project.projectVisibility")
    PublicProjectAlias.s = CkJsonObject::ckStringOf(jResp,"project.publicProjectAlias")
    QueuedTimeoutInMinutes.i = CkJsonObject::ckIntOf(jResp,"project.queuedTimeoutInMinutes")
    ResourceAccessRole.s = CkJsonObject::ckStringOf(jResp,"project.resourceAccessRole")
    projectServiceRole.s = CkJsonObject::ckStringOf(jResp,"project.serviceRole")
    Resource.s = CkJsonObject::ckStringOf(jResp,"project.source.auth.resource")
    AuthType.s = CkJsonObject::ckStringOf(jResp,"project.source.auth.type")
    Buildspec.s = CkJsonObject::ckStringOf(jResp,"project.source.buildspec")
    Context.s = CkJsonObject::ckStringOf(jResp,"project.source.buildStatusConfig.context")
    TargetUrl.s = CkJsonObject::ckStringOf(jResp,"project.source.buildStatusConfig.targetUrl")
    GitCloneDepth.i = CkJsonObject::ckIntOf(jResp,"project.source.gitCloneDepth")
    FetchSubmodules.i = CkJsonObject::ckIntOf(jResp,"project.source.gitSubmodulesConfig.fetchSubmodules")
    InsecureSsl.i = CkJsonObject::ckIntOf(jResp,"project.source.insecureSsl")
    SourceLocation.s = CkJsonObject::ckStringOf(jResp,"project.source.location")
    ReportBuildStatus.i = CkJsonObject::ckIntOf(jResp,"project.source.reportBuildStatus")
    SourceIdentifier.s = CkJsonObject::ckStringOf(jResp,"project.source.sourceIdentifier")
    SourceType.s = CkJsonObject::ckStringOf(jResp,"project.source.type")
    SourceVersion.s = CkJsonObject::ckStringOf(jResp,"project.sourceVersion")
    TimeoutInMinutes.i = CkJsonObject::ckIntOf(jResp,"project.timeoutInMinutes")
    VpcId.s = CkJsonObject::ckStringOf(jResp,"project.vpcConfig.vpcId")
    BranchFilter.s = CkJsonObject::ckStringOf(jResp,"project.webhook.branchFilter")
    BuildType.s = CkJsonObject::ckStringOf(jResp,"project.webhook.buildType")
    LastModifiedSecret.i = CkJsonObject::ckIntOf(jResp,"project.webhook.lastModifiedSecret")
    PayloadUrl.s = CkJsonObject::ckStringOf(jResp,"project.webhook.payloadUrl")
    Secret.s = CkJsonObject::ckStringOf(jResp,"project.webhook.secret")
    v_Url.s = CkJsonObject::ckStringOf(jResp,"project.webhook.url")
    i.i = 0
    count_i.i = CkJsonObject::ckSizeOfArray(jResp,"project.buildBatchConfig.restrictions.computeTypesAllowed")
    While i < count_i
        CkJsonObject::setCkI(jResp, i)
        strVal = CkJsonObject::ckStringOf(jResp,"project.buildBatchConfig.restrictions.computeTypesAllowed[i]")
        i = i + 1
    Wend
    i = 0
    count_i = CkJsonObject::ckSizeOfArray(jResp,"project.cache.modes")
    While i < count_i
        CkJsonObject::setCkI(jResp, i)
        strVal = CkJsonObject::ckStringOf(jResp,"project.cache.modes[i]")
        i = i + 1
    Wend
    i = 0
    count_i = CkJsonObject::ckSizeOfArray(jResp,"project.environment.environmentVariables")
    While i < count_i
        CkJsonObject::setCkI(jResp, i)
        name = CkJsonObject::ckStringOf(jResp,"project.environment.environmentVariables[i].name")
        v_type = CkJsonObject::ckStringOf(jResp,"project.environment.environmentVariables[i].type")
        value = CkJsonObject::ckStringOf(jResp,"project.environment.environmentVariables[i].value")
        i = i + 1
    Wend
    i = 0
    count_i = CkJsonObject::ckSizeOfArray(jResp,"project.fileSystemLocations")
    While i < count_i
        CkJsonObject::setCkI(jResp, i)
        identifier = CkJsonObject::ckStringOf(jResp,"project.fileSystemLocations[i].identifier")
        location = CkJsonObject::ckStringOf(jResp,"project.fileSystemLocations[i].location")
        mountOptions = CkJsonObject::ckStringOf(jResp,"project.fileSystemLocations[i].mountOptions")
        mountPoint = CkJsonObject::ckStringOf(jResp,"project.fileSystemLocations[i].mountPoint")
        v_type = CkJsonObject::ckStringOf(jResp,"project.fileSystemLocations[i].type")
        i = i + 1
    Wend
    i = 0
    count_i = CkJsonObject::ckSizeOfArray(jResp,"project.secondaryArtifacts")
    While i < count_i
        CkJsonObject::setCkI(jResp, i)
        artifactIdentifier = CkJsonObject::ckStringOf(jResp,"project.secondaryArtifacts[i].artifactIdentifier")
        bucketOwnerAccess = CkJsonObject::ckStringOf(jResp,"project.secondaryArtifacts[i].bucketOwnerAccess")
        encryptionDisabled = CkJsonObject::ckIntOf(jResp,"project.secondaryArtifacts[i].encryptionDisabled")
        location = CkJsonObject::ckStringOf(jResp,"project.secondaryArtifacts[i].location")
        name = CkJsonObject::ckStringOf(jResp,"project.secondaryArtifacts[i].name")
        namespaceType = CkJsonObject::ckStringOf(jResp,"project.secondaryArtifacts[i].namespaceType")
        overrideArtifactName = CkJsonObject::ckIntOf(jResp,"project.secondaryArtifacts[i].overrideArtifactName")
        packaging = CkJsonObject::ckStringOf(jResp,"project.secondaryArtifacts[i].packaging")
        path = CkJsonObject::ckStringOf(jResp,"project.secondaryArtifacts[i].path")
        v_type = CkJsonObject::ckStringOf(jResp,"project.secondaryArtifacts[i].type")
        i = i + 1
    Wend
    i = 0
    count_i = CkJsonObject::ckSizeOfArray(jResp,"project.secondarySources")
    While i < count_i
        CkJsonObject::setCkI(jResp, i)
        authResource = CkJsonObject::ckStringOf(jResp,"project.secondarySources[i].auth.resource")
        authType = CkJsonObject::ckStringOf(jResp,"project.secondarySources[i].auth.type")
        buildspec = CkJsonObject::ckStringOf(jResp,"project.secondarySources[i].buildspec")
        buildStatusConfigContext = CkJsonObject::ckStringOf(jResp,"project.secondarySources[i].buildStatusConfig.context")
        buildStatusConfigTargetUrl = CkJsonObject::ckStringOf(jResp,"project.secondarySources[i].buildStatusConfig.targetUrl")
        gitCloneDepth = CkJsonObject::ckIntOf(jResp,"project.secondarySources[i].gitCloneDepth")
        gitSubmodulesConfigFetchSubmodules = CkJsonObject::ckIntOf(jResp,"project.secondarySources[i].gitSubmodulesConfig.fetchSubmodules")
        insecureSsl = CkJsonObject::ckIntOf(jResp,"project.secondarySources[i].insecureSsl")
        location = CkJsonObject::ckStringOf(jResp,"project.secondarySources[i].location")
        reportBuildStatus = CkJsonObject::ckIntOf(jResp,"project.secondarySources[i].reportBuildStatus")
        sourceIdentifier = CkJsonObject::ckStringOf(jResp,"project.secondarySources[i].sourceIdentifier")
        v_type = CkJsonObject::ckStringOf(jResp,"project.secondarySources[i].type")
        i = i + 1
    Wend
    i = 0
    count_i = CkJsonObject::ckSizeOfArray(jResp,"project.secondarySourceVersions")
    While i < count_i
        CkJsonObject::setCkI(jResp, i)
        sourceIdentifier = CkJsonObject::ckStringOf(jResp,"project.secondarySourceVersions[i].sourceIdentifier")
        sourceVersion = CkJsonObject::ckStringOf(jResp,"project.secondarySourceVersions[i].sourceVersion")
        i = i + 1
    Wend
    i = 0
    count_i = CkJsonObject::ckSizeOfArray(jResp,"project.tags")
    While i < count_i
        CkJsonObject::setCkI(jResp, i)
        key = CkJsonObject::ckStringOf(jResp,"project.tags[i].key")
        value = CkJsonObject::ckStringOf(jResp,"project.tags[i].value")
        i = i + 1
    Wend
    i = 0
    count_i = CkJsonObject::ckSizeOfArray(jResp,"project.vpcConfig.securityGroupIds")
    While i < count_i
        CkJsonObject::setCkI(jResp, i)
        strVal = CkJsonObject::ckStringOf(jResp,"project.vpcConfig.securityGroupIds[i]")
        i = i + 1
    Wend
    i = 0
    count_i = CkJsonObject::ckSizeOfArray(jResp,"project.vpcConfig.subnets")
    While i < count_i
        CkJsonObject::setCkI(jResp, i)
        strVal = CkJsonObject::ckStringOf(jResp,"project.vpcConfig.subnets[i]")
        i = i + 1
    Wend
    i = 0
    count_i = CkJsonObject::ckSizeOfArray(jResp,"project.webhook.filterGroups")
    While i < count_i
        CkJsonObject::setCkI(jResp, i)
        j = 0
        count_j = CkJsonObject::ckSizeOfArray(jResp,"project.webhook.filterGroups[i]")
        While j < count_j
            CkJsonObject::setCkJ(jResp, j)
            excludeMatchedPattern = CkJsonObject::ckIntOf(jResp,"project.webhook.filterGroups[i][j].excludeMatchedPattern")
            pattern = CkJsonObject::ckStringOf(jResp,"project.webhook.filterGroups[i][j].pattern")
            v_type = CkJsonObject::ckStringOf(jResp,"project.webhook.filterGroups[i][j].type")
            j = j + 1
        Wend
        i = i + 1
    Wend

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


    CkRest::ckDispose(rest)
    CkAuthAws::ckDispose(authAws)
    CkJsonObject::ckDispose(json)
    CkStringBuilder::ckDispose(sbRequestBody)
    CkStringBuilder::ckDispose(sbResponseBody)
    CkJsonObject::ckDispose(jResp)


    ProcedureReturn
EndProcedure