Chilkat Online Tools

UpdateProject Foxpro Example

AWS CodeBuild

LOCAL loRest
LOCAL lnSuccess
LOCAL loAuthAws
LOCAL loJson
LOCAL loSbRequestBody
LOCAL loSbResponseBody
LOCAL lnRespStatusCode
LOCAL loJResp
LOCAL lcStrVal
LOCAL lcName
LOCAL lcV_type
LOCAL lcValue
LOCAL lcIdentifier
LOCAL lcLocation
LOCAL lcMountOptions
LOCAL lcMountPoint
LOCAL lcArtifactIdentifier
LOCAL lcBucketOwnerAccess
LOCAL lnEncryptionDisabled
LOCAL lcNamespaceType
LOCAL lnOverrideArtifactName
LOCAL lcPackaging
LOCAL lcPath
LOCAL lcAuthResource
LOCAL lcAuthType
LOCAL lcBuildspec
LOCAL lcBuildStatusConfigContext
LOCAL lcBuildStatusConfigTargetUrl
LOCAL lnGitCloneDepth
LOCAL lnGitSubmodulesConfigFetchSubmodules
LOCAL lnInsecureSsl
LOCAL lnReportBuildStatus
LOCAL lcSourceIdentifier
LOCAL lcSourceVersion
LOCAL lcKey
LOCAL j
LOCAL lnCount_j
LOCAL lnExcludeMatchedPattern
LOCAL lcPattern
LOCAL lcArn
LOCAL lcArtifactIdentifier
LOCAL lcBucketOwnerAccess
LOCAL lnEncryptionDisabled
LOCAL lcLocation
LOCAL lcName
LOCAL lcNamespaceType
LOCAL lnOverrideArtifactName
LOCAL lcPackaging
LOCAL lcPath
LOCAL lcV_Type
LOCAL lnBadgeEnabled
LOCAL lcBadgeRequestUrl
LOCAL lcBatchReportMode
LOCAL lnCombineArtifacts
LOCAL lnMaximumBuildsAllowed
LOCAL lcServiceRole
LOCAL lnTimeoutInMins
LOCAL lcCacheLocation
LOCAL lcCacheType
LOCAL lnConcurrentBuildLimit
LOCAL lnCreated
LOCAL lcDescription
LOCAL lcEncryptionKey
LOCAL lcCertificate
LOCAL lcComputeType
LOCAL lcImage
LOCAL lcImagePullCredentialsType
LOCAL lnPrivilegedMode
LOCAL lcCredential
LOCAL lcCredentialProvider
LOCAL lcEnvironmentType
LOCAL lnLastModified
LOCAL lcGroupName
LOCAL lcStatus
LOCAL lcStreamName
LOCAL lcS3LogsBucketOwnerAccess
LOCAL lnS3LogsEncryptionDisabled
LOCAL lcS3LogsLocation
LOCAL lcS3LogsStatus
LOCAL lcProjectName
LOCAL lcProjectVisibility
LOCAL lcPublicProjectAlias
LOCAL lnQueuedTimeoutInMinutes
LOCAL lcResourceAccessRole
LOCAL lcProjectServiceRole
LOCAL lcResource
LOCAL lcAuthType
LOCAL lcBuildspec
LOCAL lcContext
LOCAL lcTargetUrl
LOCAL lnGitCloneDepth
LOCAL lnFetchSubmodules
LOCAL lnInsecureSsl
LOCAL lcSourceLocation
LOCAL lnReportBuildStatus
LOCAL lcSourceIdentifier
LOCAL lcSourceType
LOCAL lcSourceVersion
LOCAL lnTimeoutInMinutes
LOCAL lcVpcId
LOCAL lcBranchFilter
LOCAL lcBuildType
LOCAL lnLastModifiedSecret
LOCAL lcPayloadUrl
LOCAL lcSecret
LOCAL lcV_Url
LOCAL i
LOCAL lnCount_i

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

loRest = CreateObject('Chilkat_9_5_0.Rest')

loAuthAws = CreateObject('Chilkat_9_5_0.AuthAws')
loAuthAws.AccessKey = "AWS_ACCESS_KEY"
loAuthAws.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.)
loAuthAws.Region = "us-west-2"
loAuthAws.ServiceName = "codebuild"
* SetAuthAws causes Chilkat to automatically add the following headers: Authorization, X-Amz-Date
loRest.SetAuthAws(loAuthAws)

