CreateProject unicodeCpp Example
#include <CkRestW.h>
#include <CkAuthAwsW.h>
#include <CkJsonObjectW.h>
#include <CkStringBuilderW.h>
void ChilkatSample(void)
{
// This example requires the Chilkat API to have been previously unlocked.
// See Global Unlock Sample for sample code.
CkRestW rest;
bool success;
CkAuthAwsW authAws;
authAws.put_AccessKey(L"AWS_ACCESS_KEY");
authAws.put_SecretKey(L"AWS_SECRET_KEY");
// Don't forget to change the region to your particular region. (Also make the same change in the call to Connect below.)
authAws.put_Region(L"us-west-2");
authAws.put_ServiceName(L"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(L"codebuild.us-west-2.amazonaws.com",443,true,true);
if (success != true) {
wprintf(L"ConnectFailReason: %d\n",rest.get_ConnectFailReason());
wprintf(L"%s\n",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
CkJsonObjectW json;
json.UpdateString(L"artifacts.artifactIdentifier",L"string");
json.UpdateString(L"artifacts.bucketOwnerAccess",L"string");
json.UpdateInt(L"artifacts.encryptionDisabled",123);
json.UpdateString(L"artifacts.location",L"string");
json.UpdateString(L"artifacts.name",L"string");
json.UpdateString(L"artifacts.namespaceType",L"string");
json.UpdateInt(L"artifacts.overrideArtifactName",123);
json.UpdateString(L"artifacts.packaging",L"string");
json.UpdateString(L"artifacts.path",L"string");
json.UpdateString(L"artifacts.type",L"string");
json.UpdateInt(L"badgeEnabled",123);
json.UpdateString(L"buildBatchConfig.batchReportMode",L"string");
json.UpdateInt(L"buildBatchConfig.combineArtifacts",123);
json.UpdateString(L"buildBatchConfig.restrictions.computeTypesAllowed[0]",L"string");
json.UpdateInt(L"buildBatchConfig.restrictions.maximumBuildsAllowed",123);
json.UpdateString(L"buildBatchConfig.serviceRole",L"string");
json.UpdateInt(L"buildBatchConfig.timeoutInMins",123);
json.UpdateString(L"cache.location",L"string");
json.UpdateString(L"cache.modes[0]",L"string");
json.UpdateString(L"cache.type",L"string");
json.UpdateInt(L"concurrentBuildLimit",123);
json.UpdateString(L"description",L"string");
json.UpdateString(L"encryptionKey",L"string");
json.UpdateString(L"environment.certificate",L"string");
json.UpdateString(L"environment.computeType",L"string");
json.UpdateString(L"environment.environmentVariables[0].name",L"string");
json.UpdateString(L"environment.environmentVariables[0].type",L"string");
json.UpdateString(L"environment.environmentVariables[0].value",L"string");
json.UpdateString(L"environment.image",L"string");
json.UpdateString(L"environment.imagePullCredentialsType",L"string");
json.UpdateInt(L"environment.privilegedMode",123);
json.UpdateString(L"environment.registryCredential.credential",L"string");
json.UpdateString(L"environment.registryCredential.credentialProvider",L"string");
json.UpdateString(L"environment.type",L"string");
json.UpdateString(L"fileSystemLocations[0].identifier",L"string");
json.UpdateString(L"fileSystemLocations[0].location",L"string");
json.UpdateString(L"fileSystemLocations[0].mountOptions",L"string");
json.UpdateString(L"fileSystemLocations[0].mountPoint",L"string");
json.UpdateString(L"fileSystemLocations[0].type",L"string");
json.UpdateString(L"logsConfig.cloudWatchLogs.groupName",L"string");
json.UpdateString(L"logsConfig.cloudWatchLogs.status",L"string");
json.UpdateString(L"logsConfig.cloudWatchLogs.streamName",L"string");
json.UpdateString(L"logsConfig.s3Logs.bucketOwnerAccess",L"string");
json.UpdateInt(L"logsConfig.s3Logs.encryptionDisabled",123);
json.UpdateString(L"logsConfig.s3Logs.location",L"string");
json.UpdateString(L"logsConfig.s3Logs.status",L"string");
json.UpdateString(L"name",L"string");
json.UpdateInt(L"queuedTimeoutInMinutes",123);
json.UpdateString(L"secondaryArtifacts[0].artifactIdentifier",L"string");
json.UpdateString(L"secondaryArtifacts[0].bucketOwnerAccess",L"string");
json.UpdateInt(L"secondaryArtifacts[0].encryptionDisabled",123);
json.UpdateString(L"secondaryArtifacts[0].location",L"string");
json.UpdateString(L"secondaryArtifacts[0].name",L"string");
json.UpdateString(L"secondaryArtifacts[0].namespaceType",L"string");
json.UpdateInt(L"secondaryArtifacts[0].overrideArtifactName",123);
json.UpdateString(L"secondaryArtifacts[0].packaging",L"string");
json.UpdateString(L"secondaryArtifacts[0].path",L"string");
json.UpdateString(L"secondaryArtifacts[0].type",L"string");
json.UpdateString(L"secondarySources[0].auth.resource",L"string");
json.UpdateString(L"secondarySources[0].auth.type",L"string");
json.UpdateString(L"secondarySources[0].buildspec",L"string");
json.UpdateString(L"secondarySources[0].buildStatusConfig.context",L"string");
json.UpdateString(L"secondarySources[0].buildStatusConfig.targetUrl",L"string");
json.UpdateInt(L"secondarySources[0].gitCloneDepth",123);
json.UpdateInt(L"secondarySources[0].gitSubmodulesConfig.fetchSubmodules",123);
json.UpdateInt(L"secondarySources[0].insecureSsl",123);
json.UpdateString(L"secondarySources[0].location",L"string");
json.UpdateInt(L"secondarySources[0].reportBuildStatus",123);
json.UpdateString(L"secondarySources[0].sourceIdentifier",L"string");
json.UpdateString(L"secondarySources[0].type",L"string");
json.UpdateString(L"secondarySourceVersions[0].sourceIdentifier",L"string");
json.UpdateString(L"secondarySourceVersions[0].sourceVersion",L"string");
json.UpdateString(L"serviceRole",L"string");
json.UpdateString(L"source.auth.resource",L"string");
json.UpdateString(L"source.auth.type",L"string");
json.UpdateString(L"source.buildspec",L"string");
json.UpdateString(L"source.buildStatusConfig.context",L"string");
json.UpdateString(L"source.buildStatusConfig.targetUrl",L"string");
json.UpdateInt(L"source.gitCloneDepth",123);
json.UpdateInt(L"source.gitSubmodulesConfig.fetchSubmodules",123);
json.UpdateInt(L"source.insecureSsl",123);
json.UpdateString(L"source.location",L"string");
json.UpdateInt(L"source.reportBuildStatus",123);
json.UpdateString(L"source.sourceIdentifier",L"string");
json.UpdateString(L"source.type",L"string");
json.UpdateString(L"sourceVersion",L"string");
json.UpdateString(L"tags[0].key",L"string");
json.UpdateString(L"tags[0].value",L"string");
json.UpdateInt(L"timeoutInMinutes",123);
json.UpdateString(L"vpcConfig.securityGroupIds[0]",L"string");
json.UpdateString(L"vpcConfig.subnets[0]",L"string");
json.UpdateString(L"vpcConfig.vpcId",L"string");
// The JSON request body created by the above code:
// {
// "artifacts": {
// "artifactIdentifier": "string",
// "bucketOwnerAccess": "string",
// "encryptionDisabled": boolean,
// "location": "string",
// "name": "string",
// "namespaceType": "string",
// "overrideArtifactName": boolean,
// "packaging": "string",
// "path": "string",
// "type": "string"
// },
// "badgeEnabled": boolean,
// "buildBatchConfig": {
// "batchReportMode": "string",
// "combineArtifacts": boolean,
// "restrictions": {
// "computeTypesAllowed": [
// "string"
// ],
// "maximumBuildsAllowed": number
// },
// "serviceRole": "string",
// "timeoutInMins": number
// },
// "cache": {
// "location": "string",
// "modes": [
// "string"
// ],
// "type": "string"
// },
// "concurrentBuildLimit": number,
// "description": "string",
// "encryptionKey": "string",
// "environment": {
// "certificate": "string",
// "computeType": "string",
// "environmentVariables": [
// {
// "name": "string",
// "type": "string",
// "value": "string"
// }
// ],
// "image": "string",
// "imagePullCredentialsType": "string",
// "privilegedMode": boolean,
// "registryCredential": {
// "credential": "string",
// "credentialProvider": "string"
// },
// "type": "string"
// },
// "fileSystemLocations": [
// {
// "identifier": "string",
// "location": "string",
// "mountOptions": "string",
// "mountPoint": "string",
// "type": "string"
// }
// ],
// "logsConfig": {
// "cloudWatchLogs": {
// "groupName": "string",
// "status": "string",
// "streamName": "string"
// },
// "s3Logs": {
// "bucketOwnerAccess": "string",
// "encryptionDisabled": boolean,
// "location": "string",
// "status": "string"
// }
// },
// "name": "string",
// "queuedTimeoutInMinutes": number,
// "secondaryArtifacts": [
// {
// "artifactIdentifier": "string",
// "bucketOwnerAccess": "string",
// "encryptionDisabled": boolean,
// "location": "string",
// "name": "string",
// "namespaceType": "string",
// "overrideArtifactName": boolean,
// "packaging": "string",
// "path": "string",
// "type": "string"
// }
// ],
// "secondarySources": [
// {
// "auth": {
// "resource": "string",
// "type": "string"
// },
// "buildspec": "string",
// "buildStatusConfig": {
// "context": "string",
// "targetUrl": "string"
// },
// "gitCloneDepth": number,
// "gitSubmodulesConfig": {
// "fetchSubmodules": boolean
// },
// "insecureSsl": boolean,
// "location": "string",
// "reportBuildStatus": boolean,
// "sourceIdentifier": "string",
// "type": "string"
// }
// ],
// "secondarySourceVersions": [
// {
// "sourceIdentifier": "string",
// "sourceVersion": "string"
// }
// ],
// "serviceRole": "string",
// "source": {
// "auth": {
// "resource": "string",
// "type": "string"
// },
// "buildspec": "string",
// "buildStatusConfig": {
// "context": "string",
// "targetUrl": "string"
// },
// "gitCloneDepth": number,
// "gitSubmodulesConfig": {
// "fetchSubmodules": boolean
// },
// "insecureSsl": boolean,
// "location": "string",
// "reportBuildStatus": boolean,
// "sourceIdentifier": "string",
// "type": "string"
// },
// "sourceVersion": "string",
// "tags": [
// {
// "key": "string",
// "value": "string"
// }
// ],
// "timeoutInMinutes": number,
// "vpcConfig": {
// "securityGroupIds": [
// "string"
// ],
// "subnets": [
// "string"
// ],
// "vpcId": "string"
// }
// }
rest.AddHeader(L"Content-Type",L"application/x-amz-json-1.1");
rest.AddHeader(L"X-Amz-Target",L"CodeBuild_20161006.CreateProject");
CkStringBuilderW sbRequestBody;
json.EmitSb(sbRequestBody);
CkStringBuilderW sbResponseBody;
success = rest.FullRequestSb(L"POST",L"/",sbRequestBody,sbResponseBody);
if (success != true) {
wprintf(L"%s\n",rest.lastErrorText());
return;
}
int respStatusCode = rest.get_ResponseStatusCode();
wprintf(L"response status code = %d\n",respStatusCode);
if (respStatusCode != 200) {
wprintf(L"Response Header:\n");
wprintf(L"%s\n",rest.responseHeader());
wprintf(L"Response Body:\n");
wprintf(L"%s\n",sbResponseBody.getAsString());
return;
}
CkJsonObjectW jResp;
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
// Chilkat functions returning "const char *" return a pointer to temporary internal memory owned and managed by Chilkat.
// See this example explaining how this memory should be used: const char * functions.
const wchar_t *strVal = 0;
const wchar_t *name = 0;
const wchar_t *v_type = 0;
const wchar_t *value = 0;
const wchar_t *identifier = 0;
const wchar_t *location = 0;
const wchar_t *mountOptions = 0;
const wchar_t *mountPoint = 0;
const wchar_t *artifactIdentifier = 0;
const wchar_t *bucketOwnerAccess = 0;
int encryptionDisabled;
const wchar_t *namespaceType = 0;
int overrideArtifactName;
const wchar_t *packaging = 0;
const wchar_t *path = 0;
const wchar_t *authResource = 0;
const wchar_t *authType = 0;
const wchar_t *buildspec = 0;
const wchar_t *buildStatusConfigContext = 0;
const wchar_t *buildStatusConfigTargetUrl = 0;
int gitCloneDepth;
int gitSubmodulesConfigFetchSubmodules;
int insecureSsl;
int reportBuildStatus;
const wchar_t *sourceIdentifier = 0;
const wchar_t *sourceVersion = 0;
const wchar_t *key = 0;
int j;
int count_j;
int excludeMatchedPattern;
const wchar_t *pattern = 0;
const wchar_t *Arn = jResp.stringOf(L"project.arn");
const wchar_t *ArtifactIdentifier = jResp.stringOf(L"project.artifacts.artifactIdentifier");
const wchar_t *BucketOwnerAccess = jResp.stringOf(L"project.artifacts.bucketOwnerAccess");
int EncryptionDisabled = jResp.IntOf(L"project.artifacts.encryptionDisabled");
const wchar_t *Location = jResp.stringOf(L"project.artifacts.location");
const wchar_t *Name = jResp.stringOf(L"project.artifacts.name");
const wchar_t *NamespaceType = jResp.stringOf(L"project.artifacts.namespaceType");
int OverrideArtifactName = jResp.IntOf(L"project.artifacts.overrideArtifactName");
const wchar_t *Packaging = jResp.stringOf(L"project.artifacts.packaging");
const wchar_t *Path = jResp.stringOf(L"project.artifacts.path");
const wchar_t *v_Type = jResp.stringOf(L"project.artifacts.type");
int BadgeEnabled = jResp.IntOf(L"project.badge.badgeEnabled");
const wchar_t *BadgeRequestUrl = jResp.stringOf(L"project.badge.badgeRequestUrl");
const wchar_t *BatchReportMode = jResp.stringOf(L"project.buildBatchConfig.batchReportMode");
int CombineArtifacts = jResp.IntOf(L"project.buildBatchConfig.combineArtifacts");
int MaximumBuildsAllowed = jResp.IntOf(L"project.buildBatchConfig.restrictions.maximumBuildsAllowed");
const wchar_t *ServiceRole = jResp.stringOf(L"project.buildBatchConfig.serviceRole");
int TimeoutInMins = jResp.IntOf(L"project.buildBatchConfig.timeoutInMins");
const wchar_t *CacheLocation = jResp.stringOf(L"project.cache.location");
const wchar_t *CacheType = jResp.stringOf(L"project.cache.type");
int ConcurrentBuildLimit = jResp.IntOf(L"project.concurrentBuildLimit");
int Created = jResp.IntOf(L"project.created");
const wchar_t *Description = jResp.stringOf(L"project.description");
const wchar_t *EncryptionKey = jResp.stringOf(L"project.encryptionKey");
const wchar_t *Certificate = jResp.stringOf(L"project.environment.certificate");
const wchar_t *ComputeType = jResp.stringOf(L"project.environment.computeType");
const wchar_t *Image = jResp.stringOf(L"project.environment.image");
const wchar_t *ImagePullCredentialsType = jResp.stringOf(L"project.environment.imagePullCredentialsType");
int PrivilegedMode = jResp.IntOf(L"project.environment.privilegedMode");
const wchar_t *Credential = jResp.stringOf(L"project.environment.registryCredential.credential");
const wchar_t *CredentialProvider = jResp.stringOf(L"project.environment.registryCredential.credentialProvider");
const wchar_t *EnvironmentType = jResp.stringOf(L"project.environment.type");
int LastModified = jResp.IntOf(L"project.lastModified");
const wchar_t *GroupName = jResp.stringOf(L"project.logsConfig.cloudWatchLogs.groupName");
const wchar_t *Status = jResp.stringOf(L"project.logsConfig.cloudWatchLogs.status");
const wchar_t *StreamName = jResp.stringOf(L"project.logsConfig.cloudWatchLogs.streamName");
const wchar_t *S3LogsBucketOwnerAccess = jResp.stringOf(L"project.logsConfig.s3Logs.bucketOwnerAccess");
int S3LogsEncryptionDisabled = jResp.IntOf(L"project.logsConfig.s3Logs.encryptionDisabled");
const wchar_t *S3LogsLocation = jResp.stringOf(L"project.logsConfig.s3Logs.location");
const wchar_t *S3LogsStatus = jResp.stringOf(L"project.logsConfig.s3Logs.status");
const wchar_t *projectName = jResp.stringOf(L"project.name");
const wchar_t *ProjectVisibility = jResp.stringOf(L"project.projectVisibility");
const wchar_t *PublicProjectAlias = jResp.stringOf(L"project.publicProjectAlias");
int QueuedTimeoutInMinutes = jResp.IntOf(L"project.queuedTimeoutInMinutes");
const wchar_t *ResourceAccessRole = jResp.stringOf(L"project.resourceAccessRole");
const wchar_t *projectServiceRole = jResp.stringOf(L"project.serviceRole");
const wchar_t *Resource = jResp.stringOf(L"project.source.auth.resource");
const wchar_t *AuthType = jResp.stringOf(L"project.source.auth.type");
const wchar_t *Buildspec = jResp.stringOf(L"project.source.buildspec");
const wchar_t *Context = jResp.stringOf(L"project.source.buildStatusConfig.context");
const wchar_t *TargetUrl = jResp.stringOf(L"project.source.buildStatusConfig.targetUrl");
int GitCloneDepth = jResp.IntOf(L"project.source.gitCloneDepth");
int FetchSubmodules = jResp.IntOf(L"project.source.gitSubmodulesConfig.fetchSubmodules");
int InsecureSsl = jResp.IntOf(L"project.source.insecureSsl");
const wchar_t *SourceLocation = jResp.stringOf(L"project.source.location");
int ReportBuildStatus = jResp.IntOf(L"project.source.reportBuildStatus");
const wchar_t *SourceIdentifier = jResp.stringOf(L"project.source.sourceIdentifier");
const wchar_t *SourceType = jResp.stringOf(L"project.source.type");
const wchar_t *SourceVersion = jResp.stringOf(L"project.sourceVersion");
int TimeoutInMinutes = jResp.IntOf(L"project.timeoutInMinutes");
const wchar_t *VpcId = jResp.stringOf(L"project.vpcConfig.vpcId");
const wchar_t *BranchFilter = jResp.stringOf(L"project.webhook.branchFilter");
const wchar_t *BuildType = jResp.stringOf(L"project.webhook.buildType");
int LastModifiedSecret = jResp.IntOf(L"project.webhook.lastModifiedSecret");
const wchar_t *PayloadUrl = jResp.stringOf(L"project.webhook.payloadUrl");
const wchar_t *Secret = jResp.stringOf(L"project.webhook.secret");
const wchar_t *v_Url = jResp.stringOf(L"project.webhook.url");
int i = 0;
int count_i = jResp.SizeOfArray(L"project.buildBatchConfig.restrictions.computeTypesAllowed");
while (i < count_i) {
jResp.put_I(i);
strVal = jResp.stringOf(L"project.buildBatchConfig.restrictions.computeTypesAllowed[i]");
i = i + 1;
}
i = 0;
count_i = jResp.SizeOfArray(L"project.cache.modes");
while (i < count_i) {
jResp.put_I(i);
strVal = jResp.stringOf(L"project.cache.modes[i]");
i = i + 1;
}
i = 0;
count_i = jResp.SizeOfArray(L"project.environment.environmentVariables");
while (i < count_i) {
jResp.put_I(i);
name = jResp.stringOf(L"project.environment.environmentVariables[i].name");
v_type = jResp.stringOf(L"project.environment.environmentVariables[i].type");
value = jResp.stringOf(L"project.environment.environmentVariables[i].value");
i = i + 1;
}
i = 0;
count_i = jResp.SizeOfArray(L"project.fileSystemLocations");
while (i < count_i) {
jResp.put_I(i);
identifier = jResp.stringOf(L"project.fileSystemLocations[i].identifier");
location = jResp.stringOf(L"project.fileSystemLocations[i].location");
mountOptions = jResp.stringOf(L"project.fileSystemLocations[i].mountOptions");
mountPoint = jResp.stringOf(L"project.fileSystemLocations[i].mountPoint");
v_type = jResp.stringOf(L"project.fileSystemLocations[i].type");
i = i + 1;
}
i = 0;
count_i = jResp.SizeOfArray(L"project.secondaryArtifacts");
while (i < count_i) {
jResp.put_I(i);
artifactIdentifier = jResp.stringOf(L"project.secondaryArtifacts[i].artifactIdentifier");
bucketOwnerAccess = jResp.stringOf(L"project.secondaryArtifacts[i].bucketOwnerAccess");
encryptionDisabled = jResp.IntOf(L"project.secondaryArtifacts[i].encryptionDisabled");
location = jResp.stringOf(L"project.secondaryArtifacts[i].location");
name = jResp.stringOf(L"project.secondaryArtifacts[i].name");
namespaceType = jResp.stringOf(L"project.secondaryArtifacts[i].namespaceType");
overrideArtifactName = jResp.IntOf(L"project.secondaryArtifacts[i].overrideArtifactName");
packaging = jResp.stringOf(L"project.secondaryArtifacts[i].packaging");
path = jResp.stringOf(L"project.secondaryArtifacts[i].path");
v_type = jResp.stringOf(L"project.secondaryArtifacts[i].type");
i = i + 1;
}
i = 0;
count_i = jResp.SizeOfArray(L"project.secondarySources");
while (i < count_i) {
jResp.put_I(i);
authResource = jResp.stringOf(L"project.secondarySources[i].auth.resource");
authType = jResp.stringOf(L"project.secondarySources[i].auth.type");
buildspec = jResp.stringOf(L"project.secondarySources[i].buildspec");
buildStatusConfigContext = jResp.stringOf(L"project.secondarySources[i].buildStatusConfig.context");
buildStatusConfigTargetUrl = jResp.stringOf(L"project.secondarySources[i].buildStatusConfig.targetUrl");
gitCloneDepth = jResp.IntOf(L"project.secondarySources[i].gitCloneDepth");
gitSubmodulesConfigFetchSubmodules = jResp.IntOf(L"project.secondarySources[i].gitSubmodulesConfig.fetchSubmodules");
insecureSsl = jResp.IntOf(L"project.secondarySources[i].insecureSsl");
location = jResp.stringOf(L"project.secondarySources[i].location");
reportBuildStatus = jResp.IntOf(L"project.secondarySources[i].reportBuildStatus");
sourceIdentifier = jResp.stringOf(L"project.secondarySources[i].sourceIdentifier");
v_type = jResp.stringOf(L"project.secondarySources[i].type");
i = i + 1;
}
i = 0;
count_i = jResp.SizeOfArray(L"project.secondarySourceVersions");
while (i < count_i) {
jResp.put_I(i);
sourceIdentifier = jResp.stringOf(L"project.secondarySourceVersions[i].sourceIdentifier");
sourceVersion = jResp.stringOf(L"project.secondarySourceVersions[i].sourceVersion");
i = i + 1;
}
i = 0;
count_i = jResp.SizeOfArray(L"project.tags");
while (i < count_i) {
jResp.put_I(i);
key = jResp.stringOf(L"project.tags[i].key");
value = jResp.stringOf(L"project.tags[i].value");
i = i + 1;
}
i = 0;
count_i = jResp.SizeOfArray(L"project.vpcConfig.securityGroupIds");
while (i < count_i) {
jResp.put_I(i);
strVal = jResp.stringOf(L"project.vpcConfig.securityGroupIds[i]");
i = i + 1;
}
i = 0;
count_i = jResp.SizeOfArray(L"project.vpcConfig.subnets");
while (i < count_i) {
jResp.put_I(i);
strVal = jResp.stringOf(L"project.vpcConfig.subnets[i]");
i = i + 1;
}
i = 0;
count_i = jResp.SizeOfArray(L"project.webhook.filterGroups");
while (i < count_i) {
jResp.put_I(i);
j = 0;
count_j = jResp.SizeOfArray(L"project.webhook.filterGroups[i]");
while (j < count_j) {
jResp.put_J(j);
excludeMatchedPattern = jResp.IntOf(L"project.webhook.filterGroups[i][j].excludeMatchedPattern");
pattern = jResp.stringOf(L"project.webhook.filterGroups[i][j].pattern");
v_type = jResp.stringOf(L"project.webhook.filterGroups[i][j].type");
j = j + 1;
}
i = i + 1;
}
// A sample JSON response body parsed by the above code:
// {
// "project": {
// "arn": "string",
// "artifacts": {
// "artifactIdentifier": "string",
// "bucketOwnerAccess": "string",
// "encryptionDisabled": boolean,
// "location": "string",
// "name": "string",
// "namespaceType": "string",
// "overrideArtifactName": boolean,
// "packaging": "string",
// "path": "string",
// "type": "string"
// },
// "badge": {
// "badgeEnabled": boolean,
// "badgeRequestUrl": "string"
// },
// "buildBatchConfig": {
// "batchReportMode": "string",
// "combineArtifacts": boolean,
// "restrictions": {
// "computeTypesAllowed": [
// "string"
// ],
// "maximumBuildsAllowed": number
// },
// "serviceRole": "string",
// "timeoutInMins": number
// },
// "cache": {
// "location": "string",
// "modes": [
// "string"
// ],
// "type": "string"
// },
// "concurrentBuildLimit": number,
// "created": number,
// "description": "string",
// "encryptionKey": "string",
// "environment": {
// "certificate": "string",
// "computeType": "string",
// "environmentVariables": [
// {
// "name": "string",
// "type": "string",
// "value": "string"
// }
// ],
// "image": "string",
// "imagePullCredentialsType": "string",
// "privilegedMode": boolean,
// "registryCredential": {
// "credential": "string",
// "credentialProvider": "string"
// },
// "type": "string"
// },
// "fileSystemLocations": [
// {
// "identifier": "string",
// "location": "string",
// "mountOptions": "string",
// "mountPoint": "string",
// "type": "string"
// }
// ],
// "lastModified": number,
// "logsConfig": {
// "cloudWatchLogs": {
// "groupName": "string",
// "status": "string",
// "streamName": "string"
// },
// "s3Logs": {
// "bucketOwnerAccess": "string",
// "encryptionDisabled": boolean,
// "location": "string",
// "status": "string"
// }
// },
// "name": "string",
// "projectVisibility": "string",
// "publicProjectAlias": "string",
// "queuedTimeoutInMinutes": number,
// "resourceAccessRole": "string",
// "secondaryArtifacts": [
// {
// "artifactIdentifier": "string",
// "bucketOwnerAccess": "string",
// "encryptionDisabled": boolean,
// "location": "string",
// "name": "string",
// "namespaceType": "string",
// "overrideArtifactName": boolean,
// "packaging": "string",
// "path": "string",
// "type": "string"
// }
// ],
// "secondarySources": [
// {
// "auth": {
// "resource": "string",
// "type": "string"
// },
// "buildspec": "string",
// "buildStatusConfig": {
// "context": "string",
// "targetUrl": "string"
// },
// "gitCloneDepth": number,
// "gitSubmodulesConfig": {
// "fetchSubmodules": boolean
// },
// "insecureSsl": boolean,
// "location": "string",
// "reportBuildStatus": boolean,
// "sourceIdentifier": "string",
// "type": "string"
// }
// ],
// "secondarySourceVersions": [
// {
// "sourceIdentifier": "string",
// "sourceVersion": "string"
// }
// ],
// "serviceRole": "string",
// "source": {
// "auth": {
// "resource": "string",
// "type": "string"
// },
// "buildspec": "string",
// "buildStatusConfig": {
// "context": "string",
// "targetUrl": "string"
// },
// "gitCloneDepth": number,
// "gitSubmodulesConfig": {
// "fetchSubmodules": boolean
// },
// "insecureSsl": boolean,
// "location": "string",
// "reportBuildStatus": boolean,
// "sourceIdentifier": "string",
// "type": "string"
// },
// "sourceVersion": "string",
// "tags": [
// {
// "key": "string",
// "value": "string"
// }
// ],
// "timeoutInMinutes": number,
// "vpcConfig": {
// "securityGroupIds": [
// "string"
// ],
// "subnets": [
// "string"
// ],
// "vpcId": "string"
// },
// "webhook": {
// "branchFilter": "string",
// "buildType": "string",
// "filterGroups": [
// [
// {
// "excludeMatchedPattern": boolean,
// "pattern": "string",
// "type": "string"
// }
// ]
// ],
// "lastModifiedSecret": number,
// "payloadUrl": "string",
// "secret": "string",
// "url": "string"
// }
// }
// }
}