{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://raw.githubusercontent.com/api-evangelist/oracle/main/json-schema/oracle-create-batch-context-details-schema.json",
  "title": "CreateBatchContextDetails",
  "description": "The data to create a batch context.\nIf the value for a collection is absent or is explicitly provided as null, it will be converted to an empty value, i.e. \"[]\" or \"{}\" in json notation. This applies to nested collections as well.\n",
  "x-generated": "2026-10-03",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/oracle-batchcomputing-api-openapi.yml#/components/schemas/CreateBatchContextDetails",
  "properties": {
    "compartmentId": {
      "description": "The [OCID](/iaas/Content/General/Concepts/identifiers.htm) of the compartment.",
      "maxLength": 255,
      "minLength": 1,
      "type": "string"
    },
    "definedTags": {
      "additionalProperties": {
        "additionalProperties": {
          "description": "The value of the tag. Only the String type is supported.\n",
          "type": "object"
        },
        "description": "Key-value pair representing a defined tag key and value, scoped to a namespace.\n\nExample: `{\"CostCenter\": \"42\"}`\n",
        "type": "object"
      },
      "description": "Defined tags for this resource. Each key is predefined and scoped to a namespace.\nFor more information, see [Resource Tags](/iaas/Content/General/Concepts/resourcetags.htm).\n\nExample: `{\"Operations\": {\"CostCenter\": \"42\"}}`\n",
      "type": "object"
    },
    "description": {
      "description": "Summarized information about the batch context.",
      "maxLength": 400,
      "type": "string"
    },
    "displayName": {
      "description": "A user-friendly name. Does not have to be unique, and it's changeable.\nIf not specified or provided as null or empty string, it will be generated as \"<resourceType><timeCreated>\", where timeCreated corresponds with the resource creation time in ISO 8601 basic format, i.e. omitting separating punctuation, at second-level precision and no UTC offset. Example: batchcontext20250914115623.\n",
      "maxLength": 255,
      "type": "string"
    },
    "entitlements": {
      "additionalProperties": {
        "description": "Value of the limit.",
        "minimum": 0,
        "type": "integer"
      },
      "description": "Mapping of concurrent/shared resources used in job tasks to their limits.",
      "maxProperties": 100,
      "type": "object",
      "x-extra-annotations": "@jakarta.validation.constraints.Size(max = 100)"
    },
    "fleets": {
      "description": "List of fleet configurations related to the batch context.",
      "items": {
        "$ref": "#/$defs/CreateFleetDetails"
      },
      "maxItems": 5,
      "minItems": 1,
      "type": "array",
      "x-extra-annotations": "@jakarta.validation.constraints.Size(min = 0, max = 5)"
    },
    "freeformTags": {
      "additionalProperties": {
        "type": "string"
      },
      "description": "Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace.\nFor more information, see [Resource Tags](/iaas/Content/General/Concepts/resourcetags.htm).\n\nExample: `{\"Department\": \"Finance\"}`\n",
      "type": "object"
    },
    "jobPriorityConfigurations": {
      "description": "List of job priority configurations related to the batch context.",
      "items": {
        "$ref": "#/$defs/JobPriorityConfiguration"
      },
      "maxItems": 10,
      "type": "array",
      "x-extra-annotations": "@jakarta.validation.constraints.Size(max = 10)"
    },
    "loggingConfiguration": {
      "$ref": "#/$defs/LoggingConfiguration"
    },
    "network": {
      "$ref": "#/$defs/CreateNetworkDetails"
    }
  },
  "required": [
    "compartmentId",
    "fleets",
    "network"
  ],
  "type": "object",
  "$defs": {
    "CreateFleetDetails": {
      "description": "Fleet configuration of the batch context.",
      "properties": {
        "type": {
          "description": "Type of the fleet. Also serves as a discriminator for sub-entities.",
          "enum": [
            "SERVICE_MANAGED_FLEET",
            "SERVICE_MANAGED_GPU_FLEET"
          ],
          "type": "string"
        }
      },
      "required": [
        "type"
      ],
      "type": "object"
    },
    "CreateNetworkDetails": {
      "description": "Network configuration of the batch context.",
      "properties": {
        "nsgIds": {
          "description": "A list of [OCIDs](/iaas/Content/General/Concepts/identifiers.htm) of associated network security groups.\n",
          "items": {
            "maxLength": 255,
            "minLength": 1,
            "type": "string"
          },
          "maxItems": 10,
          "type": "array",
          "uniqueItems": true,
          "x-extra-annotations": "@jakarta.validation.constraints.Size(max = 10) @io.micronaut.validation.annotation.UniqueElements"
        },
        "subnetId": {
          "description": "[OCID](/iaas/Content/General/Concepts/identifiers.htm) of associated subnet.\n",
          "maxLength": 255,
          "minLength": 1,
          "type": "string"
        }
      },
      "required": [
        "subnetId"
      ],
      "type": "object"
    },
    "JobPriorityConfiguration": {
      "description": "Job priority configuration to instruct the service on how to use priority tags.",
      "properties": {
        "tagKey": {
          "description": "Name of the tag key.",
          "maxLength": 100,
          "minLength": 1,
          "type": "string"
        },
        "tagNamespace": {
          "description": "Name of the corresponding tag namespace.",
          "maxLength": 100,
          "minLength": 1,
          "type": "string"
        },
        "values": {
          "additionalProperties": {
            "description": "Priority value as an integer.",
            "type": "integer"
          },
          "description": "Mapping of tag value to its priority.",
          "maxProperties": 10,
          "minProperties": 1,
          "type": "object",
          "x-extra-annotations": "@jakarta.validation.constraints.Size(min = 1, max = 10)"
        },
        "weight": {
          "description": "Weight associated with the tag key. Percentage point is the unit of measurement.",
          "maximum": 100,
          "minimum": -100,
          "type": "integer"
        }
      },
      "required": [
        "tagNamespace",
        "tagKey",
        "weight",
        "values"
      ],
      "type": "object"
    },
    "LoggingConfiguration": {
      "description": "Logging configuration of the batch context.",
      "properties": {
        "type": {
          "description": "Type of the logging configuration. Discriminator for sub-entities.",
          "enum": [
            "OCI_LOGGING"
          ],
          "type": "string"
        }
      },
      "required": [
        "type"
      ]
    }
  }
}