{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/turbonomic/json-schema/turbonomic-parkable-entity-api-dto-schema.json",
  "title": "ParkableEntityApiDTO",
  "description": "Parkable Entity",
  "x-generated": "2026-11-25",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/turbonomic-openapi.yml#/components/schemas/ParkableEntityApiDTO",
  "type": "object",
  "required": [
    "accountName",
    "accountOID",
    "entityType",
    "provider",
    "regionName",
    "regionOID"
  ],
  "properties": {
    "links": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/Link"
      }
    },
    "uuid": {
      "type": "string"
    },
    "displayName": {
      "type": "string",
      "description": "A user readable name of the api object.\nCannot be blank.\nThe UTF-8 encoding must be at most 255 bytes."
    },
    "className": {
      "type": "string"
    },
    "environmentType": {
      "type": "string",
      "description": "On-Prem environment type",
      "enum": [
        "HYBRID",
        "CLOUD",
        "ONPREM",
        "UNKNOWN"
      ]
    },
    "accountOID": {
      "type": "integer",
      "format": "int64",
      "description": "Unique ID of the account"
    },
    "accountName": {
      "type": "string",
      "description": "Display name of the account"
    },
    "provider": {
      "type": "string",
      "description": "Name of the cloud provider",
      "enum": [
        "AWS",
        "AZURE",
        "GCP",
        "HYBRID",
        "UNKNOWN",
        "OCI",
        "IBM_CLOUD"
      ]
    },
    "state": {
      "type": "string",
      "description": "Last known state of the entity",
      "enum": [
        "RUNNING",
        "STOPPED",
        "SUSPENDED",
        "MAINTENANCE",
        "FAILOVER",
        "UNKNOWN",
        "STARTING",
        "STOPPING",
        "UNINITIALIZED",
        "SOFT_STOPPED",
        "UNMANAGED"
      ]
    },
    "entityType": {
      "type": "string",
      "description": "Type of the entity",
      "enum": [
        "VirtualMachine",
        "DatabaseServer",
        "Database",
        "VirtualMachineSpec",
        "ContainerPlatformCluster",
        "DatabaseServerCluster"
      ]
    },
    "regionOID": {
      "type": "integer",
      "format": "int64",
      "description": "Unique ID of the region, the entity belongs to"
    },
    "regionName": {
      "type": "string",
      "description": "Name of the region"
    },
    "instanceType": {
      "type": "string",
      "description": "Type of the instance"
    },
    "targetOID": {
      "type": "integer",
      "format": "int64",
      "description": "Unique ID of the target"
    },
    "datacenterName": {
      "type": "string",
      "description": "Display name of the Data Center"
    },
    "cost": {
      "type": "number",
      "format": "double",
      "description": "On demand hourly cost of the entity. This value can be 0 if the entity is in a stopped state"
    },
    "onDemandRateWhenRunning": {
      "type": "number",
      "format": "double",
      "description": "On demand hourly cost when the entity is in its running state"
    },
    "tags": {
      "type": "array",
      "description": "List of tags attached to the entity",
      "items": {
        "$ref": "#/$defs/TagApiDTO"
      }
    },
    "schedules": {
      "type": "array",
      "description": "List of schedules attached to the entity",
      "items": {
        "$ref": "#/$defs/ParkableEntityScheduleApiDTO"
      }
    },
    "groups": {
      "type": "array",
      "description": "List of the Groups attached to the entity",
      "items": {
        "$ref": "#/$defs/ParkableEntityGroupApiDTO"
      }
    },
    "guestOSName": {
      "type": "string",
      "description": "Guest OS Name of the entity"
    },
    "restrictions": {
      "type": "array",
      "description": "List of the restrictions placed on the entity",
      "items": {
        "$ref": "#/$defs/ParkableEntityRestrictionApiDTO"
      }
    },
    "controlledBy": {
      "type": "integer",
      "format": "int64",
      "description": "Unique ID of the entity that this entity is controlled by. For example, if this is a Virtual Machine that is part of a scale group, this would be the ID of the scale group"
    },
    "schedulePausedUntil": {
      "type": "integer",
      "format": "int64",
      "description": "The time until which the schedule is paused only applicable if entity has parking schedule, in epoch time format"
    },
    "cloudServiceName": {
      "type": "string",
      "description": "Cloud service name is the resource bought from the cloud service provider",
      "enum": [
        "AMAZON_RDS",
        "AMAZON_RDS_CLUSTER",
        "AMAZON_EC2",
        "AMAZON_EC2_AUTO_SCALING",
        "AMAZON_REDSHIFT",
        "AMAZON_ELASTIC_KUBERNETES_SERVICE",
        "AZURE_APP_SERVICE",
        "AZURE_COSMOS_DB",
        "AZURE_DISK_STORAGE",
        "AZURE_KUBERNETES_SERVICE",
        "AZURE_MYSQL_DATABASE",
        "AZURE_SQL_DATABASE",
        "AZURE_SQL_MANAGED_INSTANCE",
        "AZURE_SYNAPSE_SQL_POOL",
        "AZURE_VIRTUAL_MACHINES",
        "AZURE_VIRTUAL_MACHINE_SCALE_SETS",
        "DATABRICKS_ALL_PURPOSE_COMPUTE",
        "GCP_DISK_STORAGE",
        "GCP_VIRTUAL_MACHINES",
        "GCP_MANAGED_INSTANCE_GROUP",
        "GCP_ALLOYDB",
        "OCI_COMPUTE",
        "OCI_INSTANCE_POOL",
        "OCI_BLOCK_STORAGE"
      ]
    },
    "customInstanceType": {
      "type": "string",
      "description": "The entity's custom instance type. Similar to instanceType but provides customization details about the type of instance the workload is based on"
    },
    "aggregatedBy": {
      "type": "integer",
      "format": "int64",
      "description": "Unique ID of the entity that this entity is aggregated by"
    },
    "parkingMode": {
      "type": "string",
      "description": "The current mode used to park the entity, if supported.",
      "enum": [
        "TERMINATE",
        "STOP"
      ]
    },
    "workloadSetName": {
      "type": "string",
      "description": "Display name of the workload set that this entity belongs to"
    },
    "virtualMachineDetails": {
      "$ref": "#/$defs/ParkableVirtualMachineDetailsApiDTO"
    },
    "virtualMachineSpecDetails": {
      "$ref": "#/$defs/ParkableVirtualMachineSpecDetailsApiDTO"
    },
    "databaseServerDetails": {
      "$ref": "#/$defs/ParkableDatabaseServerDetailsApiDTO"
    },
    "databaseServerClusterDetails": {
      "$ref": "#/$defs/ParkableDatabaseServerClusterDetailsApiDTO"
    },
    "databaseDetails": {
      "$ref": "#/$defs/ParkableDatabaseDetailsApiDTO"
    }
  },
  "$defs": {
    "Link": {
      "type": "object",
      "properties": {
        "rel": {
          "$ref": "#/$defs/LinkRelation"
        },
        "href": {
          "type": "string",
          "readOnly": true
        },
        "hreflang": {
          "type": "string",
          "readOnly": true
        },
        "media": {
          "type": "string",
          "readOnly": true
        },
        "title": {
          "type": "string",
          "readOnly": true
        },
        "type": {
          "type": "string",
          "readOnly": true
        },
        "deprecation": {
          "type": "string",
          "readOnly": true
        },
        "profile": {
          "type": "string",
          "readOnly": true
        },
        "name": {
          "type": "string",
          "readOnly": true
        }
      }
    },
    "LinkRelation": {
      "type": "object"
    },
    "ParkableDatabaseConfigApiDTO": {
      "type": "object",
      "required": [
        "instanceType"
      ],
      "properties": {
        "instanceType": {
          "type": "string",
          "description": "The database instance type or SKU"
        },
        "storageAmount": {
          "type": "number",
          "format": "float",
          "description": "The storage capacity of the database in MB"
        }
      },
      "description": "Configuration for a parkable Database that cannot be powered off. These databases properties will be modified during start/stop actions."
    },
    "ParkableDatabaseDetailsApiDTO": {
      "type": "object",
      "properties": {
        "stopConfiguration": {
          "$ref": "#/$defs/ParkableDatabaseConfigApiDTO"
        },
        "startConfiguration": {
          "$ref": "#/$defs/ParkableDatabaseConfigApiDTO"
        }
      },
      "description": "Details about a parkable Database that cannot be powered off. These databases will be modified to run at a low-resource mode during a stop action and restored to its discovered state during a start action. Ex: Azure SQL Database"
    },
    "ParkableDatabaseServerClusterDetailsApiDTO": {
      "type": "object",
      "properties": {
        "engine": {
          "type": "string",
          "description": "The database engine type"
        },
        "version": {
          "type": "string",
          "description": "The database engine version"
        },
        "deploymentType": {
          "type": "string",
          "description": "The deployment type of the database server cluster",
          "enum": [
            "SINGLE_AZ",
            "MULTI_AZ"
          ]
        },
        "availabilityZoneNames": {
          "type": "array",
          "description": "The availability zones where the database server cluster is deployed",
          "items": {
            "type": "string"
          }
        }
      },
      "description": "Details about a parkable Database Server Cluster entity. Ex: Amazon RDS Clusters"
    },
    "ParkableDatabaseServerDetailsApiDTO": {
      "type": "object",
      "properties": {
        "clusterRole": {
          "type": "string",
          "description": "The role of the database server in a cluster",
          "enum": [
            "Writer",
            "Reader"
          ]
        },
        "availabilityZoneName": {
          "type": "string",
          "description": "The availability zone where the database server is deployed"
        }
      },
      "description": "Details about a parkable Database Server entity. Ex: Amazon RDS"
    },
    "ParkableEntityGroupApiDTO": {
      "type": "object",
      "properties": {
        "links": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/Link"
          }
        },
        "uuid": {
          "type": "string"
        },
        "displayName": {
          "type": "string",
          "description": "A user readable name of the api object.\nCannot be blank.\nThe UTF-8 encoding must be at most 255 bytes."
        },
        "className": {
          "type": "string"
        },
        "groupType": {
          "type": "string",
          "description": "Type of the Group",
          "enum": [
            "RESOURCE"
          ]
        }
      },
      "description": "represents groups which are attached to the parkable entity"
    },
    "ParkableEntityRestrictionApiDTO": {
      "type": "object",
      "required": [
        "restrictionType"
      ],
      "properties": {
        "restrictionType": {
          "type": "string",
          "enum": [
            "UNPARKABLE"
          ]
        }
      },
      "description": "Parent class for restrictions details. Implementing classes include: ParkableEntityUnparkableRestrictionApiDTO."
    },
    "ParkableEntityScheduleApiDTO": {
      "type": "object",
      "required": [
        "displayName",
        "uuid"
      ],
      "properties": {
        "displayName": {
          "type": "string",
          "description": "Display name of the time span based schedule the parkable entities is attached to"
        },
        "uuid": {
          "type": "string",
          "description": "UUID of the time span based schedule the parkable entities are attached to"
        },
        "pauseEnforcementUntil": {
          "type": "integer",
          "format": "int64",
          "description": "Pause Enforcement time over the entity, in epoch time format"
        },
        "attachedBy": {
          "$ref": "#/$defs/ParkingEntitySchedulerApiDTO"
        }
      },
      "description": "Represents time span based schedule display name and uuid of the time span based schedule attached to the parkable entity"
    },
    "ParkableVirtualMachineDetailsApiDTO": {
      "type": "object",
      "properties": {
        "availabilityZoneName": {
          "type": "string",
          "description": "Name of the availability zone the instance belongs to"
        }
      },
      "description": "Details about a parkable Virtual Machine entity."
    },
    "ParkableVirtualMachineSpecConfigApiDTO": {
      "type": "object",
      "properties": {
        "minSize": {
          "type": "integer",
          "format": "int32",
          "description": "Minimum group size"
        },
        "maxSize": {
          "type": "integer",
          "format": "int32",
          "description": "Maximum group size"
        },
        "desiredSize": {
          "type": "integer",
          "format": "int32",
          "description": "Default size of group when no provider-initiated scaling actions are applied"
        }
      },
      "description": "The minimum group size, desired group size and maximum group size for a scale group"
    },
    "ParkableVirtualMachineSpecDetailsApiDTO": {
      "type": "object",
      "properties": {
        "instanceTemplateName": {
          "type": "string",
          "description": "Name of template or configuration used to create the scale group. Ex: Name of Launch Template or Launch Configuration in AWS, Auto Scale Profile in Azure or the Instance Template name in Google.\""
        },
        "currentConfiguration": {
          "$ref": "#/$defs/ParkableVirtualMachineSpecConfigApiDTO"
        },
        "startConfiguration": {
          "$ref": "#/$defs/ParkableVirtualMachineSpecConfigApiDTO"
        },
        "stopConfiguration": {
          "$ref": "#/$defs/ParkableVirtualMachineSpecConfigApiDTO"
        },
        "scalingMode": {
          "type": "string",
          "description": "The scaling mode of a cloud scale group",
          "enum": [
            "AZURE_AUTOSCALE_METRIC_BASED",
            "AZURE_AUTOSCALE_SPECIFIC_INSTANCE_COUNT",
            "AZURE_MANUAL_SCALE",
            "GCP_MANUAL_SCALE",
            "GCP_AUTOSCALE",
            "GCP_ONLY_SCALE_OUT",
            "GCP_AUTOSCALE_NOT_CONFIGURED",
            "OCI_MANUAL_SCALE",
            "OCI_AUTOSCALE"
          ]
        },
        "autoscalerSuspendedProcessesWhenStopped": {
          "type": "array",
          "description": "Autoscaler processes that are suspended when the scale group is in a stopped state.",
          "items": {
            "type": "string"
          }
        },
        "autoscalerSuspendedProcessesWhenRunning": {
          "type": "array",
          "description": "Autoscaler processes that are suspended when the scale group is in a running state.",
          "items": {
            "type": "string"
          }
        },
        "autoscalerDisabledPolicies": {
          "type": "array",
          "description": "Autoscaler policies that are disabled for the scale group.",
          "items": {
            "type": "string"
          }
        }
      },
      "description": "Details about a parkable Virtual Machine Spec entity such as a cloud scale group.A cloud scale group is is a collection of virtual machine (VM) instances that are created from a common source. Ex: AWS Auto Scaling Groups, Azure Virtual Machine Scale Sets."
    },
    "ParkingEntitySchedulerApiDTO": {
      "type": "object",
      "properties": {
        "links": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/Link"
          }
        },
        "uuid": {
          "type": "string"
        },
        "displayName": {
          "type": "string",
          "description": "A user readable name of the api object.\nCannot be blank.\nThe UTF-8 encoding must be at most 255 bytes."
        },
        "className": {
          "type": "string"
        },
        "type": {
          "type": "string",
          "description": "Whether user or policy was responsible for attaching the restriction/schedule",
          "enum": [
            "USER",
            "POLICY"
          ]
        }
      },
      "description": "Represents the details of the user/policy responsible for attaching the restriction/schedule to parkable entity"
    },
    "TagApiDTO": {
      "type": "object",
      "properties": {
        "key": {
          "type": "string",
          "description": "Tag key"
        },
        "values": {
          "type": "array",
          "description": "Tag value",
          "items": {
            "type": "string"
          }
        }
      },
      "description": "Tag information"
    }
  }
}