<commit_before>enum AffinityRuleType {
  MUST_SAME_NODE
  SHOULD_SAME_NODE
  MUST_DIFF_NODE
  SHOW_DIFF_NODE
}

input AffinityRule {
  key: String
  type: AffinityRuleType
  value: String
}

type MantaLocation {
  manta_url: String
  image_path: String
  manifest_path: String
}

# todo: get source for this
enum NicState {
  PROVISIONING
  RUNNING
  STOPPED
}

# Logical networks are used both on head nodes and compute nodes, and are associated with physical interfaces by using a system called NIC Tags
type NIC {
  # NIC's IPv4 address
  ip: String
  # NIC's MAC address
  mac: String
  # Whether this is the instance's primary NIC
  primary: Boolean
  # IPv4 netmask
  netmask: String
  # IPv4 gateway
  gateway: String
  # Describes the state of the NIC (e.g. provisioning, running, or stopped)
  state: NicState
  # The NIC's network id
  network: Network
}

# Logical networks in Triton model core network configurations to enable Triton to define Virtual Network Interfaces and IP addresses for instances
type Network {
  # Unique id for this network
  id: ID
  # The network name
  name: String
  # Whether this a public or private (rfc1918) network'
  public: Boolean
  # Whether this network is created on a fabric'
  fabric: Boolean
  # Description of this network
  description: String
  # A CIDR formatted string that describes the network'
  subnet: String
  # The first IP on the network that may be assigned'
  provision_start_ip: String
  # The last IP on the network that may be assigned'
  provision_end_ip: String
  # Optional Gateway IP address'
  gateway: String
  # Optional Resolver IP addresses'
  resolvers: [String]
  # Optional Static routes for hosts on this network'
  routes: [KeyValue]
  # Provision internet NAT zone on gateway address',
  internet_nat: Boolean
}

type VLAN {
  # A number from 0-4095 that indicates the VLAN's id
  id: ID
  # A unique name to identify the VLAN
  name: String
  # An optional description of the VLAN
  description: String
}

type FirewallRule {
  # Unique identifier for this rule
  id: ID
  # Indicates if the rule is enabled
  enabled: Boolean
  # Firewall rule
  rule: String
  # Indicates if the rule is global
  global: Boolean
  # Human-readable description for the rule
  description: String
  # Lists all instances a firewall rule is applied to
  machines: [Machine]
}

enum CallerType {
  BASIC
  OPERATOR
  SIGNATURE
  TOKEN
}

type Caller {
  # Authentication type for the action request
  type: CallerType
  # When the authentication type is BASIC, this member will be present and include user login
  user: String
  # When the authentication type is BASIC, this member will be present and include user login
  ip: String
  # When authentication type is either SIGNATURE or TOKEN, SSH key identifier
  key_id: String
}

type Action {
  # The name of the action
  name: String
  # The original set of parameters sent when the action was requested
  parameters: [KeyValue]
  # `true` or `false`, depending on the action's success
  success: Boolean
  # Account requesting the action
  caller: Caller
  # When the action finished
  time: String
}

enum SnapshotState {
  QUEUED
  CANCELED
  FAILED
  CREATED
}

type Snapshot {
  # The name of this snapshot
  name: ID
  # The current state of the snapshot
  state: SnapshotState
}

enum MachineState {
  PROVISIONING
  RUNNING
  STOPPING
  STOPPED
  DELETED
  FAILED
}

