Chilkat Online Tools

BatchRead PowerBuilder Example

Amazon Cloud Directory

integer li_rc
oleobject loo_Rest
integer li_Success
oleobject loo_AuthAws
oleobject loo_Json
oleobject loo_SbRequestBody
oleobject loo_SbResponseBody
integer li_RespStatusCode
oleobject loo_JResp
string ls_Message
string ls_V_Type
string ls_ObjectIdentifier
string ls_NextToken
string ls_ListIncomingTypedLinksNextToken
string ls_ListIndexNextToken
string ls_ListObjectAttributesNextToken
string ls_V_String
string ls_ListObjectChildrenNextToken
string ls_ListObjectParentPathsNextToken
string ls_ListObjectParentsNextToken
string ls_ListObjectPoliciesNextToken
string ls_ListOutgoingTypedLinksNextToken
string ls_ListPolicyAttachmentsNextToken
string ls_LookupPolicyNextToken
integer j
integer li_Count_j
string ls_FacetName
string ls_Name
string ls_SchemaArn
integer li_BinaryValue
integer li_BooleanValue
integer li_DatetimeValue
string ls_NumberValue
string ls_StringValue
string ls_KeyFacetName
string ls_KeyName
string ls_KeySchemaArn
integer li_ValueBinaryValue
integer li_ValueBooleanValue
integer li_ValueDatetimeValue
string ls_ValueNumberValue
string ls_ValueStringValue
integer k
integer li_Count_k
string ls_Selector
string ls_TargetObjectReferenceSelector
string ls_TypedLinkFacetSchemaArn
string ls_TypedLinkName
string ls_AttributeName
string ls_Path
string ls_StrVal
string ls_LinkName
string ls_SourceObjectReferenceSelector
string ls_TypedLinkFacetTypedLinkName
string ls_PolicyId
string ls_PolicyType
integer i
integer li_Count_i

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

loo_Rest = create oleobject
li_rc = loo_Rest.ConnectToNewObject("Chilkat_9_5_0.Rest")
if li_rc < 0 then
    destroy loo_Rest
    MessageBox("Error","Connecting to COM object failed")
    return
end if

loo_AuthAws = create oleobject
li_rc = loo_AuthAws.ConnectToNewObject("Chilkat_9_5_0.AuthAws")

loo_AuthAws.AccessKey = "AWS_ACCESS_KEY"
loo_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.)
loo_AuthAws.Region = "us-west-2"
loo_AuthAws.ServiceName = "clouddirectory"
// SetAuthAws causes Chilkat to automatically add the following headers: Authorization, X-Amz-Date
loo_Rest.SetAuthAws(loo_AuthAws)

// URL: https://clouddirectory.us-west-2.amazonaws.com/
// Use the same region as specified above.
li_Success = loo_Rest.Connect("clouddirectory.us-west-2.amazonaws.com",443,1,1)
if li_Success <> 1 then
    Write-Debug "ConnectFailReason: " + string(loo_Rest.ConnectFailReason)
    Write-Debug loo_Rest.LastErrorText
    destroy loo_Rest
    destroy loo_AuthAws
    return
end if

// 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

loo_Json = create oleobject
li_rc = loo_Json.ConnectToNewObject("Chilkat_9_5_0.JsonObject")

