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

export interface DeviceBlkArgs extends core.SchemaArgs {
  description?: string | core.StringOut;

  deviceName: string | core.StringOut;

  iotThingName?: string | core.StringOut;
}

export class DeviceBlk extends core.Schema<DeviceBlkArgs> {
  @core.attr(String)
  public description?: string | core.StringOut;

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

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

export interface DeviceArgs extends core.ResourceArgs {
  device: DeviceBlk;

  deviceFleetName: string | core.StringOut;
}

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

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

  @core.attr(DeviceBlk)
  public device!: DeviceBlk;

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

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

  constructor(name: string, args?: DeviceArgs) {
    super(name, "aws_sagemaker_device", args);
  }

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