Chilkat Online Tools

BatchRead autoit Example

Amazon Cloud Directory

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

$oRest = ObjCreate("Chilkat_9_5_0.Rest")
Local $bSuccess

$oAuthAws = ObjCreate("Chilkat_9_5_0.AuthAws")
$oAuthAws.AccessKey = "AWS_ACCESS_KEY"
$oAuthAws.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.)
$oAuthAws.Region = "us-west-2"
$oAuthAws.ServiceName = "clouddirectory"
; SetAuthAws causes Chilkat to automatically add the following headers: Authorization, X-Amz-Date
$oRest.SetAuthAws($oAuthAws)

; URL: https://clouddirectory.us-west-2.amazonaws.com/
; Use the same region as specified above.
$bSuccess = $oRest.Connect("clouddirectory.us-west-2.amazonaws.com",443,True,True)
If ($bSuccess <> True) Then
    ConsoleWrite("ConnectFailReason: " & $oRest.ConnectFailReason & @CRLF)
    ConsoleWrite($oRest.LastErrorText & @CRLF)
    Exit
EndIf

; 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

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

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

$oSbRequestBody = ObjCreate("Chilkat_9_5_0.StringBuilder")
$oJson.EmitSb($oSbRequestBody)
$oSbResponseBody = ObjCreate("Chilkat_9_5_0.StringBuilder")
$bSuccess = $oRest.FullRequestSb("POST","/amazonclouddirectory/2017-01-11/batchread",$oSbRequestBody,$oSbResponseBody)
If ($bSuccess <> True) Then
    ConsoleWrite($oRest.LastErrorText & @CRLF)
    Exit
EndIf

Local $iRespStatusCode = $oRest.ResponseStatusCode
ConsoleWrite("response status code = " & $iRespStatusCode & @CRLF)
If ($iRespStatusCode <> 200) Then
    ConsoleWrite("Response Header:" & @CRLF)
    ConsoleWrite($oRest.ResponseHeader & @CRLF)
    ConsoleWrite("Response Body:" & @CRLF)
    ConsoleWrite($oSbResponseBody.GetAsString() & @CRLF)
    Exit
EndIf

$oJResp = ObjCreate("Chilkat_9_5_0.JsonObject")
$oJResp.LoadSb($oSbResponseBody)

; 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

Local $sMessage
Local $sV_Type
Local $sObjectIdentifier
Local $sNextToken
Local $sListIncomingTypedLinksNextToken
Local $sListIndexNextToken
Local $sListObjectAttributesNextToken
Local $sV_String
Local $sListObjectChildrenNextToken
Local $sListObjectParentPathsNextToken
Local $sListObjectParentsNextToken
Local $sListObjectPoliciesNextToken
Local $sListOutgoingTypedLinksNextToken
Local $sListPolicyAttachmentsNextToken
Local $sLookupPolicyNextToken
Local $iJ
Local $iCount_j
Local $sFacetName
Local $sName
Local $sSchemaArn
Local $iBinaryValue
Local $iBooleanValue
Local $iDatetimeValue
Local $sNumberValue
Local $sStringValue
Local $sKeyFacetName
Local $sKeyName
Local $sKeySchemaArn
Local $iValueBinaryValue
Local $iValueBooleanValue
Local $iValueDatetimeValue
Local $sValueNumberValue
Local $sValueStringValue
Local $iK
Local $iCount_k
Local $sSelector
Local $sTargetObjectReferenceSelector
Local $sTypedLinkFacetSchemaArn
Local $sTypedLinkName
Local $sAttributeName
Local $sPath
Local $strVal
Local $sLinkName
Local $sSourceObjectReferenceSelector
Local $sTypedLinkFacetTypedLinkName
Local $sPolicyId
Local $sPolicyType