loo_Json.UpdateString("Operations[0].GetLinkAttributes.AttributeNames[0]","string")
loo_Json.UpdateString("Operations[0].GetLinkAttributes.TypedLinkSpecifier.IdentityAttributeValues[0].AttributeName","string")
loo_Json.UpdateInt("Operations[0].GetLinkAttributes.TypedLinkSpecifier.IdentityAttributeValues[0].Value.BinaryValue",123)
loo_Json.UpdateInt("Operations[0].GetLinkAttributes.TypedLinkSpecifier.IdentityAttributeValues[0].Value.BooleanValue",123)
loo_Json.UpdateInt("Operations[0].GetLinkAttributes.TypedLinkSpecifier.IdentityAttributeValues[0].Value.DatetimeValue",123)
loo_Json.UpdateString("Operations[0].GetLinkAttributes.TypedLinkSpecifier.IdentityAttributeValues[0].Value.NumberValue","string")
loo_Json.UpdateString("Operations[0].GetLinkAttributes.TypedLinkSpecifier.IdentityAttributeValues[0].Value.StringValue","string")
loo_Json.UpdateString("Operations[0].GetLinkAttributes.TypedLinkSpecifier.SourceObjectReference.Selector","string")
loo_Json.UpdateString("Operations[0].GetLinkAttributes.TypedLinkSpecifier.TargetObjectReference.Selector","string")
loo_Json.UpdateString("Operations[0].GetLinkAttributes.TypedLinkSpecifier.TypedLinkFacet.SchemaArn","string")
loo_Json.UpdateString("Operations[0].GetLinkAttributes.TypedLinkSpecifier.TypedLinkFacet.TypedLinkName","string")
loo_Json.UpdateString("Operations[0].GetObjectAttributes.AttributeNames[0]","string")
loo_Json.UpdateString("Operations[0].GetObjectAttributes.ObjectReference.Selector","string")
loo_Json.UpdateString("Operations[0].GetObjectAttributes.SchemaFacet.FacetName","string")
loo_Json.UpdateString("Operations[0].GetObjectAttributes.SchemaFacet.SchemaArn","string")
loo_Json.UpdateString("Operations[0].GetObjectInformation.ObjectReference.Selector","string")
loo_Json.UpdateInt("Operations[0].ListAttachedIndices.MaxResults",123)
loo_Json.UpdateString("Operations[0].ListAttachedIndices.NextToken","string")
loo_Json.UpdateString("Operations[0].ListAttachedIndices.TargetReference.Selector","string")
loo_Json.UpdateString("Operations[0].ListIncomingTypedLinks.FilterAttributeRanges[0].AttributeName","string")
loo_Json.UpdateString("Operations[0].ListIncomingTypedLinks.FilterAttributeRanges[0].Range.EndMode","string")
loo_Json.UpdateInt("Operations[0].ListIncomingTypedLinks.FilterAttributeRanges[0].Range.EndValue.BinaryValue",123)
loo_Json.UpdateInt("Operations[0].ListIncomingTypedLinks.FilterAttributeRanges[0].Range.EndValue.BooleanValue",123)
loo_Json.UpdateInt("Operations[0].ListIncomingTypedLinks.FilterAttributeRanges[0].Range.EndValue.DatetimeValue",123)
loo_Json.UpdateString("Operations[0].ListIncomingTypedLinks.FilterAttributeRanges[0].Range.EndValue.NumberValue","string")
loo_Json.UpdateString("Operations[0].ListIncomingTypedLinks.FilterAttributeRanges[0].Range.EndValue.StringValue","string")
loo_Json.UpdateString("Operations[0].ListIncomingTypedLinks.FilterAttributeRanges[0].Range.StartMode","string")
loo_Json.UpdateInt("Operations[0].ListIncomingTypedLinks.FilterAttributeRanges[0].Range.StartValue.BinaryValue",123)
loo_Json.UpdateInt("Operations[0].ListIncomingTypedLinks.FilterAttributeRanges[0].Range.StartValue.BooleanValue",123)
loo_Json.UpdateInt("Operations[0].ListIncomingTypedLinks.FilterAttributeRanges[0].Range.StartValue.DatetimeValue",123)
loo_Json.UpdateString("Operations[0].ListIncomingTypedLinks.FilterAttributeRanges[0].Range.StartValue.NumberValue","string")
loo_Json.UpdateString("Operations[0].ListIncomingTypedLinks.FilterAttributeRanges[0].Range.StartValue.StringValue","string")
loo_Json.UpdateString("Operations[0].ListIncomingTypedLinks.FilterTypedLink.SchemaArn","string")
loo_Json.UpdateString("Operations[0].ListIncomingTypedLinks.FilterTypedLink.TypedLinkName","string")
loo_Json.UpdateInt("Operations[0].ListIncomingTypedLinks.MaxResults",123)
loo_Json.UpdateString("Operations[0].ListIncomingTypedLinks.NextToken","string")
loo_Json.UpdateString("Operations[0].ListIncomingTypedLinks.ObjectReference.Selector","string")
loo_Json.UpdateString("Operations[0].ListIndex.IndexReference.Selector","string")
loo_Json.UpdateInt("Operations[0].ListIndex.MaxResults",123)
loo_Json.UpdateString("Operations[0].ListIndex.NextToken","string")
loo_Json.UpdateString("Operations[0].ListIndex.RangesOnIndexedValues[0].AttributeKey.FacetName","string")
loo_Json.UpdateString("Operations[0].ListIndex.RangesOnIndexedValues[0].AttributeKey.Name","string")
loo_Json.UpdateString("Operations[0].ListIndex.RangesOnIndexedValues[0].AttributeKey.SchemaArn","string")
loo_Json.UpdateString("Operations[0].ListIndex.RangesOnIndexedValues[0].Range.EndMode","string")
loo_Json.UpdateInt("Operations[0].ListIndex.RangesOnIndexedValues[0].Range.EndValue.BinaryValue",123)
loo_Json.UpdateInt("Operations[0].ListIndex.RangesOnIndexedValues[0].Range.EndValue.BooleanValue",123)
loo_Json.UpdateInt("Operations[0].ListIndex.RangesOnIndexedValues[0].Range.EndValue.DatetimeValue",123)
loo_Json.UpdateString("Operations[0].ListIndex.RangesOnIndexedValues[0].Range.EndValue.NumberValue","string")
loo_Json.UpdateString("Operations[0].ListIndex.RangesOnIndexedValues[0].Range.EndValue.StringValue","string")
loo_Json.UpdateString("Operations[0].ListIndex.RangesOnIndexedValues[0].Range.StartMode","string")
loo_Json.UpdateInt("Operations[0].ListIndex.RangesOnIndexedValues[0].Range.StartValue.BinaryValue",123)
loo_Json.UpdateInt("Operations[0].ListIndex.RangesOnIndexedValues[0].Range.StartValue.BooleanValue",123)
loo_Json.UpdateInt("Operations[0].ListIndex.RangesOnIndexedValues[0].Range.StartValue.DatetimeValue",123)
loo_Json.UpdateString("Operations[0].ListIndex.RangesOnIndexedValues[0].Range.StartValue.NumberValue","string")
loo_Json.UpdateString("Operations[0].ListIndex.RangesOnIndexedValues[0].Range.StartValue.StringValue","string")
loo_Json.UpdateString("Operations[0].ListObjectAttributes.FacetFilter.FacetName","string")
loo_Json.UpdateString("Operations[0].ListObjectAttributes.FacetFilter.SchemaArn","string")
loo_Json.UpdateInt("Operations[0].ListObjectAttributes.MaxResults",123)
loo_Json.UpdateString("Operations[0].ListObjectAttributes.NextToken","string")
loo_Json.UpdateString("Operations[0].ListObjectAttributes.ObjectReference.Selector","string")
loo_Json.UpdateInt("Operations[0].ListObjectChildren.MaxResults",123)
loo_Json.UpdateString("Operations[0].ListObjectChildren.NextToken","string")
loo_Json.UpdateString("Operations[0].ListObjectChildren.ObjectReference.Selector","string")
loo_Json.UpdateInt("Operations[0].ListObjectParentPaths.MaxResults",123)
loo_Json.UpdateString("Operations[0].ListObjectParentPaths.NextToken","string")
loo_Json.UpdateString("Operations[0].ListObjectParentPaths.ObjectReference.Selector","string")
loo_Json.UpdateInt("Operations[0].ListObjectParents.MaxResults",123)
loo_Json.UpdateString("Operations[0].ListObjectParents.NextToken","string")
loo_Json.UpdateString("Operations[0].ListObjectParents.ObjectReference.Selector","string")
loo_Json.UpdateInt("Operations[0].ListObjectPolicies.MaxResults",123)
loo_Json.UpdateString("Operations[0].ListObjectPolicies.NextToken","string")
loo_Json.UpdateString("Operations[0].ListObjectPolicies.ObjectReference.Selector","string")
loo_Json.UpdateString("Operations[0].ListOutgoingTypedLinks.FilterAttributeRanges[0].AttributeName","string")
loo_Json.UpdateString("Operations[0].ListOutgoingTypedLinks.FilterAttributeRanges[0].Range.EndMode","string")
loo_Json.UpdateInt("Operations[0].ListOutgoingTypedLinks.FilterAttributeRanges[0].Range.EndValue.BinaryValue",123)
loo_Json.UpdateInt("Operations[0].ListOutgoingTypedLinks.FilterAttributeRanges[0].Range.EndValue.BooleanValue",123)
loo_Json.UpdateInt("Operations[0].ListOutgoingTypedLinks.FilterAttributeRanges[0].Range.EndValue.DatetimeValue",123)
loo_Json.UpdateString("Operations[0].ListOutgoingTypedLinks.FilterAttributeRanges[0].Range.EndValue.NumberValue","string")
loo_Json.UpdateString("Operations[0].ListOutgoingTypedLinks.FilterAttributeRanges[0].Range.EndValue.StringValue","string")
loo_Json.UpdateString("Operations[0].ListOutgoingTypedLinks.FilterAttributeRanges[0].Range.StartMode","string")
loo_Json.UpdateInt("Operations[0].ListOutgoingTypedLinks.FilterAttributeRanges[0].Range.StartValue.BinaryValue",123)
loo_Json.UpdateInt("Operations[0].ListOutgoingTypedLinks.FilterAttributeRanges[0].Range.StartValue.BooleanValue",123)
loo_Json.UpdateInt("Operations[0].ListOutgoingTypedLinks.FilterAttributeRanges[0].Range.StartValue.DatetimeValue",123)
loo_Json.UpdateString("Operations[0].ListOutgoingTypedLinks.FilterAttributeRanges[0].Range.StartValue.NumberValue","string")
loo_Json.UpdateString("Operations[0].ListOutgoingTypedLinks.FilterAttributeRanges[0].Range.StartValue.StringValue","string")
loo_Json.UpdateString("Operations[0].ListOutgoingTypedLinks.FilterTypedLink.SchemaArn","string")
loo_Json.UpdateString("Operations[0].ListOutgoingTypedLinks.FilterTypedLink.TypedLinkName","string")
loo_Json.UpdateInt("Operations[0].ListOutgoingTypedLinks.MaxResults",123)
loo_Json.UpdateString("Operations[0].ListOutgoingTypedLinks.NextToken","string")
loo_Json.UpdateString("Operations[0].ListOutgoingTypedLinks.ObjectReference.Selector","string")
loo_Json.UpdateInt("Operations[0].ListPolicyAttachments.MaxResults",123)
loo_Json.UpdateString("Operations[0].ListPolicyAttachments.NextToken","string")
loo_Json.UpdateString("Operations[0].ListPolicyAttachments.PolicyReference.Selector","string")
loo_Json.UpdateInt("Operations[0].LookupPolicy.MaxResults",123)
loo_Json.UpdateString("Operations[0].LookupPolicy.NextToken","string")
loo_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"
//         }
//       }
//     }
//   ]
// }

