Chilkat Online Tools

UpdateProject Swift Example

AWS CodeBuild

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

    let rest = CkoRest()
    var success: Bool

    let authAws = CkoAuthAws()
    authAws.AccessKey = "AWS_ACCESS_KEY"
    authAws.SecretKey = "AWS_SECRET_KEY"

    // Don't forget to change the region to your particular region. (Also make the same change in the call to Connect below.)
    authAws.Region = "us-west-2"
    authAws.ServiceName = "codebuild"
    // SetAuthAws causes Chilkat to automatically add the following headers: Authorization, X-Amz-Date
    rest.SetAuthAws(authAws)

    // URL: https://codebuild.us-west-2.amazonaws.com/
    // Use the same region as specified above.
    success = rest.Connect("codebuild.us-west-2.amazonaws.com", port: 443, tls: true, autoReconnect: true)
    if success != true {
        print("ConnectFailReason: \(rest.ConnectFailReason.intValue)")
        print("\(rest.LastErrorText)")
        return
    }

    // The following code creates the JSON request body.
    // The JSON created by this code is shown below.

    // Use this online tool to generate code from sample JSON:
    // Generate Code to Create JSON

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

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

    let sbRequestBody = CkoStringBuilder()
    json.EmitSb(sbRequestBody)
    let sbResponseBody = CkoStringBuilder()
    success = rest.FullRequestSb("POST", uriPath: "/", requestBody: sbRequestBody, responseBody: sbResponseBody)
    if success != true {
        print("\(rest.LastErrorText)")
        return
    }

    var respStatusCode: Int = rest.ResponseStatusCode.intValue
    print("response status code = \(respStatusCode)")
    if respStatusCode != 200 {
        print("Response Header:")
        print("\(rest.ResponseHeader)")
        print("Response Body:")
        print("\(sbResponseBody.GetAsString())")
        return
    }

    let jResp = CkoJsonObject()
    jResp.LoadSb(sbResponseBody)

    // The following code parses the JSON response.
    // A sample JSON response is shown below the sample code.

    // Use this online tool to generate parsing code from sample JSON:
    // Generate Parsing Code from JSON

    var strVal: String?
    var name: String?
    var v_type: String?
    var value: String?
    var identifier: String?
    var location: String?
    var mountOptions: String?
    var mountPoint: String?
    var artifactIdentifier: String?
    var bucketOwnerAccess: String?
    var encryptionDisabled: Int
    var namespaceType: String?
    var overrideArtifactName: Int
    var packaging: String?
    var path: String?
    var authResource: String?
    var authType: String?
    var buildspec: String?
    var buildStatusConfigContext: String?
    var buildStatusConfigTargetUrl: String?
    var gitCloneDepth: Int
    var gitSubmodulesConfigFetchSubmodules: Int
    var insecureSsl: Int
    var reportBuildStatus: Int
    var sourceIdentifier: String?
    var sourceVersion: String?
    var key: String?
    var j: Int
    var count_j: Int
    var excludeMatchedPattern: Int
    var pattern: String?

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

    i = 0
    count_i = jResp.SizeOfArray("project.cache.modes").intValue
    while i < count_i {
        jResp.I = i
        strVal = jResp.StringOf("project.cache.modes[i]")
        i = i + 1
    }

    i = 0
    count_i = jResp.SizeOfArray("project.environment.environmentVariables").intValue
    while i < count_i {
        jResp.I = i
        name = jResp.StringOf("project.environment.environmentVariables[i].name")
        v_type = jResp.StringOf("project.environment.environmentVariables[i].type")
        value = jResp.StringOf("project.environment.environmentVariables[i].value")
        i = i + 1
    }

    i = 0
    count_i = jResp.SizeOfArray("project.fileSystemLocations").intValue
    while i < count_i {
        jResp.I = i
        identifier = jResp.StringOf("project.fileSystemLocations[i].identifier")
        location = jResp.StringOf("project.fileSystemLocations[i].location")
        mountOptions = jResp.StringOf("project.fileSystemLocations[i].mountOptions")
        mountPoint = jResp.StringOf("project.fileSystemLocations[i].mountPoint")
        v_type = jResp.StringOf("project.fileSystemLocations[i].type")
        i = i + 1
    }

    i = 0
    count_i = jResp.SizeOfArray("project.secondaryArtifacts").intValue
    while i < count_i {
        jResp.I = i
        artifactIdentifier = jResp.StringOf("project.secondaryArtifacts[i].artifactIdentifier")
        bucketOwnerAccess = jResp.StringOf("project.secondaryArtifacts[i].bucketOwnerAccess")
        encryptionDisabled = jResp.IntOf("project.secondaryArtifacts[i].encryptionDisabled").intValue
        location = jResp.StringOf("project.secondaryArtifacts[i].location")
        name = jResp.StringOf("project.secondaryArtifacts[i].name")
        namespaceType = jResp.StringOf("project.secondaryArtifacts[i].namespaceType")
        overrideArtifactName = jResp.IntOf("project.secondaryArtifacts[i].overrideArtifactName").intValue
        packaging = jResp.StringOf("project.secondaryArtifacts[i].packaging")
        path = jResp.StringOf("project.secondaryArtifacts[i].path")
        v_type = jResp.StringOf("project.secondaryArtifacts[i].type")
        i = i + 1
    }

    i = 0
    count_i = jResp.SizeOfArray("project.secondarySources").intValue
    while i < count_i {
        jResp.I = i
        authResource = jResp.StringOf("project.secondarySources[i].auth.resource")
        authType = jResp.StringOf("project.secondarySources[i].auth.type")
        buildspec = jResp.StringOf("project.secondarySources[i].buildspec")
        buildStatusConfigContext = jResp.StringOf("project.secondarySources[i].buildStatusConfig.context")
        buildStatusConfigTargetUrl = jResp.StringOf("project.secondarySources[i].buildStatusConfig.targetUrl")
        gitCloneDepth = jResp.IntOf("project.secondarySources[i].gitCloneDepth").intValue
        gitSubmodulesConfigFetchSubmodules = jResp.IntOf("project.secondarySources[i].gitSubmodulesConfig.fetchSubmodules").intValue
        insecureSsl = jResp.IntOf("project.secondarySources[i].insecureSsl").intValue
        location = jResp.StringOf("project.secondarySources[i].location")
        reportBuildStatus = jResp.IntOf("project.secondarySources[i].reportBuildStatus").intValue
        sourceIdentifier = jResp.StringOf("project.secondarySources[i].sourceIdentifier")
        v_type = jResp.StringOf("project.secondarySources[i].type")
        i = i + 1
    }

    i = 0
    count_i = jResp.SizeOfArray("project.secondarySourceVersions").intValue
    while i < count_i {
        jResp.I = i
        sourceIdentifier = jResp.StringOf("project.secondarySourceVersions[i].sourceIdentifier")
        sourceVersion = jResp.StringOf("project.secondarySourceVersions[i].sourceVersion")
        i = i + 1
    }

    i = 0
    count_i = jResp.SizeOfArray("project.tags").intValue
    while i < count_i {
        jResp.I = i
        key = jResp.StringOf("project.tags[i].key")
        value = jResp.StringOf("project.tags[i].value")
        i = i + 1
    }

    i = 0
    count_i = jResp.SizeOfArray("project.vpcConfig.securityGroupIds").intValue
    while i < count_i {
        jResp.I = i
        strVal = jResp.StringOf("project.vpcConfig.securityGroupIds[i]")
        i = i + 1
    }

    i = 0
    count_i = jResp.SizeOfArray("project.vpcConfig.subnets").intValue
    while i < count_i {
        jResp.I = i
        strVal = jResp.StringOf("project.vpcConfig.subnets[i]")
        i = i + 1
    }

    i = 0
    count_i = jResp.SizeOfArray("project.webhook.filterGroups").intValue
    while i < count_i {
        jResp.I = i
        j = 0
        count_j = jResp.SizeOfArray("project.webhook.filterGroups[i]").intValue
        while j < count_j {
            jResp.J = j
            excludeMatchedPattern = jResp.IntOf("project.webhook.filterGroups[i][j].excludeMatchedPattern").intValue
            pattern = jResp.StringOf("project.webhook.filterGroups[i][j].pattern")
            v_type = jResp.StringOf("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"
    //     }
    //   }
    // }

}