* URL: https://codebuild.us-west-2.amazonaws.com/
* Use the same region as specified above.
lnSuccess = loRest.Connect("codebuild.us-west-2.amazonaws.com",443,1,1)
IF (lnSuccess <> 1) THEN
    ? "ConnectFailReason: " + STR(loRest.ConnectFailReason)
    ? loRest.LastErrorText
    RELEASE loRest
    RELEASE loAuthAws
    CANCEL
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

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

loRest.AddHeader("Content-Type","application/x-amz-json-1.1")
loRest.AddHeader("X-Amz-Target","CodeBuild_20161006.UpdateProject")

loSbRequestBody = CreateObject('Chilkat_9_5_0.StringBuilder')
loJson.EmitSb(loSbRequestBody)
loSbResponseBody = CreateObject('Chilkat_9_5_0.StringBuilder')
lnSuccess = loRest.FullRequestSb("POST","/",loSbRequestBody,loSbResponseBody)
IF (lnSuccess <> 1) THEN
    ? loRest.LastErrorText
    RELEASE loRest
    RELEASE loAuthAws
    RELEASE loJson
    RELEASE loSbRequestBody
    RELEASE loSbResponseBody
    CANCEL
ENDIF

lnRespStatusCode = loRest.ResponseStatusCode
? "response status code = " + STR(lnRespStatusCode)
IF (lnRespStatusCode <> 200) THEN
    ? "Response Header:"
    ? loRest.ResponseHeader
    ? "Response Body:"
    ? loSbResponseBody.GetAsString()
    RELEASE loRest
    RELEASE loAuthAws
    RELEASE loJson
    RELEASE loSbRequestBody
    RELEASE loSbResponseBody
    CANCEL
ENDIF

loJResp = CreateObject('Chilkat_9_5_0.JsonObject')
loJResp.LoadSb(loSbResponseBody)

* 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