loo_Rest.AddHeader("Content-Type","application/x-amz-json-1.1")
loo_Rest.AddHeader("X-Amz-Target","BatchRead")

loo_SbRequestBody = create oleobject
li_rc = loo_SbRequestBody.ConnectToNewObject("Chilkat_9_5_0.StringBuilder")

loo_Json.EmitSb(loo_SbRequestBody)
loo_SbResponseBody = create oleobject
li_rc = loo_SbResponseBody.ConnectToNewObject("Chilkat_9_5_0.StringBuilder")

li_Success = loo_Rest.FullRequestSb("POST","/amazonclouddirectory/2017-01-11/batchread",loo_SbRequestBody,loo_SbResponseBody)
if li_Success <> 1 then
    Write-Debug loo_Rest.LastErrorText
    destroy loo_Rest
    destroy loo_AuthAws
    destroy loo_Json
    destroy loo_SbRequestBody
    destroy loo_SbResponseBody
    return
end if

li_RespStatusCode = loo_Rest.ResponseStatusCode
Write-Debug "response status code = " + string(li_RespStatusCode)
if li_RespStatusCode <> 200 then
    Write-Debug "Response Header:"
    Write-Debug loo_Rest.ResponseHeader
    Write-Debug "Response Body:"
    Write-Debug loo_SbResponseBody.GetAsString()
    destroy loo_Rest
    destroy loo_AuthAws
    destroy loo_Json
    destroy loo_SbRequestBody
    destroy loo_SbResponseBody
    return
