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

export interface DefinitionArgs extends core.SchemaArgs {
  assumeRole?: string | core.StringOut;

  name: string | core.StringOut;

  parameters?: string | core.StringOut;

  type?: string | core.StringOut;

  version: string | core.StringOut;
}

export class Definition extends core.Schema<DefinitionArgs> {
  @core.attr(String)
  public assumeRole?: string | core.StringOut;

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

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

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

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

export interface ServiceActionArgs extends core.ResourceArgs {
  acceptLanguage?: string | core.StringOut;

  definition: Definition;

  description?: string | core.StringOut;

  name: string | core.StringOut;
}

export class ServiceAction extends core.Resource<ServiceActionArgs> {
  @core.attr(String)
  public acceptLanguage?: string | core.StringOut;

  @core.attr(Definition)
  public definition!: Definition;

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

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

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

  constructor(name: string, args?: ServiceActionArgs) {
    super(name, "aws_servicecatalog_service_action", args);
  }

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