import * as core from "@terrascript/core";

export interface XraySamplingRuleArgs extends core.ResourceArgs {
  attributes?: core.Map<string, string> | core.MapOut<core.StringOut>;

  fixedRate: number | core.NumberOut;

  host: string | core.StringOut;

  httpMethod: string | core.StringOut;

  priority: number | core.NumberOut;

  reservoirSize: number | core.NumberOut;

  resourceArn: string | core.StringOut;

  ruleName?: string | core.StringOut;

  serviceName: string | core.StringOut;

  serviceType: string | core.StringOut;

  tags?: core.Map<string, string> | core.MapOut<core.StringOut>;

  tagsAll?: core.Map<string, string> | core.MapOut<core.StringOut>;

  urlPath: string | core.StringOut;

  version: number | core.NumberOut;
}

export class XraySamplingRule extends core.Resource<XraySamplingRuleArgs> {
  @core.attr(String, { computed: true })
  public arn!: string | core.StringOut;

  @core.attr(String, { kind: "map" })
  public attributes?: core.Map<string, string> | core.MapOut<core.StringOut>;

  @core.attr(Number)
  public fixedRate!: number | core.NumberOut;

  @core.attr(String)
  public host!: string | core.StringOut;

  @core.attr(String)
  public httpMethod!: string | core.StringOut;

  @core.attr(String, { computed: true })
  public id!: string | core.StringOut;

  @core.attr(Number)
  public priority!: number | core.NumberOut;

  @core.attr(Number)
  public reservoirSize!: number | core.NumberOut;

  @core.attr(String)
  public resourceArn!: string | core.StringOut;

  @core.attr(String)
  public ruleName?: string | core.StringOut;

  @core.attr(String)
  public serviceName!: string | core.StringOut;

  @core.attr(String)
  public serviceType!: string | core.StringOut;

  @core.attr(String, { kind: "map" })
  public tags?: core.Map<string, string> | core.MapOut<core.StringOut>;

  @core.attr(String, { computed: true, kind: "map" })
  public tagsAll?: core.Map<string, string> | core.MapOut<core.StringOut>;

  @core.attr(String)
  public urlPath!: string | core.StringOut;

  @core.attr(Number)
  public version!: number | core.NumberOut;

  constructor(name: string, args?: XraySamplingRuleArgs) {
    super(name, "aws_xray_sampling_rule", args);
  }

  public override getNamespace(): string {
    return "aws_x_ray";
  }
}
