BatchRead Objective-C Example
#import <CkoRest.h>
#import <CkoAuthAws.h>
#import <CkoJsonObject.h>
#import <CkoStringBuilder.h>
#import <NSString.h>
// This example requires the Chilkat API to have been previously unlocked.
// See Global Unlock Sample for sample code.
CkoRest *rest = [[CkoRest alloc] init];
BOOL success;
CkoAuthAws *authAws = [[CkoAuthAws alloc] init];
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: [NSNumber numberWithInt: 443] tls: YES autoReconnect: YES];
if (success != YES) {
NSLog(@"%@%d",@"ConnectFailReason: ",[rest.ConnectFailReason intValue]);
NSLog(@"%@",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
CkoJsonObject *json = [[CkoJsonObject alloc] init];
[json UpdateString: @"Operations[0].GetLinkAttributes.AttributeNames[0]" value: @"string"];
[json UpdateString: @"Operations[0].GetLinkAttributes.TypedLinkSpecifier.IdentityAttributeValues[0].AttributeName" value: @"string"];
[json UpdateInt: @"Operations[0].GetLinkAttributes.TypedLinkSpecifier.IdentityAttributeValues[0].Value.BinaryValue" value: [NSNumber numberWithInt: 123]];
[json UpdateInt: @"Operations[0].GetLinkAttributes.TypedLinkSpecifier.IdentityAttributeValues[0].Value.BooleanValue" value: [NSNumber numberWithInt: 123]];
[json UpdateInt: @"Operations[0].GetLinkAttributes.TypedLinkSpecifier.IdentityAttributeValues[0].Value.DatetimeValue" value: [NSNumber numberWithInt: 123]];
[json UpdateString: @"Operations[0].GetLinkAttributes.TypedLinkSpecifier.IdentityAttributeValues[0].Value.NumberValue" value: @"string"];
[json UpdateString: @"Operations[0].GetLinkAttributes.TypedLinkSpecifier.IdentityAttributeValues[0].Value.StringValue" value: @"string"];
[json UpdateString: @"Operations[0].GetLinkAttributes.TypedLinkSpecifier.SourceObjectReference.Selector" value: @"string"];
[json UpdateString: @"Operations[0].GetLinkAttributes.TypedLinkSpecifier.TargetObjectReference.Selector" value: @"string"];
[json UpdateString: @"Operations[0].GetLinkAttributes.TypedLinkSpecifier.TypedLinkFacet.SchemaArn" value: @"string"];
[json UpdateString: @"Operations[0].GetLinkAttributes.TypedLinkSpecifier.TypedLinkFacet.TypedLinkName" value: @"string"];
[json UpdateString: @"Operations[0].GetObjectAttributes.AttributeNames[0]" value: @"string"];
[json UpdateString: @"Operations[0].GetObjectAttributes.ObjectReference.Selector" value: @"string"];
[json UpdateString: @"Operations[0].GetObjectAttributes.SchemaFacet.FacetName" value: @"string"];
[json UpdateString: @"Operations[0].GetObjectAttributes.SchemaFacet.SchemaArn" value: @"string"];
[json UpdateString: @"Operations[0].GetObjectInformation.ObjectReference.Selector" value: @"string"];
[json UpdateInt: @"Operations[0].ListAttachedIndices.MaxResults" value: [NSNumber numberWithInt: 123]];
[json UpdateString: @"Operations[0].ListAttachedIndices.NextToken" value: @"string"];
[json UpdateString: @"Operations[0].ListAttachedIndices.TargetReference.Selector" value: @"string"];
[json UpdateString: @"Operations[0].ListIncomingTypedLinks.FilterAttributeRanges[0].AttributeName" value: @"string"];
[json UpdateString: @"Operations[0].ListIncomingTypedLinks.FilterAttributeRanges[0].Range.EndMode" value: @"string"];
[json UpdateInt: @"Operations[0].ListIncomingTypedLinks.FilterAttributeRanges[0].Range.EndValue.BinaryValue" value: [NSNumber numberWithInt: 123]];
[json UpdateInt: @"Operations[0].ListIncomingTypedLinks.FilterAttributeRanges[0].Range.EndValue.BooleanValue" value: [NSNumber numberWithInt: 123]];
[json UpdateInt: @"Operations[0].ListIncomingTypedLinks.FilterAttributeRanges[0].Range.EndValue.DatetimeValue" value: [NSNumber numberWithInt: 123]];
[json UpdateString: @"Operations[0].ListIncomingTypedLinks.FilterAttributeRanges[0].Range.EndValue.NumberValue" value: @"string"];
[json UpdateString: @"Operations[0].ListIncomingTypedLinks.FilterAttributeRanges[0].Range.EndValue.StringValue" value: @"string"];
[json UpdateString: @"Operations[0].ListIncomingTypedLinks.FilterAttributeRanges[0].Range.StartMode" value: @"string"];
[json UpdateInt: @"Operations[0].ListIncomingTypedLinks.FilterAttributeRanges[0].Range.StartValue.BinaryValue" value: [NSNumber numberWithInt: 123]];
[json UpdateInt: @"Operations[0].ListIncomingTypedLinks.FilterAttributeRanges[0].Range.StartValue.BooleanValue" value: [NSNumber numberWithInt: 123]];
[json UpdateInt: @"Operations[0].ListIncomingTypedLinks.FilterAttributeRanges[0].Range.StartValue.DatetimeValue" value: [NSNumber numberWithInt: 123]];
[json UpdateString: @"Operations[0].ListIncomingTypedLinks.FilterAttributeRanges[0].Range.StartValue.NumberValue" value: @"string"];
[json UpdateString: @"Operations[0].ListIncomingTypedLinks.FilterAttributeRanges[0].Range.StartValue.StringValue" value: @"string"];
[json UpdateString: @"Operations[0].ListIncomingTypedLinks.FilterTypedLink.SchemaArn" value: @"string"];
[json UpdateString: @"Operations[0].ListIncomingTypedLinks.FilterTypedLink.TypedLinkName" value: @"string"];
[json UpdateInt: @"Operations[0].ListIncomingTypedLinks.MaxResults" value: [NSNumber numberWithInt: 123]];
[json UpdateString: @"Operations[0].ListIncomingTypedLinks.NextToken" value: @"string"];
[json UpdateString: @"Operations[0].ListIncomingTypedLinks.ObjectReference.Selector" value: @"string"];
[json UpdateString: @"Operations[0].ListIndex.IndexReference.Selector" value: @"string"];
[json UpdateInt: @"Operations[0].ListIndex.MaxResults" value: [NSNumber numberWithInt: 123]];
[json UpdateString: @"Operations[0].ListIndex.NextToken" value: @"string"];
[json UpdateString: @"Operations[0].ListIndex.RangesOnIndexedValues[0].AttributeKey.FacetName" value: @"string"];
[json UpdateString: @"Operations[0].ListIndex.RangesOnIndexedValues[0].AttributeKey.Name" value: @"string"];
[json UpdateString: @"Operations[0].ListIndex.RangesOnIndexedValues[0].AttributeKey.SchemaArn" value: @"string"];
[json UpdateString: @"Operations[0].ListIndex.RangesOnIndexedValues[0].Range.EndMode" value: @"string"];
[json UpdateInt: @"Operations[0].ListIndex.RangesOnIndexedValues[0].Range.EndValue.BinaryValue" value: [NSNumber numberWithInt: 123]];
[json UpdateInt: @"Operations[0].ListIndex.RangesOnIndexedValues[0].Range.EndValue.BooleanValue" value: [NSNumber numberWithInt: 123]];
[json UpdateInt: @"Operations[0].ListIndex.RangesOnIndexedValues[0].Range.EndValue.DatetimeValue" value: [NSNumber numberWithInt: 123]];
[json UpdateString: @"Operations[0].ListIndex.RangesOnIndexedValues[0].Range.EndValue.NumberValue" value: @"string"];
[json UpdateString: @"Operations[0].ListIndex.RangesOnIndexedValues[0].Range.EndValue.StringValue" value: @"string"];
[json UpdateString: @"Operations[0].ListIndex.RangesOnIndexedValues[0].Range.StartMode" value: @"string"];
[json UpdateInt: @"Operations[0].ListIndex.RangesOnIndexedValues[0].Range.StartValue.BinaryValue" value: [NSNumber numberWithInt: 123]];
[json UpdateInt: @"Operations[0].ListIndex.RangesOnIndexedValues[0].Range.StartValue.BooleanValue" value: [NSNumber numberWithInt: 123]];
[json UpdateInt: @"Operations[0].ListIndex.RangesOnIndexedValues[0].Range.StartValue.DatetimeValue" value: [NSNumber numberWithInt: 123]];
[json UpdateString: @"Operations[0].ListIndex.RangesOnIndexedValues[0].Range.StartValue.NumberValue" value: @"string"];
[json UpdateString: @"Operations[0].ListIndex.RangesOnIndexedValues[0].Range.StartValue.StringValue" value: @"string"];
[json UpdateString: @"Operations[0].ListObjectAttributes.FacetFilter.FacetName" value: @"string"];
[json UpdateString: @"Operations[0].ListObjectAttributes.FacetFilter.SchemaArn" value: @"string"];
[json UpdateInt: @"Operations[0].ListObjectAttributes.MaxResults" value: [NSNumber numberWithInt: 123]];
[json UpdateString: @"Operations[0].ListObjectAttributes.NextToken" value: @"string"];
[json UpdateString: @"Operations[0].ListObjectAttributes.ObjectReference.Selector" value: @"string"];
[json UpdateInt: @"Operations[0].ListObjectChildren.MaxResults" value: [NSNumber numberWithInt: 123]];
[json UpdateString: @"Operations[0].ListObjectChildren.NextToken" value: @"string"];
[json UpdateString: @"Operations[0].ListObjectChildren.ObjectReference.Selector" value: @"string"];
[json UpdateInt: @"Operations[0].ListObjectParentPaths.MaxResults" value: [NSNumber numberWithInt: 123]];
[json UpdateString: @"Operations[0].ListObjectParentPaths.NextToken" value: @"string"];
[json UpdateString: @"Operations[0].ListObjectParentPaths.ObjectReference.Selector" value: @"string"];
[json UpdateInt: @"Operations[0].ListObjectParents.MaxResults" value: [NSNumber numberWithInt: 123]];
[json UpdateString: @"Operations[0].ListObjectParents.NextToken" value: @"string"];
[json UpdateString: @"Operations[0].ListObjectParents.ObjectReference.Selector" value: @"string"];
[json UpdateInt: @"Operations[0].ListObjectPolicies.MaxResults" value: [NSNumber numberWithInt: 123]];
[json UpdateString: @"Operations[0].ListObjectPolicies.NextToken" value: @"string"];
[json UpdateString: @"Operations[0].ListObjectPolicies.ObjectReference.Selector" value: @"string"];
[json UpdateString: @"Operations[0].ListOutgoingTypedLinks.FilterAttributeRanges[0].AttributeName" value: @"string"];
[json UpdateString: @"Operations[0].ListOutgoingTypedLinks.FilterAttributeRanges[0].Range.EndMode" value: @"string"];
[json UpdateInt: @"Operations[0].ListOutgoingTypedLinks.FilterAttributeRanges[0].Range.EndValue.BinaryValue" value: [NSNumber numberWithInt: 123]];
[json UpdateInt: @"Operations[0].ListOutgoingTypedLinks.FilterAttributeRanges[0].Range.EndValue.BooleanValue" value: [NSNumber numberWithInt: 123]];
[json UpdateInt: @"Operations[0].ListOutgoingTypedLinks.FilterAttributeRanges[0].Range.EndValue.DatetimeValue" value: [NSNumber numberWithInt: 123]];
[json UpdateString: @"Operations[0].ListOutgoingTypedLinks.FilterAttributeRanges[0].Range.EndValue.NumberValue" value: @"string"];
[json UpdateString: @"Operations[0].ListOutgoingTypedLinks.FilterAttributeRanges[0].Range.EndValue.StringValue" value: @"string"];
[json UpdateString: @"Operations[0].ListOutgoingTypedLinks.FilterAttributeRanges[0].Range.StartMode" value: @"string"];
[json UpdateInt: @"Operations[0].ListOutgoingTypedLinks.FilterAttributeRanges[0].Range.StartValue.BinaryValue" value: [NSNumber numberWithInt: 123]];
[json UpdateInt: @"Operations[0].ListOutgoingTypedLinks.FilterAttributeRanges[0].Range.StartValue.BooleanValue" value: [NSNumber numberWithInt: 123]];
[json UpdateInt: @"Operations[0].ListOutgoingTypedLinks.FilterAttributeRanges[0].Range.StartValue.DatetimeValue" value: [NSNumber numberWithInt: 123]];
[json UpdateString: @"Operations[0].ListOutgoingTypedLinks.FilterAttributeRanges[0].Range.StartValue.NumberValue" value: @"string"];
[json UpdateString: @"Operations[0].ListOutgoingTypedLinks.FilterAttributeRanges[0].Range.StartValue.StringValue" value: @"string"];
[json UpdateString: @"Operations[0].ListOutgoingTypedLinks.FilterTypedLink.SchemaArn" value: @"string"];
[json UpdateString: @"Operations[0].ListOutgoingTypedLinks.FilterTypedLink.TypedLinkName" value: @"string"];
[json UpdateInt: @"Operations[0].ListOutgoingTypedLinks.MaxResults" value: [NSNumber numberWithInt: 123]];
[json UpdateString: @"Operations[0].ListOutgoingTypedLinks.NextToken" value: @"string"];
[json UpdateString: @"Operations[0].ListOutgoingTypedLinks.ObjectReference.Selector" value: @"string"];
[json UpdateInt: @"Operations[0].ListPolicyAttachments.MaxResults" value: [NSNumber numberWithInt: 123]];
[json UpdateString: @"Operations[0].ListPolicyAttachments.NextToken" value: @"string"];
[json UpdateString: @"Operations[0].ListPolicyAttachments.PolicyReference.Selector" value: @"string"];
[json UpdateInt: @"Operations[0].LookupPolicy.MaxResults" value: [NSNumber numberWithInt: 123]];
[json UpdateString: @"Operations[0].LookupPolicy.NextToken" value: @"string"];
[json UpdateString: @"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"];
CkoStringBuilder *sbRequestBody = [[CkoStringBuilder alloc] init];
[json EmitSb: sbRequestBody];
CkoStringBuilder *sbResponseBody = [[CkoStringBuilder alloc] init];
success = [rest FullRequestSb: @"POST" uriPath: @"/amazonclouddirectory/2017-01-11/batchread" requestBody: sbRequestBody responseBody: sbResponseBody];
if (success != YES) {
NSLog(@"%@",rest.LastErrorText);
return;
}
int respStatusCode = [rest.ResponseStatusCode intValue];
NSLog(@"%@%d",@"response status code = ",respStatusCode);
if (respStatusCode != 200) {
NSLog(@"%@",@"Response Header:");
NSLog(@"%@",rest.ResponseHeader);
NSLog(@"%@",@"Response Body:");
NSLog(@"%@",[sbResponseBody GetAsString]);
return;
}
CkoJsonObject *jResp = [[CkoJsonObject alloc] init];
[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
NSString *Message = 0;
NSString *v_Type = 0;
NSString *ObjectIdentifier = 0;
NSString *NextToken = 0;
NSString *ListIncomingTypedLinksNextToken = 0;
NSString *ListIndexNextToken = 0;
NSString *ListObjectAttributesNextToken = 0;
NSString *v_String = 0;
NSString *ListObjectChildrenNextToken = 0;
NSString *ListObjectParentPathsNextToken = 0;
NSString *ListObjectParentsNextToken = 0;
NSString *ListObjectPoliciesNextToken = 0;
NSString *ListOutgoingTypedLinksNextToken = 0;
NSString *ListPolicyAttachmentsNextToken = 0;
NSString *LookupPolicyNextToken = 0;
int j;
int count_j;
NSString *FacetName = 0;
NSString *Name = 0;
NSString *SchemaArn = 0;
int BinaryValue;
int BooleanValue;
int DatetimeValue;
NSString *NumberValue = 0;
NSString *StringValue = 0;
NSString *KeyFacetName = 0;
NSString *KeyName = 0;
NSString *KeySchemaArn = 0;
int ValueBinaryValue;
int ValueBooleanValue;
int ValueDatetimeValue;
NSString *ValueNumberValue = 0;
NSString *ValueStringValue = 0;
int k;
int count_k;
NSString *Selector = 0;
NSString *TargetObjectReferenceSelector = 0;
NSString *TypedLinkFacetSchemaArn = 0;
NSString *TypedLinkName = 0;
NSString *AttributeName = 0;
NSString *Path = 0;
NSString *strVal = 0;
NSString *LinkName = 0;
NSString *SourceObjectReferenceSelector = 0;
NSString *TypedLinkFacetTypedLinkName = 0;
NSString *PolicyId = 0;
NSString *PolicyType = 0;
int i = 0;
int count_i = [[jResp SizeOfArray: @"Responses"] intValue];
while (i < count_i) {
jResp.I = [NSNumber numberWithInt: i];
Message = [jResp StringOf: @"Responses[i].ExceptionResponse.Message"];
v_Type = [jResp StringOf: @"Responses[i].ExceptionResponse.Type"];
ObjectIdentifier = [jResp StringOf: @"Responses[i].SuccessfulResponse.GetObjectInformation.ObjectIdentifier"];
NextToken = [jResp StringOf: @"Responses[i].SuccessfulResponse.ListAttachedIndices.NextToken"];
ListIncomingTypedLinksNextToken = [jResp StringOf: @"Responses[i].SuccessfulResponse.ListIncomingTypedLinks.NextToken"];
ListIndexNextToken = [jResp StringOf: @"Responses[i].SuccessfulResponse.ListIndex.NextToken"];
ListObjectAttributesNextToken = [jResp StringOf: @"Responses[i].SuccessfulResponse.ListObjectAttributes.NextToken"];
v_String = [jResp StringOf: @"Responses[i].SuccessfulResponse.ListObjectChildren.Children.string"];
ListObjectChildrenNextToken = [jResp StringOf: @"Responses[i].SuccessfulResponse.ListObjectChildren.NextToken"];
ListObjectParentPathsNextToken = [jResp StringOf: @"Responses[i].SuccessfulResponse.ListObjectParentPaths.NextToken"];
ListObjectParentsNextToken = [jResp StringOf: @"Responses[i].SuccessfulResponse.ListObjectParents.NextToken"];
ListObjectPoliciesNextToken = [jResp StringOf: @"Responses[i].SuccessfulResponse.ListObjectPolicies.NextToken"];
ListOutgoingTypedLinksNextToken = [jResp StringOf: @"Responses[i].SuccessfulResponse.ListOutgoingTypedLinks.NextToken"];
ListPolicyAttachmentsNextToken = [jResp StringOf: @"Responses[i].SuccessfulResponse.ListPolicyAttachments.NextToken"];
LookupPolicyNextToken = [jResp StringOf: @"Responses[i].SuccessfulResponse.LookupPolicy.NextToken"];
j = 0;
count_j = [[jResp SizeOfArray: @"Responses[i].SuccessfulResponse.GetLinkAttributes.Attributes"] intValue];
while (j < count_j) {
jResp.J = [NSNumber numberWithInt: j];
FacetName = [jResp StringOf: @"Responses[i].SuccessfulResponse.GetLinkAttributes.Attributes[j].Key.FacetName"];
Name = [jResp StringOf: @"Responses[i].SuccessfulResponse.GetLinkAttributes.Attributes[j].Key.Name"];
SchemaArn = [jResp StringOf: @"Responses[i].SuccessfulResponse.GetLinkAttributes.Attributes[j].Key.SchemaArn"];
BinaryValue = [[jResp IntOf: @"Responses[i].SuccessfulResponse.GetLinkAttributes.Attributes[j].Value.BinaryValue"] intValue];
BooleanValue = [[jResp IntOf: @"Responses[i].SuccessfulResponse.GetLinkAttributes.Attributes[j].Value.BooleanValue"] intValue];
DatetimeValue = [[jResp IntOf: @"Responses[i].SuccessfulResponse.GetLinkAttributes.Attributes[j].Value.DatetimeValue"] intValue];
NumberValue = [jResp StringOf: @"Responses[i].SuccessfulResponse.GetLinkAttributes.Attributes[j].Value.NumberValue"];
StringValue = [jResp StringOf: @"Responses[i].SuccessfulResponse.GetLinkAttributes.Attributes[j].Value.StringValue"];
j = j + 1;
}
j = 0;
count_j = [[jResp SizeOfArray: @"Responses[i].SuccessfulResponse.GetObjectAttributes.Attributes"] intValue];
while (j < count_j) {
jResp.J = [NSNumber numberWithInt: j];
KeyFacetName = [jResp StringOf: @"Responses[i].SuccessfulResponse.GetObjectAttributes.Attributes[j].Key.FacetName"];
KeyName = [jResp StringOf: @"Responses[i].SuccessfulResponse.GetObjectAttributes.Attributes[j].Key.Name"];
KeySchemaArn = [jResp StringOf: @"Responses[i].SuccessfulResponse.GetObjectAttributes.Attributes[j].Key.SchemaArn"];
ValueBinaryValue = [[jResp IntOf: @"Responses[i].SuccessfulResponse.GetObjectAttributes.Attributes[j].Value.BinaryValue"] intValue];
ValueBooleanValue = [[jResp IntOf: @"Responses[i].SuccessfulResponse.GetObjectAttributes.Attributes[j].Value.BooleanValue"] intValue];
ValueDatetimeValue = [[jResp IntOf: @"Responses[i].SuccessfulResponse.GetObjectAttributes.Attributes[j].Value.DatetimeValue"] intValue];
ValueNumberValue = [jResp StringOf: @"Responses[i].SuccessfulResponse.GetObjectAttributes.Attributes[j].Value.NumberValue"];
ValueStringValue = [jResp StringOf: @"Responses[i].SuccessfulResponse.GetObjectAttributes.Attributes[j].Value.StringValue"];
j = j + 1;
}
j = 0;
count_j = [[jResp SizeOfArray: @"Responses[i].SuccessfulResponse.GetObjectInformation.SchemaFacets"] intValue];
while (j < count_j) {
jResp.J = [NSNumber numberWithInt: j];
FacetName = [jResp StringOf: @"Responses[i].SuccessfulResponse.GetObjectInformation.SchemaFacets[j].FacetName"];
SchemaArn = [jResp StringOf: @"Responses[i].SuccessfulResponse.GetObjectInformation.SchemaFacets[j].SchemaArn"];
j = j + 1;
}
j = 0;
count_j = [[jResp SizeOfArray: @"Responses[i].SuccessfulResponse.ListAttachedIndices.IndexAttachments"] intValue];
while (j < count_j) {
jResp.J = [NSNumber numberWithInt: j];
ObjectIdentifier = [jResp StringOf: @"Responses[i].SuccessfulResponse.ListAttachedIndices.IndexAttachments[j].ObjectIdentifier"];
k = 0;
count_k = [[jResp SizeOfArray: @"Responses[i].SuccessfulResponse.ListAttachedIndices.IndexAttachments[j].IndexedAttributes"] intValue];
while (k < count_k) {
jResp.K = [NSNumber numberWithInt: k];
KeyFacetName = [jResp StringOf: @"Responses[i].SuccessfulResponse.ListAttachedIndices.IndexAttachments[j].IndexedAttributes[k].Key.FacetName"];
KeyName = [jResp StringOf: @"Responses[i].SuccessfulResponse.ListAttachedIndices.IndexAttachments[j].IndexedAttributes[k].Key.Name"];
KeySchemaArn = [jResp StringOf: @"Responses[i].SuccessfulResponse.ListAttachedIndices.IndexAttachments[j].IndexedAttributes[k].Key.SchemaArn"];
ValueBinaryValue = [[jResp IntOf: @"Responses[i].SuccessfulResponse.ListAttachedIndices.IndexAttachments[j].IndexedAttributes[k].Value.BinaryValue"] intValue];
ValueBooleanValue = [[jResp IntOf: @"Responses[i].SuccessfulResponse.ListAttachedIndices.IndexAttachments[j].IndexedAttributes[k].Value.BooleanValue"] intValue];
ValueDatetimeValue = [[jResp IntOf: @"Responses[i].SuccessfulResponse.ListAttachedIndices.IndexAttachments[j].IndexedAttributes[k].Value.DatetimeValue"] intValue];
ValueNumberValue = [jResp StringOf: @"Responses[i].SuccessfulResponse.ListAttachedIndices.IndexAttachments[j].IndexedAttributes[k].Value.NumberValue"];
ValueStringValue = [jResp StringOf: @"Responses[i].SuccessfulResponse.ListAttachedIndices.IndexAttachments[j].IndexedAttributes[k].Value.StringValue"];
k = k + 1;
}
j = j + 1;
}
j = 0;
count_j = [[jResp SizeOfArray: @"Responses[i].SuccessfulResponse.ListIncomingTypedLinks.LinkSpecifiers"] intValue];
while (j < count_j) {
jResp.J = [NSNumber numberWithInt: j];
Selector = [jResp StringOf: @"Responses[i].SuccessfulResponse.ListIncomingTypedLinks.LinkSpecifiers[j].SourceObjectReference.Selector"];
TargetObjectReferenceSelector = [jResp StringOf: @"Responses[i].SuccessfulResponse.ListIncomingTypedLinks.LinkSpecifiers[j].TargetObjectReference.Selector"];
TypedLinkFacetSchemaArn = [jResp StringOf: @"Responses[i].SuccessfulResponse.ListIncomingTypedLinks.LinkSpecifiers[j].TypedLinkFacet.SchemaArn"];
TypedLinkName = [jResp StringOf: @"Responses[i].SuccessfulResponse.ListIncomingTypedLinks.LinkSpecifiers[j].TypedLinkFacet.TypedLinkName"];
k = 0;
count_k = [[jResp SizeOfArray: @"Responses[i].SuccessfulResponse.ListIncomingTypedLinks.LinkSpecifiers[j].IdentityAttributeValues"] intValue];
while (k < count_k) {
jResp.K = [NSNumber numberWithInt: k];
AttributeName = [jResp StringOf: @"Responses[i].SuccessfulResponse.ListIncomingTypedLinks.LinkSpecifiers[j].IdentityAttributeValues[k].AttributeName"];
ValueBinaryValue = [[jResp IntOf: @"Responses[i].SuccessfulResponse.ListIncomingTypedLinks.LinkSpecifiers[j].IdentityAttributeValues[k].Value.BinaryValue"] intValue];
ValueBooleanValue = [[jResp IntOf: @"Responses[i].SuccessfulResponse.ListIncomingTypedLinks.LinkSpecifiers[j].IdentityAttributeValues[k].Value.BooleanValue"] intValue];
ValueDatetimeValue = [[jResp IntOf: @"Responses[i].SuccessfulResponse.ListIncomingTypedLinks.LinkSpecifiers[j].IdentityAttributeValues[k].Value.DatetimeValue"] intValue];
ValueNumberValue = [jResp StringOf: @"Responses[i].SuccessfulResponse.ListIncomingTypedLinks.LinkSpecifiers[j].IdentityAttributeValues[k].Value.NumberValue"];
ValueStringValue = [jResp StringOf: @"Responses[i].SuccessfulResponse.ListIncomingTypedLinks.LinkSpecifiers[j].IdentityAttributeValues[k].Value.StringValue"];
k = k + 1;
}
j = j + 1;
}
j = 0;
count_j = [[jResp SizeOfArray: @"Responses[i].SuccessfulResponse.ListIndex.IndexAttachments"] intValue];
while (j < count_j) {
jResp.J = [NSNumber numberWithInt: j];
ObjectIdentifier = [jResp StringOf: @"Responses[i].SuccessfulResponse.ListIndex.IndexAttachments[j].ObjectIdentifier"];
k = 0;
count_k = [[jResp SizeOfArray: @"Responses[i].SuccessfulResponse.ListIndex.IndexAttachments[j].IndexedAttributes"] intValue];
while (k < count_k) {
jResp.K = [NSNumber numberWithInt: k];
KeyFacetName = [jResp StringOf: @"Responses[i].SuccessfulResponse.ListIndex.IndexAttachments[j].IndexedAttributes[k].Key.FacetName"];
KeyName = [jResp StringOf: @"Responses[i].SuccessfulResponse.ListIndex.IndexAttachments[j].IndexedAttributes[k].Key.Name"];
KeySchemaArn = [jResp StringOf: @"Responses[i].SuccessfulResponse.ListIndex.IndexAttachments[j].IndexedAttributes[k].Key.SchemaArn"];
ValueBinaryValue = [[jResp IntOf: @"Responses[i].SuccessfulResponse.ListIndex.IndexAttachments[j].IndexedAttributes[k].Value.BinaryValue"] intValue];
ValueBooleanValue = [[jResp IntOf: @"Responses[i].SuccessfulResponse.ListIndex.IndexAttachments[j].IndexedAttributes[k].Value.BooleanValue"] intValue];
ValueDatetimeValue = [[jResp IntOf: @"Responses[i].SuccessfulResponse.ListIndex.IndexAttachments[j].IndexedAttributes[k].Value.DatetimeValue"] intValue];
ValueNumberValue = [jResp StringOf: @"Responses[i].SuccessfulResponse.ListIndex.IndexAttachments[j].IndexedAttributes[k].Value.NumberValue"];
ValueStringValue = [jResp StringOf: @"Responses[i].SuccessfulResponse.ListIndex.IndexAttachments[j].IndexedAttributes[k].Value.StringValue"];
k = k + 1;
}
j = j + 1;
}
j = 0;
count_j = [[jResp SizeOfArray: @"Responses[i].SuccessfulResponse.ListObjectAttributes.Attributes"] intValue];
while (j < count_j) {
jResp.J = [NSNumber numberWithInt: j];
KeyFacetName = [jResp StringOf: @"Responses[i].SuccessfulResponse.ListObjectAttributes.Attributes[j].Key.FacetName"];
KeyName = [jResp StringOf: @"Responses[i].SuccessfulResponse.ListObjectAttributes.Attributes[j].Key.Name"];
KeySchemaArn = [jResp StringOf: @"Responses[i].SuccessfulResponse.ListObjectAttributes.Attributes[j].Key.SchemaArn"];
ValueBinaryValue = [[jResp IntOf: @"Responses[i].SuccessfulResponse.ListObjectAttributes.Attributes[j].Value.BinaryValue"] intValue];
ValueBooleanValue = [[jResp IntOf: @"Responses[i].SuccessfulResponse.ListObjectAttributes.Attributes[j].Value.BooleanValue"] intValue];
ValueDatetimeValue = [[jResp IntOf: @"Responses[i].SuccessfulResponse.ListObjectAttributes.Attributes[j].Value.DatetimeValue"] intValue];
ValueNumberValue = [jResp StringOf: @"Responses[i].SuccessfulResponse.ListObjectAttributes.Attributes[j].Value.NumberValue"];
ValueStringValue = [jResp StringOf: @"Responses[i].SuccessfulResponse.ListObjectAttributes.Attributes[j].Value.StringValue"];
j = j + 1;
}
j = 0;
count_j = [[jResp SizeOfArray: @"Responses[i].SuccessfulResponse.ListObjectParentPaths.PathToObjectIdentifiersList"] intValue];
while (j < count_j) {
jResp.J = [NSNumber numberWithInt: j];
Path = [jResp StringOf: @"Responses[i].SuccessfulResponse.ListObjectParentPaths.PathToObjectIdentifiersList[j].Path"];
k = 0;
count_k = [[jResp SizeOfArray: @"Responses[i].SuccessfulResponse.ListObjectParentPaths.PathToObjectIdentifiersList[j].ObjectIdentifiers"] intValue];
while (k < count_k) {
jResp.K = [NSNumber numberWithInt: k];
strVal = [jResp StringOf: @"Responses[i].SuccessfulResponse.ListObjectParentPaths.PathToObjectIdentifiersList[j].ObjectIdentifiers[k]"];
k = k + 1;
}
j = j + 1;
}
j = 0;
count_j = [[jResp SizeOfArray: @"Responses[i].SuccessfulResponse.ListObjectParents.ParentLinks"] intValue];
while (j < count_j) {
jResp.J = [NSNumber numberWithInt: j];
LinkName = [jResp StringOf: @"Responses[i].SuccessfulResponse.ListObjectParents.ParentLinks[j].LinkName"];
ObjectIdentifier = [jResp StringOf: @"Responses[i].SuccessfulResponse.ListObjectParents.ParentLinks[j].ObjectIdentifier"];
j = j + 1;
}
j = 0;
count_j = [[jResp SizeOfArray: @"Responses[i].SuccessfulResponse.ListObjectPolicies.AttachedPolicyIds"] intValue];
while (j < count_j) {
jResp.J = [NSNumber numberWithInt: j];
strVal = [jResp StringOf: @"Responses[i].SuccessfulResponse.ListObjectPolicies.AttachedPolicyIds[j]"];
j = j + 1;
}
j = 0;
count_j = [[jResp SizeOfArray: @"Responses[i].SuccessfulResponse.ListOutgoingTypedLinks.TypedLinkSpecifiers"] intValue];
while (j < count_j) {
jResp.J = [NSNumber numberWithInt: j];
SourceObjectReferenceSelector = [jResp StringOf: @"Responses[i].SuccessfulResponse.ListOutgoingTypedLinks.TypedLinkSpecifiers[j].SourceObjectReference.Selector"];
TargetObjectReferenceSelector = [jResp StringOf: @"Responses[i].SuccessfulResponse.ListOutgoingTypedLinks.TypedLinkSpecifiers[j].TargetObjectReference.Selector"];
TypedLinkFacetSchemaArn = [jResp StringOf: @"Responses[i].SuccessfulResponse.ListOutgoingTypedLinks.TypedLinkSpecifiers[j].TypedLinkFacet.SchemaArn"];
TypedLinkFacetTypedLinkName = [jResp StringOf: @"Responses[i].SuccessfulResponse.ListOutgoingTypedLinks.TypedLinkSpecifiers[j].TypedLinkFacet.TypedLinkName"];
k = 0;
count_k = [[jResp SizeOfArray: @"Responses[i].SuccessfulResponse.ListOutgoingTypedLinks.TypedLinkSpecifiers[j].IdentityAttributeValues"] intValue];
while (k < count_k) {
jResp.K = [NSNumber numberWithInt: k];
AttributeName = [jResp StringOf: @"Responses[i].SuccessfulResponse.ListOutgoingTypedLinks.TypedLinkSpecifiers[j].IdentityAttributeValues[k].AttributeName"];
ValueBinaryValue = [[jResp IntOf: @"Responses[i].SuccessfulResponse.ListOutgoingTypedLinks.TypedLinkSpecifiers[j].IdentityAttributeValues[k].Value.BinaryValue"] intValue];
ValueBooleanValue = [[jResp IntOf: @"Responses[i].SuccessfulResponse.ListOutgoingTypedLinks.TypedLinkSpecifiers[j].IdentityAttributeValues[k].Value.BooleanValue"] intValue];
ValueDatetimeValue = [[jResp IntOf: @"Responses[i].SuccessfulResponse.ListOutgoingTypedLinks.TypedLinkSpecifiers[j].IdentityAttributeValues[k].Value.DatetimeValue"] intValue];
ValueNumberValue = [jResp StringOf: @"Responses[i].SuccessfulResponse.ListOutgoingTypedLinks.TypedLinkSpecifiers[j].IdentityAttributeValues[k].Value.NumberValue"];
ValueStringValue = [jResp StringOf: @"Responses[i].SuccessfulResponse.ListOutgoingTypedLinks.TypedLinkSpecifiers[j].IdentityAttributeValues[k].Value.StringValue"];
k = k + 1;
}
j = j + 1;
}
j = 0;
count_j = [[jResp SizeOfArray: @"Responses[i].SuccessfulResponse.ListPolicyAttachments.ObjectIdentifiers"] intValue];
while (j < count_j) {
jResp.J = [NSNumber numberWithInt: j];
strVal = [jResp StringOf: @"Responses[i].SuccessfulResponse.ListPolicyAttachments.ObjectIdentifiers[j]"];
j = j + 1;
}
j = 0;
count_j = [[jResp SizeOfArray: @"Responses[i].SuccessfulResponse.LookupPolicy.PolicyToPathList"] intValue];
while (j < count_j) {
jResp.J = [NSNumber numberWithInt: j];
Path = [jResp StringOf: @"Responses[i].SuccessfulResponse.LookupPolicy.PolicyToPathList[j].Path"];
k = 0;
count_k = [[jResp SizeOfArray: @"Responses[i].SuccessfulResponse.LookupPolicy.PolicyToPathList[j].Policies"] intValue];
while (k < count_k) {
jResp.K = [NSNumber numberWithInt: k];
ObjectIdentifier = [jResp StringOf: @"Responses[i].SuccessfulResponse.LookupPolicy.PolicyToPathList[j].Policies[k].ObjectIdentifier"];
PolicyId = [jResp StringOf: @"Responses[i].SuccessfulResponse.LookupPolicy.PolicyToPathList[j].Policies[k].PolicyId"];
PolicyType = [jResp StringOf: @"Responses[i].SuccessfulResponse.LookupPolicy.PolicyToPathList[j].Policies[k].PolicyType"];
k = k + 1;
}
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"
// }
// ]
// }
// ]
// }
// }
// }
// ]
// }