BatchRead delphiAx Example
var
rest: TChilkatRest;
success: Integer;
authAws: TChilkatAuthAws;
json: TChilkatJsonObject;
sbRequestBody: TChilkatStringBuilder;
sbResponseBody: TChilkatStringBuilder;
respStatusCode: Integer;
jResp: TChilkatJsonObject;
Message: WideString;
v_Type: WideString;
ObjectIdentifier: WideString;
NextToken: WideString;
ListIncomingTypedLinksNextToken: WideString;
ListIndexNextToken: WideString;
ListObjectAttributesNextToken: WideString;
v_String: WideString;
ListObjectChildrenNextToken: WideString;
ListObjectParentPathsNextToken: WideString;
ListObjectParentsNextToken: WideString;
ListObjectPoliciesNextToken: WideString;
ListOutgoingTypedLinksNextToken: WideString;
ListPolicyAttachmentsNextToken: WideString;
LookupPolicyNextToken: WideString;
j: Integer;
count_j: Integer;
FacetName: WideString;
Name: WideString;
SchemaArn: WideString;
BinaryValue: Integer;
BooleanValue: Integer;
DatetimeValue: Integer;
NumberValue: WideString;
StringValue: WideString;
KeyFacetName: WideString;
KeyName: WideString;
KeySchemaArn: WideString;
ValueBinaryValue: Integer;
ValueBooleanValue: Integer;
ValueDatetimeValue: Integer;
ValueNumberValue: WideString;
ValueStringValue: WideString;
k: Integer;
count_k: Integer;
Selector: WideString;
TargetObjectReferenceSelector: WideString;
TypedLinkFacetSchemaArn: WideString;
TypedLinkName: WideString;
AttributeName: WideString;
Path: WideString;
strVal: WideString;
LinkName: WideString;
SourceObjectReferenceSelector: WideString;
TypedLinkFacetTypedLinkName: WideString;
PolicyId: WideString;
PolicyType: WideString;
i: Integer;
count_i: Integer;
begin
// This example requires the Chilkat API to have been previously unlocked.
// See Global Unlock Sample for sample code.
rest := TChilkatRest.Create(Self);
authAws := TChilkatAuthAws.Create(Self);
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 := 'clouddirectory';
// SetAuthAws causes Chilkat to automatically add the following headers: Authorization, X-Amz-Date
rest.SetAuthAws(authAws.ControlInterface);
// URL: https://clouddirectory.us-west-2.amazonaws.com/
// Use the same region as specified above.
success := rest.Connect('clouddirectory.us-west-2.amazonaws.com',443,1,1);
if (success <> 1) then
begin
Memo1.Lines.Add('ConnectFailReason: ' + IntToStr(rest.ConnectFailReason));
Memo1.Lines.Add(rest.LastErrorText);
Exit;
end;
// 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 := TChilkatJsonObject.Create(Self);
json.UpdateString('Operations[0].GetLinkAttributes.AttributeNames[0]','string');
json.UpdateString('Operations[0].GetLinkAttributes.TypedLinkSpecifier.IdentityAttributeValues[0].AttributeName','string');
json.UpdateInt('Operations[0].GetLinkAttributes.TypedLinkSpecifier.IdentityAttributeValues[0].Value.BinaryValue',123);
json.UpdateInt('Operations[0].GetLinkAttributes.TypedLinkSpecifier.IdentityAttributeValues[0].Value.BooleanValue',123);
json.UpdateInt('Operations[0].GetLinkAttributes.TypedLinkSpecifier.IdentityAttributeValues[0].Value.DatetimeValue',123);
json.UpdateString('Operations[0].GetLinkAttributes.TypedLinkSpecifier.IdentityAttributeValues[0].Value.NumberValue','string');
json.UpdateString('Operations[0].GetLinkAttributes.TypedLinkSpecifier.IdentityAttributeValues[0].Value.StringValue','string');
json.UpdateString('Operations[0].GetLinkAttributes.TypedLinkSpecifier.SourceObjectReference.Selector','string');
json.UpdateString('Operations[0].GetLinkAttributes.TypedLinkSpecifier.TargetObjectReference.Selector','string');
json.UpdateString('Operations[0].GetLinkAttributes.TypedLinkSpecifier.TypedLinkFacet.SchemaArn','string');
json.UpdateString('Operations[0].GetLinkAttributes.TypedLinkSpecifier.TypedLinkFacet.TypedLinkName','string');
json.UpdateString('Operations[0].GetObjectAttributes.AttributeNames[0]','string');
json.UpdateString('Operations[0].GetObjectAttributes.ObjectReference.Selector','string');
json.UpdateString('Operations[0].GetObjectAttributes.SchemaFacet.FacetName','string');
json.UpdateString('Operations[0].GetObjectAttributes.SchemaFacet.SchemaArn','string');
json.UpdateString('Operations[0].GetObjectInformation.ObjectReference.Selector','string');
json.UpdateInt('Operations[0].ListAttachedIndices.MaxResults',123);
json.UpdateString('Operations[0].ListAttachedIndices.NextToken','string');
json.UpdateString('Operations[0].ListAttachedIndices.TargetReference.Selector','string');
json.UpdateString('Operations[0].ListIncomingTypedLinks.FilterAttributeRanges[0].AttributeName','string');
json.UpdateString('Operations[0].ListIncomingTypedLinks.FilterAttributeRanges[0].Range.EndMode','string');
json.UpdateInt('Operations[0].ListIncomingTypedLinks.FilterAttributeRanges[0].Range.EndValue.BinaryValue',123);
json.UpdateInt('Operations[0].ListIncomingTypedLinks.FilterAttributeRanges[0].Range.EndValue.BooleanValue',123);
json.UpdateInt('Operations[0].ListIncomingTypedLinks.FilterAttributeRanges[0].Range.EndValue.DatetimeValue',123);
json.UpdateString('Operations[0].ListIncomingTypedLinks.FilterAttributeRanges[0].Range.EndValue.NumberValue','string');
json.UpdateString('Operations[0].ListIncomingTypedLinks.FilterAttributeRanges[0].Range.EndValue.StringValue','string');
json.UpdateString('Operations[0].ListIncomingTypedLinks.FilterAttributeRanges[0].Range.StartMode','string');
json.UpdateInt('Operations[0].ListIncomingTypedLinks.FilterAttributeRanges[0].Range.StartValue.BinaryValue',123);
json.UpdateInt('Operations[0].ListIncomingTypedLinks.FilterAttributeRanges[0].Range.StartValue.BooleanValue',123);
json.UpdateInt('Operations[0].ListIncomingTypedLinks.FilterAttributeRanges[0].Range.StartValue.DatetimeValue',123);
json.UpdateString('Operations[0].ListIncomingTypedLinks.FilterAttributeRanges[0].Range.StartValue.NumberValue','string');
json.UpdateString('Operations[0].ListIncomingTypedLinks.FilterAttributeRanges[0].Range.StartValue.StringValue','string');
json.UpdateString('Operations[0].ListIncomingTypedLinks.FilterTypedLink.SchemaArn','string');
json.UpdateString('Operations[0].ListIncomingTypedLinks.FilterTypedLink.TypedLinkName','string');
json.UpdateInt('Operations[0].ListIncomingTypedLinks.MaxResults',123);
json.UpdateString('Operations[0].ListIncomingTypedLinks.NextToken','string');
json.UpdateString('Operations[0].ListIncomingTypedLinks.ObjectReference.Selector','string');
json.UpdateString('Operations[0].ListIndex.IndexReference.Selector','string');
json.UpdateInt('Operations[0].ListIndex.MaxResults',123);
json.UpdateString('Operations[0].ListIndex.NextToken','string');
json.UpdateString('Operations[0].ListIndex.RangesOnIndexedValues[0].AttributeKey.FacetName','string');
json.UpdateString('Operations[0].ListIndex.RangesOnIndexedValues[0].AttributeKey.Name','string');
json.UpdateString('Operations[0].ListIndex.RangesOnIndexedValues[0].AttributeKey.SchemaArn','string');
json.UpdateString('Operations[0].ListIndex.RangesOnIndexedValues[0].Range.EndMode','string');
json.UpdateInt('Operations[0].ListIndex.RangesOnIndexedValues[0].Range.EndValue.BinaryValue',123);
json.UpdateInt('Operations[0].ListIndex.RangesOnIndexedValues[0].Range.EndValue.BooleanValue',123);
json.UpdateInt('Operations[0].ListIndex.RangesOnIndexedValues[0].Range.EndValue.DatetimeValue',123);
json.UpdateString('Operations[0].ListIndex.RangesOnIndexedValues[0].Range.EndValue.NumberValue','string');
json.UpdateString('Operations[0].ListIndex.RangesOnIndexedValues[0].Range.EndValue.StringValue','string');
json.UpdateString('Operations[0].ListIndex.RangesOnIndexedValues[0].Range.StartMode','string');
json.UpdateInt('Operations[0].ListIndex.RangesOnIndexedValues[0].Range.StartValue.BinaryValue',123);
json.UpdateInt('Operations[0].ListIndex.RangesOnIndexedValues[0].Range.StartValue.BooleanValue',123);
json.UpdateInt('Operations[0].ListIndex.RangesOnIndexedValues[0].Range.StartValue.DatetimeValue',123);
json.UpdateString('Operations[0].ListIndex.RangesOnIndexedValues[0].Range.StartValue.NumberValue','string');
json.UpdateString('Operations[0].ListIndex.RangesOnIndexedValues[0].Range.StartValue.StringValue','string');
json.UpdateString('Operations[0].ListObjectAttributes.FacetFilter.FacetName','string');
json.UpdateString('Operations[0].ListObjectAttributes.FacetFilter.SchemaArn','string');
json.UpdateInt('Operations[0].ListObjectAttributes.MaxResults',123);
json.UpdateString('Operations[0].ListObjectAttributes.NextToken','string');
json.UpdateString('Operations[0].ListObjectAttributes.ObjectReference.Selector','string');
json.UpdateInt('Operations[0].ListObjectChildren.MaxResults',123);
json.UpdateString('Operations[0].ListObjectChildren.NextToken','string');
json.UpdateString('Operations[0].ListObjectChildren.ObjectReference.Selector','string');
json.UpdateInt('Operations[0].ListObjectParentPaths.MaxResults',123);
json.UpdateString('Operations[0].ListObjectParentPaths.NextToken','string');
json.UpdateString('Operations[0].ListObjectParentPaths.ObjectReference.Selector','string');
json.UpdateInt('Operations[0].ListObjectParents.MaxResults',123);
json.UpdateString('Operations[0].ListObjectParents.NextToken','string');
json.UpdateString('Operations[0].ListObjectParents.ObjectReference.Selector','string');
json.UpdateInt('Operations[0].ListObjectPolicies.MaxResults',123);
json.UpdateString('Operations[0].ListObjectPolicies.NextToken','string');
json.UpdateString('Operations[0].ListObjectPolicies.ObjectReference.Selector','string');
json.UpdateString('Operations[0].ListOutgoingTypedLinks.FilterAttributeRanges[0].AttributeName','string');
json.UpdateString('Operations[0].ListOutgoingTypedLinks.FilterAttributeRanges[0].Range.EndMode','string');
json.UpdateInt('Operations[0].ListOutgoingTypedLinks.FilterAttributeRanges[0].Range.EndValue.BinaryValue',123);
json.UpdateInt('Operations[0].ListOutgoingTypedLinks.FilterAttributeRanges[0].Range.EndValue.BooleanValue',123);
json.UpdateInt('Operations[0].ListOutgoingTypedLinks.FilterAttributeRanges[0].Range.EndValue.DatetimeValue',123);
json.UpdateString('Operations[0].ListOutgoingTypedLinks.FilterAttributeRanges[0].Range.EndValue.NumberValue','string');
json.UpdateString('Operations[0].ListOutgoingTypedLinks.FilterAttributeRanges[0].Range.EndValue.StringValue','string');
json.UpdateString('Operations[0].ListOutgoingTypedLinks.FilterAttributeRanges[0].Range.StartMode','string');
json.UpdateInt('Operations[0].ListOutgoingTypedLinks.FilterAttributeRanges[0].Range.StartValue.BinaryValue',123);
json.UpdateInt('Operations[0].ListOutgoingTypedLinks.FilterAttributeRanges[0].Range.StartValue.BooleanValue',123);
json.UpdateInt('Operations[0].ListOutgoingTypedLinks.FilterAttributeRanges[0].Range.StartValue.DatetimeValue',123);
json.UpdateString('Operations[0].ListOutgoingTypedLinks.FilterAttributeRanges[0].Range.StartValue.NumberValue','string');
json.UpdateString('Operations[0].ListOutgoingTypedLinks.FilterAttributeRanges[0].Range.StartValue.StringValue','string');
json.UpdateString('Operations[0].ListOutgoingTypedLinks.FilterTypedLink.SchemaArn','string');
json.UpdateString('Operations[0].ListOutgoingTypedLinks.FilterTypedLink.TypedLinkName','string');
json.UpdateInt('Operations[0].ListOutgoingTypedLinks.MaxResults',123);
json.UpdateString('Operations[0].ListOutgoingTypedLinks.NextToken','string');
json.UpdateString('Operations[0].ListOutgoingTypedLinks.ObjectReference.Selector','string');
json.UpdateInt('Operations[0].ListPolicyAttachments.MaxResults',123);
json.UpdateString('Operations[0].ListPolicyAttachments.NextToken','string');
json.UpdateString('Operations[0].ListPolicyAttachments.PolicyReference.Selector','string');
json.UpdateInt('Operations[0].LookupPolicy.MaxResults',123);
json.UpdateString('Operations[0].LookupPolicy.NextToken','string');
json.UpdateString('Operations[0].LookupPolicy.ObjectReference.Selector','string');
// The JSON request body created by the above code:
// {
// "Operations": [
// {
// "GetLinkAttributes": {
// "AttributeNames": [
// "string"
// ],
// "TypedLinkSpecifier": {
// "IdentityAttributeValues": [
// {
// "AttributeName": "string",
// "Value": {
// "BinaryValue": blob,
// "BooleanValue": boolean,
// "DatetimeValue": number,
// "NumberValue": "string",
// "StringValue": "string"
// }
// }
// ],
// "SourceObjectReference": {
// "Selector": "string"
// },
// "TargetObjectReference": {
// "Selector": "string"
// },
// "TypedLinkFacet": {
// "SchemaArn": "string",
// "TypedLinkName": "string"
// }
// }
// },
// "GetObjectAttributes": {
// "AttributeNames": [
// "string"
// ],
// "ObjectReference": {
// "Selector": "string"
// },
// "SchemaFacet": {
// "FacetName": "string",
// "SchemaArn": "string"
// }
// },
// "GetObjectInformation": {
// "ObjectReference": {
// "Selector": "string"
// }
// },
// "ListAttachedIndices": {
// "MaxResults": number,
// "NextToken": "string",
// "TargetReference": {
// "Selector": "string"
// }
// },
// "ListIncomingTypedLinks": {
// "FilterAttributeRanges": [
// {
// "AttributeName": "string",
// "Range": {
// "EndMode": "string",
// "EndValue": {
// "BinaryValue": blob,
// "BooleanValue": boolean,
// "DatetimeValue": number,
// "NumberValue": "string",
// "StringValue": "string"
// },
// "StartMode": "string",
// "StartValue": {
// "BinaryValue": blob,
// "BooleanValue": boolean,
// "DatetimeValue": number,
// "NumberValue": "string",
// "StringValue": "string"
// }
// }
// }
// ],
// "FilterTypedLink": {
// "SchemaArn": "string",
// "TypedLinkName": "string"
// },
// "MaxResults": number,
// "NextToken": "string",
// "ObjectReference": {
// "Selector": "string"
// }
// },
// "ListIndex": {
// "IndexReference": {
// "Selector": "string"
// },
// "MaxResults": number,
// "NextToken": "string",
// "RangesOnIndexedValues": [
// {
// "AttributeKey": {
// "FacetName": "string",
// "Name": "string",
// "SchemaArn": "string"
// },
// "Range": {
// "EndMode": "string",
// "EndValue": {
// "BinaryValue": blob,
// "BooleanValue": boolean,
// "DatetimeValue": number,
// "NumberValue": "string",
// "StringValue": "string"
// },
// "StartMode": "string",
// "StartValue": {
// "BinaryValue": blob,
// "BooleanValue": boolean,
// "DatetimeValue": number,
// "NumberValue": "string",
// "StringValue": "string"
// }
// }
// }
// ]
// },
// "ListObjectAttributes": {
// "FacetFilter": {
// "FacetName": "string",
// "SchemaArn": "string"
// },
// "MaxResults": number,
// "NextToken": "string",
// "ObjectReference": {
// "Selector": "string"
// }
// },
// "ListObjectChildren": {
// "MaxResults": number,
// "NextToken": "string",
// "ObjectReference": {
// "Selector": "string"
// }
// },
// "ListObjectParentPaths": {
// "MaxResults": number,
// "NextToken": "string",
// "ObjectReference": {
// "Selector": "string"
// }
// },
// "ListObjectParents": {
// "MaxResults": number,
// "NextToken": "string",
// "ObjectReference": {
// "Selector": "string"
// }
// },
// "ListObjectPolicies": {
// "MaxResults": number,
// "NextToken": "string",
// "ObjectReference": {
// "Selector": "string"
// }
// },
// "ListOutgoingTypedLinks": {
// "FilterAttributeRanges": [
// {
// "AttributeName": "string",
// "Range": {
// "EndMode": "string",
// "EndValue": {
// "BinaryValue": blob,
// "BooleanValue": boolean,
// "DatetimeValue": number,
// "NumberValue": "string",
// "StringValue": "string"
// },
// "StartMode": "string",
// "StartValue": {
// "BinaryValue": blob,
// "BooleanValue": boolean,
// "DatetimeValue": number,
// "NumberValue": "string",
// "StringValue": "string"
// }
// }
// }
// ],
// "FilterTypedLink": {
// "SchemaArn": "string",
// "TypedLinkName": "string"
// },
// "MaxResults": number,
// "NextToken": "string",
// "ObjectReference": {
// "Selector": "string"
// }
// },
// "ListPolicyAttachments": {
// "MaxResults": number,
// "NextToken": "string",
// "PolicyReference": {
// "Selector": "string"
// }
// },
// "LookupPolicy": {
// "MaxResults": number,
// "NextToken": "string",
// "ObjectReference": {
// "Selector": "string"
// }
// }
// }
// ]
// }
rest.AddHeader('Content-Type','application/x-amz-json-1.1');
rest.AddHeader('X-Amz-Target','BatchRead');
sbRequestBody := TChilkatStringBuilder.Create(Self);
json.EmitSb(sbRequestBody.ControlInterface);
sbResponseBody := TChilkatStringBuilder.Create(Self);
success := rest.FullRequestSb('POST','/amazonclouddirectory/2017-01-11/batchread',sbRequestBody.ControlInterface,sbResponseBody.ControlInterface);
if (success <> 1) then
begin
Memo1.Lines.Add(rest.LastErrorText);
Exit;
end;
respStatusCode := rest.ResponseStatusCode;
Memo1.Lines.Add('response status code = ' + IntToStr(respStatusCode));
if (respStatusCode <> 200) then
begin
Memo1.Lines.Add('Response Header:');
Memo1.Lines.Add(rest.ResponseHeader);
Memo1.Lines.Add('Response Body:');
Memo1.Lines.Add(sbResponseBody.GetAsString());
Exit;
end;
jResp := TChilkatJsonObject.Create(Self);
jResp.LoadSb(sbResponseBody.ControlInterface);
// 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
i := 0;
count_i := jResp.SizeOfArray('Responses');
while i < count_i do
begin
jResp.I := i;
Message := jResp.StringOf('Responses[i].ExceptionResponse.Message');
v_Type := jResp.StringOf('Responses[i].ExceptionResponse.Type');
ObjectIdentifier := jResp.StringOf('Responses[i].SuccessfulResponse.GetObjectInformation.ObjectIdentifier');
NextToken := jResp.StringOf('Responses[i].SuccessfulResponse.ListAttachedIndices.NextToken');
ListIncomingTypedLinksNextToken := jResp.StringOf('Responses[i].SuccessfulResponse.ListIncomingTypedLinks.NextToken');
ListIndexNextToken := jResp.StringOf('Responses[i].SuccessfulResponse.ListIndex.NextToken');
ListObjectAttributesNextToken := jResp.StringOf('Responses[i].SuccessfulResponse.ListObjectAttributes.NextToken');
v_String := jResp.StringOf('Responses[i].SuccessfulResponse.ListObjectChildren.Children.string');
ListObjectChildrenNextToken := jResp.StringOf('Responses[i].SuccessfulResponse.ListObjectChildren.NextToken');
ListObjectParentPathsNextToken := jResp.StringOf('Responses[i].SuccessfulResponse.ListObjectParentPaths.NextToken');
ListObjectParentsNextToken := jResp.StringOf('Responses[i].SuccessfulResponse.ListObjectParents.NextToken');
ListObjectPoliciesNextToken := jResp.StringOf('Responses[i].SuccessfulResponse.ListObjectPolicies.NextToken');
ListOutgoingTypedLinksNextToken := jResp.StringOf('Responses[i].SuccessfulResponse.ListOutgoingTypedLinks.NextToken');
ListPolicyAttachmentsNextToken := jResp.StringOf('Responses[i].SuccessfulResponse.ListPolicyAttachments.NextToken');
LookupPolicyNextToken := jResp.StringOf('Responses[i].SuccessfulResponse.LookupPolicy.NextToken');
j := 0;
count_j := jResp.SizeOfArray('Responses[i].SuccessfulResponse.GetLinkAttributes.Attributes');
while j < count_j do
begin
jResp.J := j;
FacetName := jResp.StringOf('Responses[i].SuccessfulResponse.GetLinkAttributes.Attributes[j].Key.FacetName');
Name := jResp.StringOf('Responses[i].SuccessfulResponse.GetLinkAttributes.Attributes[j].Key.Name');
SchemaArn := jResp.StringOf('Responses[i].SuccessfulResponse.GetLinkAttributes.Attributes[j].Key.SchemaArn');
BinaryValue := jResp.IntOf('Responses[i].SuccessfulResponse.GetLinkAttributes.Attributes[j].Value.BinaryValue');
BooleanValue := jResp.IntOf('Responses[i].SuccessfulResponse.GetLinkAttributes.Attributes[j].Value.BooleanValue');
DatetimeValue := jResp.IntOf('Responses[i].SuccessfulResponse.GetLinkAttributes.Attributes[j].Value.DatetimeValue');
NumberValue := jResp.StringOf('Responses[i].SuccessfulResponse.GetLinkAttributes.Attributes[j].Value.NumberValue');
StringValue := jResp.StringOf('Responses[i].SuccessfulResponse.GetLinkAttributes.Attributes[j].Value.StringValue');
j := j + 1;
end;
j := 0;
count_j := jResp.SizeOfArray('Responses[i].SuccessfulResponse.GetObjectAttributes.Attributes');
while j < count_j do
begin
jResp.J := j;
KeyFacetName := jResp.StringOf('Responses[i].SuccessfulResponse.GetObjectAttributes.Attributes[j].Key.FacetName');
KeyName := jResp.StringOf('Responses[i].SuccessfulResponse.GetObjectAttributes.Attributes[j].Key.Name');
KeySchemaArn := jResp.StringOf('Responses[i].SuccessfulResponse.GetObjectAttributes.Attributes[j].Key.SchemaArn');
ValueBinaryValue := jResp.IntOf('Responses[i].SuccessfulResponse.GetObjectAttributes.Attributes[j].Value.BinaryValue');
ValueBooleanValue := jResp.IntOf('Responses[i].SuccessfulResponse.GetObjectAttributes.Attributes[j].Value.BooleanValue');
ValueDatetimeValue := jResp.IntOf('Responses[i].SuccessfulResponse.GetObjectAttributes.Attributes[j].Value.DatetimeValue');
ValueNumberValue := jResp.StringOf('Responses[i].SuccessfulResponse.GetObjectAttributes.Attributes[j].Value.NumberValue');
ValueStringValue := jResp.StringOf('Responses[i].SuccessfulResponse.GetObjectAttributes.Attributes[j].Value.StringValue');
j := j + 1;
end;
j := 0;
count_j := jResp.SizeOfArray('Responses[i].SuccessfulResponse.GetObjectInformation.SchemaFacets');
while j < count_j do
begin
jResp.J := j;
FacetName := jResp.StringOf('Responses[i].SuccessfulResponse.GetObjectInformation.SchemaFacets[j].FacetName');
SchemaArn := jResp.StringOf('Responses[i].SuccessfulResponse.GetObjectInformation.SchemaFacets[j].SchemaArn');
j := j + 1;
end;
j := 0;
count_j := jResp.SizeOfArray('Responses[i].SuccessfulResponse.ListAttachedIndices.IndexAttachments');
while j < count_j do
begin
jResp.J := j;
ObjectIdentifier := jResp.StringOf('Responses[i].SuccessfulResponse.ListAttachedIndices.IndexAttachments[j].ObjectIdentifier');
k := 0;
count_k := jResp.SizeOfArray('Responses[i].SuccessfulResponse.ListAttachedIndices.IndexAttachments[j].IndexedAttributes');
while k < count_k do
begin
jResp.K := k;
KeyFacetName := jResp.StringOf('Responses[i].SuccessfulResponse.ListAttachedIndices.IndexAttachments[j].IndexedAttributes[k].Key.FacetName');
KeyName := jResp.StringOf('Responses[i].SuccessfulResponse.ListAttachedIndices.IndexAttachments[j].IndexedAttributes[k].Key.Name');
KeySchemaArn := jResp.StringOf('Responses[i].SuccessfulResponse.ListAttachedIndices.IndexAttachments[j].IndexedAttributes[k].Key.SchemaArn');
ValueBinaryValue := jResp.IntOf('Responses[i].SuccessfulResponse.ListAttachedIndices.IndexAttachments[j].IndexedAttributes[k].Value.BinaryValue');
ValueBooleanValue := jResp.IntOf('Responses[i].SuccessfulResponse.ListAttachedIndices.IndexAttachments[j].IndexedAttributes[k].Value.BooleanValue');
ValueDatetimeValue := jResp.IntOf('Responses[i].SuccessfulResponse.ListAttachedIndices.IndexAttachments[j].IndexedAttributes[k].Value.DatetimeValue');
ValueNumberValue := jResp.StringOf('Responses[i].SuccessfulResponse.ListAttachedIndices.IndexAttachments[j].IndexedAttributes[k].Value.NumberValue');
ValueStringValue := jResp.StringOf('Responses[i].SuccessfulResponse.ListAttachedIndices.IndexAttachments[j].IndexedAttributes[k].Value.StringValue');
k := k + 1;
end;
j := j + 1;
end;
j := 0;
count_j := jResp.SizeOfArray('Responses[i].SuccessfulResponse.ListIncomingTypedLinks.LinkSpecifiers');
while j < count_j do
begin
jResp.J := j;
Selector := jResp.StringOf('Responses[i].SuccessfulResponse.ListIncomingTypedLinks.LinkSpecifiers[j].SourceObjectReference.Selector');
TargetObjectReferenceSelector := jResp.StringOf('Responses[i].SuccessfulResponse.ListIncomingTypedLinks.LinkSpecifiers[j].TargetObjectReference.Selector');
TypedLinkFacetSchemaArn := jResp.StringOf('Responses[i].SuccessfulResponse.ListIncomingTypedLinks.LinkSpecifiers[j].TypedLinkFacet.SchemaArn');
TypedLinkName := jResp.StringOf('Responses[i].SuccessfulResponse.ListIncomingTypedLinks.LinkSpecifiers[j].TypedLinkFacet.TypedLinkName');
k := 0;
count_k := jResp.SizeOfArray('Responses[i].SuccessfulResponse.ListIncomingTypedLinks.LinkSpecifiers[j].IdentityAttributeValues');
while k < count_k do
begin
jResp.K := k;
AttributeName := jResp.StringOf('Responses[i].SuccessfulResponse.ListIncomingTypedLinks.LinkSpecifiers[j].IdentityAttributeValues[k].AttributeName');
ValueBinaryValue := jResp.IntOf('Responses[i].SuccessfulResponse.ListIncomingTypedLinks.LinkSpecifiers[j].IdentityAttributeValues[k].Value.BinaryValue');
ValueBooleanValue := jResp.IntOf('Responses[i].SuccessfulResponse.ListIncomingTypedLinks.LinkSpecifiers[j].IdentityAttributeValues[k].Value.BooleanValue');
ValueDatetimeValue := jResp.IntOf('Responses[i].SuccessfulResponse.ListIncomingTypedLinks.LinkSpecifiers[j].IdentityAttributeValues[k].Value.DatetimeValue');
ValueNumberValue := jResp.StringOf('Responses[i].SuccessfulResponse.ListIncomingTypedLinks.LinkSpecifiers[j].IdentityAttributeValues[k].Value.NumberValue');
ValueStringValue := jResp.StringOf('Responses[i].SuccessfulResponse.ListIncomingTypedLinks.LinkSpecifiers[j].IdentityAttributeValues[k].Value.StringValue');
k := k + 1;
end;
j := j + 1;
end;
j := 0;
count_j := jResp.SizeOfArray('Responses[i].SuccessfulResponse.ListIndex.IndexAttachments');
while j < count_j do
begin
jResp.J := j;
ObjectIdentifier := jResp.StringOf('Responses[i].SuccessfulResponse.ListIndex.IndexAttachments[j].ObjectIdentifier');
k := 0;
count_k := jResp.SizeOfArray('Responses[i].SuccessfulResponse.ListIndex.IndexAttachments[j].IndexedAttributes');
while k < count_k do
begin
jResp.K := k;
KeyFacetName := jResp.StringOf('Responses[i].SuccessfulResponse.ListIndex.IndexAttachments[j].IndexedAttributes[k].Key.FacetName');
KeyName := jResp.StringOf('Responses[i].SuccessfulResponse.ListIndex.IndexAttachments[j].IndexedAttributes[k].Key.Name');
KeySchemaArn := jResp.StringOf('Responses[i].SuccessfulResponse.ListIndex.IndexAttachments[j].IndexedAttributes[k].Key.SchemaArn');
ValueBinaryValue := jResp.IntOf('Responses[i].SuccessfulResponse.ListIndex.IndexAttachments[j].IndexedAttributes[k].Value.BinaryValue');
ValueBooleanValue := jResp.IntOf('Responses[i].SuccessfulResponse.ListIndex.IndexAttachments[j].IndexedAttributes[k].Value.BooleanValue');
ValueDatetimeValue := jResp.IntOf('Responses[i].SuccessfulResponse.ListIndex.IndexAttachments[j].IndexedAttributes[k].Value.DatetimeValue');
ValueNumberValue := jResp.StringOf('Responses[i].SuccessfulResponse.ListIndex.IndexAttachments[j].IndexedAttributes[k].Value.NumberValue');
ValueStringValue := jResp.StringOf('Responses[i].SuccessfulResponse.ListIndex.IndexAttachments[j].IndexedAttributes[k].Value.StringValue');
k := k + 1;
end;
j := j + 1;
end;
j := 0;
count_j := jResp.SizeOfArray('Responses[i].SuccessfulResponse.ListObjectAttributes.Attributes');
while j < count_j do
begin
jResp.J := j;
KeyFacetName := jResp.StringOf('Responses[i].SuccessfulResponse.ListObjectAttributes.Attributes[j].Key.FacetName');
KeyName := jResp.StringOf('Responses[i].SuccessfulResponse.ListObjectAttributes.Attributes[j].Key.Name');
KeySchemaArn := jResp.StringOf('Responses[i].SuccessfulResponse.ListObjectAttributes.Attributes[j].Key.SchemaArn');
ValueBinaryValue := jResp.IntOf('Responses[i].SuccessfulResponse.ListObjectAttributes.Attributes[j].Value.BinaryValue');
ValueBooleanValue := jResp.IntOf('Responses[i].SuccessfulResponse.ListObjectAttributes.Attributes[j].Value.BooleanValue');
ValueDatetimeValue := jResp.IntOf('Responses[i].SuccessfulResponse.ListObjectAttributes.Attributes[j].Value.DatetimeValue');
ValueNumberValue := jResp.StringOf('Responses[i].SuccessfulResponse.ListObjectAttributes.Attributes[j].Value.NumberValue');
ValueStringValue := jResp.StringOf('Responses[i].SuccessfulResponse.ListObjectAttributes.Attributes[j].Value.StringValue');
j := j + 1;
end;
j := 0;
count_j := jResp.SizeOfArray('Responses[i].SuccessfulResponse.ListObjectParentPaths.PathToObjectIdentifiersList');
while j < count_j do
begin
jResp.J := j;
Path := jResp.StringOf('Responses[i].SuccessfulResponse.ListObjectParentPaths.PathToObjectIdentifiersList[j].Path');
k := 0;
count_k := jResp.SizeOfArray('Responses[i].SuccessfulResponse.ListObjectParentPaths.PathToObjectIdentifiersList[j].ObjectIdentifiers');
while k < count_k do
begin
jResp.K := k;
strVal := jResp.StringOf('Responses[i].SuccessfulResponse.ListObjectParentPaths.PathToObjectIdentifiersList[j].ObjectIdentifiers[k]');
k := k + 1;
end;
j := j + 1;
end;
j := 0;
count_j := jResp.SizeOfArray('Responses[i].SuccessfulResponse.ListObjectParents.ParentLinks');
while j < count_j do
begin
jResp.J := j;
LinkName := jResp.StringOf('Responses[i].SuccessfulResponse.ListObjectParents.ParentLinks[j].LinkName');
ObjectIdentifier := jResp.StringOf('Responses[i].SuccessfulResponse.ListObjectParents.ParentLinks[j].ObjectIdentifier');
j := j + 1;
end;
j := 0;
count_j := jResp.SizeOfArray('Responses[i].SuccessfulResponse.ListObjectPolicies.AttachedPolicyIds');
while j < count_j do
begin
jResp.J := j;
strVal := jResp.StringOf('Responses[i].SuccessfulResponse.ListObjectPolicies.AttachedPolicyIds[j]');
j := j + 1;
end;
j := 0;
count_j := jResp.SizeOfArray('Responses[i].SuccessfulResponse.ListOutgoingTypedLinks.TypedLinkSpecifiers');
while j < count_j do
begin
jResp.J := j;
SourceObjectReferenceSelector := jResp.StringOf('Responses[i].SuccessfulResponse.ListOutgoingTypedLinks.TypedLinkSpecifiers[j].SourceObjectReference.Selector');
TargetObjectReferenceSelector := jResp.StringOf('Responses[i].SuccessfulResponse.ListOutgoingTypedLinks.TypedLinkSpecifiers[j].TargetObjectReference.Selector');
TypedLinkFacetSchemaArn := jResp.StringOf('Responses[i].SuccessfulResponse.ListOutgoingTypedLinks.TypedLinkSpecifiers[j].TypedLinkFacet.SchemaArn');
TypedLinkFacetTypedLinkName := jResp.StringOf('Responses[i].SuccessfulResponse.ListOutgoingTypedLinks.TypedLinkSpecifiers[j].TypedLinkFacet.TypedLinkName');
k := 0;
count_k := jResp.SizeOfArray('Responses[i].SuccessfulResponse.ListOutgoingTypedLinks.TypedLinkSpecifiers[j].IdentityAttributeValues');
while k < count_k do
begin
jResp.K := k;
AttributeName := jResp.StringOf('Responses[i].SuccessfulResponse.ListOutgoingTypedLinks.TypedLinkSpecifiers[j].IdentityAttributeValues[k].AttributeName');
ValueBinaryValue := jResp.IntOf('Responses[i].SuccessfulResponse.ListOutgoingTypedLinks.TypedLinkSpecifiers[j].IdentityAttributeValues[k].Value.BinaryValue');
ValueBooleanValue := jResp.IntOf('Responses[i].SuccessfulResponse.ListOutgoingTypedLinks.TypedLinkSpecifiers[j].IdentityAttributeValues[k].Value.BooleanValue');
ValueDatetimeValue := jResp.IntOf('Responses[i].SuccessfulResponse.ListOutgoingTypedLinks.TypedLinkSpecifiers[j].IdentityAttributeValues[k].Value.DatetimeValue');
ValueNumberValue := jResp.StringOf('Responses[i].SuccessfulResponse.ListOutgoingTypedLinks.TypedLinkSpecifiers[j].IdentityAttributeValues[k].Value.NumberValue');
ValueStringValue := jResp.StringOf('Responses[i].SuccessfulResponse.ListOutgoingTypedLinks.TypedLinkSpecifiers[j].IdentityAttributeValues[k].Value.StringValue');
k := k + 1;
end;
j := j + 1;
end;
j := 0;
count_j := jResp.SizeOfArray('Responses[i].SuccessfulResponse.ListPolicyAttachments.ObjectIdentifiers');
while j < count_j do
begin
jResp.J := j;
strVal := jResp.StringOf('Responses[i].SuccessfulResponse.ListPolicyAttachments.ObjectIdentifiers[j]');
j := j + 1;
end;
j := 0;
count_j := jResp.SizeOfArray('Responses[i].SuccessfulResponse.LookupPolicy.PolicyToPathList');
while j < count_j do
begin
jResp.J := j;
Path := jResp.StringOf('Responses[i].SuccessfulResponse.LookupPolicy.PolicyToPathList[j].Path');
k := 0;
count_k := jResp.SizeOfArray('Responses[i].SuccessfulResponse.LookupPolicy.PolicyToPathList[j].Policies');
while k < count_k do
begin
jResp.K := k;
ObjectIdentifier := jResp.StringOf('Responses[i].SuccessfulResponse.LookupPolicy.PolicyToPathList[j].Policies[k].ObjectIdentifier');
PolicyId := jResp.StringOf('Responses[i].SuccessfulResponse.LookupPolicy.PolicyToPathList[j].Policies[k].PolicyId');
PolicyType := jResp.StringOf('Responses[i].SuccessfulResponse.LookupPolicy.PolicyToPathList[j].Policies[k].PolicyType');
k := k + 1;
end;
j := j + 1;
end;
i := i + 1;
end;
// A sample JSON response body parsed by the above code:
// {
// "Responses": [
// {
// "ExceptionResponse": {
// "Message": "string",
// "Type": "string"
// },
// "SuccessfulResponse": {
// "GetLinkAttributes": {
// "Attributes": [
// {
// "Key": {
// "FacetName": "string",
// "Name": "string",
// "SchemaArn": "string"
// },
// "Value": {
// "BinaryValue": blob,
// "BooleanValue": boolean,
// "DatetimeValue": number,
// "NumberValue": "string",
// "StringValue": "string"
// }
// }
// ]
// },
// "GetObjectAttributes": {
// "Attributes": [
// {
// "Key": {
// "FacetName": "string",
// "Name": "string",
// "SchemaArn": "string"
// },
// "Value": {
// "BinaryValue": blob,
// "BooleanValue": boolean,
// "DatetimeValue": number,
// "NumberValue": "string",
// "StringValue": "string"
// }
// }
// ]
// },
// "GetObjectInformation": {
// "ObjectIdentifier": "string",
// "SchemaFacets": [
// {
// "FacetName": "string",
// "SchemaArn": "string"
// }
// ]
// },
// "ListAttachedIndices": {
// "IndexAttachments": [
// {
// "IndexedAttributes": [
// {
// "Key": {
// "FacetName": "string",
// "Name": "string",
// "SchemaArn": "string"
// },
// "Value": {
// "BinaryValue": blob,
// "BooleanValue": boolean,
// "DatetimeValue": number,
// "NumberValue": "string",
// "StringValue": "string"
// }
// }
// ],
// "ObjectIdentifier": "string"
// }
// ],
// "NextToken": "string"
// },
// "ListIncomingTypedLinks": {
// "LinkSpecifiers": [
// {
// "IdentityAttributeValues": [
// {
// "AttributeName": "string",
// "Value": {
// "BinaryValue": blob,
// "BooleanValue": boolean,
// "DatetimeValue": number,
// "NumberValue": "string",
// "StringValue": "string"
// }
// }
// ],
// "SourceObjectReference": {
// "Selector": "string"
// },
// "TargetObjectReference": {
// "Selector": "string"
// },
// "TypedLinkFacet": {
// "SchemaArn": "string",
// "TypedLinkName": "string"
// }
// }
// ],
// "NextToken": "string"
// },
// "ListIndex": {
// "IndexAttachments": [
// {
// "IndexedAttributes": [
// {
// "Key": {
// "FacetName": "string",
// "Name": "string",
// "SchemaArn": "string"
// },
// "Value": {
// "BinaryValue": blob,
// "BooleanValue": boolean,
// "DatetimeValue": number,
// "NumberValue": "string",
// "StringValue": "string"
// }
// }
// ],
// "ObjectIdentifier": "string"
// }
// ],
// "NextToken": "string"
// },
// "ListObjectAttributes": {
// "Attributes": [
// {
// "Key": {
// "FacetName": "string",
// "Name": "string",
// "SchemaArn": "string"
// },
// "Value": {
// "BinaryValue": blob,
// "BooleanValue": boolean,
// "DatetimeValue": number,
// "NumberValue": "string",
// "StringValue": "string"
// }
// }
// ],
// "NextToken": "string"
// },
// "ListObjectChildren": {
// "Children": {
// "string": "string"
// },
// "NextToken": "string"
// },
// "ListObjectParentPaths": {
// "NextToken": "string",
// "PathToObjectIdentifiersList": [
// {
// "ObjectIdentifiers": [
// "string"
// ],
// "Path": "string"
// }
// ]
// },
// "ListObjectParents": {
// "NextToken": "string",
// "ParentLinks": [
// {
// "LinkName": "string",
// "ObjectIdentifier": "string"
// }
// ]
// },
// "ListObjectPolicies": {
// "AttachedPolicyIds": [
// "string"
// ],
// "NextToken": "string"
// },
// "ListOutgoingTypedLinks": {
// "NextToken": "string",
// "TypedLinkSpecifiers": [
// {
// "IdentityAttributeValues": [
// {
// "AttributeName": "string",
// "Value": {
// "BinaryValue": blob,
// "BooleanValue": boolean,
// "DatetimeValue": number,
// "NumberValue": "string",
// "StringValue": "string"
// }
// }
// ],
// "SourceObjectReference": {
// "Selector": "string"
// },
// "TargetObjectReference": {
// "Selector": "string"
// },
// "TypedLinkFacet": {
// "SchemaArn": "string",
// "TypedLinkName": "string"
// }
// }
// ]
// },
// "ListPolicyAttachments": {
// "NextToken": "string",
// "ObjectIdentifiers": [
// "string"
// ]
// },
// "LookupPolicy": {
// "NextToken": "string",
// "PolicyToPathList": [
// {
// "Path": "string",
// "Policies": [
// {
// "ObjectIdentifier": "string",
// "PolicyId": "string",
// "PolicyType": "string"
// }
// ]
// }
// ]
// }
// }
// }
// ]
// }