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

export interface LocationArgs extends core.SchemaArgs {
  method?: string | core.StringOut;

  name?: string | core.StringOut;

  path?: string | core.StringOut;

  statusCode?: string | core.StringOut;

  type: string | core.StringOut;
}

export class Location extends core.Schema<LocationArgs> {
  @core.attr(String)
  public method?: string | core.StringOut;

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

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

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

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

export interface DocumentationPartArgs extends core.ResourceArgs {
  location: Location;

  properties: string | core.StringOut;

  restApiId: string | core.StringOut;
}

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

  @core.attr(Location)
  public location!: Location;

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

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

  constructor(name: string, args?: DocumentationPartArgs) {
    super(name, "aws_api_gateway_documentation_part", args);
  }

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