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

export interface AlarmsArgs extends core.SchemaArgs {
  alarmName: string | core.StringOut;
}

export class Alarms extends core.Schema<AlarmsArgs> {
  @core.attr(String)
  public alarmName!: string | core.StringOut;
}

export interface AutoRollbackConfigurationArgs extends core.SchemaArgs {
  alarms?: core.Array<Alarms> | core.ArrayOut<Alarms>;
}

export class AutoRollbackConfiguration extends core.Schema<AutoRollbackConfigurationArgs> {
  @core.attr(Alarms, { kind: "array" })
  public alarms?: core.Array<Alarms> | core.ArrayOut<Alarms>;
}

export interface CanarySizeArgs extends core.SchemaArgs {
  type: string | core.StringOut;

  value: number | core.NumberOut;
}

export class CanarySize extends core.Schema<CanarySizeArgs> {
  @core.attr(String)
  public type!: string | core.StringOut;

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

export interface LinearStepSizeArgs extends core.SchemaArgs {
  type: string | core.StringOut;

  value: number | core.NumberOut;
}

export class LinearStepSize extends core.Schema<LinearStepSizeArgs> {
  @core.attr(String)
  public type!: string | core.StringOut;

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

export interface TrafficRoutingConfigurationArgs extends core.SchemaArgs {
  canarySize?: CanarySize;

  linearStepSize?: LinearStepSize;

  type: string | core.StringOut;

  waitIntervalInSeconds: number | core.NumberOut;
}

export class TrafficRoutingConfiguration extends core.Schema<TrafficRoutingConfigurationArgs> {
  @core.attr(CanarySize)
  public canarySize?: CanarySize;

  @core.attr(LinearStepSize)
  public linearStepSize?: LinearStepSize;

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

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

export interface BlueGreenUpdatePolicyArgs extends core.SchemaArgs {
  maximumExecutionTimeoutInSeconds?: number | core.NumberOut;

  terminationWaitInSeconds?: number | core.NumberOut;

  trafficRoutingConfiguration: TrafficRoutingConfiguration;
}

export class BlueGreenUpdatePolicy extends core.Schema<BlueGreenUpdatePolicyArgs> {
  @core.attr(Number)
  public maximumExecutionTimeoutInSeconds?: number | core.NumberOut;

  @core.attr(Number)
  public terminationWaitInSeconds?: number | core.NumberOut;

  @core.attr(TrafficRoutingConfiguration)
  public trafficRoutingConfiguration!: TrafficRoutingConfiguration;
}

export interface DeploymentConfigArgs extends core.SchemaArgs {
  autoRollbackConfiguration?: AutoRollbackConfiguration;

  blueGreenUpdatePolicy: BlueGreenUpdatePolicy;
}

export class DeploymentConfig extends core.Schema<DeploymentConfigArgs> {
  @core.attr(AutoRollbackConfiguration)
  public autoRollbackConfiguration?: AutoRollbackConfiguration;

  @core.attr(BlueGreenUpdatePolicy)
  public blueGreenUpdatePolicy!: BlueGreenUpdatePolicy;
}

export interface EndpointArgs extends core.ResourceArgs {
  deploymentConfig?: DeploymentConfig;

  endpointConfigName: string | core.StringOut;

  name?: string | core.StringOut;

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

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

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

  @core.attr(DeploymentConfig)
  public deploymentConfig?: DeploymentConfig;

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

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

  @core.attr(String, { computed: true })
  public name?: 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>;

  constructor(name: string, args?: EndpointArgs) {
    super(name, "aws_sagemaker_endpoint", args);
  }

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