Chilkat Online Tools

BatchRead Swift3 Example

Amazon Cloud Directory

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

    let rest = CkoRest()!
    var success: Bool

    let authAws = CkoAuthAws()!
    authAws.accessKey = "AWS_ACCESS_KEY"
    authAws.secretKey = "AWS_SECRET_KEY"

    // Don't forget to change the region to your particular region. (Also make the same change in the call to Connect below.)
    authAws.region = "us-west-2"
    authAws.serviceName = "clouddirectory"
    // SetAuthAws causes Chilkat to automatically add the following headers: Authorization, X-Amz-Date
    rest.setAuthAws(authAws)

    // URL: https://clouddirectory.us-west-2.amazonaws.com/
    // Use the same region as specified above.
    success = rest.connect("clouddirectory.us-west-2.amazonaws.com", port: 443, tls: true, autoReconnect: true)
    if success != true {
        print("ConnectFailReason: \(rest.connectFailReason.intValue)")
        print("\(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

    let json = CkoJsonObject()!
    json.update("Operations[0].GetLinkAttributes.AttributeNames[0]", value: "string")
    json.update("Operations[0].GetLinkAttributes.TypedLinkSpecifier.IdentityAttributeValues[0].AttributeName", value: "string")
    json.updateInt("Operations[0].GetLinkAttributes.TypedLinkSpecifier.IdentityAttributeValues[0].Value.BinaryValue", value: 123)
    json.updateInt("Operations[0].GetLinkAttributes.TypedLinkSpecifier.IdentityAttributeValues[0].Value.BooleanValue", value: 123)
    json.updateInt("Operations[0].GetLinkAttributes.TypedLinkSpecifier.IdentityAttributeValues[0].Value.DatetimeValue", value: 123)
    json.update("Operations[0].GetLinkAttributes.TypedLinkSpecifier.IdentityAttributeValues[0].Value.NumberValue", value: "string")
    json.update("Operations[0].GetLinkAttributes.TypedLinkSpecifier.IdentityAttributeValues[0].Value.StringValue", value: "string")
    json.update("Operations[0].GetLinkAttributes.TypedLinkSpecifier.SourceObjectReference.Selector", value: "string")
    json.update("Operations[0].GetLinkAttributes.TypedLinkSpecifier.TargetObjectReference.Selector", value: "string")
    json.update("Operations[0].GetLinkAttributes.TypedLinkSpecifier.TypedLinkFacet.SchemaArn", value: "string")
    json.update("Operations[0].GetLinkAttributes.TypedLinkSpecifier.TypedLinkFacet.TypedLinkName", value: "string")
    json.update("Operations[0].GetObjectAttributes.AttributeNames[0]", value: "string")
    json.update("Operations[0].GetObjectAttributes.ObjectReference.Selector", value: "string")
    json.update("Operations[0].GetObjectAttributes.SchemaFacet.FacetName", value: "string")
    json.update("Operations[0].GetObjectAttributes.SchemaFacet.SchemaArn", value: "string")
    json.update("Operations[0].GetObjectInformation.ObjectReference.Selector", value: "string")
    json.updateInt("Operations[0].ListAttachedIndices.MaxResults", value: 123)
    json.update("Operations[0].ListAttachedIndices.NextToken", value: "string")
    json.update("Operations[0].ListAttachedIndices.TargetReference.Selector", value: "string")
    json.update("Operations[0].ListIncomingTypedLinks.FilterAttributeRanges[0].AttributeName", value: "string")
    json.update("Operations[0].ListIncomingTypedLinks.FilterAttributeRanges[0].Range.EndMode", value: "string")
    json.updateInt("Operations[0].ListIncomingTypedLinks.FilterAttributeRanges[0].Range.EndValue.BinaryValue", value: 123)
    json.updateInt("Operations[0].ListIncomingTypedLinks.FilterAttributeRanges[0].Range.EndValue.BooleanValue", value: 123)
    json.updateInt("Operations[0].ListIncomingTypedLinks.FilterAttributeRanges[0].Range.EndValue.DatetimeValue", value: 123)
    json.update("Operations[0].ListIncomingTypedLinks.FilterAttributeRanges[0].Range.EndValue.NumberValue", value: "string")
    json.update("Operations[0].ListIncomingTypedLinks.FilterAttributeRanges[0].Range.EndValue.StringValue", value: "string")
    json.update("Operations[0].ListIncomingTypedLinks.FilterAttributeRanges[0].Range.StartMode", value: "string")
    json.updateInt("Operations[0].ListIncomingTypedLinks.FilterAttributeRanges[0].Range.StartValue.BinaryValue", value: 123)
    json.updateInt("Operations[0].ListIncomingTypedLinks.FilterAttributeRanges[0].Range.StartValue.BooleanValue", value: 123)
    json.updateInt("Operations[0].ListIncomingTypedLinks.FilterAttributeRanges[0].Range.StartValue.DatetimeValue", value: 123)
    json.update("Operations[0].ListIncomingTypedLinks.FilterAttributeRanges[0].Range.StartValue.NumberValue", value: "string")
    json.update("Operations[0].ListIncomingTypedLinks.FilterAttributeRanges[0].Range.StartValue.StringValue", value: "string")
    json.update("Operations[0].ListIncomingTypedLinks.FilterTypedLink.SchemaArn", value: "string")
    json.update("Operations[0].ListIncomingTypedLinks.FilterTypedLink.TypedLinkName", value: "string")
    json.updateInt("Operations[0].ListIncomingTypedLinks.MaxResults", value: 123)
    json.update("Operations[0].ListIncomingTypedLinks.NextToken", value: "string")
    json.update("Operations[0].ListIncomingTypedLinks.ObjectReference.Selector", value: "string")
    json.update("Operations[0].ListIndex.IndexReference.Selector", value: "string")
    json.updateInt("Operations[0].ListIndex.MaxResults", value: 123)
    json.update("Operations[0].ListIndex.NextToken", value: "string")
    json.update("Operations[0].ListIndex.RangesOnIndexedValues[0].AttributeKey.FacetName", value: "string")
    json.update("Operations[0].ListIndex.RangesOnIndexedValues[0].AttributeKey.Name", value: "string")
    json.update("Operations[0].ListIndex.RangesOnIndexedValues[0].AttributeKey.SchemaArn", value: "string")
    json.update("Operations[0].ListIndex.RangesOnIndexedValues[0].Range.EndMode", value: "string")
    json.updateInt("Operations[0].ListIndex.RangesOnIndexedValues[0].Range.EndValue.BinaryValue", value: 123)
    json.updateInt("Operations[0].ListIndex.RangesOnIndexedValues[0].Range.EndValue.BooleanValue", value: 123)
    json.updateInt("Operations[0].ListIndex.RangesOnIndexedValues[0].Range.EndValue.DatetimeValue", value: 123)
    json.update("Operations[0].ListIndex.RangesOnIndexedValues[0].Range.EndValue.NumberValue", value: "string")
    json.update("Operations[0].ListIndex.RangesOnIndexedValues[0].Range.EndValue.StringValue", value: "string")
    json.update("Operations[0].ListIndex.RangesOnIndexedValues[0].Range.StartMode", value: "string")
    json.updateInt("Operations[0].ListIndex.RangesOnIndexedValues[0].Range.StartValue.BinaryValue", value: 123)
    json.updateInt("Operations[0].ListIndex.RangesOnIndexedValues[0].Range.StartValue.BooleanValue", value: 123)
    json.updateInt("Operations[0].ListIndex.RangesOnIndexedValues[0].Range.StartValue.DatetimeValue", value: 123)
    json.update("Operations[0].ListIndex.RangesOnIndexedValues[0].Range.StartValue.NumberValue", value: "string")
    json.update("Operations[0].ListIndex.RangesOnIndexedValues[0].Range.StartValue.StringValue", value: "string")
    json.update("Operations[0].ListObjectAttributes.FacetFilter.FacetName", value: "string")
    json.update("Operations[0].ListObjectAttributes.FacetFilter.SchemaArn", value: "string")
    json.updateInt("Operations[0].ListObjectAttributes.MaxResults", value: 123)
    json.update("Operations[0].ListObjectAttributes.NextToken", value: "string")
    json.update("Operations[0].ListObjectAttributes.ObjectReference.Selector", value: "string")
    json.updateInt("Operations[0].ListObjectChildren.MaxResults", value: 123)
    json.update("Operations[0].ListObjectChildren.NextToken", value: "string")
    json.update("Operations[0].ListObjectChildren.ObjectReference.Selector", value: "string")
    json.updateInt("Operations[0].ListObjectParentPaths.MaxResults", value: 123)
    json.update("Operations[0].ListObjectParentPaths.NextToken", value: "string")
    json.update("Operations[0].ListObjectParentPaths.ObjectReference.Selector", value: "string")
    json.updateInt("Operations[0].ListObjectParents.MaxResults", value: 123)
    json.update("Operations[0].ListObjectParents.NextToken", value: "string")
    json.update("Operations[0].ListObjectParents.ObjectReference.Selector", value: "string")
    json.updateInt("Operations[0].ListObjectPolicies.MaxResults", value: 123)
    json.update("Operations[0].ListObjectPolicies.NextToken", value: "string")
    json.update("Operations[0].ListObjectPolicies.ObjectReference.Selector", value: "string")
    json.update("Operations[0].ListOutgoingTypedLinks.FilterAttributeRanges[0].AttributeName", value: "string")
    json.update("Operations[0].ListOutgoingTypedLinks.FilterAttributeRanges[0].Range.EndMode", value: "string")
    json.updateInt("Operations[0].ListOutgoingTypedLinks.FilterAttributeRanges[0].Range.EndValue.BinaryValue", value: 123)
    json.updateInt("Operations[0].ListOutgoingTypedLinks.FilterAttributeRanges[0].Range.EndValue.BooleanValue", value: 123)
    json.updateInt("Operations[0].ListOutgoingTypedLinks.FilterAttributeRanges[0].Range.EndValue.DatetimeValue", value: 123)
    json.update("Operations[0].ListOutgoingTypedLinks.FilterAttributeRanges[0].Range.EndValue.NumberValue", value: "string")
    json.update("Operations[0].ListOutgoingTypedLinks.FilterAttributeRanges[0].Range.EndValue.StringValue", value: "string")
    json.update("Operations[0].ListOutgoingTypedLinks.FilterAttributeRanges[0].Range.StartMode", value: "string")
    json.updateInt("Operations[0].ListOutgoingTypedLinks.FilterAttributeRanges[0].Range.StartValue.BinaryValue", value: 123)
    json.updateInt("Operations[0].ListOutgoingTypedLinks.FilterAttributeRanges[0].Range.StartValue.BooleanValue", value: 123)
    json.updateInt("Operations[0].ListOutgoingTypedLinks.FilterAttributeRanges[0].Range.StartValue.DatetimeValue", value: 123)
    json.update("Operations[0].ListOutgoingTypedLinks.FilterAttributeRanges[0].Range.StartValue.NumberValue", value: "string")
    json.update("Operations[0].ListOutgoingTypedLinks.FilterAttributeRanges[0].Range.StartValue.StringValue", value: "string")
    json.update("Operations[0].ListOutgoingTypedLinks.FilterTypedLink.SchemaArn", value: "string")
    json.update("Operations[0].ListOutgoingTypedLinks.FilterTypedLink.TypedLinkName", value: "string")
    json.updateInt("Operations[0].ListOutgoingTypedLinks.MaxResults", value: 123)
    json.update("Operations[0].ListOutgoingTypedLinks.NextToken", value: "string")
    json.update("Operations[0].ListOutgoingTypedLinks.ObjectReference.Selector", value: "string")
    json.updateInt("Operations[0].ListPolicyAttachments.MaxResults", value: 123)
    json.update("Operations[0].ListPolicyAttachments.NextToken", value: "string")
    json.update("Operations[0].ListPolicyAttachments.PolicyReference.Selector", value: "string")
    json.updateInt("Operations[0].LookupPolicy.MaxResults", value: 123)
    json.update("Operations[0].LookupPolicy.NextToken", value: "string")
    json.update("Operations[0].LookupPolicy.ObjectReference.Selector", value: "string")

    // The JSON request body created by the above code:

    // {
    //   "Operations": [
    //     {
    //       "GetLinkAttributes": {
    //         "AttributeNames": [
    //           "string"
    //         ],
    //         "TypedLinkSpecifier": {
    //           "IdentityAttributeValues": [
    //             {
    //               "AttributeName": "string",
    //               "Value": {
    //                 "BinaryValue": blob,
    //                 "BooleanValue": boolean,
    //                 "DatetimeValue": number,
    //                 "NumberValue": "string",
    //                 "StringValue": "string"
    //               }
    //             }
    //           ],
    //           "SourceObjectReference": {
    //             "Selector": "string"
    //           },
    //           "TargetObjectReference": {
    //             "Selector": "string"
    //           },
    //           "TypedLinkFacet": {
    //             "SchemaArn": "string",
    //             "TypedLinkName": "string"
    //           }
    //         }
    //       },
    //       "GetObjectAttributes": {
    //         "AttributeNames": [
    //           "string"
    //         ],
    //         "ObjectReference": {
    //           "Selector": "string"
    //         },
    //         "SchemaFacet": {
    //           "FacetName": "string",
    //           "SchemaArn": "string"
    //         }
    //       },
    //       "GetObjectInformation": {
    //         "ObjectReference": {
    //           "Selector": "string"
    //         }
    //       },
    //       "ListAttachedIndices": {
    //         "MaxResults": number,
    //         "NextToken": "string",
    //         "TargetReference": {
    //           "Selector": "string"
    //         }
    //       },
    //       "ListIncomingTypedLinks": {
    //         "FilterAttributeRanges": [
    //           {
    //             "AttributeName": "string",
    //             "Range": {
    //               "EndMode": "string",
    //               "EndValue": {
    //                 "BinaryValue": blob,
    //                 "BooleanValue": boolean,
    //                 "DatetimeValue": number,
    //                 "NumberValue": "string",
    //                 "StringValue": "string"
    //               },
    //               "StartMode": "string",
    //               "StartValue": {
    //                 "BinaryValue": blob,
    //                 "BooleanValue": boolean,
    //                 "DatetimeValue": number,
    //                 "NumberValue": "string",
    //                 "StringValue": "string"
    //               }
    //             }
    //           }
    //         ],
    //         "FilterTypedLink": {
    //           "SchemaArn": "string",
    //           "TypedLinkName": "string"
    //         },
    //         "MaxResults": number,
    //         "NextToken": "string",
    //         "ObjectReference": {
    //           "Selector": "string"
    //         }
    //       },
    //       "ListIndex": {
    //         "IndexReference": {
    //           "Selector": "string"
    //         },
    //         "MaxResults": number,
    //         "NextToken": "string",
    //         "RangesOnIndexedValues": [
    //           {
    //             "AttributeKey": {
    //               "FacetName": "string",
    //               "Name": "string",
    //               "SchemaArn": "string"
    //             },
    //             "Range": {
    //               "EndMode": "string",
    //               "EndValue": {
    //                 "BinaryValue": blob,
    //                 "BooleanValue": boolean,
    //                 "DatetimeValue": number,
    //                 "NumberValue": "string",
    //                 "StringValue": "string"
    //               },
    //               "StartMode": "string",
    //               "StartValue": {
    //                 "BinaryValue": blob,
    //                 "BooleanValue": boolean,
    //                 "DatetimeValue": number,
    //                 "NumberValue": "string",
    //                 "StringValue": "string"
    //               }
    //             }
    //           }
    //         ]
    //       },
    //       "ListObjectAttributes": {
    //         "FacetFilter": {
    //           "FacetName": "string",
    //           "SchemaArn": "string"
    //         },
    //         "MaxResults": number,
    //         "NextToken": "string",
    //         "ObjectReference": {
    //           "Selector": "string"
    //         }
    //       },
    //       "ListObjectChildren": {
    //         "MaxResults": number,
    //         "NextToken": "string",
    //         "ObjectReference": {
    //           "Selector": "string"
    //         }
    //       },
    //       "ListObjectParentPaths": {
    //         "MaxResults": number,
    //         "NextToken": "string",
    //         "ObjectReference": {
    //           "Selector": "string"
    //         }
    //       },
    //       "ListObjectParents": {
    //         "MaxResults": number,
    //         "NextToken": "string",
    //         "ObjectReference": {
    //           "Selector": "string"
    //         }
    //       },
    //       "ListObjectPolicies": {
    //         "MaxResults": number,
    //         "NextToken": "string",
    //         "ObjectReference": {
    //           "Selector": "string"
    //         }
    //       },
    //       "ListOutgoingTypedLinks": {
    //         "FilterAttributeRanges": [
    //           {
    //             "AttributeName": "string",
    //             "Range": {
    //               "EndMode": "string",
    //               "EndValue": {
    //                 "BinaryValue": blob,
    //                 "BooleanValue": boolean,
    //                 "DatetimeValue": number,
    //                 "NumberValue": "string",
    //                 "StringValue": "string"
    //               },
    //               "StartMode": "string",
    //               "StartValue": {
    //                 "BinaryValue": blob,
    //                 "BooleanValue": boolean,
    //                 "DatetimeValue": number,
    //                 "NumberValue": "string",
    //                 "StringValue": "string"
    //               }
    //             }
    //           }
    //         ],
    //         "FilterTypedLink": {
    //           "SchemaArn": "string",
    //           "TypedLinkName": "string"
    //         },
    //         "MaxResults": number,
    //         "NextToken": "string",
    //         "ObjectReference": {
    //           "Selector": "string"
    //         }
    //       },
    //       "ListPolicyAttachments": {
    //         "MaxResults": number,
    //         "NextToken": "string",
    //         "PolicyReference": {
    //           "Selector": "string"
    //         }
    //       },
    //       "LookupPolicy": {
    //         "MaxResults": number,
    //         "NextToken": "string",
    //         "ObjectReference": {
    //           "Selector": "string"
    //         }
    //       }
    //     }
    //   ]
    // }

    rest.addHeader("Content-Type", value: "application/x-amz-json-1.1")
    rest.addHeader("X-Amz-Target", value: "BatchRead")

    let sbRequestBody = CkoStringBuilder()!
    json.emitSb(sbRequestBody)
    let sbResponseBody = CkoStringBuilder()!
    success = rest.fullRequestSb("POST", uriPath: "/amazonclouddirectory/2017-01-11/batchread", requestBody: sbRequestBody, responseBody: sbResponseBody)
    if success != true {
        print("\(rest.lastErrorText!)")
        return
    }

    var respStatusCode: Int = rest.responseStatusCode.intValue
    print("response status code = \(respStatusCode)")
    if respStatusCode != 200 {
        print("Response Header:")
        print("\(rest.responseHeader!)")
        print("Response Body:")
        print("\(sbResponseBody.getAsString()!)")
        return
    }

    let jResp = CkoJsonObject()!
    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

    var Message: String?
    var v_Type: String?
    var ObjectIdentifier: String?
    var NextToken: String?
    var ListIncomingTypedLinksNextToken: String?
    var ListIndexNextToken: String?
    var ListObjectAttributesNextToken: String?
    var v_String: String?
    var ListObjectChildrenNextToken: String?
    var ListObjectParentPathsNextToken: String?
    var ListObjectParentsNextToken: String?
    var ListObjectPoliciesNextToken: String?
    var ListOutgoingTypedLinksNextToken: String?
    var ListPolicyAttachmentsNextToken: String?
    var LookupPolicyNextToken: String?
    var j: Int
    var count_j: Int
    var FacetName: String?
    var Name: String?
    var SchemaArn: String?
    var BinaryValue: Int
    var BooleanValue: Int
    var DatetimeValue: Int
    var NumberValue: String?
    var StringValue: String?
    var KeyFacetName: String?
    var KeyName: String?
    var KeySchemaArn: String?
    var ValueBinaryValue: Int
    var ValueBooleanValue: Int
    var ValueDatetimeValue: Int
    var ValueNumberValue: String?
    var ValueStringValue: String?
    var k: Int
    var count_k: Int
    var Selector: String?
    var TargetObjectReferenceSelector: String?
    var TypedLinkFacetSchemaArn: String?
    var TypedLinkName: String?
    var AttributeName: String?
    var Path: String?
    var strVal: String?
    var LinkName: String?
    var SourceObjectReferenceSelector: String?
    var TypedLinkFacetTypedLinkName: String?
    var PolicyId: String?
    var PolicyType: String?

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

        j = 0
        count_j = jResp.size(ofArray: "Responses[i].SuccessfulResponse.GetObjectAttributes.Attributes").intValue
        while j < count_j {
            jResp.j = j
            KeyFacetName = jResp.string(of: "Responses[i].SuccessfulResponse.GetObjectAttributes.Attributes[j].Key.FacetName")
            KeyName = jResp.string(of: "Responses[i].SuccessfulResponse.GetObjectAttributes.Attributes[j].Key.Name")
            KeySchemaArn = jResp.string(of: "Responses[i].SuccessfulResponse.GetObjectAttributes.Attributes[j].Key.SchemaArn")
            ValueBinaryValue = jResp.int(of: "Responses[i].SuccessfulResponse.GetObjectAttributes.Attributes[j].Value.BinaryValue").intValue
            ValueBooleanValue = jResp.int(of: "Responses[i].SuccessfulResponse.GetObjectAttributes.Attributes[j].Value.BooleanValue").intValue
            ValueDatetimeValue = jResp.int(of: "Responses[i].SuccessfulResponse.GetObjectAttributes.Attributes[j].Value.DatetimeValue").intValue
            ValueNumberValue = jResp.string(of: "Responses[i].SuccessfulResponse.GetObjectAttributes.Attributes[j].Value.NumberValue")
            ValueStringValue = jResp.string(of: "Responses[i].SuccessfulResponse.GetObjectAttributes.Attributes[j].Value.StringValue")
            j = j + 1
        }

        j = 0
        count_j = jResp.size(ofArray: "Responses[i].SuccessfulResponse.GetObjectInformation.SchemaFacets").intValue
        while j < count_j {
            jResp.j = j
            FacetName = jResp.string(of: "Responses[i].SuccessfulResponse.GetObjectInformation.SchemaFacets[j].FacetName")
            SchemaArn = jResp.string(of: "Responses[i].SuccessfulResponse.GetObjectInformation.SchemaFacets[j].SchemaArn")
            j = j + 1
        }

        j = 0
        count_j = jResp.size(ofArray: "Responses[i].SuccessfulResponse.ListAttachedIndices.IndexAttachments").intValue
        while j < count_j {
            jResp.j = j
            ObjectIdentifier = jResp.string(of: "Responses[i].SuccessfulResponse.ListAttachedIndices.IndexAttachments[j].ObjectIdentifier")
            k = 0
            count_k = jResp.size(ofArray: "Responses[i].SuccessfulResponse.ListAttachedIndices.IndexAttachments[j].IndexedAttributes").intValue
            while k < count_k {
                jResp.k = k
                KeyFacetName = jResp.string(of: "Responses[i].SuccessfulResponse.ListAttachedIndices.IndexAttachments[j].IndexedAttributes[k].Key.FacetName")
                KeyName = jResp.string(of: "Responses[i].SuccessfulResponse.ListAttachedIndices.IndexAttachments[j].IndexedAttributes[k].Key.Name")
                KeySchemaArn = jResp.string(of: "Responses[i].SuccessfulResponse.ListAttachedIndices.IndexAttachments[j].IndexedAttributes[k].Key.SchemaArn")
                ValueBinaryValue = jResp.int(of: "Responses[i].SuccessfulResponse.ListAttachedIndices.IndexAttachments[j].IndexedAttributes[k].Value.BinaryValue").intValue
                ValueBooleanValue = jResp.int(of: "Responses[i].SuccessfulResponse.ListAttachedIndices.IndexAttachments[j].IndexedAttributes[k].Value.BooleanValue").intValue
                ValueDatetimeValue = jResp.int(of: "Responses[i].SuccessfulResponse.ListAttachedIndices.IndexAttachments[j].IndexedAttributes[k].Value.DatetimeValue").intValue
                ValueNumberValue = jResp.string(of: "Responses[i].SuccessfulResponse.ListAttachedIndices.IndexAttachments[j].IndexedAttributes[k].Value.NumberValue")
                ValueStringValue = jResp.string(of: "Responses[i].SuccessfulResponse.ListAttachedIndices.IndexAttachments[j].IndexedAttributes[k].Value.StringValue")
                k = k + 1
            }

            j = j + 1
        }

        j = 0
        count_j = jResp.size(ofArray: "Responses[i].SuccessfulResponse.ListIncomingTypedLinks.LinkSpecifiers").intValue
        while j < count_j {
            jResp.j = j
            Selector = jResp.string(of: "Responses[i].SuccessfulResponse.ListIncomingTypedLinks.LinkSpecifiers[j].SourceObjectReference.Selector")
            TargetObjectReferenceSelector = jResp.string(of: "Responses[i].SuccessfulResponse.ListIncomingTypedLinks.LinkSpecifiers[j].TargetObjectReference.Selector")
            TypedLinkFacetSchemaArn = jResp.string(of: "Responses[i].SuccessfulResponse.ListIncomingTypedLinks.LinkSpecifiers[j].TypedLinkFacet.SchemaArn")
            TypedLinkName = jResp.string(of: "Responses[i].SuccessfulResponse.ListIncomingTypedLinks.LinkSpecifiers[j].TypedLinkFacet.TypedLinkName")
            k = 0
            count_k = jResp.size(ofArray: "Responses[i].SuccessfulResponse.ListIncomingTypedLinks.LinkSpecifiers[j].IdentityAttributeValues").intValue
            while k < count_k {
                jResp.k = k
                AttributeName = jResp.string(of: "Responses[i].SuccessfulResponse.ListIncomingTypedLinks.LinkSpecifiers[j].IdentityAttributeValues[k].AttributeName")
                ValueBinaryValue = jResp.int(of: "Responses[i].SuccessfulResponse.ListIncomingTypedLinks.LinkSpecifiers[j].IdentityAttributeValues[k].Value.BinaryValue").intValue
                ValueBooleanValue = jResp.int(of: "Responses[i].SuccessfulResponse.ListIncomingTypedLinks.LinkSpecifiers[j].IdentityAttributeValues[k].Value.BooleanValue").intValue
                ValueDatetimeValue = jResp.int(of: "Responses[i].SuccessfulResponse.ListIncomingTypedLinks.LinkSpecifiers[j].IdentityAttributeValues[k].Value.DatetimeValue").intValue
                ValueNumberValue = jResp.string(of: "Responses[i].SuccessfulResponse.ListIncomingTypedLinks.LinkSpecifiers[j].IdentityAttributeValues[k].Value.NumberValue")
                ValueStringValue = jResp.string(of: "Responses[i].SuccessfulResponse.ListIncomingTypedLinks.LinkSpecifiers[j].IdentityAttributeValues[k].Value.StringValue")
                k = k + 1
            }

            j = j + 1
        }

        j = 0
        count_j = jResp.size(ofArray: "Responses[i].SuccessfulResponse.ListIndex.IndexAttachments").intValue
        while j < count_j {
            jResp.j = j
            ObjectIdentifier = jResp.string(of: "Responses[i].SuccessfulResponse.ListIndex.IndexAttachments[j].ObjectIdentifier")
            k = 0
            count_k = jResp.size(ofArray: "Responses[i].SuccessfulResponse.ListIndex.IndexAttachments[j].IndexedAttributes").intValue
            while k < count_k {
                jResp.k = k
                KeyFacetName = jResp.string(of: "Responses[i].SuccessfulResponse.ListIndex.IndexAttachments[j].IndexedAttributes[k].Key.FacetName")
                KeyName = jResp.string(of: "Responses[i].SuccessfulResponse.ListIndex.IndexAttachments[j].IndexedAttributes[k].Key.Name")
                KeySchemaArn = jResp.string(of: "Responses[i].SuccessfulResponse.ListIndex.IndexAttachments[j].IndexedAttributes[k].Key.SchemaArn")
                ValueBinaryValue = jResp.int(of: "Responses[i].SuccessfulResponse.ListIndex.IndexAttachments[j].IndexedAttributes[k].Value.BinaryValue").intValue
                ValueBooleanValue = jResp.int(of: "Responses[i].SuccessfulResponse.ListIndex.IndexAttachments[j].IndexedAttributes[k].Value.BooleanValue").intValue
                ValueDatetimeValue = jResp.int(of: "Responses[i].SuccessfulResponse.ListIndex.IndexAttachments[j].IndexedAttributes[k].Value.DatetimeValue").intValue
                ValueNumberValue = jResp.string(of: "Responses[i].SuccessfulResponse.ListIndex.IndexAttachments[j].IndexedAttributes[k].Value.NumberValue")
                ValueStringValue = jResp.string(of: "Responses[i].SuccessfulResponse.ListIndex.IndexAttachments[j].IndexedAttributes[k].Value.StringValue")
                k = k + 1
            }

            j = j + 1
        }

        j = 0
        count_j = jResp.size(ofArray: "Responses[i].SuccessfulResponse.ListObjectAttributes.Attributes").intValue
        while j < count_j {
            jResp.j = j
            KeyFacetName = jResp.string(of: "Responses[i].SuccessfulResponse.ListObjectAttributes.Attributes[j].Key.FacetName")
            KeyName = jResp.string(of: "Responses[i].SuccessfulResponse.ListObjectAttributes.Attributes[j].Key.Name")
            KeySchemaArn = jResp.string(of: "Responses[i].SuccessfulResponse.ListObjectAttributes.Attributes[j].Key.SchemaArn")
            ValueBinaryValue = jResp.int(of: "Responses[i].SuccessfulResponse.ListObjectAttributes.Attributes[j].Value.BinaryValue").intValue
            ValueBooleanValue = jResp.int(of: "Responses[i].SuccessfulResponse.ListObjectAttributes.Attributes[j].Value.BooleanValue").intValue
            ValueDatetimeValue = jResp.int(of: "Responses[i].SuccessfulResponse.ListObjectAttributes.Attributes[j].Value.DatetimeValue").intValue
            ValueNumberValue = jResp.string(of: "Responses[i].SuccessfulResponse.ListObjectAttributes.Attributes[j].Value.NumberValue")
            ValueStringValue = jResp.string(of: "Responses[i].SuccessfulResponse.ListObjectAttributes.Attributes[j].Value.StringValue")
            j = j + 1
        }

        j = 0
        count_j = jResp.size(ofArray: "Responses[i].SuccessfulResponse.ListObjectParentPaths.PathToObjectIdentifiersList").intValue
        while j < count_j {
            jResp.j = j
            Path = jResp.string(of: "Responses[i].SuccessfulResponse.ListObjectParentPaths.PathToObjectIdentifiersList[j].Path")
            k = 0
            count_k = jResp.size(ofArray: "Responses[i].SuccessfulResponse.ListObjectParentPaths.PathToObjectIdentifiersList[j].ObjectIdentifiers").intValue
            while k < count_k {
                jResp.k = k
                strVal = jResp.string(of: "Responses[i].SuccessfulResponse.ListObjectParentPaths.PathToObjectIdentifiersList[j].ObjectIdentifiers[k]")
                k = k + 1
            }

            j = j + 1
        }

        j = 0
        count_j = jResp.size(ofArray: "Responses[i].SuccessfulResponse.ListObjectParents.ParentLinks").intValue
        while j < count_j {
            jResp.j = j
            LinkName = jResp.string(of: "Responses[i].SuccessfulResponse.ListObjectParents.ParentLinks[j].LinkName")
            ObjectIdentifier = jResp.string(of: "Responses[i].SuccessfulResponse.ListObjectParents.ParentLinks[j].ObjectIdentifier")
            j = j + 1
        }

        j = 0
        count_j = jResp.size(ofArray: "Responses[i].SuccessfulResponse.ListObjectPolicies.AttachedPolicyIds").intValue
        while j < count_j {
            jResp.j = j
            strVal = jResp.string(of: "Responses[i].SuccessfulResponse.ListObjectPolicies.AttachedPolicyIds[j]")
            j = j + 1
        }

        j = 0
        count_j = jResp.size(ofArray: "Responses[i].SuccessfulResponse.ListOutgoingTypedLinks.TypedLinkSpecifiers").intValue
        while j < count_j {
            jResp.j = j
            SourceObjectReferenceSelector = jResp.string(of: "Responses[i].SuccessfulResponse.ListOutgoingTypedLinks.TypedLinkSpecifiers[j].SourceObjectReference.Selector")
            TargetObjectReferenceSelector = jResp.string(of: "Responses[i].SuccessfulResponse.ListOutgoingTypedLinks.TypedLinkSpecifiers[j].TargetObjectReference.Selector")
            TypedLinkFacetSchemaArn = jResp.string(of: "Responses[i].SuccessfulResponse.ListOutgoingTypedLinks.TypedLinkSpecifiers[j].TypedLinkFacet.SchemaArn")
            TypedLinkFacetTypedLinkName = jResp.string(of: "Responses[i].SuccessfulResponse.ListOutgoingTypedLinks.TypedLinkSpecifiers[j].TypedLinkFacet.TypedLinkName")
            k = 0
            count_k = jResp.size(ofArray: "Responses[i].SuccessfulResponse.ListOutgoingTypedLinks.TypedLinkSpecifiers[j].IdentityAttributeValues").intValue
            while k < count_k {
                jResp.k = k
                AttributeName = jResp.string(of: "Responses[i].SuccessfulResponse.ListOutgoingTypedLinks.TypedLinkSpecifiers[j].IdentityAttributeValues[k].AttributeName")
                ValueBinaryValue = jResp.int(of: "Responses[i].SuccessfulResponse.ListOutgoingTypedLinks.TypedLinkSpecifiers[j].IdentityAttributeValues[k].Value.BinaryValue").intValue
                ValueBooleanValue = jResp.int(of: "Responses[i].SuccessfulResponse.ListOutgoingTypedLinks.TypedLinkSpecifiers[j].IdentityAttributeValues[k].Value.BooleanValue").intValue
                ValueDatetimeValue = jResp.int(of: "Responses[i].SuccessfulResponse.ListOutgoingTypedLinks.TypedLinkSpecifiers[j].IdentityAttributeValues[k].Value.DatetimeValue").intValue
                ValueNumberValue = jResp.string(of: "Responses[i].SuccessfulResponse.ListOutgoingTypedLinks.TypedLinkSpecifiers[j].IdentityAttributeValues[k].Value.NumberValue")
                ValueStringValue = jResp.string(of: "Responses[i].SuccessfulResponse.ListOutgoingTypedLinks.TypedLinkSpecifiers[j].IdentityAttributeValues[k].Value.StringValue")
                k = k + 1
            }

            j = j + 1
        }

        j = 0
        count_j = jResp.size(ofArray: "Responses[i].SuccessfulResponse.ListPolicyAttachments.ObjectIdentifiers").intValue
        while j < count_j {
            jResp.j = j
            strVal = jResp.string(of: "Responses[i].SuccessfulResponse.ListPolicyAttachments.ObjectIdentifiers[j]")
            j = j + 1
        }

        j = 0
        count_j = jResp.size(ofArray: "Responses[i].SuccessfulResponse.LookupPolicy.PolicyToPathList").intValue
        while j < count_j {
            jResp.j = j
            Path = jResp.string(of: "Responses[i].SuccessfulResponse.LookupPolicy.PolicyToPathList[j].Path")
            k = 0
            count_k = jResp.size(ofArray: "Responses[i].SuccessfulResponse.LookupPolicy.PolicyToPathList[j].Policies").intValue
            while k < count_k {
                jResp.k = k
                ObjectIdentifier = jResp.string(of: "Responses[i].SuccessfulResponse.LookupPolicy.PolicyToPathList[j].Policies[k].ObjectIdentifier")
                PolicyId = jResp.string(of: "Responses[i].SuccessfulResponse.LookupPolicy.PolicyToPathList[j].Policies[k].PolicyId")
                PolicyType = jResp.string(of: "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"
    //                 }
    //               ]
    //             }
    //           ]
    //         }
    //       }
    //     }
    //   ]
    // }

}