lcArn = loJResp.StringOf("project.arn")
lcArtifactIdentifier = loJResp.StringOf("project.artifacts.artifactIdentifier")
lcBucketOwnerAccess = loJResp.StringOf("project.artifacts.bucketOwnerAccess")
lnEncryptionDisabled = loJResp.IntOf("project.artifacts.encryptionDisabled")
lcLocation = loJResp.StringOf("project.artifacts.location")
lcName = loJResp.StringOf("project.artifacts.name")
lcNamespaceType = loJResp.StringOf("project.artifacts.namespaceType")
lnOverrideArtifactName = loJResp.IntOf("project.artifacts.overrideArtifactName")
lcPackaging = loJResp.StringOf("project.artifacts.packaging")
lcPath = loJResp.StringOf("project.artifacts.path")
lcV_Type = loJResp.StringOf("project.artifacts.type")
lnBadgeEnabled = loJResp.IntOf("project.badge.badgeEnabled")
lcBadgeRequestUrl = loJResp.StringOf("project.badge.badgeRequestUrl")
lcBatchReportMode = loJResp.StringOf("project.buildBatchConfig.batchReportMode")
lnCombineArtifacts = loJResp.IntOf("project.buildBatchConfig.combineArtifacts")
lnMaximumBuildsAllowed = loJResp.IntOf("project.buildBatchConfig.restrictions.maximumBuildsAllowed")
lcServiceRole = loJResp.StringOf("project.buildBatchConfig.serviceRole")
lnTimeoutInMins = loJResp.IntOf("project.buildBatchConfig.timeoutInMins")
lcCacheLocation = loJResp.StringOf("project.cache.location")
lcCacheType = loJResp.StringOf("project.cache.type")
lnConcurrentBuildLimit = loJResp.IntOf("project.concurrentBuildLimit")
lnCreated = loJResp.IntOf("project.created")
lcDescription = loJResp.StringOf("project.description")
lcEncryptionKey = loJResp.StringOf("project.encryptionKey")
lcCertificate = loJResp.StringOf("project.environment.certificate")
lcComputeType = loJResp.StringOf("project.environment.computeType")
lcImage = loJResp.StringOf("project.environment.image")
lcImagePullCredentialsType = loJResp.StringOf("project.environment.imagePullCredentialsType")
lnPrivilegedMode = loJResp.IntOf("project.environment.privilegedMode")
lcCredential = loJResp.StringOf("project.environment.registryCredential.credential")
lcCredentialProvider = loJResp.StringOf("project.environment.registryCredential.credentialProvider")
lcEnvironmentType = loJResp.StringOf("project.environment.type")
lnLastModified = loJResp.IntOf("project.lastModified")
lcGroupName = loJResp.StringOf("project.logsConfig.cloudWatchLogs.groupName")
lcStatus = loJResp.StringOf("project.logsConfig.cloudWatchLogs.status")
lcStreamName = loJResp.StringOf("project.logsConfig.cloudWatchLogs.streamName")
lcS3LogsBucketOwnerAccess = loJResp.StringOf("project.logsConfig.s3Logs.bucketOwnerAccess")
lnS3LogsEncryptionDisabled = loJResp.IntOf("project.logsConfig.s3Logs.encryptionDisabled")
lcS3LogsLocation = loJResp.StringOf("project.logsConfig.s3Logs.location")
lcS3LogsStatus = loJResp.StringOf("project.logsConfig.s3Logs.status")
lcProjectName = loJResp.StringOf("project.name")
lcProjectVisibility = loJResp.StringOf("project.projectVisibility")
lcPublicProjectAlias = loJResp.StringOf("project.publicProjectAlias")
lnQueuedTimeoutInMinutes = loJResp.IntOf("project.queuedTimeoutInMinutes")
lcResourceAccessRole = loJResp.StringOf("project.resourceAccessRole")
lcProjectServiceRole = loJResp.StringOf("project.serviceRole")
lcResource = loJResp.StringOf("project.source.auth.resource")
lcAuthType = loJResp.StringOf("project.source.auth.type")
lcBuildspec = loJResp.StringOf("project.source.buildspec")
lcContext = loJResp.StringOf("project.source.buildStatusConfig.context")
lcTargetUrl = loJResp.StringOf("project.source.buildStatusConfig.targetUrl")
lnGitCloneDepth = loJResp.IntOf("project.source.gitCloneDepth")
lnFetchSubmodules = loJResp.IntOf("project.source.gitSubmodulesConfig.fetchSubmodules")
lnInsecureSsl = loJResp.IntOf("project.source.insecureSsl")
lcSourceLocation = loJResp.StringOf("project.source.location")
lnReportBuildStatus = loJResp.IntOf("project.source.reportBuildStatus")
lcSourceIdentifier = loJResp.StringOf("project.source.sourceIdentifier")
lcSourceType = loJResp.StringOf("project.source.type")
lcSourceVersion = loJResp.StringOf("project.sourceVersion")
lnTimeoutInMinutes = loJResp.IntOf("project.timeoutInMinutes")
lcVpcId = loJResp.StringOf("project.vpcConfig.vpcId")
lcBranchFilter = loJResp.StringOf("project.webhook.branchFilter")
lcBuildType = loJResp.StringOf("project.webhook.buildType")
lnLastModifiedSecret = loJResp.IntOf("project.webhook.lastModifiedSecret")
lcPayloadUrl = loJResp.StringOf("project.webhook.payloadUrl")
lcSecret = loJResp.StringOf("project.webhook.secret")
lcV_Url = loJResp.StringOf("project.webhook.url")
i = 0
lnCount_i = loJResp.SizeOfArray("project.buildBatchConfig.restrictions.computeTypesAllowed")
DO WHILE i < lnCount_i
    loJResp.I = i
    lcStrVal = loJResp.StringOf("project.buildBatchConfig.restrictions.computeTypesAllowed[i]")
    i = i + 1
ENDDO
i = 0
lnCount_i = loJResp.SizeOfArray("project.cache.modes")
DO WHILE i < lnCount_i
    loJResp.I = i
    lcStrVal = loJResp.StringOf("project.cache.modes[i]")
    i = i + 1
ENDDO
i = 0
lnCount_i = loJResp.SizeOfArray("project.environment.environmentVariables")
DO WHILE i < lnCount_i
    loJResp.I = i
    lcName = loJResp.StringOf("project.environment.environmentVariables[i].name")
    lcV_type = loJResp.StringOf("project.environment.environmentVariables[i].type")
    lcValue = loJResp.StringOf("project.environment.environmentVariables[i].value")
    i = i + 1
ENDDO
i = 0
lnCount_i = loJResp.SizeOfArray("project.fileSystemLocations")
DO WHILE i < lnCount_i
    loJResp.I = i
    lcIdentifier = loJResp.StringOf("project.fileSystemLocations[i].identifier")
    lcLocation = loJResp.StringOf("project.fileSystemLocations[i].location")
    lcMountOptions = loJResp.StringOf("project.fileSystemLocations[i].mountOptions")
    lcMountPoint = loJResp.StringOf("project.fileSystemLocations[i].mountPoint")
    lcV_type = loJResp.StringOf("project.fileSystemLocations[i].type")
    i = i + 1