end if

loo_JResp = create oleobject
li_rc = loo_JResp.ConnectToNewObject("Chilkat_9_5_0.JsonObject")

loo_JResp.LoadSb(loo_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

i = 0
li_Count_i = loo_JResp.SizeOfArray("Responses")
do while i < li_Count_i
    loo_JResp.I = i
    ls_Message = loo_JResp.StringOf("Responses[i].ExceptionResponse.Message")
    ls_V_Type = loo_JResp.StringOf("Responses[i].ExceptionResponse.Type")
    ls_ObjectIdentifier = loo_JResp.StringOf("Responses[i].SuccessfulResponse.GetObjectInformation.ObjectIdentifier")
    ls_NextToken = loo_JResp.StringOf("Responses[i].SuccessfulResponse.ListAttachedIndices.NextToken")
    ls_ListIncomingTypedLinksNextToken = loo_JResp.StringOf("Responses[i].SuccessfulResponse.ListIncomingTypedLinks.NextToken")
    ls_ListIndexNextToken = loo_JResp.StringOf("Responses[i].SuccessfulResponse.ListIndex.NextToken")
    ls_ListObjectAttributesNextToken = loo_JResp.StringOf("Responses[i].SuccessfulResponse.ListObjectAttributes.NextToken")
    ls_V_String = loo_JResp.StringOf("Responses[i].SuccessfulResponse.ListObjectChildren.Children.string")
    ls_ListObjectChildrenNextToken = loo_JResp.StringOf("Responses[i].SuccessfulResponse.ListObjectChildren.NextToken")
    ls_ListObjectParentPathsNextToken = loo_JResp.StringOf("Responses[i].SuccessfulResponse.ListObjectParentPaths.NextToken")
    ls_ListObjectParentsNextToken = loo_JResp.StringOf("Responses[i].SuccessfulResponse.ListObjectParents.NextToken")
    ls_ListObjectPoliciesNextToken = loo_JResp.StringOf("Responses[i].SuccessfulResponse.ListObjectPolicies.NextToken")
    ls_ListOutgoingTypedLinksNextToken = loo_JResp.StringOf("Responses[i].SuccessfulResponse.ListOutgoingTypedLinks.NextToken")
    ls_ListPolicyAttachmentsNextToken = loo_JResp.StringOf("Responses[i].SuccessfulResponse.ListPolicyAttachments.NextToken")
    ls_LookupPolicyNextToken = loo_JResp.StringOf("Responses[i].SuccessfulResponse.LookupPolicy.NextToken")
    j = 0
    li_Count_j = loo_JResp.SizeOfArray("Responses[i].SuccessfulResponse.GetLinkAttributes.Attributes")
    do while j < li_Count_j
        loo_JResp.J = j
        ls_FacetName = loo_JResp.StringOf("Responses[i].SuccessfulResponse.GetLinkAttributes.Attributes[j].Key.FacetName")
        ls_Name = loo_JResp.StringOf("Responses[i].SuccessfulResponse.GetLinkAttributes.Attributes[j].Key.Name")
        ls_SchemaArn = loo_JResp.StringOf("Responses[i].SuccessfulResponse.GetLinkAttributes.Attributes[j].Key.SchemaArn")
        li_BinaryValue = loo_JResp.IntOf("Responses[i].SuccessfulResponse.GetLinkAttributes.Attributes[j].Value.BinaryValue")
        li_BooleanValue = loo_JResp.IntOf("Responses[i].SuccessfulResponse.GetLinkAttributes.Attributes[j].Value.BooleanValue")
        li_DatetimeValue = loo_JResp.IntOf("Responses[i].SuccessfulResponse.GetLinkAttributes.Attributes[j].Value.DatetimeValue")
        ls_NumberValue = loo_JResp.StringOf("Responses[i].SuccessfulResponse.GetLinkAttributes.Attributes[j].Value.NumberValue")
        ls_StringValue = loo_JResp.StringOf("Responses[i].SuccessfulResponse.GetLinkAttributes.Attributes[j].Value.StringValue")
        j = j + 1
    loop
    j = 0
    li_Count_j = loo_JResp.SizeOfArray("Responses[i].SuccessfulResponse.GetObjectAttributes.Attributes")
    do while j < li_Count_j
        loo_JResp.J = j
        ls_KeyFacetName = loo_JResp.StringOf("Responses[i].SuccessfulResponse.GetObjectAttributes.Attributes[j].Key.FacetName")
        ls_KeyName = loo_JResp.StringOf("Responses[i].SuccessfulResponse.GetObjectAttributes.Attributes[j].Key.Name")
        ls_KeySchemaArn = loo_JResp.StringOf("Responses[i].SuccessfulResponse.GetObjectAttributes.Attributes[j].Key.SchemaArn")
        li_ValueBinaryValue = loo_JResp.IntOf("Responses[i].SuccessfulResponse.GetObjectAttributes.Attributes[j].Value.BinaryValue")
        li_ValueBooleanValue = loo_JResp.IntOf("Responses[i].SuccessfulResponse.GetObjectAttributes.Attributes[j].Value.BooleanValue")
        li_ValueDatetimeValue = loo_JResp.IntOf("Responses[i].SuccessfulResponse.GetObjectAttributes.Attributes[j].Value.DatetimeValue")
        ls_ValueNumberValue = loo_JResp.StringOf("Responses[i].SuccessfulResponse.GetObjectAttributes.Attributes[j].Value.NumberValue")
        ls_ValueStringValue = loo_JResp.StringOf("Responses[i].SuccessfulResponse.GetObjectAttributes.Attributes[j].Value.StringValue")
        j = j + 1
    loop
    j = 0
    li_Count_j = loo_JResp.SizeOfArray("Responses[i].SuccessfulResponse.GetObjectInformation.SchemaFacets")
    do while j < li_Count_j
        loo_JResp.J = j
        ls_FacetName = loo_JResp.StringOf("Responses[i].SuccessfulResponse.GetObjectInformation.SchemaFacets[j].FacetName")
        ls_SchemaArn = loo_JResp.StringOf("Responses[i].SuccessfulResponse.GetObjectInformation.SchemaFacets[j].SchemaArn")
        j = j + 1
    loop
    j = 0
    li_Count_j = loo_JResp.SizeOfArray("Responses[i].SuccessfulResponse.ListAttachedIndices.IndexAttachments")
    do while j < li_Count_j
        loo_JResp.J = j
        ls_ObjectIdentifier = loo_JResp.StringOf("Responses[i].SuccessfulResponse.ListAttachedIndices.IndexAttachments[j].ObjectIdentifier")
        k = 0
        li_Count_k = loo_JResp.SizeOfArray("Responses[i].SuccessfulResponse.ListAttachedIndices.IndexAttachments[j].IndexedAttributes")
        do while k < li_Count_k
            loo_JResp.K = k
            ls_KeyFacetName = loo_JResp.StringOf("Responses[i].SuccessfulResponse.ListAttachedIndices.IndexAttachments[j].IndexedAttributes[k].Key.FacetName")
            ls_KeyName = loo_JResp.StringOf("Responses[i].SuccessfulResponse.ListAttachedIndices.IndexAttachments[j].IndexedAttributes[k].Key.Name")
            ls_KeySchemaArn = loo_JResp.StringOf("Responses[i].SuccessfulResponse.ListAttachedIndices.IndexAttachments[j].IndexedAttributes[k].Key.SchemaArn")
            li_ValueBinaryValue = loo_JResp.IntOf("Responses[i].SuccessfulResponse.ListAttachedIndices.IndexAttachments[j].IndexedAttributes[k].Value.BinaryValue")
            li_ValueBooleanValue = loo_JResp.IntOf("Responses[i].SuccessfulResponse.ListAttachedIndices.IndexAttachments[j].IndexedAttributes[k].Value.BooleanValue")
            li_ValueDatetimeValue = loo_JResp.IntOf("Responses[i].SuccessfulResponse.ListAttachedIndices.IndexAttachments[j].IndexedAttributes[k].Value.DatetimeValue")
            ls_ValueNumberValue = loo_JResp.StringOf("Responses[i].SuccessfulResponse.ListAttachedIndices.IndexAttachments[j].IndexedAttributes[k].Value.NumberValue")
            ls_ValueStringValue = loo_JResp.StringOf("Responses[i].SuccessfulResponse.ListAttachedIndices.IndexAttachments[j].IndexedAttributes[k].Value.StringValue")
            k = k + 1
        loop
        j = j + 1
    loop
    j = 0
    li_Count_j = loo_JResp.SizeOfArray("Responses[i].SuccessfulResponse.ListIncomingTypedLinks.LinkSpecifiers")
    do while j < li_Count_j
        loo_JResp.J = j
        ls_Selector = loo_JResp.StringOf("Responses[i].SuccessfulResponse.ListIncomingTypedLinks.LinkSpecifiers[j].SourceObjectReference.Selector")
        ls_TargetObjectReferenceSelector = loo_JResp.StringOf("Responses[i].SuccessfulResponse.ListIncomingTypedLinks.LinkSpecifiers[j].TargetObjectReference.Selector")
        ls_TypedLinkFacetSchemaArn = loo_JResp.StringOf("Responses[i].SuccessfulResponse.ListIncomingTypedLinks.LinkSpecifiers[j].TypedLinkFacet.SchemaArn")
        ls_TypedLinkName = loo_JResp.StringOf("Responses[i].SuccessfulResponse.ListIncomingTypedLinks.LinkSpecifiers[j].TypedLinkFacet.TypedLinkName")
        k = 0
        li_Count_k = loo_JResp.SizeOfArray("Responses[i].SuccessfulResponse.ListIncomingTypedLinks.LinkSpecifiers[j].IdentityAttributeValues")
        do while k < li_Count_k
            loo_JResp.K = k
            ls_AttributeName = loo_JResp.StringOf("Responses[i].SuccessfulResponse.ListIncomingTypedLinks.LinkSpecifiers[j].IdentityAttributeValues[k].AttributeName")
            li_ValueBinaryValue = loo_JResp.IntOf("Responses[i].SuccessfulResponse.ListIncomingTypedLinks.LinkSpecifiers[j].IdentityAttributeValues[k].Value.BinaryValue")
            li_ValueBooleanValue = loo_JResp.IntOf("Responses[i].SuccessfulResponse.ListIncomingTypedLinks.LinkSpecifiers[j].IdentityAttributeValues[k].Value.BooleanValue")
            li_ValueDatetimeValue = loo_JResp.IntOf("Responses[i].SuccessfulResponse.ListIncomingTypedLinks.LinkSpecifiers[j].IdentityAttributeValues[k].Value.DatetimeValue")
            ls_ValueNumberValue = loo_JResp.StringOf("Responses[i].SuccessfulResponse.ListIncomingTypedLinks.LinkSpecifiers[j].IdentityAttributeValues[k].Value.NumberValue")
            ls_ValueStringValue = loo_JResp.StringOf("Responses[i].SuccessfulResponse.ListIncomingTypedLinks.LinkSpecifiers[j].IdentityAttributeValues[k].Value.StringValue")
            k = k + 1
        loop
        j = j + 1
    loop
    j = 0
    li_Count_j = loo_JResp.SizeOfArray("Responses[i].SuccessfulResponse.ListIndex.IndexAttachments")
    do while j < li_Count_j
        loo_JResp.J = j
        ls_ObjectIdentifier = loo_JResp.StringOf("Responses[i].SuccessfulResponse.ListIndex.IndexAttachments[j].ObjectIdentifier")
        k = 0
        li_Count_k = loo_JResp.SizeOfArray("Responses[i].SuccessfulResponse.ListIndex.IndexAttachments[j].IndexedAttributes")
        do while k < li_Count_k
            loo_JResp.K = k
            ls_KeyFacetName = loo_JResp.StringOf("Responses[i].SuccessfulResponse.ListIndex.IndexAttachments[j].IndexedAttributes[k].Key.FacetName")
            ls_KeyName = loo_JResp.StringOf("Responses[i].SuccessfulResponse.ListIndex.IndexAttachments[j].IndexedAttributes[k].Key.Name")
            ls_KeySchemaArn = loo_JResp.StringOf("Responses[i].SuccessfulResponse.ListIndex.IndexAttachments[j].IndexedAttributes[k].Key.SchemaArn")
            li_ValueBinaryValue = loo_JResp.IntOf("Responses[i].SuccessfulResponse.ListIndex.IndexAttachments[j].IndexedAttributes[k].Value.BinaryValue")
            li_ValueBooleanValue = loo_JResp.IntOf("Responses[i].SuccessfulResponse.ListIndex.IndexAttachments[j].IndexedAttributes[k].Value.BooleanValue")
            li_ValueDatetimeValue = loo_JResp.IntOf("Responses[i].SuccessfulResponse.ListIndex.IndexAttachments[j].IndexedAttributes[k].Value.DatetimeValue")
            ls_ValueNumberValue = loo_JResp.StringOf("Responses[i].SuccessfulResponse.ListIndex.IndexAttachments[j].IndexedAttributes[k].Value.NumberValue")
            ls_ValueStringValue = loo_JResp.StringOf("Responses[i].SuccessfulResponse.ListIndex.IndexAttachments[j].IndexedAttributes[k].Value.StringValue")
            k = k + 1
        loop
        j = j + 1
    loop
    j = 0
    li_Count_j = loo_JResp.SizeOfArray("Responses[i].SuccessfulResponse.ListObjectAttributes.Attributes")
    do while j < li_Count_j
        loo_JResp.J = j
        ls_KeyFacetName = loo_JResp.StringOf("Responses[i].SuccessfulResponse.ListObjectAttributes.Attributes[j].Key.FacetName")
        ls_KeyName = loo_JResp.StringOf("Responses[i].SuccessfulResponse.ListObjectAttributes.Attributes[j].Key.Name")
        ls_KeySchemaArn = loo_JResp.StringOf("Responses[i].SuccessfulResponse.ListObjectAttributes.Attributes[j].Key.SchemaArn")
        li_ValueBinaryValue = loo_JResp.IntOf("Responses[i].SuccessfulResponse.ListObjectAttributes.Attributes[j].Value.BinaryValue")
        li_ValueBooleanValue = loo_JResp.IntOf("Responses[i].SuccessfulResponse.ListObjectAttributes.Attributes[j].Value.BooleanValue")
        li_ValueDatetimeValue = loo_JResp.IntOf("Responses[i].SuccessfulResponse.ListObjectAttributes.Attributes[j].Value.DatetimeValue")
        ls_ValueNumberValue = loo_JResp.StringOf("Responses[i].SuccessfulResponse.ListObjectAttributes.Attributes[j].Value.NumberValue")
        ls_ValueStringValue = loo_JResp.StringOf("Responses[i].SuccessfulResponse.ListObjectAttributes.Attributes[j].Value.StringValue")
        j = j + 1
    loop
    j = 0
    li_Count_j = loo_JResp.SizeOfArray("Responses[i].SuccessfulResponse.ListObjectParentPaths.PathToObjectIdentifiersList")
    do while j < li_Count_j
        loo_JResp.J = j
        ls_Path = loo_JResp.StringOf("Responses[i].SuccessfulResponse.ListObjectParentPaths.PathToObjectIdentifiersList[j].Path")
        k = 0
        li_Count_k = loo_JResp.SizeOfArray("Responses[i].SuccessfulResponse.ListObjectParentPaths.PathToObjectIdentifiersList[j].ObjectIdentifiers")
        do while k < li_Count_k
            loo_JResp.K = k
            ls_StrVal = loo_JResp.StringOf("Responses[i].SuccessfulResponse.ListObjectParentPaths.PathToObjectIdentifiersList[j].ObjectIdentifiers[k]")
            k = k + 1
        loop
        j = j + 1
    loop
    j = 0
    li_Count_j = loo_JResp.SizeOfArray("Responses[i].SuccessfulResponse.ListObjectParents.ParentLinks")
    do while j < li_Count_j
        loo_JResp.J = j
        ls_LinkName = loo_JResp.StringOf("Responses[i].SuccessfulResponse.ListObjectParents.ParentLinks[j].LinkName")
        ls_ObjectIdentifier = loo_JResp.StringOf("Responses[i].SuccessfulResponse.ListObjectParents.ParentLinks[j].ObjectIdentifier")
        j = j + 1
    loop
    j = 0
    li_Count_j = loo_JResp.SizeOfArray("Responses[i].SuccessfulResponse.ListObjectPolicies.AttachedPolicyIds")
    do while j < li_Count_j
        loo_JResp.J = j
        ls_StrVal = loo_JResp.StringOf("Responses[i].SuccessfulResponse.ListObjectPolicies.AttachedPolicyIds[j]")
        j = j + 1
    loop
    j = 0
    li_Count_j = loo_JResp.SizeOfArray("Responses[i].SuccessfulResponse.ListOutgoingTypedLinks.TypedLinkSpecifiers")
    do while j < li_Count_j
        loo_JResp.J = j
        ls_SourceObjectReferenceSelector = loo_JResp.StringOf("Responses[i].SuccessfulResponse.ListOutgoingTypedLinks.TypedLinkSpecifiers[j].SourceObjectReference.Selector")
        ls_TargetObjectReferenceSelector = loo_JResp.StringOf("Responses[i].SuccessfulResponse.ListOutgoingTypedLinks.TypedLinkSpecifiers[j].TargetObjectReference.Selector")
        ls_TypedLinkFacetSchemaArn = loo_JResp.StringOf("Responses[i].SuccessfulResponse.ListOutgoingTypedLinks.TypedLinkSpecifiers[j].TypedLinkFacet.SchemaArn")
        ls_TypedLinkFacetTypedLinkName = loo_JResp.StringOf("Responses[i].SuccessfulResponse.ListOutgoingTypedLinks.TypedLinkSpecifiers[j].TypedLinkFacet.TypedLinkName")
        k = 0
        li_Count_k = loo_JResp.SizeOfArray("Responses[i].SuccessfulResponse.ListOutgoingTypedLinks.TypedLinkSpecifiers[j].IdentityAttributeValues")
        do while k < li_Count_k
            loo_JResp.K = k
            ls_AttributeName = loo_JResp.StringOf("Responses[i].SuccessfulResponse.ListOutgoingTypedLinks.TypedLinkSpecifiers[j].IdentityAttributeValues[k].AttributeName")
            li_ValueBinaryValue = loo_JResp.IntOf("Responses[i].SuccessfulResponse.ListOutgoingTypedLinks.TypedLinkSpecifiers[j].IdentityAttributeValues[k].Value.BinaryValue")
            li_ValueBooleanValue = loo_JResp.IntOf("Responses[i].SuccessfulResponse.ListOutgoingTypedLinks.TypedLinkSpecifiers[j].IdentityAttributeValues[k].Value.BooleanValue")
            li_ValueDatetimeValue = loo_JResp.IntOf("Responses[i].SuccessfulResponse.ListOutgoingTypedLinks.TypedLinkSpecifiers[j].IdentityAttributeValues[k].Value.DatetimeValue")
            ls_ValueNumberValue = loo_JResp.StringOf("Responses[i].SuccessfulResponse.ListOutgoingTypedLinks.TypedLinkSpecifiers[j].IdentityAttributeValues[k].Value.NumberValue")
            ls_ValueStringValue = loo_JResp.StringOf("Responses[i].SuccessfulResponse.ListOutgoingTypedLinks.TypedLinkSpecifiers[j].IdentityAttributeValues[k].Value.StringValue")
            k = k + 1
        loop
        j = j + 1
    loop
    j = 0
    li_Count_j = loo_JResp.SizeOfArray("Responses[i].SuccessfulResponse.ListPolicyAttachments.ObjectIdentifiers")
    do while j < li_Count_j
        loo_JResp.J = j
        ls_StrVal = loo_JResp.StringOf("Responses[i].SuccessfulResponse.ListPolicyAttachments.ObjectIdentifiers[j]")
        j = j + 1
    loop
    j = 0
    li_Count_j = loo_JResp.SizeOfArray("Responses[i].SuccessfulResponse.LookupPolicy.PolicyToPathList")
    do while j < li_Count_j
        loo_JResp.J = j
        ls_Path = loo_JResp.StringOf("Responses[i].SuccessfulResponse.LookupPolicy.PolicyToPathList[j].Path")
        k = 0
        li_Count_k = loo_JResp.SizeOfArray("Responses[i].SuccessfulResponse.LookupPolicy.PolicyToPathList[j].Policies")
        do while k < li_Count_k
            loo_JResp.K = k
            ls_ObjectIdentifier = loo_JResp.StringOf("Responses[i].SuccessfulResponse.LookupPolicy.PolicyToPathList[j].Policies[k].ObjectIdentifier")
            ls_PolicyId = loo_JResp.StringOf("Responses[i].SuccessfulResponse.LookupPolicy.PolicyToPathList[j].Policies[k].PolicyId")
            ls_PolicyType = loo_JResp.StringOf("Responses[i].SuccessfulResponse.LookupPolicy.PolicyToPathList[j].Policies[k].PolicyType")
            k = k + 1
        loop
        j = j + 1
    loop
    i = i + 1
loop

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


destroy loo_Rest
destroy loo_AuthAws
destroy loo_Json
destroy loo_SbRequestBody
destroy loo_SbResponseBody
destroy loo_JResp