UpdateProject C Example
#include <C_CkRest.h>
#include <C_CkAuthAws.h>
#include <C_CkJsonObject.h>
#include <C_CkStringBuilder.h>
void ChilkatSample(void)
{
HCkRest rest;
BOOL success;
HCkAuthAws authAws;
HCkJsonObject json;
HCkStringBuilder sbRequestBody;
HCkStringBuilder sbResponseBody;
int respStatusCode;
HCkJsonObject jResp;
const char *strVal;
const char *name;
const char *v_type;
const char *value;
const char *identifier;
const char *location;
const char *mountOptions;
const char *mountPoint;
const char *artifactIdentifier;
const char *bucketOwnerAccess;
int encryptionDisabled;
const char *namespaceType;
int overrideArtifactName;
const char *packaging;
const char *path;
const char *authResource;
const char *authType;
const char *buildspec;
const char *buildStatusConfigContext;
const char *buildStatusConfigTargetUrl;
int gitCloneDepth;
int gitSubmodulesConfigFetchSubmodules;
int insecureSsl;
int reportBuildStatus;
const char *sourceIdentifier;
const char *sourceVersion;
const char *key;
int j;
int count_j;
int excludeMatchedPattern;
const char *pattern;
const char *Arn;
const char *ArtifactIdentifier;
const char *BucketOwnerAccess;
int EncryptionDisabled;
const char *Location;
const char *Name;
const char *NamespaceType;
int OverrideArtifactName;
const char *Packaging;
const char *Path;
const char *v_Type;
int BadgeEnabled;
const char *BadgeRequestUrl;
const char *BatchReportMode;
int CombineArtifacts;
int MaximumBuildsAllowed;
const char *ServiceRole;
int TimeoutInMins;
const char *CacheLocation;
const char *CacheType;
int ConcurrentBuildLimit;
int Created;
const char *Description;
const char *EncryptionKey;
const char *Certificate;
const char *ComputeType;
const char *Image;
const char *ImagePullCredentialsType;
int PrivilegedMode;
const char *Credential;
const char *CredentialProvider;
const char *EnvironmentType;
int LastModified;
const char *GroupName;
const char *Status;
const char *StreamName;
const char *S3LogsBucketOwnerAccess;
int S3LogsEncryptionDisabled;
const char *S3LogsLocation;
const char *S3LogsStatus;
const char *projectName;
const char *ProjectVisibility;
const char *PublicProjectAlias;
int QueuedTimeoutInMinutes;
const char *ResourceAccessRole;
const char *projectServiceRole;
const char *Resource;
const char *AuthType;
const char *Buildspec;
const char *Context;
const char *TargetUrl;
int GitCloneDepth;
int FetchSubmodules;
int InsecureSsl;
const char *SourceLocation;
int ReportBuildStatus;
const char *SourceIdentifier;
const char *SourceType;
const char *SourceVersion;
int TimeoutInMinutes;
const char *VpcId;
const char *BranchFilter;
const char *BuildType;
int LastModifiedSecret;
const char *PayloadUrl;
const char *Secret;
const char *v_Url;
int i;
int count_i;
// This example requires the Chilkat API to have been previously unlocked.
// See Global Unlock Sample for sample code.
rest = CkRest_Create();
authAws = CkAuthAws_Create();
CkAuthAws_putAccessKey(authAws,"AWS_ACCESS_KEY");
CkAuthAws_putSecretKey(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_putRegion(authAws,"us-west-2");
CkAuthAws_putServiceName(authAws,"codebuild");
// SetAuthAws causes Chilkat to automatically add the following headers: Authorization, X-Amz-Date
CkRest_SetAuthAws(rest,authAws);
// URL: https://codebuild.us-west-2.amazonaws.com/
// Use the same region as specified above.
success = CkRest_Connect(rest,"codebuild.us-west-2.amazonaws.com",443,TRUE,TRUE);
if (success != TRUE) {
printf("ConnectFailReason: %d\n",CkRest_getConnectFailReason(rest));
printf("%s\n",CkRest_lastErrorText(rest));
CkRest_Dispose(rest);
CkAuthAws_Dispose(authAws);
return;
}
// The following code creates the JSON request body.
// The JSON created by this code is shown below.
// Use this online tool to generate code from sample JSON:
// Generate Code to Create JSON
json = CkJsonObject_Create();
CkJsonObject_UpdateString(json,"artifacts.artifactIdentifier","string");
CkJsonObject_UpdateString(json,"artifacts.bucketOwnerAccess","string");
CkJsonObject_UpdateInt(json,"artifacts.encryptionDisabled",123);
CkJsonObject_UpdateString(json,"artifacts.location","string");
CkJsonObject_UpdateString(json,"artifacts.name","string");
CkJsonObject_UpdateString(json,"artifacts.namespaceType","string");
CkJsonObject_UpdateInt(json,"artifacts.overrideArtifactName",123);
CkJsonObject_UpdateString(json,"artifacts.packaging","string");
CkJsonObject_UpdateString(json,"artifacts.path","string");
CkJsonObject_UpdateString(json,"artifacts.type","string");
CkJsonObject_UpdateInt(json,"badgeEnabled",123);
CkJsonObject_UpdateString(json,"buildBatchConfig.batchReportMode","string");
CkJsonObject_UpdateInt(json,"buildBatchConfig.combineArtifacts",123);
CkJsonObject_UpdateString(json,"buildBatchConfig.restrictions.computeTypesAllowed[0]","string");
CkJsonObject_UpdateInt(json,"buildBatchConfig.restrictions.maximumBuildsAllowed",123);
CkJsonObject_UpdateString(json,"buildBatchConfig.serviceRole","string");
CkJsonObject_UpdateInt(json,"buildBatchConfig.timeoutInMins",123);
CkJsonObject_UpdateString(json,"cache.location","string");
CkJsonObject_UpdateString(json,"cache.modes[0]","string");
CkJsonObject_UpdateString(json,"cache.type","string");
CkJsonObject_UpdateInt(json,"concurrentBuildLimit",123);
CkJsonObject_UpdateString(json,"description","string");
CkJsonObject_UpdateString(json,"encryptionKey","string");
CkJsonObject_UpdateString(json,"environment.certificate","string");
CkJsonObject_UpdateString(json,"environment.computeType","string");
CkJsonObject_UpdateString(json,"environment.environmentVariables[0].name","string");
CkJsonObject_UpdateString(json,"environment.environmentVariables[0].type","string");
CkJsonObject_UpdateString(json,"environment.environmentVariables[0].value","string");
CkJsonObject_UpdateString(json,"environment.image","string");
CkJsonObject_UpdateString(json,"environment.imagePullCredentialsType","string");
CkJsonObject_UpdateInt(json,"environment.privilegedMode",123);
CkJsonObject_UpdateString(json,"environment.registryCredential.credential","string");
CkJsonObject_UpdateString(json,"environment.registryCredential.credentialProvider","string");
CkJsonObject_UpdateString(json,"environment.type","string");
CkJsonObject_UpdateString(json,"fileSystemLocations[0].identifier","string");
CkJsonObject_UpdateString(json,"fileSystemLocations[0].location","string");
CkJsonObject_UpdateString(json,"fileSystemLocations[0].mountOptions","string");
CkJsonObject_UpdateString(json,"fileSystemLocations[0].mountPoint","string");
CkJsonObject_UpdateString(json,"fileSystemLocations[0].type","string");
CkJsonObject_UpdateString(json,"logsConfig.cloudWatchLogs.groupName","string");
CkJsonObject_UpdateString(json,"logsConfig.cloudWatchLogs.status","string");
CkJsonObject_UpdateString(json,"logsConfig.cloudWatchLogs.streamName","string");
CkJsonObject_UpdateString(json,"logsConfig.s3Logs.bucketOwnerAccess","string");
CkJsonObject_UpdateInt(json,"logsConfig.s3Logs.encryptionDisabled",123);
CkJsonObject_UpdateString(json,"logsConfig.s3Logs.location","string");
CkJsonObject_UpdateString(json,"logsConfig.s3Logs.status","string");
CkJsonObject_UpdateString(json,"name","string");
CkJsonObject_UpdateInt(json,"queuedTimeoutInMinutes",123);
CkJsonObject_UpdateString(json,"secondaryArtifacts[0].artifactIdentifier","string");
CkJsonObject_UpdateString(json,"secondaryArtifacts[0].bucketOwnerAccess","string");
CkJsonObject_UpdateInt(json,"secondaryArtifacts[0].encryptionDisabled",123);
CkJsonObject_UpdateString(json,"secondaryArtifacts[0].location","string");
CkJsonObject_UpdateString(json,"secondaryArtifacts[0].name","string");
CkJsonObject_UpdateString(json,"secondaryArtifacts[0].namespaceType","string");
CkJsonObject_UpdateInt(json,"secondaryArtifacts[0].overrideArtifactName",123);
CkJsonObject_UpdateString(json,"secondaryArtifacts[0].packaging","string");
CkJsonObject_UpdateString(json,"secondaryArtifacts[0].path","string");
CkJsonObject_UpdateString(json,"secondaryArtifacts[0].type","string");
CkJsonObject_UpdateString(json,"secondarySources[0].auth.resource","string");
CkJsonObject_UpdateString(json,"secondarySources[0].auth.type","string");
CkJsonObject_UpdateString(json,"secondarySources[0].buildspec","string");
CkJsonObject_UpdateString(json,"secondarySources[0].buildStatusConfig.context","string");
CkJsonObject_UpdateString(json,"secondarySources[0].buildStatusConfig.targetUrl","string");
CkJsonObject_UpdateInt(json,"secondarySources[0].gitCloneDepth",123);
CkJsonObject_UpdateInt(json,"secondarySources[0].gitSubmodulesConfig.fetchSubmodules",123);
CkJsonObject_UpdateInt(json,"secondarySources[0].insecureSsl",123);
CkJsonObject_UpdateString(json,"secondarySources[0].location","string");
CkJsonObject_UpdateInt(json,"secondarySources[0].reportBuildStatus",123);
CkJsonObject_UpdateString(json,"secondarySources[0].sourceIdentifier","string");
CkJsonObject_UpdateString(json,"secondarySources[0].type","string");
CkJsonObject_UpdateString(json,"secondarySourceVersions[0].sourceIdentifier","string");
CkJsonObject_UpdateString(json,"secondarySourceVersions[0].sourceVersion","string");
CkJsonObject_UpdateString(json,"serviceRole","string");
CkJsonObject_UpdateString(json,"source.auth.resource","string");
CkJsonObject_UpdateString(json,"source.auth.type","string");
CkJsonObject_UpdateString(json,"source.buildspec","string");
CkJsonObject_UpdateString(json,"source.buildStatusConfig.context","string");
CkJsonObject_UpdateString(json,"source.buildStatusConfig.targetUrl","string");
CkJsonObject_UpdateInt(json,"source.gitCloneDepth",123);
CkJsonObject_UpdateInt(json,"source.gitSubmodulesConfig.fetchSubmodules",123);
CkJsonObject_UpdateInt(json,"source.insecureSsl",123);
CkJsonObject_UpdateString(json,"source.location","string");
CkJsonObject_UpdateInt(json,"source.reportBuildStatus",123);
CkJsonObject_UpdateString(json,"source.sourceIdentifier","string");
CkJsonObject_UpdateString(json,"source.type","string");
CkJsonObject_UpdateString(json,"sourceVersion","string");
CkJsonObject_UpdateString(json,"tags[0].key","string");
CkJsonObject_UpdateString(json,"tags[0].value","string");
CkJsonObject_UpdateInt(json,"timeoutInMinutes",123);
CkJsonObject_UpdateString(json,"vpcConfig.securityGroupIds[0]","string");
CkJsonObject_UpdateString(json,"vpcConfig.subnets[0]","string");
CkJsonObject_UpdateString(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_AddHeader(rest,"Content-Type","application/x-amz-json-1.1");
CkRest_AddHeader(rest,"X-Amz-Target","CodeBuild_20161006.UpdateProject");
sbRequestBody = CkStringBuilder_Create();
CkJsonObject_EmitSb(json,sbRequestBody);
sbResponseBody = CkStringBuilder_Create();
success = CkRest_FullRequestSb(rest,"POST","/",sbRequestBody,sbResponseBody);
if (success != TRUE) {
printf("%s\n",CkRest_lastErrorText(rest));
CkRest_Dispose(rest);
CkAuthAws_Dispose(authAws);
CkJsonObject_Dispose(json);
CkStringBuilder_Dispose(sbRequestBody);
CkStringBuilder_Dispose(sbResponseBody);
return;
}
respStatusCode = CkRest_getResponseStatusCode(rest);
printf("response status code = %d\n",respStatusCode);
if (respStatusCode != 200) {
printf("Response Header:\n");
printf("%s\n",CkRest_responseHeader(rest));
printf("Response Body:\n");
printf("%s\n",CkStringBuilder_getAsString(sbResponseBody));
CkRest_Dispose(rest);
CkAuthAws_Dispose(authAws);
CkJsonObject_Dispose(json);
CkStringBuilder_Dispose(sbRequestBody);
CkStringBuilder_Dispose(sbResponseBody);
return;
}
jResp = CkJsonObject_Create();
CkJsonObject_LoadSb(jResp,sbResponseBody);
// The following code parses the JSON response.
// A sample JSON response is shown below the sample code.
// Use this online tool to generate parsing code from sample JSON:
// Generate Parsing Code from JSON
// Chilkat functions returning "const char *" return a pointer to temporary internal memory owned and managed by Chilkat.
// See this example explaining how this memory should be used: const char * functions.
Arn = CkJsonObject_stringOf(jResp,"project.arn");
ArtifactIdentifier = CkJsonObject_stringOf(jResp,"project.artifacts.artifactIdentifier");
BucketOwnerAccess = CkJsonObject_stringOf(jResp,"project.artifacts.bucketOwnerAccess");
EncryptionDisabled = CkJsonObject_IntOf(jResp,"project.artifacts.encryptionDisabled");
Location = CkJsonObject_stringOf(jResp,"project.artifacts.location");
Name = CkJsonObject_stringOf(jResp,"project.artifacts.name");
NamespaceType = CkJsonObject_stringOf(jResp,"project.artifacts.namespaceType");
OverrideArtifactName = CkJsonObject_IntOf(jResp,"project.artifacts.overrideArtifactName");
Packaging = CkJsonObject_stringOf(jResp,"project.artifacts.packaging");
Path = CkJsonObject_stringOf(jResp,"project.artifacts.path");
v_Type = CkJsonObject_stringOf(jResp,"project.artifacts.type");
BadgeEnabled = CkJsonObject_IntOf(jResp,"project.badge.badgeEnabled");
BadgeRequestUrl = CkJsonObject_stringOf(jResp,"project.badge.badgeRequestUrl");
BatchReportMode = CkJsonObject_stringOf(jResp,"project.buildBatchConfig.batchReportMode");
CombineArtifacts = CkJsonObject_IntOf(jResp,"project.buildBatchConfig.combineArtifacts");
MaximumBuildsAllowed = CkJsonObject_IntOf(jResp,"project.buildBatchConfig.restrictions.maximumBuildsAllowed");
ServiceRole = CkJsonObject_stringOf(jResp,"project.buildBatchConfig.serviceRole");
TimeoutInMins = CkJsonObject_IntOf(jResp,"project.buildBatchConfig.timeoutInMins");
CacheLocation = CkJsonObject_stringOf(jResp,"project.cache.location");
CacheType = CkJsonObject_stringOf(jResp,"project.cache.type");
ConcurrentBuildLimit = CkJsonObject_IntOf(jResp,"project.concurrentBuildLimit");
Created = CkJsonObject_IntOf(jResp,"project.created");
Description = CkJsonObject_stringOf(jResp,"project.description");
EncryptionKey = CkJsonObject_stringOf(jResp,"project.encryptionKey");
Certificate = CkJsonObject_stringOf(jResp,"project.environment.certificate");
ComputeType = CkJsonObject_stringOf(jResp,"project.environment.computeType");
Image = CkJsonObject_stringOf(jResp,"project.environment.image");
ImagePullCredentialsType = CkJsonObject_stringOf(jResp,"project.environment.imagePullCredentialsType");
PrivilegedMode = CkJsonObject_IntOf(jResp,"project.environment.privilegedMode");
Credential = CkJsonObject_stringOf(jResp,"project.environment.registryCredential.credential");
CredentialProvider = CkJsonObject_stringOf(jResp,"project.environment.registryCredential.credentialProvider");
EnvironmentType = CkJsonObject_stringOf(jResp,"project.environment.type");
LastModified = CkJsonObject_IntOf(jResp,"project.lastModified");
GroupName = CkJsonObject_stringOf(jResp,"project.logsConfig.cloudWatchLogs.groupName");
Status = CkJsonObject_stringOf(jResp,"project.logsConfig.cloudWatchLogs.status");
StreamName = CkJsonObject_stringOf(jResp,"project.logsConfig.cloudWatchLogs.streamName");
S3LogsBucketOwnerAccess = CkJsonObject_stringOf(jResp,"project.logsConfig.s3Logs.bucketOwnerAccess");
S3LogsEncryptionDisabled = CkJsonObject_IntOf(jResp,"project.logsConfig.s3Logs.encryptionDisabled");
S3LogsLocation = CkJsonObject_stringOf(jResp,"project.logsConfig.s3Logs.location");
S3LogsStatus = CkJsonObject_stringOf(jResp,"project.logsConfig.s3Logs.status");
projectName = CkJsonObject_stringOf(jResp,"project.name");
ProjectVisibility = CkJsonObject_stringOf(jResp,"project.projectVisibility");
PublicProjectAlias = CkJsonObject_stringOf(jResp,"project.publicProjectAlias");
QueuedTimeoutInMinutes = CkJsonObject_IntOf(jResp,"project.queuedTimeoutInMinutes");
ResourceAccessRole = CkJsonObject_stringOf(jResp,"project.resourceAccessRole");
projectServiceRole = CkJsonObject_stringOf(jResp,"project.serviceRole");
Resource = CkJsonObject_stringOf(jResp,"project.source.auth.resource");
AuthType = CkJsonObject_stringOf(jResp,"project.source.auth.type");
Buildspec = CkJsonObject_stringOf(jResp,"project.source.buildspec");
Context = CkJsonObject_stringOf(jResp,"project.source.buildStatusConfig.context");
TargetUrl = CkJsonObject_stringOf(jResp,"project.source.buildStatusConfig.targetUrl");
GitCloneDepth = CkJsonObject_IntOf(jResp,"project.source.gitCloneDepth");
FetchSubmodules = CkJsonObject_IntOf(jResp,"project.source.gitSubmodulesConfig.fetchSubmodules");
InsecureSsl = CkJsonObject_IntOf(jResp,"project.source.insecureSsl");
SourceLocation = CkJsonObject_stringOf(jResp,"project.source.location");
ReportBuildStatus = CkJsonObject_IntOf(jResp,"project.source.reportBuildStatus");
SourceIdentifier = CkJsonObject_stringOf(jResp,"project.source.sourceIdentifier");
SourceType = CkJsonObject_stringOf(jResp,"project.source.type");
SourceVersion = CkJsonObject_stringOf(jResp,"project.sourceVersion");
TimeoutInMinutes = CkJsonObject_IntOf(jResp,"project.timeoutInMinutes");
VpcId = CkJsonObject_stringOf(jResp,"project.vpcConfig.vpcId");
BranchFilter = CkJsonObject_stringOf(jResp,"project.webhook.branchFilter");
BuildType = CkJsonObject_stringOf(jResp,"project.webhook.buildType");
LastModifiedSecret = CkJsonObject_IntOf(jResp,"project.webhook.lastModifiedSecret");
PayloadUrl = CkJsonObject_stringOf(jResp,"project.webhook.payloadUrl");
Secret = CkJsonObject_stringOf(jResp,"project.webhook.secret");
v_Url = CkJsonObject_stringOf(jResp,"project.webhook.url");
i = 0;
count_i = CkJsonObject_SizeOfArray(jResp,"project.buildBatchConfig.restrictions.computeTypesAllowed");
while (i < count_i) {
CkJsonObject_putI(jResp,i);
strVal = CkJsonObject_stringOf(jResp,"project.buildBatchConfig.restrictions.computeTypesAllowed[i]");
i = i + 1;
}
i = 0;
count_i = CkJsonObject_SizeOfArray(jResp,"project.cache.modes");
while (i < count_i) {
CkJsonObject_putI(jResp,i);
strVal = CkJsonObject_stringOf(jResp,"project.cache.modes[i]");
i = i + 1;
}
i = 0;
count_i = CkJsonObject_SizeOfArray(jResp,"project.environment.environmentVariables");
while (i < count_i) {
CkJsonObject_putI(jResp,i);
name = CkJsonObject_stringOf(jResp,"project.environment.environmentVariables[i].name");
v_type = CkJsonObject_stringOf(jResp,"project.environment.environmentVariables[i].type");
value = CkJsonObject_stringOf(jResp,"project.environment.environmentVariables[i].value");
i = i + 1;
}
i = 0;
count_i = CkJsonObject_SizeOfArray(jResp,"project.fileSystemLocations");
while (i < count_i) {
CkJsonObject_putI(jResp,i);
identifier = CkJsonObject_stringOf(jResp,"project.fileSystemLocations[i].identifier");
location = CkJsonObject_stringOf(jResp,"project.fileSystemLocations[i].location");
mountOptions = CkJsonObject_stringOf(jResp,"project.fileSystemLocations[i].mountOptions");
mountPoint = CkJsonObject_stringOf(jResp,"project.fileSystemLocations[i].mountPoint");
v_type = CkJsonObject_stringOf(jResp,"project.fileSystemLocations[i].type");
i = i + 1;
}
i = 0;
count_i = CkJsonObject_SizeOfArray(jResp,"project.secondaryArtifacts");
while (i < count_i) {
CkJsonObject_putI(jResp,i);
artifactIdentifier = CkJsonObject_stringOf(jResp,"project.secondaryArtifacts[i].artifactIdentifier");
bucketOwnerAccess = CkJsonObject_stringOf(jResp,"project.secondaryArtifacts[i].bucketOwnerAccess");
encryptionDisabled = CkJsonObject_IntOf(jResp,"project.secondaryArtifacts[i].encryptionDisabled");
location = CkJsonObject_stringOf(jResp,"project.secondaryArtifacts[i].location");
name = CkJsonObject_stringOf(jResp,"project.secondaryArtifacts[i].name");
namespaceType = CkJsonObject_stringOf(jResp,"project.secondaryArtifacts[i].namespaceType");
overrideArtifactName = CkJsonObject_IntOf(jResp,"project.secondaryArtifacts[i].overrideArtifactName");
packaging = CkJsonObject_stringOf(jResp,"project.secondaryArtifacts[i].packaging");
path = CkJsonObject_stringOf(jResp,"project.secondaryArtifacts[i].path");
v_type = CkJsonObject_stringOf(jResp,"project.secondaryArtifacts[i].type");
i = i + 1;
}
i = 0;
count_i = CkJsonObject_SizeOfArray(jResp,"project.secondarySources");
while (i < count_i) {
CkJsonObject_putI(jResp,i);
authResource = CkJsonObject_stringOf(jResp,"project.secondarySources[i].auth.resource");
authType = CkJsonObject_stringOf(jResp,"project.secondarySources[i].auth.type");
buildspec = CkJsonObject_stringOf(jResp,"project.secondarySources[i].buildspec");
buildStatusConfigContext = CkJsonObject_stringOf(jResp,"project.secondarySources[i].buildStatusConfig.context");
buildStatusConfigTargetUrl = CkJsonObject_stringOf(jResp,"project.secondarySources[i].buildStatusConfig.targetUrl");
gitCloneDepth = CkJsonObject_IntOf(jResp,"project.secondarySources[i].gitCloneDepth");
gitSubmodulesConfigFetchSubmodules = CkJsonObject_IntOf(jResp,"project.secondarySources[i].gitSubmodulesConfig.fetchSubmodules");
insecureSsl = CkJsonObject_IntOf(jResp,"project.secondarySources[i].insecureSsl");
location = CkJsonObject_stringOf(jResp,"project.secondarySources[i].location");
reportBuildStatus = CkJsonObject_IntOf(jResp,"project.secondarySources[i].reportBuildStatus");
sourceIdentifier = CkJsonObject_stringOf(jResp,"project.secondarySources[i].sourceIdentifier");
v_type = CkJsonObject_stringOf(jResp,"project.secondarySources[i].type");
i = i + 1;
}
i = 0;
count_i = CkJsonObject_SizeOfArray(jResp,"project.secondarySourceVersions");
while (i < count_i) {
CkJsonObject_putI(jResp,i);
sourceIdentifier = CkJsonObject_stringOf(jResp,"project.secondarySourceVersions[i].sourceIdentifier");
sourceVersion = CkJsonObject_stringOf(jResp,"project.secondarySourceVersions[i].sourceVersion");
i = i + 1;
}
i = 0;
count_i = CkJsonObject_SizeOfArray(jResp,"project.tags");
while (i < count_i) {
CkJsonObject_putI(jResp,i);
key = CkJsonObject_stringOf(jResp,"project.tags[i].key");
value = CkJsonObject_stringOf(jResp,"project.tags[i].value");
i = i + 1;
}
i = 0;
count_i = CkJsonObject_SizeOfArray(jResp,"project.vpcConfig.securityGroupIds");
while (i < count_i) {
CkJsonObject_putI(jResp,i);
strVal = CkJsonObject_stringOf(jResp,"project.vpcConfig.securityGroupIds[i]");
i = i + 1;
}
i = 0;
count_i = CkJsonObject_SizeOfArray(jResp,"project.vpcConfig.subnets");
while (i < count_i) {
CkJsonObject_putI(jResp,i);
strVal = CkJsonObject_stringOf(jResp,"project.vpcConfig.subnets[i]");
i = i + 1;
}
i = 0;
count_i = CkJsonObject_SizeOfArray(jResp,"project.webhook.filterGroups");
while (i < count_i) {
CkJsonObject_putI(jResp,i);
j = 0;
count_j = CkJsonObject_SizeOfArray(jResp,"project.webhook.filterGroups[i]");
while (j < count_j) {
CkJsonObject_putJ(jResp,j);
excludeMatchedPattern = CkJsonObject_IntOf(jResp,"project.webhook.filterGroups[i][j].excludeMatchedPattern");
pattern = CkJsonObject_stringOf(jResp,"project.webhook.filterGroups[i][j].pattern");
v_type = CkJsonObject_stringOf(jResp,"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"
// }
// }
// }
CkRest_Dispose(rest);
CkAuthAws_Dispose(authAws);
CkJsonObject_Dispose(json);
CkStringBuilder_Dispose(sbRequestBody);
CkStringBuilder_Dispose(sbResponseBody);
CkJsonObject_Dispose(jResp);
}