Chilkat Online Tools

GetRuleGroup delphiDll Example

AWS WAFV2

var
rest: HCkRest;
success: Boolean;
authAws: HCkAuthAws;
json: HCkJsonObject;
sbRequestBody: HCkStringBuilder;
sbResponseBody: HCkStringBuilder;
respStatusCode: Integer;
jResp: HCkJsonObject;
CustomResponseBodyKey: PWideChar;
ResponseCode: Integer;
ImmunityTime: Integer;
Priority: Integer;
OversizeHandling: PWideChar;
MatchScope: PWideChar;
CookiesOversizeHandling: PWideChar;
HeadersMatchScope: PWideChar;
HeadersOversizeHandling: PWideChar;
InvalidFallbackBehavior: PWideChar;
JsonBodyMatchScope: PWideChar;
JsonBodyOversizeHandling: PWideChar;
SingleHeaderName: PWideChar;
SingleQueryArgumentName: PWideChar;
PositionalConstraint: PWideChar;
SearchString: Integer;
FallbackBehavior: PWideChar;
HeaderName: PWideChar;
IPSetReferenceStatementARN: PWideChar;
IPSetForwardedIPConfigFallbackBehavior: PWideChar;
IPSetForwardedIPConfigHeaderName: PWideChar;
Position: PWideChar;
Key: PWideChar;
Scope: PWideChar;
ManagedRuleGroupStatementName: PWideChar;
ScopeDownStatement: PWideChar;
VendorName: PWideChar;
Version: PWideChar;
Statement: PWideChar;
AggregateKeyType: PWideChar;
ForwardedIPConfigFallbackBehavior: PWideChar;
ForwardedIPConfigHeaderName: PWideChar;
Limit: Integer;
RateBasedStatementScopeDownStatement: PWideChar;
BodyOversizeHandling: PWideChar;
CookiesMatchScope: PWideChar;
JsonBodyInvalidFallbackBehavior: PWideChar;
RegexString: PWideChar;
RegexPatternSetReferenceStatementARN: PWideChar;
RuleGroupReferenceStatementARN: PWideChar;
ComparisonOperator: PWideChar;
Size: Integer;
VisibilityConfigCloudWatchMetricsEnabled: Integer;
VisibilityConfigMetricName: PWideChar;
VisibilityConfigSampledRequestsEnabled: Integer;
j: Integer;
count_j: Integer;
Value: PWideChar;
strVal: PWideChar;
v_Type: PWideChar;
LoginPath: PWideChar;
Identifier: PWideChar;
PayloadType: PWideChar;
UsernameFieldIdentifier: PWideChar;
LockToken: PWideChar;
ARN: PWideChar;
Capacity: Integer;
Content: PWideChar;
ContentType: PWideChar;
Description: PWideChar;
Id: PWideChar;
LabelNamespace: PWideChar;
Name: PWideChar;
CloudWatchMetricsEnabled: Integer;
MetricName: PWideChar;
SampledRequestsEnabled: Integer;
i: Integer;
count_i: Integer;

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

rest := CkRest_Create();