ENDDO
i = 0
lnCount_i = loJResp.SizeOfArray("project.secondaryArtifacts")
DO WHILE i < lnCount_i
    loJResp.I = i
    lcArtifactIdentifier = loJResp.StringOf("project.secondaryArtifacts[i].artifactIdentifier")
    lcBucketOwnerAccess = loJResp.StringOf("project.secondaryArtifacts[i].bucketOwnerAccess")
    lnEncryptionDisabled = loJResp.IntOf("project.secondaryArtifacts[i].encryptionDisabled")
    lcLocation = loJResp.StringOf("project.secondaryArtifacts[i].location")
    lcName = loJResp.StringOf("project.secondaryArtifacts[i].name")
    lcNamespaceType = loJResp.StringOf("project.secondaryArtifacts[i].namespaceType")
    lnOverrideArtifactName = loJResp.IntOf("project.secondaryArtifacts[i].overrideArtifactName")
    lcPackaging = loJResp.StringOf("project.secondaryArtifacts[i].packaging")
    lcPath = loJResp.StringOf("project.secondaryArtifacts[i].path")
    lcV_type = loJResp.StringOf("project.secondaryArtifacts[i].type")
    i = i + 1
ENDDO
i = 0
lnCount_i = loJResp.SizeOfArray("project.secondarySources")
DO WHILE i < lnCount_i
    loJResp.I = i
    lcAuthResource = loJResp.StringOf("project.secondarySources[i].auth.resource")
    lcAuthType = loJResp.StringOf("project.secondarySources[i].auth.type")
    lcBuildspec = loJResp.StringOf("project.secondarySources[i].buildspec")
    lcBuildStatusConfigContext = loJResp.StringOf("project.secondarySources[i].buildStatusConfig.context")
    lcBuildStatusConfigTargetUrl = loJResp.StringOf("project.secondarySources[i].buildStatusConfig.targetUrl")
    lnGitCloneDepth = loJResp.IntOf("project.secondarySources[i].gitCloneDepth")
    lnGitSubmodulesConfigFetchSubmodules = loJResp.IntOf("project.secondarySources[i].gitSubmodulesConfig.fetchSubmodules")
    lnInsecureSsl = loJResp.IntOf("project.secondarySources[i].insecureSsl")
    lcLocation = loJResp.StringOf("project.secondarySources[i].location")
    lnReportBuildStatus = loJResp.IntOf("project.secondarySources[i].reportBuildStatus")
    lcSourceIdentifier = loJResp.StringOf("project.secondarySources[i].sourceIdentifier")
    lcV_type = loJResp.StringOf("project.secondarySources[i].type")
    i = i + 1
ENDDO
i = 0
lnCount_i = loJResp.SizeOfArray("project.secondarySourceVersions")
DO WHILE i < lnCount_i
    loJResp.I = i
    lcSourceIdentifier = loJResp.StringOf("project.secondarySourceVersions[i].sourceIdentifier")
    lcSourceVersion = loJResp.StringOf("project.secondarySourceVersions[i].sourceVersion")
    i = i + 1
ENDDO
i = 0
lnCount_i = loJResp.SizeOfArray("project.tags")
DO WHILE i < lnCount_i
    loJResp.I = i
    lcKey = loJResp.StringOf("project.tags[i].key")
    lcValue = loJResp.StringOf("project.tags[i].value")
    i = i + 1
ENDDO
i = 0
lnCount_i = loJResp.SizeOfArray("project.vpcConfig.securityGroupIds")
DO WHILE i < lnCount_i
    loJResp.I = i
    lcStrVal = loJResp.StringOf("project.vpcConfig.securityGroupIds[i]")
    i = i + 1
ENDDO
i = 0
lnCount_i = loJResp.SizeOfArray("project.vpcConfig.subnets")
DO WHILE i < lnCount_i
    loJResp.I = i
    lcStrVal = loJResp.StringOf("project.vpcConfig.subnets[i]")
    i = i + 1
ENDDO
i = 0
lnCount_i = loJResp.SizeOfArray("project.webhook.filterGroups")
DO WHILE i < lnCount_i
    loJResp.I = i
    j = 0
    lnCount_j = loJResp.SizeOfArray("project.webhook.filterGroups[i]")
    DO WHILE j < lnCount_j
        loJResp.J = j
        lnExcludeMatchedPattern = loJResp.IntOf("project.webhook.filterGroups[i][j].excludeMatchedPattern")
        lcPattern = loJResp.StringOf("project.webhook.filterGroups[i][j].pattern")
        lcV_type = loJResp.StringOf("project.webhook.filterGroups[i][j].type")
        j = j + 1
    ENDDO
    i = i + 1
ENDDO

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

RELEASE loRest
RELEASE loAuthAws
RELEASE loJson
RELEASE loSbRequestBody
RELEASE loSbResponseBody
RELEASE loJResp