Chilkat Online Tools

BatchRead unicodeCpp Example

Amazon Cloud Directory

#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"clouddirectory");
    // SetAuthAws causes Chilkat to automatically add the following headers: Authorization, X-Amz-Date
    rest.SetAuthAws(authAws);

    // URL: https://clouddirectory.us-west-2.amazonaws.com/
    // Use the same region as specified above.
    success = rest.Connect(L"clouddirectory.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"Operations[0].GetLinkAttributes.AttributeNames[0]",L"string");
    json.UpdateString(L"Operations[0].GetLinkAttributes.TypedLinkSpecifier.IdentityAttributeValues[0].AttributeName",L"string");
    json.UpdateInt(L"Operations[0].GetLinkAttributes.TypedLinkSpecifier.IdentityAttributeValues[0].Value.BinaryValue",123);
    json.UpdateInt(L"Operations[0].GetLinkAttributes.TypedLinkSpecifier.IdentityAttributeValues[0].Value.BooleanValue",123);
    json.UpdateInt(L"Operations[0].GetLinkAttributes.TypedLinkSpecifier.IdentityAttributeValues[0].Value.DatetimeValue",123);
    json.UpdateString(L"Operations[0].GetLinkAttributes.TypedLinkSpecifier.IdentityAttributeValues[0].Value.NumberValue",L"string");
    json.UpdateString(L"Operations[0].GetLinkAttributes.TypedLinkSpecifier.IdentityAttributeValues[0].Value.StringValue",L"string");
    json.UpdateString(L"Operations[0].GetLinkAttributes.TypedLinkSpecifier.SourceObjectReference.Selector",L"string");
    json.UpdateString(L"Operations[0].GetLinkAttributes.TypedLinkSpecifier.TargetObjectReference.Selector",L"string");
    json.UpdateString(L"Operations[0].GetLinkAttributes.TypedLinkSpecifier.TypedLinkFacet.SchemaArn",L"string");
    json.UpdateString(L"Operations[0].GetLinkAttributes.TypedLinkSpecifier.TypedLinkFacet.TypedLinkName",L"string");
    json.UpdateString(L"Operations[0].GetObjectAttributes.AttributeNames[0]",L"string");
    json.UpdateString(L"Operations[0].GetObjectAttributes.ObjectReference.Selector",L"string");
    json.UpdateString(L"Operations[0].GetObjectAttributes.SchemaFacet.FacetName",L"string");
    json.UpdateString(L"Operations[0].GetObjectAttributes.SchemaFacet.SchemaArn",L"string");
    json.UpdateString(L"Operations[0].GetObjectInformation.ObjectReference.Selector",L"string");
    json.UpdateInt(L"Operations[0].ListAttachedIndices.MaxResults",123);
    json.UpdateString(L"Operations[0].ListAttachedIndices.NextToken",L"string");
    json.UpdateString(L"Operations[0].ListAttachedIndices.TargetReference.Selector",L"string");
    json.UpdateString(L"Operations[0].ListIncomingTypedLinks.FilterAttributeRanges[0].AttributeName",L"string");
    json.UpdateString(L"Operations[0].ListIncomingTypedLinks.FilterAttributeRanges[0].Range.EndMode",L"string");
    json.UpdateInt(L"Operations[0].ListIncomingTypedLinks.FilterAttributeRanges[0].Range.EndValue.BinaryValue",123);
    json.UpdateInt(L"Operations[0].ListIncomingTypedLinks.FilterAttributeRanges[0].Range.EndValue.BooleanValue",123);
    json.UpdateInt(L"Operations[0].ListIncomingTypedLinks.FilterAttributeRanges[0].Range.EndValue.DatetimeValue",123);
    json.UpdateString(L"Operations[0].ListIncomingTypedLinks.FilterAttributeRanges[0].Range.EndValue.NumberValue",L"string");
    json.UpdateString(L"Operations[0].ListIncomingTypedLinks.FilterAttributeRanges[0].Range.EndValue.StringValue",L"string");
    json.UpdateString(L"Operations[0].ListIncomingTypedLinks.FilterAttributeRanges[0].Range.StartMode",L"string");
    json.UpdateInt(L"Operations[0].ListIncomingTypedLinks.FilterAttributeRanges[0].Range.StartValue.BinaryValue",123);
    json.UpdateInt(L"Operations[0].ListIncomingTypedLinks.FilterAttributeRanges[0].Range.StartValue.BooleanValue",123);
    json.UpdateInt(L"Operations[0].ListIncomingTypedLinks.FilterAttributeRanges[0].Range.StartValue.DatetimeValue",123);
    json.UpdateString(L"Operations[0].ListIncomingTypedLinks.FilterAttributeRanges[0].Range.StartValue.NumberValue",L"string");
    json.UpdateString(L"Operations[0].ListIncomingTypedLinks.FilterAttributeRanges[0].Range.StartValue.StringValue",L"string");
    json.UpdateString(L"Operations[0].ListIncomingTypedLinks.FilterTypedLink.SchemaArn",L"string");
    json.UpdateString(L"Operations[0].ListIncomingTypedLinks.FilterTypedLink.TypedLinkName",L"string");
    json.UpdateInt(L"Operations[0].ListIncomingTypedLinks.MaxResults",123);
    json.UpdateString(L"Operations[0].ListIncomingTypedLinks.NextToken",L"string");
    json.UpdateString(L"Operations[0].ListIncomingTypedLinks.ObjectReference.Selector",L"string");
    json.UpdateString(L"Operations[0].ListIndex.IndexReference.Selector",L"string");
    json.UpdateInt(L"Operations[0].ListIndex.MaxResults",123);
    json.UpdateString(L"Operations[0].ListIndex.NextToken",L"string");
    json.UpdateString(L"Operations[0].ListIndex.RangesOnIndexedValues[0].AttributeKey.FacetName",L"string");
    json.UpdateString(L"Operations[0].ListIndex.RangesOnIndexedValues[0].AttributeKey.Name",L"string");
    json.UpdateString(L"Operations[0].ListIndex.RangesOnIndexedValues[0].AttributeKey.SchemaArn",L"string");
    json.UpdateString(L"Operations[0].ListIndex.RangesOnIndexedValues[0].Range.EndMode",L"string");
    json.UpdateInt(L"Operations[0].ListIndex.RangesOnIndexedValues[0].Range.EndValue.BinaryValue",123);
    json.UpdateInt(L"Operations[0].ListIndex.RangesOnIndexedValues[0].Range.EndValue.BooleanValue",123);
    json.UpdateInt(L"Operations[0].ListIndex.RangesOnIndexedValues[0].Range.EndValue.DatetimeValue",123);
    json.UpdateString(L"Operations[0].ListIndex.RangesOnIndexedValues[0].Range.EndValue.NumberValue",L"string");
    json.UpdateString(L"Operations[0].ListIndex.RangesOnIndexedValues[0].Range.EndValue.StringValue",L"string");
    json.UpdateString(L"Operations[0].ListIndex.RangesOnIndexedValues[0].Range.StartMode",L"string");
    json.UpdateInt(L"Operations[0].ListIndex.RangesOnIndexedValues[0].Range.StartValue.BinaryValue",123);
    json.UpdateInt(L"Operations[0].ListIndex.RangesOnIndexedValues[0].Range.StartValue.BooleanValue",123);
    json.UpdateInt(L"Operations[0].ListIndex.RangesOnIndexedValues[0].Range.StartValue.DatetimeValue",123);
    json.UpdateString(L"Operations[0].ListIndex.RangesOnIndexedValues[0].Range.StartValue.NumberValue",L"string");
    json.UpdateString(L"Operations[0].ListIndex.RangesOnIndexedValues[0].Range.StartValue.StringValue",L"string");
    json.UpdateString(L"Operations[0].ListObjectAttributes.FacetFilter.FacetName",L"string");
    json.UpdateString(L"Operations[0].ListObjectAttributes.FacetFilter.SchemaArn",L"string");
    json.UpdateInt(L"Operations[0].ListObjectAttributes.MaxResults",123);
    json.UpdateString(L"Operations[0].ListObjectAttributes.NextToken",L"string");
    json.UpdateString(L"Operations[0].ListObjectAttributes.ObjectReference.Selector",L"string");
    json.UpdateInt(L"Operations[0].ListObjectChildren.MaxResults",123);
    json.UpdateString(L"Operations[0].ListObjectChildren.NextToken",L"string");
    json.UpdateString(L"Operations[0].ListObjectChildren.ObjectReference.Selector",L"string");
    json.UpdateInt(L"Operations[0].ListObjectParentPaths.MaxResults",123);
    json.UpdateString(L"Operations[0].ListObjectParentPaths.NextToken",L"string");
    json.UpdateString(L"Operations[0].ListObjectParentPaths.ObjectReference.Selector",L"string");
    json.UpdateInt(L"Operations[0].ListObjectParents.MaxResults",123);
    json.UpdateString(L"Operations[0].ListObjectParents.NextToken",L"string");
    json.UpdateString(L"Operations[0].ListObjectParents.ObjectReference.Selector",L"string");
    json.UpdateInt(L"Operations[0].ListObjectPolicies.MaxResults",123);
    json.UpdateString(L"Operations[0].ListObjectPolicies.NextToken",L"string");
    json.UpdateString(L"Operations[0].ListObjectPolicies.ObjectReference.Selector",L"string");
    json.UpdateString(L"Operations[0].ListOutgoingTypedLinks.FilterAttributeRanges[0].AttributeName",L"string");
    json.UpdateString(L"Operations[0].ListOutgoingTypedLinks.FilterAttributeRanges[0].Range.EndMode",L"string");
    json.UpdateInt(L"Operations[0].ListOutgoingTypedLinks.FilterAttributeRanges[0].Range.EndValue.BinaryValue",123);
    json.UpdateInt(L"Operations[0].ListOutgoingTypedLinks.FilterAttributeRanges[0].Range.EndValue.BooleanValue",123);
    json.UpdateInt(L"Operations[0].ListOutgoingTypedLinks.FilterAttributeRanges[0].Range.EndValue.DatetimeValue",123);
    json.UpdateString(L"Operations[0].ListOutgoingTypedLinks.FilterAttributeRanges[0].Range.EndValue.NumberValue",L"string");
    json.UpdateString(L"Operations[0].ListOutgoingTypedLinks.FilterAttributeRanges[0].Range.EndValue.StringValue",L"string");
    json.UpdateString(L"Operations[0].ListOutgoingTypedLinks.FilterAttributeRanges[0].Range.StartMode",L"string");
    json.UpdateInt(L"Operations[0].ListOutgoingTypedLinks.FilterAttributeRanges[0].Range.StartValue.BinaryValue",123);
    json.UpdateInt(L"Operations[0].ListOutgoingTypedLinks.FilterAttributeRanges[0].Range.StartValue.BooleanValue",123);
    json.UpdateInt(L"Operations[0].ListOutgoingTypedLinks.FilterAttributeRanges[0].Range.StartValue.DatetimeValue",123);
    json.UpdateString(L"Operations[0].ListOutgoingTypedLinks.FilterAttributeRanges[0].Range.StartValue.NumberValue",L"string");
    json.UpdateString(L"Operations[0].ListOutgoingTypedLinks.FilterAttributeRanges[0].Range.StartValue.StringValue",L"string");
    json.UpdateString(L"Operations[0].ListOutgoingTypedLinks.FilterTypedLink.SchemaArn",L"string");
    json.UpdateString(L"Operations[0].ListOutgoingTypedLinks.FilterTypedLink.TypedLinkName",L"string");
    json.UpdateInt(L"Operations[0].ListOutgoingTypedLinks.MaxResults",123);
    json.UpdateString(L"Operations[0].ListOutgoingTypedLinks.NextToken",L"string");
    json.UpdateString(L"Operations[0].ListOutgoingTypedLinks.ObjectReference.Selector",L"string");
    json.UpdateInt(L"Operations[0].ListPolicyAttachments.MaxResults",123);
    json.UpdateString(L"Operations[0].ListPolicyAttachments.NextToken",L"string");
    json.UpdateString(L"Operations[0].ListPolicyAttachments.PolicyReference.Selector",L"string");
    json.UpdateInt(L"Operations[0].LookupPolicy.MaxResults",123);
    json.UpdateString(L"Operations[0].LookupPolicy.NextToken",L"string");
    json.UpdateString(L"Operations[0].LookupPolicy.ObjectReference.Selector",L"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(L"Content-Type",L"application/x-amz-json-1.1");
    rest.AddHeader(L"X-Amz-Target",L"BatchRead");

    CkStringBuilderW sbRequestBody;
    json.EmitSb(sbRequestBody);
    CkStringBuilderW sbResponseBody;
    success = rest.FullRequestSb(L"POST",L"/amazonclouddirectory/2017-01-11/batchread",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 *Message = 0;
    const wchar_t *v_Type = 0;
    const wchar_t *ObjectIdentifier = 0;
    const wchar_t *NextToken = 0;
    const wchar_t *ListIncomingTypedLinksNextToken = 0;
    const wchar_t *ListIndexNextToken = 0;
    const wchar_t *ListObjectAttributesNextToken = 0;
    const wchar_t *v_String = 0;
    const wchar_t *ListObjectChildrenNextToken = 0;
    const wchar_t *ListObjectParentPathsNextToken = 0;
    const wchar_t *ListObjectParentsNextToken = 0;
    const wchar_t *ListObjectPoliciesNextToken = 0;
    const wchar_t *ListOutgoingTypedLinksNextToken = 0;
    const wchar_t *ListPolicyAttachmentsNextToken = 0;
    const wchar_t *LookupPolicyNextToken = 0;
    int j;
    int count_j;
    const wchar_t *FacetName = 0;
    const wchar_t *Name = 0;
    const wchar_t *SchemaArn = 0;
    int BinaryValue;
    int BooleanValue;
    int DatetimeValue;
    const wchar_t *NumberValue = 0;
    const wchar_t *StringValue = 0;
    const wchar_t *KeyFacetName = 0;
    const wchar_t *KeyName = 0;
    const wchar_t *KeySchemaArn = 0;
    int ValueBinaryValue;
    int ValueBooleanValue;
    int ValueDatetimeValue;
    const wchar_t *ValueNumberValue = 0;
    const wchar_t *ValueStringValue = 0;
    int k;
    int count_k;
    const wchar_t *Selector = 0;
    const wchar_t *TargetObjectReferenceSelector = 0;
    const wchar_t *TypedLinkFacetSchemaArn = 0;
    const wchar_t *TypedLinkName = 0;
    const wchar_t *AttributeName = 0;
    const wchar_t *Path = 0;
    const wchar_t *strVal = 0;
    const wchar_t *LinkName = 0;
    const wchar_t *SourceObjectReferenceSelector = 0;
    const wchar_t *TypedLinkFacetTypedLinkName = 0;
    const wchar_t *PolicyId = 0;
    const wchar_t *PolicyType = 0;

    int i = 0;
    int count_i = jResp.SizeOfArray(L"Responses");
    while (i < count_i) {
        jResp.put_I(i);
        Message = jResp.stringOf(L"Responses[i].ExceptionResponse.Message");
        v_Type = jResp.stringOf(L"Responses[i].ExceptionResponse.Type");
        ObjectIdentifier = jResp.stringOf(L"Responses[i].SuccessfulResponse.GetObjectInformation.ObjectIdentifier");
        NextToken = jResp.stringOf(L"Responses[i].SuccessfulResponse.ListAttachedIndices.NextToken");
        ListIncomingTypedLinksNextToken = jResp.stringOf(L"Responses[i].SuccessfulResponse.ListIncomingTypedLinks.NextToken");
        ListIndexNextToken = jResp.stringOf(L"Responses[i].SuccessfulResponse.ListIndex.NextToken");
        ListObjectAttributesNextToken = jResp.stringOf(L"Responses[i].SuccessfulResponse.ListObjectAttributes.NextToken");
        v_String = jResp.stringOf(L"Responses[i].SuccessfulResponse.ListObjectChildren.Children.string");
        ListObjectChildrenNextToken = jResp.stringOf(L"Responses[i].SuccessfulResponse.ListObjectChildren.NextToken");
        ListObjectParentPathsNextToken = jResp.stringOf(L"Responses[i].SuccessfulResponse.ListObjectParentPaths.NextToken");
        ListObjectParentsNextToken = jResp.stringOf(L"Responses[i].SuccessfulResponse.ListObjectParents.NextToken");
        ListObjectPoliciesNextToken = jResp.stringOf(L"Responses[i].SuccessfulResponse.ListObjectPolicies.NextToken");
        ListOutgoingTypedLinksNextToken = jResp.stringOf(L"Responses[i].SuccessfulResponse.ListOutgoingTypedLinks.NextToken");
        ListPolicyAttachmentsNextToken = jResp.stringOf(L"Responses[i].SuccessfulResponse.ListPolicyAttachments.NextToken");
        LookupPolicyNextToken = jResp.stringOf(L"Responses[i].SuccessfulResponse.LookupPolicy.NextToken");
        j = 0;
        count_j = jResp.SizeOfArray(L"Responses[i].SuccessfulResponse.GetLinkAttributes.Attributes");
        while (j < count_j) {
            jResp.put_J(j);
            FacetName = jResp.stringOf(L"Responses[i].SuccessfulResponse.GetLinkAttributes.Attributes[j].Key.FacetName");
            Name = jResp.stringOf(L"Responses[i].SuccessfulResponse.GetLinkAttributes.Attributes[j].Key.Name");
            SchemaArn = jResp.stringOf(L"Responses[i].SuccessfulResponse.GetLinkAttributes.Attributes[j].Key.SchemaArn");
            BinaryValue = jResp.IntOf(L"Responses[i].SuccessfulResponse.GetLinkAttributes.Attributes[j].Value.BinaryValue");
            BooleanValue = jResp.IntOf(L"Responses[i].SuccessfulResponse.GetLinkAttributes.Attributes[j].Value.BooleanValue");
            DatetimeValue = jResp.IntOf(L"Responses[i].SuccessfulResponse.GetLinkAttributes.Attributes[j].Value.DatetimeValue");
            NumberValue = jResp.stringOf(L"Responses[i].SuccessfulResponse.GetLinkAttributes.Attributes[j].Value.NumberValue");
            StringValue = jResp.stringOf(L"Responses[i].SuccessfulResponse.GetLinkAttributes.Attributes[j].Value.StringValue");
            j = j + 1;
        }

        j = 0;
        count_j = jResp.SizeOfArray(L"Responses[i].SuccessfulResponse.GetObjectAttributes.Attributes");
        while (j < count_j) {
            jResp.put_J(j);
            KeyFacetName = jResp.stringOf(L"Responses[i].SuccessfulResponse.GetObjectAttributes.Attributes[j].Key.FacetName");
            KeyName = jResp.stringOf(L"Responses[i].SuccessfulResponse.GetObjectAttributes.Attributes[j].Key.Name");
            KeySchemaArn = jResp.stringOf(L"Responses[i].SuccessfulResponse.GetObjectAttributes.Attributes[j].Key.SchemaArn");
            ValueBinaryValue = jResp.IntOf(L"Responses[i].SuccessfulResponse.GetObjectAttributes.Attributes[j].Value.BinaryValue");
            ValueBooleanValue = jResp.IntOf(L"Responses[i].SuccessfulResponse.GetObjectAttributes.Attributes[j].Value.BooleanValue");
            ValueDatetimeValue = jResp.IntOf(L"Responses[i].SuccessfulResponse.GetObjectAttributes.Attributes[j].Value.DatetimeValue");
            ValueNumberValue = jResp.stringOf(L"Responses[i].SuccessfulResponse.GetObjectAttributes.Attributes[j].Value.NumberValue");
            ValueStringValue = jResp.stringOf(L"Responses[i].SuccessfulResponse.GetObjectAttributes.Attributes[j].Value.StringValue");
            j = j + 1;
        }

        j = 0;
        count_j = jResp.SizeOfArray(L"Responses[i].SuccessfulResponse.GetObjectInformation.SchemaFacets");
        while (j < count_j) {
            jResp.put_J(j);
            FacetName = jResp.stringOf(L"Responses[i].SuccessfulResponse.GetObjectInformation.SchemaFacets[j].FacetName");
            SchemaArn = jResp.stringOf(L"Responses[i].SuccessfulResponse.GetObjectInformation.SchemaFacets[j].SchemaArn");
            j = j + 1;
        }

        j = 0;
        count_j = jResp.SizeOfArray(L"Responses[i].SuccessfulResponse.ListAttachedIndices.IndexAttachments");
        while (j < count_j) {
            jResp.put_J(j);
            ObjectIdentifier = jResp.stringOf(L"Responses[i].SuccessfulResponse.ListAttachedIndices.IndexAttachments[j].ObjectIdentifier");
            k = 0;
            count_k = jResp.SizeOfArray(L"Responses[i].SuccessfulResponse.ListAttachedIndices.IndexAttachments[j].IndexedAttributes");
            while (k < count_k) {
                jResp.put_K(k);
                KeyFacetName = jResp.stringOf(L"Responses[i].SuccessfulResponse.ListAttachedIndices.IndexAttachments[j].IndexedAttributes[k].Key.FacetName");
                KeyName = jResp.stringOf(L"Responses[i].SuccessfulResponse.ListAttachedIndices.IndexAttachments[j].IndexedAttributes[k].Key.Name");
                KeySchemaArn = jResp.stringOf(L"Responses[i].SuccessfulResponse.ListAttachedIndices.IndexAttachments[j].IndexedAttributes[k].Key.SchemaArn");
                ValueBinaryValue = jResp.IntOf(L"Responses[i].SuccessfulResponse.ListAttachedIndices.IndexAttachments[j].IndexedAttributes[k].Value.BinaryValue");
                ValueBooleanValue = jResp.IntOf(L"Responses[i].SuccessfulResponse.ListAttachedIndices.IndexAttachments[j].IndexedAttributes[k].Value.BooleanValue");
                ValueDatetimeValue = jResp.IntOf(L"Responses[i].SuccessfulResponse.ListAttachedIndices.IndexAttachments[j].IndexedAttributes[k].Value.DatetimeValue");
                ValueNumberValue = jResp.stringOf(L"Responses[i].SuccessfulResponse.ListAttachedIndices.IndexAttachments[j].IndexedAttributes[k].Value.NumberValue");
                ValueStringValue = jResp.stringOf(L"Responses[i].SuccessfulResponse.ListAttachedIndices.IndexAttachments[j].IndexedAttributes[k].Value.StringValue");
                k = k + 1;
            }

            j = j + 1;
        }

        j = 0;
        count_j = jResp.SizeOfArray(L"Responses[i].SuccessfulResponse.ListIncomingTypedLinks.LinkSpecifiers");
        while (j < count_j) {
            jResp.put_J(j);
            Selector = jResp.stringOf(L"Responses[i].SuccessfulResponse.ListIncomingTypedLinks.LinkSpecifiers[j].SourceObjectReference.Selector");
            TargetObjectReferenceSelector = jResp.stringOf(L"Responses[i].SuccessfulResponse.ListIncomingTypedLinks.LinkSpecifiers[j].TargetObjectReference.Selector");
            TypedLinkFacetSchemaArn = jResp.stringOf(L"Responses[i].SuccessfulResponse.ListIncomingTypedLinks.LinkSpecifiers[j].TypedLinkFacet.SchemaArn");
            TypedLinkName = jResp.stringOf(L"Responses[i].SuccessfulResponse.ListIncomingTypedLinks.LinkSpecifiers[j].TypedLinkFacet.TypedLinkName");
            k = 0;
            count_k = jResp.SizeOfArray(L"Responses[i].SuccessfulResponse.ListIncomingTypedLinks.LinkSpecifiers[j].IdentityAttributeValues");
            while (k < count_k) {
                jResp.put_K(k);
                AttributeName = jResp.stringOf(L"Responses[i].SuccessfulResponse.ListIncomingTypedLinks.LinkSpecifiers[j].IdentityAttributeValues[k].AttributeName");
                ValueBinaryValue = jResp.IntOf(L"Responses[i].SuccessfulResponse.ListIncomingTypedLinks.LinkSpecifiers[j].IdentityAttributeValues[k].Value.BinaryValue");
                ValueBooleanValue = jResp.IntOf(L"Responses[i].SuccessfulResponse.ListIncomingTypedLinks.LinkSpecifiers[j].IdentityAttributeValues[k].Value.BooleanValue");
                ValueDatetimeValue = jResp.IntOf(L"Responses[i].SuccessfulResponse.ListIncomingTypedLinks.LinkSpecifiers[j].IdentityAttributeValues[k].Value.DatetimeValue");
                ValueNumberValue = jResp.stringOf(L"Responses[i].SuccessfulResponse.ListIncomingTypedLinks.LinkSpecifiers[j].IdentityAttributeValues[k].Value.NumberValue");
                ValueStringValue = jResp.stringOf(L"Responses[i].SuccessfulResponse.ListIncomingTypedLinks.LinkSpecifiers[j].IdentityAttributeValues[k].Value.StringValue");
                k = k + 1;
            }

            j = j + 1;
        }

        j = 0;
        count_j = jResp.SizeOfArray(L"Responses[i].SuccessfulResponse.ListIndex.IndexAttachments");
        while (j < count_j) {
            jResp.put_J(j);
            ObjectIdentifier = jResp.stringOf(L"Responses[i].SuccessfulResponse.ListIndex.IndexAttachments[j].ObjectIdentifier");
            k = 0;
            count_k = jResp.SizeOfArray(L"Responses[i].SuccessfulResponse.ListIndex.IndexAttachments[j].IndexedAttributes");
            while (k < count_k) {
                jResp.put_K(k);
                KeyFacetName = jResp.stringOf(L"Responses[i].SuccessfulResponse.ListIndex.IndexAttachments[j].IndexedAttributes[k].Key.FacetName");
                KeyName = jResp.stringOf(L"Responses[i].SuccessfulResponse.ListIndex.IndexAttachments[j].IndexedAttributes[k].Key.Name");
                KeySchemaArn = jResp.stringOf(L"Responses[i].SuccessfulResponse.ListIndex.IndexAttachments[j].IndexedAttributes[k].Key.SchemaArn");
                ValueBinaryValue = jResp.IntOf(L"Responses[i].SuccessfulResponse.ListIndex.IndexAttachments[j].IndexedAttributes[k].Value.BinaryValue");
                ValueBooleanValue = jResp.IntOf(L"Responses[i].SuccessfulResponse.ListIndex.IndexAttachments[j].IndexedAttributes[k].Value.BooleanValue");
                ValueDatetimeValue = jResp.IntOf(L"Responses[i].SuccessfulResponse.ListIndex.IndexAttachments[j].IndexedAttributes[k].Value.DatetimeValue");
                ValueNumberValue = jResp.stringOf(L"Responses[i].SuccessfulResponse.ListIndex.IndexAttachments[j].IndexedAttributes[k].Value.NumberValue");
                ValueStringValue = jResp.stringOf(L"Responses[i].SuccessfulResponse.ListIndex.IndexAttachments[j].IndexedAttributes[k].Value.StringValue");
                k = k + 1;
            }

            j = j + 1;
        }

        j = 0;
        count_j = jResp.SizeOfArray(L"Responses[i].SuccessfulResponse.ListObjectAttributes.Attributes");
        while (j < count_j) {
            jResp.put_J(j);
            KeyFacetName = jResp.stringOf(L"Responses[i].SuccessfulResponse.ListObjectAttributes.Attributes[j].Key.FacetName");
            KeyName = jResp.stringOf(L"Responses[i].SuccessfulResponse.ListObjectAttributes.Attributes[j].Key.Name");
            KeySchemaArn = jResp.stringOf(L"Responses[i].SuccessfulResponse.ListObjectAttributes.Attributes[j].Key.SchemaArn");
            ValueBinaryValue = jResp.IntOf(L"Responses[i].SuccessfulResponse.ListObjectAttributes.Attributes[j].Value.BinaryValue");
            ValueBooleanValue = jResp.IntOf(L"Responses[i].SuccessfulResponse.ListObjectAttributes.Attributes[j].Value.BooleanValue");
            ValueDatetimeValue = jResp.IntOf(L"Responses[i].SuccessfulResponse.ListObjectAttributes.Attributes[j].Value.DatetimeValue");
            ValueNumberValue = jResp.stringOf(L"Responses[i].SuccessfulResponse.ListObjectAttributes.Attributes[j].Value.NumberValue");
            ValueStringValue = jResp.stringOf(L"Responses[i].SuccessfulResponse.ListObjectAttributes.Attributes[j].Value.StringValue");
            j = j + 1;
        }

        j = 0;
        count_j = jResp.SizeOfArray(L"Responses[i].SuccessfulResponse.ListObjectParentPaths.PathToObjectIdentifiersList");
        while (j < count_j) {
            jResp.put_J(j);
            Path = jResp.stringOf(L"Responses[i].SuccessfulResponse.ListObjectParentPaths.PathToObjectIdentifiersList[j].Path");
            k = 0;
            count_k = jResp.SizeOfArray(L"Responses[i].SuccessfulResponse.ListObjectParentPaths.PathToObjectIdentifiersList[j].ObjectIdentifiers");
            while (k < count_k) {
                jResp.put_K(k);
                strVal = jResp.stringOf(L"Responses[i].SuccessfulResponse.ListObjectParentPaths.PathToObjectIdentifiersList[j].ObjectIdentifiers[k]");
                k = k + 1;
            }

            j = j + 1;
        }

        j = 0;
        count_j = jResp.SizeOfArray(L"Responses[i].SuccessfulResponse.ListObjectParents.ParentLinks");
        while (j < count_j) {
            jResp.put_J(j);
            LinkName = jResp.stringOf(L"Responses[i].SuccessfulResponse.ListObjectParents.ParentLinks[j].LinkName");
            ObjectIdentifier = jResp.stringOf(L"Responses[i].SuccessfulResponse.ListObjectParents.ParentLinks[j].ObjectIdentifier");
            j = j + 1;
        }

        j = 0;
        count_j = jResp.SizeOfArray(L"Responses[i].SuccessfulResponse.ListObjectPolicies.AttachedPolicyIds");
        while (j < count_j) {
            jResp.put_J(j);
            strVal = jResp.stringOf(L"Responses[i].SuccessfulResponse.ListObjectPolicies.AttachedPolicyIds[j]");
            j = j + 1;
        }

        j = 0;
        count_j = jResp.SizeOfArray(L"Responses[i].SuccessfulResponse.ListOutgoingTypedLinks.TypedLinkSpecifiers");
        while (j < count_j) {
            jResp.put_J(j);
            SourceObjectReferenceSelector = jResp.stringOf(L"Responses[i].SuccessfulResponse.ListOutgoingTypedLinks.TypedLinkSpecifiers[j].SourceObjectReference.Selector");
            TargetObjectReferenceSelector = jResp.stringOf(L"Responses[i].SuccessfulResponse.ListOutgoingTypedLinks.TypedLinkSpecifiers[j].TargetObjectReference.Selector");
            TypedLinkFacetSchemaArn = jResp.stringOf(L"Responses[i].SuccessfulResponse.ListOutgoingTypedLinks.TypedLinkSpecifiers[j].TypedLinkFacet.SchemaArn");
            TypedLinkFacetTypedLinkName = jResp.stringOf(L"Responses[i].SuccessfulResponse.ListOutgoingTypedLinks.TypedLinkSpecifiers[j].TypedLinkFacet.TypedLinkName");
            k = 0;
            count_k = jResp.SizeOfArray(L"Responses[i].SuccessfulResponse.ListOutgoingTypedLinks.TypedLinkSpecifiers[j].IdentityAttributeValues");
            while (k < count_k) {
                jResp.put_K(k);
                AttributeName = jResp.stringOf(L"Responses[i].SuccessfulResponse.ListOutgoingTypedLinks.TypedLinkSpecifiers[j].IdentityAttributeValues[k].AttributeName");
                ValueBinaryValue = jResp.IntOf(L"Responses[i].SuccessfulResponse.ListOutgoingTypedLinks.TypedLinkSpecifiers[j].IdentityAttributeValues[k].Value.BinaryValue");
                ValueBooleanValue = jResp.IntOf(L"Responses[i].SuccessfulResponse.ListOutgoingTypedLinks.TypedLinkSpecifiers[j].IdentityAttributeValues[k].Value.BooleanValue");
                ValueDatetimeValue = jResp.IntOf(L"Responses[i].SuccessfulResponse.ListOutgoingTypedLinks.TypedLinkSpecifiers[j].IdentityAttributeValues[k].Value.DatetimeValue");
                ValueNumberValue = jResp.stringOf(L"Responses[i].SuccessfulResponse.ListOutgoingTypedLinks.TypedLinkSpecifiers[j].IdentityAttributeValues[k].Value.NumberValue");
                ValueStringValue = jResp.stringOf(L"Responses[i].SuccessfulResponse.ListOutgoingTypedLinks.TypedLinkSpecifiers[j].IdentityAttributeValues[k].Value.StringValue");
                k = k + 1;
            }

            j = j + 1;
        }

        j = 0;
        count_j = jResp.SizeOfArray(L"Responses[i].SuccessfulResponse.ListPolicyAttachments.ObjectIdentifiers");
        while (j < count_j) {
            jResp.put_J(j);
            strVal = jResp.stringOf(L"Responses[i].SuccessfulResponse.ListPolicyAttachments.ObjectIdentifiers[j]");
            j = j + 1;
        }

        j = 0;
        count_j = jResp.SizeOfArray(L"Responses[i].SuccessfulResponse.LookupPolicy.PolicyToPathList");
        while (j < count_j) {
            jResp.put_J(j);
            Path = jResp.stringOf(L"Responses[i].SuccessfulResponse.LookupPolicy.PolicyToPathList[j].Path");
            k = 0;
            count_k = jResp.SizeOfArray(L"Responses[i].SuccessfulResponse.LookupPolicy.PolicyToPathList[j].Policies");
            while (k < count_k) {
                jResp.put_K(k);
                ObjectIdentifier = jResp.stringOf(L"Responses[i].SuccessfulResponse.LookupPolicy.PolicyToPathList[j].Policies[k].ObjectIdentifier");
                PolicyId = jResp.stringOf(L"Responses[i].SuccessfulResponse.LookupPolicy.PolicyToPathList[j].Policies[k].PolicyId");
                PolicyType = jResp.stringOf(L"Responses[i].SuccessfulResponse.LookupPolicy.PolicyToPathList[j].Policies[k].PolicyType");
                k = k + 1;
            }

            j = j + 1;
        }

        i = i + 1;
    }

    // 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"
    //                 }
    //               ]
    //             }
    //           ]
    //         }
    //       }
    //     }
    //   ]
    // }
    }