authAws := CkAuthAws_Create();
CkAuthAws_putAccessKey(authAws,'AWS_ACCESS_KEY');
CkAuthAws_putSecretKey(authAws,'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.)
CkAuthAws_putRegion(authAws,'us-west-2');
CkAuthAws_putServiceName(authAws,'wafv2');
// SetAuthAws causes Chilkat to automatically add the following headers: Authorization, X-Amz-Date
CkRest_SetAuthAws(rest,authAws);

// URL: https://wafv2.us-west-2.amazonaws.com/
// Use the same region as specified above.
success := CkRest_Connect(rest,'wafv2.us-west-2.amazonaws.com',443,True,True);
if (success <> True) then
  begin
    Memo1.Lines.Add('ConnectFailReason: ' + IntToStr(CkRest_getConnectFailReason(rest)));
    Memo1.Lines.Add(CkRest__lastErrorText(rest));
    Exit;
  end;

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

json := CkJsonObject_Create();
CkJsonObject_UpdateString(json,'ARN','string');
CkJsonObject_UpdateString(json,'Id','string');
CkJsonObject_UpdateString(json,'Name','string');
CkJsonObject_UpdateString(json,'Scope','string');

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

// {
//   "ARN": "string",
//   "Id": "string",
//   "Name": "string",
//   "Scope": "string"
// }

CkRest_AddHeader(rest,'Content-Type','application/x-amz-json-1.1');
CkRest_AddHeader(rest,'X-Amz-Target','AWSWAF_20190729.GetRuleGroup');

sbRequestBody := CkStringBuilder_Create();
CkJsonObject_EmitSb(json,sbRequestBody);
sbResponseBody := CkStringBuilder_Create();
success := CkRest_FullRequestSb(rest,'POST','/',sbRequestBody,sbResponseBody);
if (success <> True) then
  begin
    Memo1.Lines.Add(CkRest__lastErrorText(rest));
    Exit;
  end;
respStatusCode := CkRest_getResponseStatusCode(rest);
Memo1.Lines.Add('response status code = ' + IntToStr(respStatusCode));
if (respStatusCode <> 200) then
  begin
    Memo1.Lines.Add('Response Header:');
    Memo1.Lines.Add(CkRest__responseHeader(rest));
    Memo1.Lines.Add('Response Body:');
    Memo1.Lines.Add(CkStringBuilder__getAsString(sbResponseBody));
    Exit;
  end;

jResp := CkJsonObject_Create();
CkJsonObject_LoadSb(jResp,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

LockToken := CkJsonObject__stringOf(jResp,'LockToken');
ARN := CkJsonObject__stringOf(jResp,'RuleGroup.ARN');
Capacity := CkJsonObject_IntOf(jResp,'RuleGroup.Capacity');
Content := CkJsonObject__stringOf(jResp,'RuleGroup.CustomResponseBodies.string.Content');
ContentType := CkJsonObject__stringOf(jResp,'RuleGroup.CustomResponseBodies.string.ContentType');
Description := CkJsonObject__stringOf(jResp,'RuleGroup.Description');
Id := CkJsonObject__stringOf(jResp,'RuleGroup.Id');
LabelNamespace := CkJsonObject__stringOf(jResp,'RuleGroup.LabelNamespace');
Name := CkJsonObject__stringOf(jResp,'RuleGroup.Name');
CloudWatchMetricsEnabled := CkJsonObject_IntOf(jResp,'RuleGroup.VisibilityConfig.CloudWatchMetricsEnabled');
MetricName := CkJsonObject__stringOf(jResp,'RuleGroup.VisibilityConfig.MetricName');
SampledRequestsEnabled := CkJsonObject_IntOf(jResp,'RuleGroup.VisibilityConfig.SampledRequestsEnabled');
i := 0;
count_i := CkJsonObject_SizeOfArray(jResp,'RuleGroup.AvailableLabels');
while i < count_i do
  begin
    CkJsonObject_putI(jResp,i);
    Name := CkJsonObject__stringOf(jResp,'RuleGroup.AvailableLabels[i].Name');
    i := i + 1;
  end;

i := 0;
count_i := CkJsonObject_SizeOfArray(jResp,'RuleGroup.ConsumedLabels');
while i < count_i do
  begin
    CkJsonObject_putI(jResp,i);
    Name := CkJsonObject__stringOf(jResp,'RuleGroup.ConsumedLabels[i].Name');
    i := i + 1;
  end;

i := 0;
count_i := CkJsonObject_SizeOfArray(jResp,'RuleGroup.Rules');
while i < count_i do
  begin
    CkJsonObject_putI(jResp,i);
    CustomResponseBodyKey := CkJsonObject__stringOf(jResp,'RuleGroup.Rules[i].Action.Block.CustomResponse.CustomResponseBodyKey');
    ResponseCode := CkJsonObject_IntOf(jResp,'RuleGroup.Rules[i].Action.Block.CustomResponse.ResponseCode');
    ImmunityTime := CkJsonObject_IntOf(jResp,'RuleGroup.Rules[i].CaptchaConfig.ImmunityTimeProperty.ImmunityTime');
    Name := CkJsonObject__stringOf(jResp,'RuleGroup.Rules[i].Name');
    Priority := CkJsonObject_IntOf(jResp,'RuleGroup.Rules[i].Priority');
    OversizeHandling := CkJsonObject__stringOf(jResp,'RuleGroup.Rules[i].Statement.ByteMatchStatement.FieldToMatch.Body.OversizeHandling');
    MatchScope := CkJsonObject__stringOf(jResp,'RuleGroup.Rules[i].Statement.ByteMatchStatement.FieldToMatch.Cookies.MatchScope');
    CookiesOversizeHandling := CkJsonObject__stringOf(jResp,'RuleGroup.Rules[i].Statement.ByteMatchStatement.FieldToMatch.Cookies.OversizeHandling');
    HeadersMatchScope := CkJsonObject__stringOf(jResp,'RuleGroup.Rules[i].Statement.ByteMatchStatement.FieldToMatch.Headers.MatchScope');
    HeadersOversizeHandling := CkJsonObject__stringOf(jResp,'RuleGroup.Rules[i].Statement.ByteMatchStatement.FieldToMatch.Headers.OversizeHandling');
    InvalidFallbackBehavior := CkJsonObject__stringOf(jResp,'RuleGroup.Rules[i].Statement.ByteMatchStatement.FieldToMatch.JsonBody.InvalidFallbackBehavior');
    JsonBodyMatchScope := CkJsonObject__stringOf(jResp,'RuleGroup.Rules[i].Statement.ByteMatchStatement.FieldToMatch.JsonBody.MatchScope');
    JsonBodyOversizeHandling := CkJsonObject__stringOf(jResp,'RuleGroup.Rules[i].Statement.ByteMatchStatement.FieldToMatch.JsonBody.OversizeHandling');
    SingleHeaderName := CkJsonObject__stringOf(jResp,'RuleGroup.Rules[i].Statement.ByteMatchStatement.FieldToMatch.SingleHeader.Name');
    SingleQueryArgumentName := CkJsonObject__stringOf(jResp,'RuleGroup.Rules[i].Statement.ByteMatchStatement.FieldToMatch.SingleQueryArgument.Name');
    PositionalConstraint := CkJsonObject__stringOf(jResp,'RuleGroup.Rules[i].Statement.ByteMatchStatement.PositionalConstraint');
    SearchString := CkJsonObject_IntOf(jResp,'RuleGroup.Rules[i].Statement.ByteMatchStatement.SearchString');
    FallbackBehavior := CkJsonObject__stringOf(jResp,'RuleGroup.Rules[i].Statement.GeoMatchStatement.ForwardedIPConfig.FallbackBehavior');
    HeaderName := CkJsonObject__stringOf(jResp,'RuleGroup.Rules[i].Statement.GeoMatchStatement.ForwardedIPConfig.HeaderName');
    IPSetReferenceStatementARN := CkJsonObject__stringOf(jResp,'RuleGroup.Rules[i].Statement.IPSetReferenceStatement.ARN');
    IPSetForwardedIPConfigFallbackBehavior := CkJsonObject__stringOf(jResp,'RuleGroup.Rules[i].Statement.IPSetReferenceStatement.IPSetForwardedIPConfig.FallbackBehavior');
    IPSetForwardedIPConfigHeaderName := CkJsonObject__stringOf(jResp,'RuleGroup.Rules[i].Statement.IPSetReferenceStatement.IPSetForwardedIPConfig.HeaderName');
    Position := CkJsonObject__stringOf(jResp,'RuleGroup.Rules[i].Statement.IPSetReferenceStatement.IPSetForwardedIPConfig.Position');
    Key := CkJsonObject__stringOf(jResp,'RuleGroup.Rules[i].Statement.LabelMatchStatement.Key');
    Scope := CkJsonObject__stringOf(jResp,'RuleGroup.Rules[i].Statement.LabelMatchStatement.Scope');
    ManagedRuleGroupStatementName := CkJsonObject__stringOf(jResp,'RuleGroup.Rules[i].Statement.ManagedRuleGroupStatement.Name');
    ScopeDownStatement := CkJsonObject__stringOf(jResp,'RuleGroup.Rules[i].Statement.ManagedRuleGroupStatement.ScopeDownStatement');
    VendorName := CkJsonObject__stringOf(jResp,'RuleGroup.Rules[i].Statement.ManagedRuleGroupStatement.VendorName');
    Version := CkJsonObject__stringOf(jResp,'RuleGroup.Rules[i].Statement.ManagedRuleGroupStatement.Version');
    Statement := CkJsonObject__stringOf(jResp,'RuleGroup.Rules[i].Statement.NotStatement.Statement');
    AggregateKeyType := CkJsonObject__stringOf(jResp,'RuleGroup.Rules[i].Statement.RateBasedStatement.AggregateKeyType');
    ForwardedIPConfigFallbackBehavior := CkJsonObject__stringOf(jResp,'RuleGroup.Rules[i].Statement.RateBasedStatement.ForwardedIPConfig.FallbackBehavior');
    ForwardedIPConfigHeaderName := CkJsonObject__stringOf(jResp,'RuleGroup.Rules[i].Statement.RateBasedStatement.ForwardedIPConfig.HeaderName');
    Limit := CkJsonObject_IntOf(jResp,'RuleGroup.Rules[i].Statement.RateBasedStatement.Limit');
    RateBasedStatementScopeDownStatement := CkJsonObject__stringOf(jResp,'RuleGroup.Rules[i].Statement.RateBasedStatement.ScopeDownStatement');
    BodyOversizeHandling := CkJsonObject__stringOf(jResp,'RuleGroup.Rules[i].Statement.RegexMatchStatement.FieldToMatch.Body.OversizeHandling');
    CookiesMatchScope := CkJsonObject__stringOf(jResp,'RuleGroup.Rules[i].Statement.RegexMatchStatement.FieldToMatch.Cookies.MatchScope');
    CookiesOversizeHandling := CkJsonObject__stringOf(jResp,'RuleGroup.Rules[i].Statement.RegexMatchStatement.FieldToMatch.Cookies.OversizeHandling');
    HeadersMatchScope := CkJsonObject__stringOf(jResp,'RuleGroup.Rules[i].Statement.RegexMatchStatement.FieldToMatch.Headers.MatchScope');
    HeadersOversizeHandling := CkJsonObject__stringOf(jResp,'RuleGroup.Rules[i].Statement.RegexMatchStatement.FieldToMatch.Headers.OversizeHandling');
    JsonBodyInvalidFallbackBehavior := CkJsonObject__stringOf(jResp,'RuleGroup.Rules[i].Statement.RegexMatchStatement.FieldToMatch.JsonBody.InvalidFallbackBehavior');
    JsonBodyMatchScope := CkJsonObject__stringOf(jResp,'RuleGroup.Rules[i].Statement.RegexMatchStatement.FieldToMatch.JsonBody.MatchScope');
    JsonBodyOversizeHandling := CkJsonObject__stringOf(jResp,'RuleGroup.Rules[i].Statement.RegexMatchStatement.FieldToMatch.JsonBody.OversizeHandling');
    SingleHeaderName := CkJsonObject__stringOf(jResp,'RuleGroup.Rules[i].Statement.RegexMatchStatement.FieldToMatch.SingleHeader.Name');
    SingleQueryArgumentName := CkJsonObject__stringOf(jResp,'RuleGroup.Rules[i].Statement.RegexMatchStatement.FieldToMatch.SingleQueryArgument.Name');
    RegexString := CkJsonObject__stringOf(jResp,'RuleGroup.Rules[i].Statement.RegexMatchStatement.RegexString');
    RegexPatternSetReferenceStatementARN := CkJsonObject__stringOf(jResp,'RuleGroup.Rules[i].Statement.RegexPatternSetReferenceStatement.ARN');
    BodyOversizeHandling := CkJsonObject__stringOf(jResp,'RuleGroup.Rules[i].Statement.RegexPatternSetReferenceStatement.FieldToMatch.Body.OversizeHandling');
    CookiesMatchScope := CkJsonObject__stringOf(jResp,'RuleGroup.Rules[i].Statement.RegexPatternSetReferenceStatement.FieldToMatch.Cookies.MatchScope');
    CookiesOversizeHandling := CkJsonObject__stringOf(jResp,'RuleGroup.Rules[i].Statement.RegexPatternSetReferenceStatement.FieldToMatch.Cookies.OversizeHandling');
    HeadersMatchScope := CkJsonObject__stringOf(jResp,'RuleGroup.Rules[i].Statement.RegexPatternSetReferenceStatement.FieldToMatch.Headers.MatchScope');
    HeadersOversizeHandling := CkJsonObject__stringOf(jResp,'RuleGroup.Rules[i].Statement.RegexPatternSetReferenceStatement.FieldToMatch.Headers.OversizeHandling');
    JsonBodyInvalidFallbackBehavior := CkJsonObject__stringOf(jResp,'RuleGroup.Rules[i].Statement.RegexPatternSetReferenceStatement.FieldToMatch.JsonBody.InvalidFallbackBehavior');
    JsonBodyMatchScope := CkJsonObject__stringOf(jResp,'RuleGroup.Rules[i].Statement.RegexPatternSetReferenceStatement.FieldToMatch.JsonBody.MatchScope');
    JsonBodyOversizeHandling := CkJsonObject__stringOf(jResp,'RuleGroup.Rules[i].Statement.RegexPatternSetReferenceStatement.FieldToMatch.JsonBody.OversizeHandling');
    SingleHeaderName := CkJsonObject__stringOf(jResp,'RuleGroup.Rules[i].Statement.RegexPatternSetReferenceStatement.FieldToMatch.SingleHeader.Name');
    SingleQueryArgumentName := CkJsonObject__stringOf(jResp,'RuleGroup.Rules[i].Statement.RegexPatternSetReferenceStatement.FieldToMatch.SingleQueryArgument.Name');
    RuleGroupReferenceStatementARN := CkJsonObject__stringOf(jResp,'RuleGroup.Rules[i].Statement.RuleGroupReferenceStatement.ARN');
    ComparisonOperator := CkJsonObject__stringOf(jResp,'RuleGroup.Rules[i].Statement.SizeConstraintStatement.ComparisonOperator');
    BodyOversizeHandling := CkJsonObject__stringOf(jResp,'RuleGroup.Rules[i].Statement.SizeConstraintStatement.FieldToMatch.Body.OversizeHandling');
    CookiesMatchScope := CkJsonObject__stringOf(jResp,'RuleGroup.Rules[i].Statement.SizeConstraintStatement.FieldToMatch.Cookies.MatchScope');
    CookiesOversizeHandling := CkJsonObject__stringOf(jResp,'RuleGroup.Rules[i].Statement.SizeConstraintStatement.FieldToMatch.Cookies.OversizeHandling');
    HeadersMatchScope := CkJsonObject__stringOf(jResp,'RuleGroup.Rules[i].Statement.SizeConstraintStatement.FieldToMatch.Headers.MatchScope');
    HeadersOversizeHandling := CkJsonObject__stringOf(jResp,'RuleGroup.Rules[i].Statement.SizeConstraintStatement.FieldToMatch.Headers.OversizeHandling');
    JsonBodyInvalidFallbackBehavior := CkJsonObject__stringOf(jResp,'RuleGroup.Rules[i].Statement.SizeConstraintStatement.FieldToMatch.JsonBody.InvalidFallbackBehavior');
    JsonBodyMatchScope := CkJsonObject__stringOf(jResp,'RuleGroup.Rules[i].Statement.SizeConstraintStatement.FieldToMatch.JsonBody.MatchScope');
    JsonBodyOversizeHandling := CkJsonObject__stringOf(jResp,'RuleGroup.Rules[i].Statement.SizeConstraintStatement.FieldToMatch.JsonBody.OversizeHandling');
    SingleHeaderName := CkJsonObject__stringOf(jResp,'RuleGroup.Rules[i].Statement.SizeConstraintStatement.FieldToMatch.SingleHeader.Name');
    SingleQueryArgumentName := CkJsonObject__stringOf(jResp,'RuleGroup.Rules[i].Statement.SizeConstraintStatement.FieldToMatch.SingleQueryArgument.Name');
    Size := CkJsonObject_IntOf(jResp,'RuleGroup.Rules[i].Statement.SizeConstraintStatement.Size');
    BodyOversizeHandling := CkJsonObject__stringOf(jResp,'RuleGroup.Rules[i].Statement.SqliMatchStatement.FieldToMatch.Body.OversizeHandling');
    CookiesMatchScope := CkJsonObject__stringOf(jResp,'RuleGroup.Rules[i].Statement.SqliMatchStatement.FieldToMatch.Cookies.MatchScope');
    CookiesOversizeHandling := CkJsonObject__stringOf(jResp,'RuleGroup.Rules[i].Statement.SqliMatchStatement.FieldToMatch.Cookies.OversizeHandling');
    HeadersMatchScope := CkJsonObject__stringOf(jResp,'RuleGroup.Rules[i].Statement.SqliMatchStatement.FieldToMatch.Headers.MatchScope');
    HeadersOversizeHandling := CkJsonObject__stringOf(jResp,'RuleGroup.Rules[i].Statement.SqliMatchStatement.FieldToMatch.Headers.OversizeHandling');
    JsonBodyInvalidFallbackBehavior := CkJsonObject__stringOf(jResp,'RuleGroup.Rules[i].Statement.SqliMatchStatement.FieldToMatch.JsonBody.InvalidFallbackBehavior');
    JsonBodyMatchScope := CkJsonObject__stringOf(jResp,'RuleGroup.Rules[i].Statement.SqliMatchStatement.FieldToMatch.JsonBody.MatchScope');
    JsonBodyOversizeHandling := CkJsonObject__stringOf(jResp,'RuleGroup.Rules[i].Statement.SqliMatchStatement.FieldToMatch.JsonBody.OversizeHandling');
    SingleHeaderName := CkJsonObject__stringOf(jResp,'RuleGroup.Rules[i].Statement.SqliMatchStatement.FieldToMatch.SingleHeader.Name');
    SingleQueryArgumentName := CkJsonObject__stringOf(jResp,'RuleGroup.Rules[i].Statement.SqliMatchStatement.FieldToMatch.SingleQueryArgument.Name');
    BodyOversizeHandling := CkJsonObject__stringOf(jResp,'RuleGroup.Rules[i].Statement.XssMatchStatement.FieldToMatch.Body.OversizeHandling');
    CookiesMatchScope := CkJsonObject__stringOf(jResp,'RuleGroup.Rules[i].Statement.XssMatchStatement.FieldToMatch.Cookies.MatchScope');
    CookiesOversizeHandling := CkJsonObject__stringOf(jResp,'RuleGroup.Rules[i].Statement.XssMatchStatement.FieldToMatch.Cookies.OversizeHandling');
    HeadersMatchScope := CkJsonObject__stringOf(jResp,'RuleGroup.Rules[i].Statement.XssMatchStatement.FieldToMatch.Headers.MatchScope');
    HeadersOversizeHandling := CkJsonObject__stringOf(jResp,'RuleGroup.Rules[i].Statement.XssMatchStatement.FieldToMatch.Headers.OversizeHandling');
    JsonBodyInvalidFallbackBehavior := CkJsonObject__stringOf(jResp,'RuleGroup.Rules[i].Statement.XssMatchStatement.FieldToMatch.JsonBody.InvalidFallbackBehavior');
    JsonBodyMatchScope := CkJsonObject__stringOf(jResp,'RuleGroup.Rules[i].Statement.XssMatchStatement.FieldToMatch.JsonBody.MatchScope');
    JsonBodyOversizeHandling := CkJsonObject__stringOf(jResp,'RuleGroup.Rules[i].Statement.XssMatchStatement.FieldToMatch.JsonBody.OversizeHandling');
    SingleHeaderName := CkJsonObject__stringOf(jResp,'RuleGroup.Rules[i].Statement.XssMatchStatement.FieldToMatch.SingleHeader.Name');
    SingleQueryArgumentName := CkJsonObject__stringOf(jResp,'RuleGroup.Rules[i].Statement.XssMatchStatement.FieldToMatch.SingleQueryArgument.Name');
    VisibilityConfigCloudWatchMetricsEnabled := CkJsonObject_IntOf(jResp,'RuleGroup.Rules[i].VisibilityConfig.CloudWatchMetricsEnabled');
    VisibilityConfigMetricName := CkJsonObject__stringOf(jResp,'RuleGroup.Rules[i].VisibilityConfig.MetricName');
    VisibilityConfigSampledRequestsEnabled := CkJsonObject_IntOf(jResp,'RuleGroup.Rules[i].VisibilityConfig.SampledRequestsEnabled');
    j := 0;
    count_j := CkJsonObject_SizeOfArray(jResp,'RuleGroup.Rules[i].Action.Allow.CustomRequestHandling.InsertHeaders');
    while j < count_j do
      begin
        CkJsonObject_putJ(jResp,j);
        Name := CkJsonObject__stringOf(jResp,'RuleGroup.Rules[i].Action.Allow.CustomRequestHandling.InsertHeaders[j].Name');
        Value := CkJsonObject__stringOf(jResp,'RuleGroup.Rules[i].Action.Allow.CustomRequestHandling.InsertHeaders[j].Value');
        j := j + 1;
      end;

    j := 0;
    count_j := CkJsonObject_SizeOfArray(jResp,'RuleGroup.Rules[i].Action.Block.CustomResponse.ResponseHeaders');
    while j < count_j do
      begin
        CkJsonObject_putJ(jResp,j);
        Name := CkJsonObject__stringOf(jResp,'RuleGroup.Rules[i].Action.Block.CustomResponse.ResponseHeaders[j].Name');
        Value := CkJsonObject__stringOf(jResp,'RuleGroup.Rules[i].Action.Block.CustomResponse.ResponseHeaders[j].Value');
        j := j + 1;
      end;

    j := 0;
    count_j := CkJsonObject_SizeOfArray(jResp,'RuleGroup.Rules[i].Action.Captcha.CustomRequestHandling.InsertHeaders');
    while j < count_j do
      begin
        CkJsonObject_putJ(jResp,j);
        Name := CkJsonObject__stringOf(jResp,'RuleGroup.Rules[i].Action.Captcha.CustomRequestHandling.InsertHeaders[j].Name');
        Value := CkJsonObject__stringOf(jResp,'RuleGroup.Rules[i].Action.Captcha.CustomRequestHandling.InsertHeaders[j].Value');
        j := j + 1;
      end;

    j := 0;
    count_j := CkJsonObject_SizeOfArray(jResp,'RuleGroup.Rules[i].Action.Count.CustomRequestHandling.InsertHeaders');
    while j < count_j do
      begin
        CkJsonObject_putJ(jResp,j);
        Name := CkJsonObject__stringOf(jResp,'RuleGroup.Rules[i].Action.Count.CustomRequestHandling.InsertHeaders[j].Name');
        Value := CkJsonObject__stringOf(jResp,'RuleGroup.Rules[i].Action.Count.CustomRequestHandling.InsertHeaders[j].Value');
        j := j + 1;
      end;

    j := 0;
    count_j := CkJsonObject_SizeOfArray(jResp,'RuleGroup.Rules[i].OverrideAction.Count.CustomRequestHandling.InsertHeaders');
    while j < count_j do
      begin
        CkJsonObject_putJ(jResp,j);
        Name := CkJsonObject__stringOf(jResp,'RuleGroup.Rules[i].OverrideAction.Count.CustomRequestHandling.InsertHeaders[j].Name');
        Value := CkJsonObject__stringOf(jResp,'RuleGroup.Rules[i].OverrideAction.Count.CustomRequestHandling.InsertHeaders[j].Value');
        j := j + 1;
      end;

    j := 0;
    count_j := CkJsonObject_SizeOfArray(jResp,'RuleGroup.Rules[i].RuleLabels');
    while j < count_j do
      begin
        CkJsonObject_putJ(jResp,j);
        Name := CkJsonObject__stringOf(jResp,'RuleGroup.Rules[i].RuleLabels[j].Name');
        j := j + 1;
      end;

    j := 0;
    count_j := CkJsonObject_SizeOfArray(jResp,'RuleGroup.Rules[i].Statement.AndStatement.Statements');
    while j < count_j do
      begin
        CkJsonObject_putJ(jResp,j);
        strVal := CkJsonObject__stringOf(jResp,'RuleGroup.Rules[i].Statement.AndStatement.Statements[j]');
        j := j + 1;
      end;

    j := 0;
    count_j := CkJsonObject_SizeOfArray(jResp,'RuleGroup.Rules[i].Statement.ByteMatchStatement.FieldToMatch.Cookies.MatchPattern.ExcludedCookies');
    while j < count_j do
      begin
        CkJsonObject_putJ(jResp,j);
        strVal := CkJsonObject__stringOf(jResp,'RuleGroup.Rules[i].Statement.ByteMatchStatement.FieldToMatch.Cookies.MatchPattern.ExcludedCookies[j]');
        j := j + 1;
      end;

    j := 0;
    count_j := CkJsonObject_SizeOfArray(jResp,'RuleGroup.Rules[i].Statement.ByteMatchStatement.FieldToMatch.Cookies.MatchPattern.IncludedCookies');
    while j < count_j do
      begin
        CkJsonObject_putJ(jResp,j);
        strVal := CkJsonObject__stringOf(jResp,'RuleGroup.Rules[i].Statement.ByteMatchStatement.FieldToMatch.Cookies.MatchPattern.IncludedCookies[j]');
        j := j + 1;
      end;

    j := 0;
    count_j := CkJsonObject_SizeOfArray(jResp,'RuleGroup.Rules[i].Statement.ByteMatchStatement.FieldToMatch.Headers.MatchPattern.ExcludedHeaders');
    while j < count_j do
      begin
        CkJsonObject_putJ(jResp,j);
        strVal := CkJsonObject__stringOf(jResp,'RuleGroup.Rules[i].Statement.ByteMatchStatement.FieldToMatch.Headers.MatchPattern.ExcludedHeaders[j]');
        j := j + 1;
      end;

    j := 0;
    count_j := CkJsonObject_SizeOfArray(jResp,'RuleGroup.Rules[i].Statement.ByteMatchStatement.FieldToMatch.Headers.MatchPattern.IncludedHeaders');
    while j < count_j do
      begin
        CkJsonObject_putJ(jResp,j);
        strVal := CkJsonObject__stringOf(jResp,'RuleGroup.Rules[i].Statement.ByteMatchStatement.FieldToMatch.Headers.MatchPattern.IncludedHeaders[j]');
        j := j + 1;
      end;

    j := 0;
    count_j := CkJsonObject_SizeOfArray(jResp,'RuleGroup.Rules[i].Statement.ByteMatchStatement.FieldToMatch.JsonBody.MatchPattern.IncludedPaths');
    while j < count_j do
      begin
        CkJsonObject_putJ(jResp,j);
        strVal := CkJsonObject__stringOf(jResp,'RuleGroup.Rules[i].Statement.ByteMatchStatement.FieldToMatch.JsonBody.MatchPattern.IncludedPaths[j]');
        j := j + 1;
      end;

    j := 0;
    count_j := CkJsonObject_SizeOfArray(jResp,'RuleGroup.Rules[i].Statement.ByteMatchStatement.TextTransformations');
    while j < count_j do
      begin
        CkJsonObject_putJ(jResp,j);
        Priority := CkJsonObject_IntOf(jResp,'RuleGroup.Rules[i].Statement.ByteMatchStatement.TextTransformations[j].Priority');
        v_Type := CkJsonObject__stringOf(jResp,'RuleGroup.Rules[i].Statement.ByteMatchStatement.TextTransformations[j].Type');
        j := j + 1;
      end;

    j := 0;
    count_j := CkJsonObject_SizeOfArray(jResp,'RuleGroup.Rules[i].Statement.GeoMatchStatement.CountryCodes');
    while j < count_j do
      begin
        CkJsonObject_putJ(jResp,j);
        strVal := CkJsonObject__stringOf(jResp,'RuleGroup.Rules[i].Statement.GeoMatchStatement.CountryCodes[j]');
        j := j + 1;
      end;

    j := 0;
    count_j := CkJsonObject_SizeOfArray(jResp,'RuleGroup.Rules[i].Statement.ManagedRuleGroupStatement.ExcludedRules');
    while j < count_j do
      begin
        CkJsonObject_putJ(jResp,j);
        Name := CkJsonObject__stringOf(jResp,'RuleGroup.Rules[i].Statement.ManagedRuleGroupStatement.ExcludedRules[j].Name');
        j := j + 1;
      end;

    j := 0;
    count_j := CkJsonObject_SizeOfArray(jResp,'RuleGroup.Rules[i].Statement.ManagedRuleGroupStatement.ManagedRuleGroupConfigs');
    while j < count_j do
      begin
        CkJsonObject_putJ(jResp,j);
        LoginPath := CkJsonObject__stringOf(jResp,'RuleGroup.Rules[i].Statement.ManagedRuleGroupStatement.ManagedRuleGroupConfigs[j].LoginPath');
        Identifier := CkJsonObject__stringOf(jResp,'RuleGroup.Rules[i].Statement.ManagedRuleGroupStatement.ManagedRuleGroupConfigs[j].PasswordField.Identifier');
        PayloadType := CkJsonObject__stringOf(jResp,'RuleGroup.Rules[i].Statement.ManagedRuleGroupStatement.ManagedRuleGroupConfigs[j].PayloadType');
        UsernameFieldIdentifier := CkJsonObject__stringOf(jResp,'RuleGroup.Rules[i].Statement.ManagedRuleGroupStatement.ManagedRuleGroupConfigs[j].UsernameField.Identifier');
        j := j + 1;
      end;

    j := 0;
    count_j := CkJsonObject_SizeOfArray(jResp,'RuleGroup.Rules[i].Statement.OrStatement.Statements');
    while j < count_j do
      begin
        CkJsonObject_putJ(jResp,j);
        strVal := CkJsonObject__stringOf(jResp,'RuleGroup.Rules[i].Statement.OrStatement.Statements[j]');
        j := j + 1;
      end;

    j := 0;
    count_j := CkJsonObject_SizeOfArray(jResp,'RuleGroup.Rules[i].Statement.RegexMatchStatement.FieldToMatch.Cookies.MatchPattern.ExcludedCookies');
    while j < count_j do
      begin
        CkJsonObject_putJ(jResp,j);
        strVal := CkJsonObject__stringOf(jResp,'RuleGroup.Rules[i].Statement.RegexMatchStatement.FieldToMatch.Cookies.MatchPattern.ExcludedCookies[j]');
        j := j + 1;
      end;

    j := 0;
    count_j := CkJsonObject_SizeOfArray(jResp,'RuleGroup.Rules[i].Statement.RegexMatchStatement.FieldToMatch.Cookies.MatchPattern.IncludedCookies');
    while j < count_j do
      begin
        CkJsonObject_putJ(jResp,j);
        strVal := CkJsonObject__stringOf(jResp,'RuleGroup.Rules[i].Statement.RegexMatchStatement.FieldToMatch.Cookies.MatchPattern.IncludedCookies[j]');
        j := j + 1;
      end;

    j := 0;
    count_j := CkJsonObject_SizeOfArray(jResp,'RuleGroup.Rules[i].Statement.RegexMatchStatement.FieldToMatch.Headers.MatchPattern.ExcludedHeaders');
    while j < count_j do
      begin
        CkJsonObject_putJ(jResp,j);
        strVal := CkJsonObject__stringOf(jResp,'RuleGroup.Rules[i].Statement.RegexMatchStatement.FieldToMatch.Headers.MatchPattern.ExcludedHeaders[j]');
        j := j + 1;
      end;

    j := 0;
    count_j := CkJsonObject_SizeOfArray(jResp,'RuleGroup.Rules[i].Statement.RegexMatchStatement.FieldToMatch.Headers.MatchPattern.IncludedHeaders');
    while j < count_j do
      begin
        CkJsonObject_putJ(jResp,j);
        strVal := CkJsonObject__stringOf(jResp,'RuleGroup.Rules[i].Statement.RegexMatchStatement.FieldToMatch.Headers.MatchPattern.IncludedHeaders[j]');
        j := j + 1;
      end;

    j := 0;
    count_j := CkJsonObject_SizeOfArray(jResp,'RuleGroup.Rules[i].Statement.RegexMatchStatement.FieldToMatch.JsonBody.MatchPattern.IncludedPaths');
    while j < count_j do
      begin
        CkJsonObject_putJ(jResp,j);
        strVal := CkJsonObject__stringOf(jResp,'RuleGroup.Rules[i].Statement.RegexMatchStatement.FieldToMatch.JsonBody.MatchPattern.IncludedPaths[j]');
        j := j + 1;
      end;

    j := 0;
    count_j := CkJsonObject_SizeOfArray(jResp,'RuleGroup.Rules[i].Statement.RegexMatchStatement.TextTransformations');
    while j < count_j do
      begin
        CkJsonObject_putJ(jResp,j);
        Priority := CkJsonObject_IntOf(jResp,'RuleGroup.Rules[i].Statement.RegexMatchStatement.TextTransformations[j].Priority');
        v_Type := CkJsonObject__stringOf(jResp,'RuleGroup.Rules[i].Statement.RegexMatchStatement.TextTransformations[j].Type');
        j := j + 1;
      end;

    j := 0;
    count_j := CkJsonObject_SizeOfArray(jResp,'RuleGroup.Rules[i].Statement.RegexPatternSetReferenceStatement.FieldToMatch.Cookies.MatchPattern.ExcludedCookies');
    while j < count_j do
      begin
        CkJsonObject_putJ(jResp,j);
        strVal := CkJsonObject__stringOf(jResp,'RuleGroup.Rules[i].Statement.RegexPatternSetReferenceStatement.FieldToMatch.Cookies.MatchPattern.ExcludedCookies[j]');
        j := j + 1;
      end;

    j := 0;
    count_j := CkJsonObject_SizeOfArray(jResp,'RuleGroup.Rules[i].Statement.RegexPatternSetReferenceStatement.FieldToMatch.Cookies.MatchPattern.IncludedCookies');
    while j < count_j do
      begin
        CkJsonObject_putJ(jResp,j);
        strVal := CkJsonObject__stringOf(jResp,'RuleGroup.Rules[i].Statement.RegexPatternSetReferenceStatement.FieldToMatch.Cookies.MatchPattern.IncludedCookies[j]');
        j := j + 1;
      end;

    j := 0;
    count_j := CkJsonObject_SizeOfArray(jResp,'RuleGroup.Rules[i].Statement.RegexPatternSetReferenceStatement.FieldToMatch.Headers.MatchPattern.ExcludedHeaders');
    while j < count_j do
      begin
        CkJsonObject_putJ(jResp,j);
        strVal := CkJsonObject__stringOf(jResp,'RuleGroup.Rules[i].Statement.RegexPatternSetReferenceStatement.FieldToMatch.Headers.MatchPattern.ExcludedHeaders[j]');
        j := j + 1;
      end;

    j := 0;
    count_j := CkJsonObject_SizeOfArray(jResp,'RuleGroup.Rules[i].Statement.RegexPatternSetReferenceStatement.FieldToMatch.Headers.MatchPattern.IncludedHeaders');
    while j < count_j do
      begin
        CkJsonObject_putJ(jResp,j);
        strVal := CkJsonObject__stringOf(jResp,'RuleGroup.Rules[i].Statement.RegexPatternSetReferenceStatement.FieldToMatch.Headers.MatchPattern.IncludedHeaders[j]');
        j := j + 1;
      end;

    j := 0;
    count_j := CkJsonObject_SizeOfArray(jResp,'RuleGroup.Rules[i].Statement.RegexPatternSetReferenceStatement.FieldToMatch.JsonBody.MatchPattern.IncludedPaths');
    while j < count_j do
      begin
        CkJsonObject_putJ(jResp,j);
        strVal := CkJsonObject__stringOf(jResp,'RuleGroup.Rules[i].Statement.RegexPatternSetReferenceStatement.FieldToMatch.JsonBody.MatchPattern.IncludedPaths[j]');
        j := j + 1;
      end;

    j := 0;
    count_j := CkJsonObject_SizeOfArray(jResp,'RuleGroup.Rules[i].Statement.RegexPatternSetReferenceStatement.TextTransformations');
    while j < count_j do
      begin
        CkJsonObject_putJ(jResp,j);
        Priority := CkJsonObject_IntOf(jResp,'RuleGroup.Rules[i].Statement.RegexPatternSetReferenceStatement.TextTransformations[j].Priority');
        v_Type := CkJsonObject__stringOf(jResp,'RuleGroup.Rules[i].Statement.RegexPatternSetReferenceStatement.TextTransformations[j].Type');
        j := j + 1;
      end;

    j := 0;
    count_j := CkJsonObject_SizeOfArray(jResp,'RuleGroup.Rules[i].Statement.RuleGroupReferenceStatement.ExcludedRules');
    while j < count_j do
      begin
        CkJsonObject_putJ(jResp,j);
        Name := CkJsonObject__stringOf(jResp,'RuleGroup.Rules[i].Statement.RuleGroupReferenceStatement.ExcludedRules[j].Name');
        j := j + 1;
      end;

    j := 0;
    count_j := CkJsonObject_SizeOfArray(jResp,'RuleGroup.Rules[i].Statement.SizeConstraintStatement.FieldToMatch.Cookies.MatchPattern.ExcludedCookies');
    while j < count_j do
      begin
        CkJsonObject_putJ(jResp,j);
        strVal := CkJsonObject__stringOf(jResp,'RuleGroup.Rules[i].Statement.SizeConstraintStatement.FieldToMatch.Cookies.MatchPattern.ExcludedCookies[j]');
        j := j + 1;
      end;

    j := 0;
    count_j := CkJsonObject_SizeOfArray(jResp,'RuleGroup.Rules[i].Statement.SizeConstraintStatement.FieldToMatch.Cookies.MatchPattern.IncludedCookies');
    while j < count_j do
      begin
        CkJsonObject_putJ(jResp,j);
        strVal := CkJsonObject__stringOf(jResp,'RuleGroup.Rules[i].Statement.SizeConstraintStatement.FieldToMatch.Cookies.MatchPattern.IncludedCookies[j]');
        j := j + 1;
      end;

    j := 0;
    count_j := CkJsonObject_SizeOfArray(jResp,'RuleGroup.Rules[i].Statement.SizeConstraintStatement.FieldToMatch.Headers.MatchPattern.ExcludedHeaders');
    while j < count_j do
      begin
        CkJsonObject_putJ(jResp,j);
        strVal := CkJsonObject__stringOf(jResp,'RuleGroup.Rules[i].Statement.SizeConstraintStatement.FieldToMatch.Headers.MatchPattern.ExcludedHeaders[j]');
        j := j + 1;
      end;

    j := 0;
    count_j := CkJsonObject_SizeOfArray(jResp,'RuleGroup.Rules[i].Statement.SizeConstraintStatement.FieldToMatch.Headers.MatchPattern.IncludedHeaders');
    while j < count_j do
      begin
        CkJsonObject_putJ(jResp,j);
        strVal := CkJsonObject__stringOf(jResp,'RuleGroup.Rules[i].Statement.SizeConstraintStatement.FieldToMatch.Headers.MatchPattern.IncludedHeaders[j]');
        j := j + 1;
      end;

    j := 0;
    count_j := CkJsonObject_SizeOfArray(jResp,'RuleGroup.Rules[i].Statement.SizeConstraintStatement.FieldToMatch.JsonBody.MatchPattern.IncludedPaths');
    while j < count_j do
      begin
        CkJsonObject_putJ(jResp,j);
        strVal := CkJsonObject__stringOf(jResp,'RuleGroup.Rules[i].Statement.SizeConstraintStatement.FieldToMatch.JsonBody.MatchPattern.IncludedPaths[j]');
        j := j + 1;
      end;

    j := 0;
    count_j := CkJsonObject_SizeOfArray(jResp,'RuleGroup.Rules[i].Statement.SizeConstraintStatement.TextTransformations');
    while j < count_j do
      begin
        CkJsonObject_putJ(jResp,j);
        Priority := CkJsonObject_IntOf(jResp,'RuleGroup.Rules[i].Statement.SizeConstraintStatement.TextTransformations[j].Priority');
        v_Type := CkJsonObject__stringOf(jResp,'RuleGroup.Rules[i].Statement.SizeConstraintStatement.TextTransformations[j].Type');
        j := j + 1;
      end;

    j := 0;
    count_j := CkJsonObject_SizeOfArray(jResp,'RuleGroup.Rules[i].Statement.SqliMatchStatement.FieldToMatch.Cookies.MatchPattern.ExcludedCookies');
    while j < count_j do
      begin
        CkJsonObject_putJ(jResp,j);
        strVal := CkJsonObject__stringOf(jResp,'RuleGroup.Rules[i].Statement.SqliMatchStatement.FieldToMatch.Cookies.MatchPattern.ExcludedCookies[j]');
        j := j + 1;
      end;

    j := 0;
    count_j := CkJsonObject_SizeOfArray(jResp,'RuleGroup.Rules[i].Statement.SqliMatchStatement.FieldToMatch.Cookies.MatchPattern.IncludedCookies');
    while j < count_j do
      begin
        CkJsonObject_putJ(jResp,j);
        strVal := CkJsonObject__stringOf(jResp,'RuleGroup.Rules[i].Statement.SqliMatchStatement.FieldToMatch.Cookies.MatchPattern.IncludedCookies[j]');
        j := j + 1;
      end;

    j := 0;
    count_j := CkJsonObject_SizeOfArray(jResp,'RuleGroup.Rules[i].Statement.SqliMatchStatement.FieldToMatch.Headers.MatchPattern.ExcludedHeaders');
    while j < count_j do
      begin
        CkJsonObject_putJ(jResp,j);
        strVal := CkJsonObject__stringOf(jResp,'RuleGroup.Rules[i].Statement.SqliMatchStatement.FieldToMatch.Headers.MatchPattern.ExcludedHeaders[j]');
        j := j + 1;
      end;

    j := 0;
    count_j := CkJsonObject_SizeOfArray(jResp,'RuleGroup.Rules[i].Statement.SqliMatchStatement.FieldToMatch.Headers.MatchPattern.IncludedHeaders');
    while j < count_j do
      begin
        CkJsonObject_putJ(jResp,j);
        strVal := CkJsonObject__stringOf(jResp,'RuleGroup.Rules[i].Statement.SqliMatchStatement.FieldToMatch.Headers.MatchPattern.IncludedHeaders[j]');
        j := j + 1;
      end;

    j := 0;
    count_j := CkJsonObject_SizeOfArray(jResp,'RuleGroup.Rules[i].Statement.SqliMatchStatement.FieldToMatch.JsonBody.MatchPattern.IncludedPaths');
    while j < count_j do
      begin
        CkJsonObject_putJ(jResp,j);
        strVal := CkJsonObject__stringOf(jResp,'RuleGroup.Rules[i].Statement.SqliMatchStatement.FieldToMatch.JsonBody.MatchPattern.IncludedPaths[j]');
        j := j + 1;
      end;

    j := 0;
    count_j := CkJsonObject_SizeOfArray(jResp,'RuleGroup.Rules[i].Statement.SqliMatchStatement.TextTransformations');
    while j < count_j do
      begin
        CkJsonObject_putJ(jResp,j);
        Priority := CkJsonObject_IntOf(jResp,'RuleGroup.Rules[i].Statement.SqliMatchStatement.TextTransformations[j].Priority');
        v_Type := CkJsonObject__stringOf(jResp,'RuleGroup.Rules[i].Statement.SqliMatchStatement.TextTransformations[j].Type');
        j := j + 1;
      end;

    j := 0;
    count_j := CkJsonObject_SizeOfArray(jResp,'RuleGroup.Rules[i].Statement.XssMatchStatement.FieldToMatch.Cookies.MatchPattern.ExcludedCookies');
    while j < count_j do
      begin
        CkJsonObject_putJ(jResp,j);
        strVal := CkJsonObject__stringOf(jResp,'RuleGroup.Rules[i].Statement.XssMatchStatement.FieldToMatch.Cookies.MatchPattern.ExcludedCookies[j]');
        j := j + 1;
      end;

    j := 0;
    count_j := CkJsonObject_SizeOfArray(jResp,'RuleGroup.Rules[i].Statement.XssMatchStatement.FieldToMatch.Cookies.MatchPattern.IncludedCookies');
    while j < count_j do
      begin
        CkJsonObject_putJ(jResp,j);
        strVal := CkJsonObject__stringOf(jResp,'RuleGroup.Rules[i].Statement.XssMatchStatement.FieldToMatch.Cookies.MatchPattern.IncludedCookies[j]');
        j := j + 1;
      end;

    j := 0;
    count_j := CkJsonObject_SizeOfArray(jResp,'RuleGroup.Rules[i].Statement.XssMatchStatement.FieldToMatch.Headers.MatchPattern.ExcludedHeaders');
    while j < count_j do
      begin
        CkJsonObject_putJ(jResp,j);
        strVal := CkJsonObject__stringOf(jResp,'RuleGroup.Rules[i].Statement.XssMatchStatement.FieldToMatch.Headers.MatchPattern.ExcludedHeaders[j]');
        j := j + 1;
      end;

    j := 0;
    count_j := CkJsonObject_SizeOfArray(jResp,'RuleGroup.Rules[i].Statement.XssMatchStatement.FieldToMatch.Headers.MatchPattern.IncludedHeaders');
    while j < count_j do
      begin
        CkJsonObject_putJ(jResp,j);
        strVal := CkJsonObject__stringOf(jResp,'RuleGroup.Rules[i].Statement.XssMatchStatement.FieldToMatch.Headers.MatchPattern.IncludedHeaders[j]');
        j := j + 1;
      end;

    j := 0;
    count_j := CkJsonObject_SizeOfArray(jResp,'RuleGroup.Rules[i].Statement.XssMatchStatement.FieldToMatch.JsonBody.MatchPattern.IncludedPaths');
    while j < count_j do
      begin
        CkJsonObject_putJ(jResp,j);
        strVal := CkJsonObject__stringOf(jResp,'RuleGroup.Rules[i].Statement.XssMatchStatement.FieldToMatch.JsonBody.MatchPattern.IncludedPaths[j]');
        j := j + 1;
      end;

    j := 0;
    count_j := CkJsonObject_SizeOfArray(jResp,'RuleGroup.Rules[i].Statement.XssMatchStatement.TextTransformations');
    while j < count_j do
      begin
        CkJsonObject_putJ(jResp,j);
        Priority := CkJsonObject_IntOf(jResp,'RuleGroup.Rules[i].Statement.XssMatchStatement.TextTransformations[j].Priority');
        v_Type := CkJsonObject__stringOf(jResp,'RuleGroup.Rules[i].Statement.XssMatchStatement.TextTransformations[j].Type');
        j := j + 1;
      end;

    i := i + 1;
  end;

// A sample JSON response body parsed by the above code:

// {
//   "LockToken": "string",
//   "RuleGroup": {
//     "ARN": "string",
//     "AvailableLabels": [
//       {
//         "Name": "string"
//       }
//     ],
//     "Capacity": number,
//     "ConsumedLabels": [
//       {
//         "Name": "string"
//       }
//     ],
//     "CustomResponseBodies": {
//       "string": {
//         "Content": "string",
//         "ContentType": "string"
//       }
//     },
//     "Description": "string",
//     "Id": "string",
//     "LabelNamespace": "string",
//     "Name": "string",
//     "Rules": [
//       {
//         "Action": {
//           "Allow": {
//             "CustomRequestHandling": {
//               "InsertHeaders": [
//                 {
//                   "Name": "string",
//                   "Value": "string"
//                 }
//               ]
//             }
//           },
//           "Block": {
//             "CustomResponse": {
//               "CustomResponseBodyKey": "string",
//               "ResponseCode": number,
//               "ResponseHeaders": [
//                 {
//                   "Name": "string",
//                   "Value": "string"
//                 }
//               ]
//             }
//           },
//           "Captcha": {
//             "CustomRequestHandling": {
//               "InsertHeaders": [
//                 {
//                   "Name": "string",
//                   "Value": "string"
//                 }
//               ]
//             }
//           },
//           "Count": {
//             "CustomRequestHandling": {
//               "InsertHeaders": [
//                 {
//                   "Name": "string",
//                   "Value": "string"
//                 }
//               ]
//             }
//           }
//         },
//         "CaptchaConfig": {
//           "ImmunityTimeProperty": {
//             "ImmunityTime": number
//           }
//         },
//         "Name": "string",
//         "OverrideAction": {
//           "Count": {
//             "CustomRequestHandling": {
//               "InsertHeaders": [
//                 {
//                   "Name": "string",
//                   "Value": "string"
//                 }
//               ]
//             }
//           },
//           "None": {}
//         },
//         "Priority": number,
//         "RuleLabels": [
//           {
//             "Name": "string"
//           }
//         ],
//         "Statement": {
//           "AndStatement": {
//             "Statements": [
//               "Statement"
//             ]
//           },
//           "ByteMatchStatement": {
//             "FieldToMatch": {
//               "AllQueryArguments": {},
//               "Body": {
//                 "OversizeHandling": "string"
//               },
//               "Cookies": {
//                 "MatchPattern": {
//                   "All": {},
//                   "ExcludedCookies": [
//                     "string"
//                   ],
//                   "IncludedCookies": [
//                     "string"
//                   ]
//                 },
//                 "MatchScope": "string",
//                 "OversizeHandling": "string"
//               },
//               "Headers": {
//                 "MatchPattern": {
//                   "All": {},
//                   "ExcludedHeaders": [
//                     "string"
//                   ],
//                   "IncludedHeaders": [
//                     "string"
//                   ]
//                 },
//                 "MatchScope": "string",
//                 "OversizeHandling": "string"
//               },
//               "JsonBody": {
//                 "InvalidFallbackBehavior": "string",
//                 "MatchPattern": {
//                   "All": {},
//                   "IncludedPaths": [
//                     "string"
//                   ]
//                 },
//                 "MatchScope": "string",
//                 "OversizeHandling": "string"
//               },
//               "Method": {},
//               "QueryString": {},
//               "SingleHeader": {
//                 "Name": "string"
//               },
//               "SingleQueryArgument": {
//                 "Name": "string"
//               },
//               "UriPath": {}
//             },
//             "PositionalConstraint": "string",
//             "SearchString": blob,
//             "TextTransformations": [
//               {
//                 "Priority": number,
//                 "Type": "string"
//               }
//             ]
//           },
//           "GeoMatchStatement": {
//             "CountryCodes": [
//               "string"
//             ],
//             "ForwardedIPConfig": {
//               "FallbackBehavior": "string",
//               "HeaderName": "string"
//             }
//           },
//           "IPSetReferenceStatement": {
//             "ARN": "string",
//             "IPSetForwardedIPConfig": {
//               "FallbackBehavior": "string",
//               "HeaderName": "string",
//               "Position": "string"
//             }
//           },
//           "LabelMatchStatement": {
//             "Key": "string",
//             "Scope": "string"
//           },
//           "ManagedRuleGroupStatement": {
//             "ExcludedRules": [
//               {
//                 "Name": "string"
//               }
//             ],
//             "ManagedRuleGroupConfigs": [
//               {
//                 "LoginPath": "string",
//                 "PasswordField": {
//                   "Identifier": "string"
//                 },
//                 "PayloadType": "string",
//                 "UsernameField": {
//                   "Identifier": "string"
//                 }
//               }
//             ],
//             "Name": "string",
//             "ScopeDownStatement": "Statement",
//             "VendorName": "string",
//             "Version": "string"
//           },
//           "NotStatement": {
//             "Statement": "Statement"
//           },
//           "OrStatement": {
//             "Statements": [
//               "Statement"
//             ]
//           },
//           "RateBasedStatement": {
//             "AggregateKeyType": "string",
//             "ForwardedIPConfig": {
//               "FallbackBehavior": "string",
//               "HeaderName": "string"
//             },
//             "Limit": number,
//             "ScopeDownStatement": "Statement"
//           },
//           "RegexMatchStatement": {
//             "FieldToMatch": {
//               "AllQueryArguments": {},
//               "Body": {
//                 "OversizeHandling": "string"
//               },
//               "Cookies": {
//                 "MatchPattern": {
//                   "All": {},
//                   "ExcludedCookies": [
//                     "string"
//                   ],
//                   "IncludedCookies": [
//                     "string"
//                   ]
//                 },
//                 "MatchScope": "string",
//                 "OversizeHandling": "string"
//               },
//               "Headers": {
//                 "MatchPattern": {
//                   "All": {},
//                   "ExcludedHeaders": [
//                     "string"
//                   ],
//                   "IncludedHeaders": [
//                     "string"
//                   ]
//                 },
//                 "MatchScope": "string",
//                 "OversizeHandling": "string"
//               },
//               "JsonBody": {
//                 "InvalidFallbackBehavior": "string",
//                 "MatchPattern": {
//                   "All": {},
//                   "IncludedPaths": [
//                     "string"
//                   ]
//                 },
//                 "MatchScope": "string",
//                 "OversizeHandling": "string"
//               },
//               "Method": {},
//               "QueryString": {},
//               "SingleHeader": {
//                 "Name": "string"
//               },
//               "SingleQueryArgument": {
//                 "Name": "string"
//               },
//               "UriPath": {}
//             },
//             "RegexString": "string",
//             "TextTransformations": [
//               {
//                 "Priority": number,
//                 "Type": "string"
//               }
//             ]
//           },
//           "RegexPatternSetReferenceStatement": {
//             "ARN": "string",
//             "FieldToMatch": {
//               "AllQueryArguments": {},
//               "Body": {
//                 "OversizeHandling": "string"
//               },
//               "Cookies": {
//                 "MatchPattern": {
//                   "All": {},
//                   "ExcludedCookies": [
//                     "string"
//                   ],
//                   "IncludedCookies": [
//                     "string"
//                   ]
//                 },
//                 "MatchScope": "string",
//                 "OversizeHandling": "string"
//               },
//               "Headers": {
//                 "MatchPattern": {
//                   "All": {},
//                   "ExcludedHeaders": [
//                     "string"
//                   ],
//                   "IncludedHeaders": [
//                     "string"
//                   ]
//                 },
//                 "MatchScope": "string",
//                 "OversizeHandling": "string"
//               },
//               "JsonBody": {
//                 "InvalidFallbackBehavior": "string",
//                 "MatchPattern": {
//                   "All": {},
//                   "IncludedPaths": [
//                     "string"
//                   ]
//                 },
//                 "MatchScope": "string",
//                 "OversizeHandling": "string"
//               },
//               "Method": {},
//               "QueryString": {},
//               "SingleHeader": {
//                 "Name": "string"
//               },
//               "SingleQueryArgument": {
//                 "Name": "string"
//               },
//               "UriPath": {}
//             },
//             "TextTransformations": [
//               {
//                 "Priority": number,
//                 "Type": "string"
//               }
//             ]
//           },
//           "RuleGroupReferenceStatement": {
//             "ARN": "string",
//             "ExcludedRules": [
//               {
//                 "Name": "string"
//               }
//             ]
//           },
//           "SizeConstraintStatement": {
//             "ComparisonOperator": "string",
//             "FieldToMatch": {
//               "AllQueryArguments": {},
//               "Body": {
//                 "OversizeHandling": "string"
//               },
//               "Cookies": {
//                 "MatchPattern": {
//                   "All": {},
//                   "ExcludedCookies": [
//                     "string"
//                   ],
//                   "IncludedCookies": [
//                     "string"
//                   ]
//                 },
//                 "MatchScope": "string",
//                 "OversizeHandling": "string"
//               },
//               "Headers": {
//                 "MatchPattern": {
//                   "All": {},
//                   "ExcludedHeaders": [
//                     "string"
//                   ],
//                   "IncludedHeaders": [
//                     "string"
//                   ]
//                 },
//                 "MatchScope": "string",
//                 "OversizeHandling": "string"
//               },
//               "JsonBody": {
//                 "InvalidFallbackBehavior": "string",
//                 "MatchPattern": {
//                   "All": {},
//                   "IncludedPaths": [
//                     "string"
//                   ]
//                 },
//                 "MatchScope": "string",
//                 "OversizeHandling": "string"
//               },
//               "Method": {},
//               "QueryString": {},
//               "SingleHeader": {
//                 "Name": "string"
//               },
//               "SingleQueryArgument": {
//                 "Name": "string"
//               },
//               "UriPath": {}
//             },
//             "Size": number,
//             "TextTransformations": [
//               {
//                 "Priority": number,
//                 "Type": "string"
//               }
//             ]
//           },
//           "SqliMatchStatement": {
//             "FieldToMatch": {
//               "AllQueryArguments": {},
//               "Body": {
//                 "OversizeHandling": "string"
//               },
//               "Cookies": {
//                 "MatchPattern": {
//                   "All": {},
//                   "ExcludedCookies": [
//                     "string"
//                   ],
//                   "IncludedCookies": [
//                     "string"
//                   ]
//                 },
//                 "MatchScope": "string",
//                 "OversizeHandling": "string"
//               },
//               "Headers": {
//                 "MatchPattern": {
//                   "All": {},
//                   "ExcludedHeaders": [
//                     "string"
//                   ],
//                   "IncludedHeaders": [
//                     "string"
//                   ]
//                 },
//                 "MatchScope": "string",
//                 "OversizeHandling": "string"
//               },
//               "JsonBody": {
//                 "InvalidFallbackBehavior": "string",
//                 "MatchPattern": {
//                   "All": {},
//                   "IncludedPaths": [
//                     "string"
//                   ]
//                 },
//                 "MatchScope": "string",
//                 "OversizeHandling": "string"
//               },
//               "Method": {},
//               "QueryString": {},
//               "SingleHeader": {
//                 "Name": "string"
//               },
//               "SingleQueryArgument": {
//                 "Name": "string"
//               },
//               "UriPath": {}
//             },
//             "TextTransformations": [
//               {
//                 "Priority": number,
//                 "Type": "string"
//               }
//             ]
//           },
//           "XssMatchStatement": {
//             "FieldToMatch": {
//               "AllQueryArguments": {},
//               "Body": {
//                 "OversizeHandling": "string"
//               },
//               "Cookies": {
//                 "MatchPattern": {
//                   "All": {},
//                   "ExcludedCookies": [
//                     "string"
//                   ],
//                   "IncludedCookies": [
//                     "string"
//                   ]
//                 },
//                 "MatchScope": "string",
//                 "OversizeHandling": "string"
//               },
//               "Headers": {
//                 "MatchPattern": {
//                   "All": {},
//                   "ExcludedHeaders": [
//                     "string"
//                   ],
//                   "IncludedHeaders": [
//                     "string"
//                   ]
//                 },
//                 "MatchScope": "string",
//                 "OversizeHandling": "string"
//               },
//               "JsonBody": {
//                 "InvalidFallbackBehavior": "string",
//                 "MatchPattern": {
//                   "All": {},
//                   "IncludedPaths": [
//                     "string"
//                   ]
//                 },
//                 "MatchScope": "string",
//                 "OversizeHandling": "string"
//               },
//               "Method": {},
//               "QueryString": {},
//               "SingleHeader": {
//                 "Name": "string"
//               },
//               "SingleQueryArgument": {
//                 "Name": "string"
//               },
//               "UriPath": {}
//             },
//             "TextTransformations": [
//               {
//                 "Priority": number,
//                 "Type": "string"
//               }
//             ]
//           }
//         },
//         "VisibilityConfig": {
//           "CloudWatchMetricsEnabled": boolean,
//           "MetricName": "string",
//           "SampledRequestsEnabled": boolean
//         }
//       }
//     ],
//     "VisibilityConfig": {
//       "CloudWatchMetricsEnabled": boolean,
//       "MetricName": "string",
//       "SampledRequestsEnabled": boolean
//     }
//   }
// }

CkRest_Dispose(rest);
CkAuthAws_Dispose(authAws);
CkJsonObject_Dispose(json);
CkStringBuilder_Dispose(sbRequestBody);
CkStringBuilder_Dispose(sbResponseBody);
CkJsonObject_Dispose(jResp);