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

export interface ConditionsArgs extends core.SchemaArgs {
  key?: string | core.StringOut;

  operator?: string | core.StringOut;

  type: string | core.StringOut;

  value?: string | core.StringOut;
}

export class Conditions extends core.Schema<ConditionsArgs> {
  @core.attr(String)
  public key?: string | core.StringOut;

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

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

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

export interface ActionArgs extends core.SchemaArgs {
  associationMethod: string | core.StringOut;

  requireAcceptance?: boolean | core.BooleanOut;

  segment?: string | core.StringOut;

  tagValueOfKey?: string | core.StringOut;
}

export class Action extends core.Schema<ActionArgs> {
  @core.attr(String)
  public associationMethod!: string | core.StringOut;

  @core.attr(Boolean)
  public requireAcceptance?: boolean | core.BooleanOut;

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

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

export interface AttachmentPoliciesArgs extends core.SchemaArgs {
  action: Action;

  conditionLogic?: string | core.StringOut;

  conditions: core.Array<Conditions> | core.ArrayOut<Conditions>;

  description?: string | core.StringOut;

  ruleNumber: number | core.NumberOut;
}

export class AttachmentPolicies extends core.Schema<AttachmentPoliciesArgs> {
  @core.attr(Action)
  public action!: Action;

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

  @core.attr(Conditions, { kind: "array" })
  public conditions!: core.Array<Conditions> | core.ArrayOut<Conditions>;

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

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

export interface EdgeLocationsArgs extends core.SchemaArgs {
  asn?: number | core.NumberOut;

  insideCidrBlocks?: core.Array<string> | core.ArrayOut<core.StringOut>;

  location: string | core.StringOut;
}

export class EdgeLocations extends core.Schema<EdgeLocationsArgs> {
  @core.attr(Number)
  public asn?: number | core.NumberOut;

  @core.attr(String, { kind: "array" })
  public insideCidrBlocks?: core.Array<string> | core.ArrayOut<core.StringOut>;

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

export interface CoreNetworkConfigurationArgs extends core.SchemaArgs {
  asnRanges: core.Array<string> | core.ArrayOut<core.StringOut>;

  edgeLocations: core.Array<EdgeLocations> | core.ArrayOut<EdgeLocations>;

  insideCidrBlocks?: core.Array<string> | core.ArrayOut<core.StringOut>;

  vpnEcmpSupport?: boolean | core.BooleanOut;
}

export class CoreNetworkConfiguration extends core.Schema<CoreNetworkConfigurationArgs> {
  @core.attr(String, { kind: "array" })
  public asnRanges!: core.Array<string> | core.ArrayOut<core.StringOut>;

  @core.attr(EdgeLocations, { kind: "array" })
  public edgeLocations!:
    | core.Array<EdgeLocations>
    | core.ArrayOut<EdgeLocations>;

  @core.attr(String, { kind: "array" })
  public insideCidrBlocks?: core.Array<string> | core.ArrayOut<core.StringOut>;

  @core.attr(Boolean)
  public vpnEcmpSupport?: boolean | core.BooleanOut;
}

export interface SegmentsArgs extends core.SchemaArgs {
  allowFilter?: core.Array<string> | core.ArrayOut<core.StringOut>;

  denyFilter?: core.Array<string> | core.ArrayOut<core.StringOut>;

  description?: string | core.StringOut;

  edgeLocations?: core.Array<string> | core.ArrayOut<core.StringOut>;

  isolateAttachments?: boolean | core.BooleanOut;

  name: string | core.StringOut;

  requireAttachmentAcceptance?: boolean | core.BooleanOut;
}

export class Segments extends core.Schema<SegmentsArgs> {
  @core.attr(String, { kind: "array" })
  public allowFilter?: core.Array<string> | core.ArrayOut<core.StringOut>;

  @core.attr(String, { kind: "array" })
  public denyFilter?: core.Array<string> | core.ArrayOut<core.StringOut>;

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

  @core.attr(String, { kind: "array" })
  public edgeLocations?: core.Array<string> | core.ArrayOut<core.StringOut>;

  @core.attr(Boolean)
  public isolateAttachments?: boolean | core.BooleanOut;

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

  @core.attr(Boolean)
  public requireAttachmentAcceptance?: boolean | core.BooleanOut;
}

export interface SegmentActionsArgs extends core.SchemaArgs {
  action: string | core.StringOut;

  description?: string | core.StringOut;

  destinationCidrBlocks?: core.Array<string> | core.ArrayOut<core.StringOut>;

  destinations?: core.Array<string> | core.ArrayOut<core.StringOut>;

  mode?: string | core.StringOut;

  segment: string | core.StringOut;

  shareWith?: core.Array<string> | core.ArrayOut<core.StringOut>;

  shareWithExcept?: core.Array<string> | core.ArrayOut<core.StringOut>;
}

export class SegmentActions extends core.Schema<SegmentActionsArgs> {
  @core.attr(String)
  public action!: string | core.StringOut;

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

  @core.attr(String, { kind: "array" })
  public destinationCidrBlocks?:
    | core.Array<string>
    | core.ArrayOut<core.StringOut>;

  @core.attr(String, { kind: "array" })
  public destinations?: core.Array<string> | core.ArrayOut<core.StringOut>;

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

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

  @core.attr(String, { kind: "array" })
  public shareWith?: core.Array<string> | core.ArrayOut<core.StringOut>;

  @core.attr(String, { kind: "array" })
  public shareWithExcept?: core.Array<string> | core.ArrayOut<core.StringOut>;
}

export interface DsCoreNetworkPolicyDocumentArgs {
  attachmentPolicies?:
    | core.Array<AttachmentPolicies>
    | core.ArrayOut<AttachmentPolicies>;

  coreNetworkConfiguration:
    | core.Array<CoreNetworkConfiguration>
    | core.ArrayOut<CoreNetworkConfiguration>;

  segmentActions?: core.Array<SegmentActions> | core.ArrayOut<SegmentActions>;

  segments: core.Array<Segments> | core.ArrayOut<Segments>;

  version?: string | core.StringOut;
}

export class DsCoreNetworkPolicyDocument extends core.Data<DsCoreNetworkPolicyDocumentArgs> {
  @core.attr(AttachmentPolicies, { kind: "array" })
  public attachmentPolicies?:
    | core.Array<AttachmentPolicies>
    | core.ArrayOut<AttachmentPolicies>;

  @core.attr(CoreNetworkConfiguration, { kind: "array" })
  public coreNetworkConfiguration!:
    | core.Array<CoreNetworkConfiguration>
    | core.ArrayOut<CoreNetworkConfiguration>;

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

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

  @core.attr(SegmentActions, { kind: "array" })
  public segmentActions?:
    | core.Array<SegmentActions>
    | core.ArrayOut<SegmentActions>;

  @core.attr(Segments, { kind: "array" })
  public segments!: core.Array<Segments> | core.ArrayOut<Segments>;

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

  constructor(name: string, args?: DsCoreNetworkPolicyDocumentArgs) {
    super(name, "aws_networkmanager_core_network_policy_document", args);
  }

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