# An image contains the software packages that will be available on newly-provisioned instance. In the case of hardware virtual machines, the image also includes the operating system
type Machine {
  # Unique id for this instance'
  id: ID
  # The "friendly" name for this instance'
  name: String
  # The type of instance (e.g. lx)'
  brand: Brand
  # The current state of this instance (e.g. running)'
  state: MachineState
  # The image id this instance was provisioned with'
  image: Image
  # The amount of RAM this instance has (in MiB)'
  memory: Int
  # The amount of disk this instance has (in MiB)'
  disk: Int
  # Any additional metadata this instance has',
  metadata(<commit_msg>feat(cloudapi-gql): add updated and created fields to Snapshot<commit_after>enum AffinityRuleType {
  MUST_SAME_NODE
  SHOULD_SAME_NODE
  MUST_DIFF_NODE
  SHOW_DIFF_NODE
}

input AffinityRule {
  key: String
  type: AffinityRuleType
  value: String
}

type MantaLocation {
  manta_url: String
  image_path: String
  manifest_path: String
}

# todo: get source for this
enum NicState {
  PROVISIONING
  RUNNING
  STOPPED
}

# Logical networks are used both on head nodes and compute nodes, and are associated with physical interfaces by using a system called NIC Tags
type NIC {
  # NIC's IPv4 address
  ip: String
  # NIC's MAC address
  mac: String
  # Whether this is the instance's primary NIC
  primary: Boolean
  # IPv4 netmask
  netmask: String
  # IPv4 gateway
  gateway: String
  # Describes the state of the NIC (e.g. provisioning, running, or stopped)
  state: NicState
  # The NIC's network id
  network: Network
}

# Logical networks in Triton model core network configurations to enable Triton to define Virtual Network Interfaces and IP addresses for instances
type Network {
  # Unique id for this network
  id: ID
  # The network name
  name: String
  # Whether this a public or private (rfc1918) network'
  public: Boolean
  # Whether this network is created on a fabric'
  fabric: Boolean
  # Description of this network
  description: String
  # A CIDR formatted string that describes the network'
  subnet: String
  # The first IP on the network that may be assigned'
  provision_start_ip: String
  # The last IP on the network that may be assigned'
  provision_end_ip: String
  # Optional Gateway IP address'
  gateway: String
  # Optional Resolver IP addresses'
  resolvers: [String]
  # Optional Static routes for hosts on this network'
  routes: [KeyValue]
  # Provision internet NAT zone on gateway address',
  internet_nat: Boolean
}

type VLAN {
  # A number from 0-4095 that indicates the VLAN's id
  id: ID
  # A unique name to identify the VLAN
  name: String
  # An optional description of the VLAN
  description: String
}

type FirewallRule {
  # Unique identifier for this rule
  id: ID
  # Indicates if the rule is enabled
  enabled: Boolean
  # Firewall rule
  rule: String
  # Indicates if the rule is global
  global: Boolean
  # Human-readable description for the rule
  description: String
  # Lists all instances a firewall rule is applied to
  machines: [Machine]
}

enum CallerType {
  BASIC
  OPERATOR
  SIGNATURE
  TOKEN
}

type Caller {
  # Authentication type for the action request
  type: CallerType
  # When the authentication type is BASIC, this member will be present and include user login
  user: String
  # When the authentication type is BASIC, this member will be present and include user login
  ip: String
  # When authentication type is either SIGNATURE or TOKEN, SSH key identifier
  key_id: String
}

type Action {
  # The name of the action
  name: String
  # The original set of parameters sent when the action was requested
  parameters: [KeyValue]
  # `true` or `false`, depending on the action's success
  success: Boolean
  # Account requesting the action
  caller: Caller
  # When the action finished
  time: String
}

enum SnapshotState {
  QUEUED
  CANCELED
  FAILED
  CREATED
}

type Snapshot {
  # The name of this snapshot
  name: ID
  # The current state of the snapshot
  state: SnapshotState
  updated: String
  created: String
}

enum MachineState {
  PROVISIONING
  RUNNING
  STOPPING
  STOPPED
  DELETED
  FAILED
}

# An image contains the software packages that will be available on newly-provisioned instance. In the case of hardware virtual machines, the image also includes the operating system
type Machine {
  # Unique id for this instance'
  id: ID
  # The "friendly" name for this instance'
  name: String
  # The type of instance (e.g. lx)'
  brand: Brand
  # The current state of this instance (e.g. running)'
  state: MachineState
  # The image id this instance was provisioned with'
  image: Image
  # The amount of RAM this instance has (in MiB)'
  memory: Int
  # The amount of disk this instance has (in MiB)'
  disk: Int
  # Any additional metadata this instance has',
  metadata(
{'fraction_non_alphanumeric': 0.05057471264367816, 'fraction_numerical': 0.0029038112522686023, 'mean_word_length': 3.594774874930517, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5518779', 'n_tokens_mistral': 2504, 'n_tokens_neox': 2426, 'n_words': 1102}