Local $i = 0
Local $iCount_i = $oJResp.SizeOfArray("Responses")
While $i < $iCount_i
    $oJResp.I = $i
    $sMessage = $oJResp.StringOf("Responses[i].ExceptionResponse.Message")
    $sV_Type = $oJResp.StringOf("Responses[i].ExceptionResponse.Type")
    $sObjectIdentifier = $oJResp.StringOf("Responses[i].SuccessfulResponse.GetObjectInformation.ObjectIdentifier")
    $sNextToken = $oJResp.StringOf("Responses[i].SuccessfulResponse.ListAttachedIndices.NextToken")
    $sListIncomingTypedLinksNextToken = $oJResp.StringOf("Responses[i].SuccessfulResponse.ListIncomingTypedLinks.NextToken")
    $sListIndexNextToken = $oJResp.StringOf("Responses[i].SuccessfulResponse.ListIndex.NextToken")
    $sListObjectAttributesNextToken = $oJResp.StringOf("Responses[i].SuccessfulResponse.ListObjectAttributes.NextToken")
    $sV_String = $oJResp.StringOf("Responses[i].SuccessfulResponse.ListObjectChildren.Children.string")
    $sListObjectChildrenNextToken = $oJResp.StringOf("Responses[i].SuccessfulResponse.ListObjectChildren.NextToken")
    $sListObjectParentPathsNextToken = $oJResp.StringOf("Responses[i].SuccessfulResponse.ListObjectParentPaths.NextToken")
    $sListObjectParentsNextToken = $oJResp.StringOf("Responses[i].SuccessfulResponse.ListObjectParents.NextToken")
    $sListObjectPoliciesNextToken = $oJResp.StringOf("Responses[i].SuccessfulResponse.ListObjectPolicies.NextToken")
    $sListOutgoingTypedLinksNextToken = $oJResp.StringOf("Responses[i].SuccessfulResponse.ListOutgoingTypedLinks.NextToken")
    $sListPolicyAttachmentsNextToken = $oJResp.StringOf("Responses[i].SuccessfulResponse.ListPolicyAttachments.NextToken")
    $sLookupPolicyNextToken = $oJResp.StringOf("Responses[i].SuccessfulResponse.LookupPolicy.NextToken")
    $iJ = 0
    $iCount_j = $oJResp.SizeOfArray("Responses[i].SuccessfulResponse.GetLinkAttributes.Attributes")
    While $iJ < $iCount_j
        $oJResp.J = $iJ
        $sFacetName = $oJResp.StringOf("Responses[i].SuccessfulResponse.GetLinkAttributes.Attributes[j].Key.FacetName")
        $sName = $oJResp.StringOf("Responses[i].SuccessfulResponse.GetLinkAttributes.Attributes[j].Key.Name")
        $sSchemaArn = $oJResp.StringOf("Responses[i].SuccessfulResponse.GetLinkAttributes.Attributes[j].Key.SchemaArn")
        $iBinaryValue = $oJResp.IntOf("Responses[i].SuccessfulResponse.GetLinkAttributes.Attributes[j].Value.BinaryValue")
        $iBooleanValue = $oJResp.IntOf("Responses[i].SuccessfulResponse.GetLinkAttributes.Attributes[j].Value.BooleanValue")
        $iDatetimeValue = $oJResp.IntOf("Responses[i].SuccessfulResponse.GetLinkAttributes.Attributes[j].Value.DatetimeValue")
        $sNumberValue = $oJResp.StringOf("Responses[i].SuccessfulResponse.GetLinkAttributes.Attributes[j].Value.NumberValue")
        $sStringValue = $oJResp.StringOf("Responses[i].SuccessfulResponse.GetLinkAttributes.Attributes[j].Value.StringValue")
        $iJ = $iJ + 1
    Wend
    $iJ = 0
    $iCount_j = $oJResp.SizeOfArray("Responses[i].SuccessfulResponse.GetObjectAttributes.Attributes")
    While $iJ < $iCount_j
        $oJResp.J = $iJ
        $sKeyFacetName = $oJResp.StringOf("Responses[i].SuccessfulResponse.GetObjectAttributes.Attributes[j].Key.FacetName")
        $sKeyName = $oJResp.StringOf("Responses[i].SuccessfulResponse.GetObjectAttributes.Attributes[j].Key.Name")
        $sKeySchemaArn = $oJResp.StringOf("Responses[i].SuccessfulResponse.GetObjectAttributes.Attributes[j].Key.SchemaArn")
        $iValueBinaryValue = $oJResp.IntOf("Responses[i].SuccessfulResponse.GetObjectAttributes.Attributes[j].Value.BinaryValue")
        $iValueBooleanValue = $oJResp.IntOf("Responses[i].SuccessfulResponse.GetObjectAttributes.Attributes[j].Value.BooleanValue")
        $iValueDatetimeValue = $oJResp.IntOf("Responses[i].SuccessfulResponse.GetObjectAttributes.Attributes[j].Value.DatetimeValue")
        $sValueNumberValue = $oJResp.StringOf("Responses[i].SuccessfulResponse.GetObjectAttributes.Attributes[j].Value.NumberValue")
        $sValueStringValue = $oJResp.StringOf("Responses[i].SuccessfulResponse.GetObjectAttributes.Attributes[j].Value.StringValue")
        $iJ = $iJ + 1
    Wend
    $iJ = 0
    $iCount_j = $oJResp.SizeOfArray("Responses[i].SuccessfulResponse.GetObjectInformation.SchemaFacets")
    While $iJ < $iCount_j
        $oJResp.J = $iJ
        $sFacetName = $oJResp.StringOf("Responses[i].SuccessfulResponse.GetObjectInformation.SchemaFacets[j].FacetName")
        $sSchemaArn = $oJResp.StringOf("Responses[i].SuccessfulResponse.GetObjectInformation.SchemaFacets[j].SchemaArn")
        $iJ = $iJ + 1
    Wend
    $iJ = 0
    $iCount_j = $oJResp.SizeOfArray("Responses[i].SuccessfulResponse.ListAttachedIndices.IndexAttachments")
    While $iJ < $iCount_j
        $oJResp.J = $iJ
        $sObjectIdentifier = $oJResp.StringOf("Responses[i].SuccessfulResponse.ListAttachedIndices.IndexAttachments[j].ObjectIdentifier")
        $iK = 0
        $iCount_k = $oJResp.SizeOfArray("Responses[i].SuccessfulResponse.ListAttachedIndices.IndexAttachments[j].IndexedAttributes")
        While $iK < $iCount_k
            $oJResp.K = $iK
            $sKeyFacetName = $oJResp.StringOf("Responses[i].SuccessfulResponse.ListAttachedIndices.IndexAttachments[j].IndexedAttributes[k].Key.FacetName")
            $sKeyName = $oJResp.StringOf("Responses[i].SuccessfulResponse.ListAttachedIndices.IndexAttachments[j].IndexedAttributes[k].Key.Name")
            $sKeySchemaArn = $oJResp.StringOf("Responses[i].SuccessfulResponse.ListAttachedIndices.IndexAttachments[j].IndexedAttributes[k].Key.SchemaArn")
            $iValueBinaryValue = $oJResp.IntOf("Responses[i].SuccessfulResponse.ListAttachedIndices.IndexAttachments[j].IndexedAttributes[k].Value.BinaryValue")
            $iValueBooleanValue = $oJResp.IntOf("Responses[i].SuccessfulResponse.ListAttachedIndices.IndexAttachments[j].IndexedAttributes[k].Value.BooleanValue")
            $iValueDatetimeValue = $oJResp.IntOf("Responses[i].SuccessfulResponse.ListAttachedIndices.IndexAttachments[j].IndexedAttributes[k].Value.DatetimeValue")
            $sValueNumberValue = $oJResp.StringOf("Responses[i].SuccessfulResponse.ListAttachedIndices.IndexAttachments[j].IndexedAttributes[k].Value.NumberValue")
            $sValueStringValue = $oJResp.StringOf("Responses[i].SuccessfulResponse.ListAttachedIndices.IndexAttachments[j].IndexedAttributes[k].Value.StringValue")
            $iK = $iK + 1
        Wend
        $iJ = $iJ + 1
    Wend
    $iJ = 0
    $iCount_j = $oJResp.SizeOfArray("Responses[i].SuccessfulResponse.ListIncomingTypedLinks.LinkSpecifiers")
    While $iJ < $iCount_j
        $oJResp.J = $iJ
        $sSelector = $oJResp.StringOf("Responses[i].SuccessfulResponse.ListIncomingTypedLinks.LinkSpecifiers[j].SourceObjectReference.Selector")
        $sTargetObjectReferenceSelector = $oJResp.StringOf("Responses[i].SuccessfulResponse.ListIncomingTypedLinks.LinkSpecifiers[j].TargetObjectReference.Selector")
        $sTypedLinkFacetSchemaArn = $oJResp.StringOf("Responses[i].SuccessfulResponse.ListIncomingTypedLinks.LinkSpecifiers[j].TypedLinkFacet.SchemaArn")
        $sTypedLinkName = $oJResp.StringOf("Responses[i].SuccessfulResponse.ListIncomingTypedLinks.LinkSpecifiers[j].TypedLinkFacet.TypedLinkName")
        $iK = 0
        $iCount_k = $oJResp.SizeOfArray("Responses[i].SuccessfulResponse.ListIncomingTypedLinks.LinkSpecifiers[j].IdentityAttributeValues")
        While $iK < $iCount_k
            $oJResp.K = $iK
            $sAttributeName = $oJResp.StringOf("Responses[i].SuccessfulResponse.ListIncomingTypedLinks.LinkSpecifiers[j].IdentityAttributeValues[k].AttributeName")
            $iValueBinaryValue = $oJResp.IntOf("Responses[i].SuccessfulResponse.ListIncomingTypedLinks.LinkSpecifiers[j].IdentityAttributeValues[k].Value.BinaryValue")
            $iValueBooleanValue = $oJResp.IntOf("Responses[i].SuccessfulResponse.ListIncomingTypedLinks.LinkSpecifiers[j].IdentityAttributeValues[k].Value.BooleanValue")
            $iValueDatetimeValue = $oJResp.IntOf("Responses[i].SuccessfulResponse.ListIncomingTypedLinks.LinkSpecifiers[j].IdentityAttributeValues[k].Value.DatetimeValue")
            $sValueNumberValue = $oJResp.StringOf("Responses[i].SuccessfulResponse.ListIncomingTypedLinks.LinkSpecifiers[j].IdentityAttributeValues[k].Value.NumberValue")
            $sValueStringValue = $oJResp.StringOf("Responses[i].SuccessfulResponse.ListIncomingTypedLinks.LinkSpecifiers[j].IdentityAttributeValues[k].Value.StringValue")
            $iK = $iK + 1
        Wend
        $iJ = $iJ + 1
    Wend
    $iJ = 0
    $iCount_j = $oJResp.SizeOfArray("Responses[i].SuccessfulResponse.ListIndex.IndexAttachments")
    While $iJ < $iCount_j
        $oJResp.J = $iJ
        $sObjectIdentifier = $oJResp.StringOf("Responses[i].SuccessfulResponse.ListIndex.IndexAttachments[j].ObjectIdentifier")
        $iK = 0
        $iCount_k = $oJResp.SizeOfArray("Responses[i].SuccessfulResponse.ListIndex.IndexAttachments[j].IndexedAttributes")
        While $iK < $iCount_k
            $oJResp.K = $iK
            $sKeyFacetName = $oJResp.StringOf("Responses[i].SuccessfulResponse.ListIndex.IndexAttachments[j].IndexedAttributes[k].Key.FacetName")
            $sKeyName = $oJResp.StringOf("Responses[i].SuccessfulResponse.ListIndex.IndexAttachments[j].IndexedAttributes[k].Key.Name")
            $sKeySchemaArn = $oJResp.StringOf("Responses[i].SuccessfulResponse.ListIndex.IndexAttachments[j].IndexedAttributes[k].Key.SchemaArn")
            $iValueBinaryValue = $oJResp.IntOf("Responses[i].SuccessfulResponse.ListIndex.IndexAttachments[j].IndexedAttributes[k].Value.BinaryValue")
            $iValueBooleanValue = $oJResp.IntOf("Responses[i].SuccessfulResponse.ListIndex.IndexAttachments[j].IndexedAttributes[k].Value.BooleanValue")
            $iValueDatetimeValue = $oJResp.IntOf("Responses[i].SuccessfulResponse.ListIndex.IndexAttachments[j].IndexedAttributes[k].Value.DatetimeValue")
            $sValueNumberValue = $oJResp.StringOf("Responses[i].SuccessfulResponse.ListIndex.IndexAttachments[j].IndexedAttributes[k].Value.NumberValue")
            $sValueStringValue = $oJResp.StringOf("Responses[i].SuccessfulResponse.ListIndex.IndexAttachments[j].IndexedAttributes[k].Value.StringValue")
            $iK = $iK + 1
        Wend
        $iJ = $iJ + 1
    Wend
    $iJ = 0
    $iCount_j = $oJResp.SizeOfArray("Responses[i].SuccessfulResponse.ListObjectAttributes.Attributes")
    While $iJ < $iCount_j
        $oJResp.J = $iJ
        $sKeyFacetName = $oJResp.StringOf("Responses[i].SuccessfulResponse.ListObjectAttributes.Attributes[j].Key.FacetName")
        $sKeyName = $oJResp.StringOf("Responses[i].SuccessfulResponse.ListObjectAttributes.Attributes[j].Key.Name")
        $sKeySchemaArn = $oJResp.StringOf("Responses[i].SuccessfulResponse.ListObjectAttributes.Attributes[j].Key.SchemaArn")
        $iValueBinaryValue = $oJResp.IntOf("Responses[i].SuccessfulResponse.ListObjectAttributes.Attributes[j].Value.BinaryValue")
        $iValueBooleanValue = $oJResp.IntOf("Responses[i].SuccessfulResponse.ListObjectAttributes.Attributes[j].Value.BooleanValue")
        $iValueDatetimeValue = $oJResp.IntOf("Responses[i].SuccessfulResponse.ListObjectAttributes.Attributes[j].Value.DatetimeValue")
        $sValueNumberValue = $oJResp.StringOf("Responses[i].SuccessfulResponse.ListObjectAttributes.Attributes[j].Value.NumberValue")
        $sValueStringValue = $oJResp.StringOf("Responses[i].SuccessfulResponse.ListObjectAttributes.Attributes[j].Value.StringValue")
        $iJ = $iJ + 1
    Wend
    $iJ = 0
    $iCount_j = $oJResp.SizeOfArray("Responses[i].SuccessfulResponse.ListObjectParentPaths.PathToObjectIdentifiersList")
    While $iJ < $iCount_j
        $oJResp.J = $iJ
        $sPath = $oJResp.StringOf("Responses[i].SuccessfulResponse.ListObjectParentPaths.PathToObjectIdentifiersList[j].Path")
        $iK = 0
        $iCount_k = $oJResp.SizeOfArray("Responses[i].SuccessfulResponse.ListObjectParentPaths.PathToObjectIdentifiersList[j].ObjectIdentifiers")
        While $iK < $iCount_k
            $oJResp.K = $iK
            $strVal = $oJResp.StringOf("Responses[i].SuccessfulResponse.ListObjectParentPaths.PathToObjectIdentifiersList[j].ObjectIdentifiers[k]")
            $iK = $iK + 1
        Wend
        $iJ = $iJ + 1
    Wend
    $iJ = 0
    $iCount_j = $oJResp.SizeOfArray("Responses[i].SuccessfulResponse.ListObjectParents.ParentLinks")
    While $iJ < $iCount_j
        $oJResp.J = $iJ
        $sLinkName = $oJResp.StringOf("Responses[i].SuccessfulResponse.ListObjectParents.ParentLinks[j].LinkName")
        $sObjectIdentifier = $oJResp.StringOf("Responses[i].SuccessfulResponse.ListObjectParents.ParentLinks[j].ObjectIdentifier")
        $iJ = $iJ + 1
    Wend
    $iJ = 0
    $iCount_j = $oJResp.SizeOfArray("Responses[i].SuccessfulResponse.ListObjectPolicies.AttachedPolicyIds")
    While $iJ < $iCount_j
        $oJResp.J = $iJ
        $strVal = $oJResp.StringOf("Responses[i].SuccessfulResponse.ListObjectPolicies.AttachedPolicyIds[j]")
        $iJ = $iJ + 1
    Wend
    $iJ = 0
    $iCount_j = $oJResp.SizeOfArray("Responses[i].SuccessfulResponse.ListOutgoingTypedLinks.TypedLinkSpecifiers")
    While $iJ < $iCount_j
        $oJResp.J = $iJ
        $sSourceObjectReferenceSelector = $oJResp.StringOf("Responses[i].SuccessfulResponse.ListOutgoingTypedLinks.TypedLinkSpecifiers[j].SourceObjectReference.Selector")
        $sTargetObjectReferenceSelector = $oJResp.StringOf("Responses[i].SuccessfulResponse.ListOutgoingTypedLinks.TypedLinkSpecifiers[j].TargetObjectReference.Selector")
        $sTypedLinkFacetSchemaArn = $oJResp.StringOf("Responses[i].SuccessfulResponse.ListOutgoingTypedLinks.TypedLinkSpecifiers[j].TypedLinkFacet.SchemaArn")
        $sTypedLinkFacetTypedLinkName = $oJResp.StringOf("Responses[i].SuccessfulResponse.ListOutgoingTypedLinks.TypedLinkSpecifiers[j].TypedLinkFacet.TypedLinkName")
        $iK = 0
        $iCount_k = $oJResp.SizeOfArray("Responses[i].SuccessfulResponse.ListOutgoingTypedLinks.TypedLinkSpecifiers[j].IdentityAttributeValues")
        While $iK < $iCount_k
            $oJResp.K = $iK
            $sAttributeName = $oJResp.StringOf("Responses[i].SuccessfulResponse.ListOutgoingTypedLinks.TypedLinkSpecifiers[j].IdentityAttributeValues[k].AttributeName")
            $iValueBinaryValue = $oJResp.IntOf("Responses[i].SuccessfulResponse.ListOutgoingTypedLinks.TypedLinkSpecifiers[j].IdentityAttributeValues[k].Value.BinaryValue")
            $iValueBooleanValue = $oJResp.IntOf("Responses[i].SuccessfulResponse.ListOutgoingTypedLinks.TypedLinkSpecifiers[j].IdentityAttributeValues[k].Value.BooleanValue")
            $iValueDatetimeValue = $oJResp.IntOf("Responses[i].SuccessfulResponse.ListOutgoingTypedLinks.TypedLinkSpecifiers[j].IdentityAttributeValues[k].Value.DatetimeValue")
            $sValueNumberValue = $oJResp.StringOf("Responses[i].SuccessfulResponse.ListOutgoingTypedLinks.TypedLinkSpecifiers[j].IdentityAttributeValues[k].Value.NumberValue")
            $sValueStringValue = $oJResp.StringOf("Responses[i].SuccessfulResponse.ListOutgoingTypedLinks.TypedLinkSpecifiers[j].IdentityAttributeValues[k].Value.StringValue")
            $iK = $iK + 1
        Wend
        $iJ = $iJ + 1
    Wend
    $iJ = 0
    $iCount_j = $oJResp.SizeOfArray("Responses[i].SuccessfulResponse.ListPolicyAttachments.ObjectIdentifiers")
    While $iJ < $iCount_j
        $oJResp.J = $iJ
        $strVal = $oJResp.StringOf("Responses[i].SuccessfulResponse.ListPolicyAttachments.ObjectIdentifiers[j]")
        $iJ = $iJ + 1
    Wend
    $iJ = 0
    $iCount_j = $oJResp.SizeOfArray("Responses[i].SuccessfulResponse.LookupPolicy.PolicyToPathList")
    While $iJ < $iCount_j
        $oJResp.J = $iJ
        $sPath = $oJResp.StringOf("Responses[i].SuccessfulResponse.LookupPolicy.PolicyToPathList[j].Path")
        $iK = 0
        $iCount_k = $oJResp.SizeOfArray("Responses[i].SuccessfulResponse.LookupPolicy.PolicyToPathList[j].Policies")
        While $iK < $iCount_k
            $oJResp.K = $iK
            $sObjectIdentifier = $oJResp.StringOf("Responses[i].SuccessfulResponse.LookupPolicy.PolicyToPathList[j].Policies[k].ObjectIdentifier")
            $sPolicyId = $oJResp.StringOf("Responses[i].SuccessfulResponse.LookupPolicy.PolicyToPathList[j].Policies[k].PolicyId")
            $sPolicyType = $oJResp.StringOf("Responses[i].SuccessfulResponse.LookupPolicy.PolicyToPathList[j].Policies[k].PolicyType")
            $iK = $iK + 1
        Wend
        $iJ = $iJ + 1
    Wend
    $i = $i + 1
Wend

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