{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/google-cloud-compute-engine/json-schema/google-cloud-compute-engine-license-code-schema.json",
  "title": "LicenseCode",
  "description": "Represents a License Code resource.\n\nA License Code is a unique identifier used to represent alicense\nresource.\n *Caution* This resource is intended for\nuse only by third-party partners who are creatingCloud Marketplace\nimages.",
  "x-generated": "2026-11-11",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/google-cloud-compute-engine-license-codes-api-openapi.yml#/components/schemas/LicenseCode",
  "properties": {
    "allowedReplacementLicenses": {
      "description": "Specifies licenseCodes of licenses that can replace this license. Note:\nsuch replacements are allowed even if removable_from_disk is false.",
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "incompatibleLicenses": {
      "description": "Specifies licenseCodes of licenses that are incompatible with this license.\nIf a license is incompatible with this license, it cannot be attached to\nthe same disk or image.",
      "items": {
        "type": "string"
      },
      "type": "array"
    },
    "osLicense": {
      "description": "If true, indicates this is an OS license. Only one OS license can be\nattached to a disk or image at a time.",
      "type": "boolean"
    },
    "name": {
      "readOnly": true,
      "type": "string",
      "description": "Output only. [Output Only] Name of the resource. The name is 1-20 characters long and\nmust be a valid 64 bit integer.",
      "pattern": "[0-9]{0,20}?"
    },
    "creationTimestamp": {
      "type": "string",
      "description": "Output only. [Output Only] Creation timestamp inRFC3339\ntext format.",
      "readOnly": true
    },
    "state": {
      "readOnly": true,
      "description": "Output only. [Output Only] Current state of this License Code.",
      "type": "string",
      "enum": [
        "DISABLED",
        "ENABLED",
        "RESTRICTED",
        "STATE_UNSPECIFIED",
        "TERMINATED"
      ]
    },
    "selfLink": {
      "type": "string",
      "readOnly": true,
      "description": "Output only. [Output Only] Server-defined URL for the resource."
    },
    "soleTenantOnly": {
      "description": "If true, this license can only be used on VMs on sole tenant nodes.",
      "type": "boolean"
    },
    "multiTenantOnly": {
      "description": "If true, this license can only be used on VMs on multi tenant nodes.",
      "type": "boolean"
    },
    "appendableToDisk": {
      "description": "If true, this license can be appended to an existing disk's set of\nlicenses.",
      "type": "boolean"
    },
    "minimumRetention": {
      "$ref": "#/$defs/Duration",
      "description": "If set, this license will be unable to be removed or replaced once attached\nto a disk until the minimum_retention period has passed."
    },
    "id": {
      "readOnly": true,
      "description": "Output only. [Output Only] The unique identifier for the resource. This identifier is\ndefined by the server.",
      "format": "uint64",
      "type": "string"
    },
    "requiredCoattachedLicenses": {
      "items": {
        "type": "string"
      },
      "type": "array",
      "description": "Specifies the set of permissible coattached licenseCodes of licenses that\nsatisfy the coattachment requirement of this license. At least one license\nfrom the set must be attached to the same disk or image as this license."
    },
    "removableFromDisk": {
      "type": "boolean",
      "description": "If true, this license can be removed from a disk's set of licenses, with no\nreplacement license needed."
    },
    "kind": {
      "type": "string",
      "description": "Output only. [Output Only] Type of resource. Always compute#licenseCode for\nlicenses.",
      "readOnly": true,
      "default": "compute#licenseCode"
    },
    "transferable": {
      "readOnly": true,
      "type": "boolean",
      "description": "Output only. [Output Only] If true, the license will remain attached when creating\nimages or snapshots from disks. Otherwise, the license is not transferred."
    },
    "description": {
      "type": "string",
      "readOnly": true,
      "description": "Output only. [Output Only] Description of this License Code."
    },
    "updateTimestamp": {
      "readOnly": true,
      "type": "string",
      "description": "Output only. [Output Only] Last update timestamp inRFC3339\ntext format."
    },
    "licenseAlias": {
      "type": "array",
      "description": "[Output Only] URL and description aliases of Licenses with the same\nLicense Code.",
      "items": {
        "$ref": "#/$defs/LicenseCodeLicenseAlias"
      }
    }
  },
  "type": "object",
  "$defs": {
    "Duration": {
      "type": "object",
      "description": "A Duration represents a fixed-length span of time represented\nas a count of seconds and fractions of seconds at nanosecond\nresolution. It is independent of any calendar and concepts like \"day\"\nor \"month\". Range is approximately 10,000 years.",
      "properties": {
        "seconds": {
          "description": "Span of time at a resolution of a second. Must be from 0\nto 315,576,000,000 inclusive. Note: these bounds are computed from:\n60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years",
          "type": "string",
          "format": "int64"
        },
        "nanos": {
          "format": "int32",
          "type": "integer",
          "description": "Span of time that's a fraction of a second at nanosecond resolution.\nDurations less than one second are represented with a 0\n`seconds` field and a positive `nanos` field. Must be from 0\nto 999,999,999 inclusive."
        }
      }
    },
    "LicenseCodeLicenseAlias": {
      "properties": {
        "description": {
          "readOnly": true,
          "type": "string",
          "description": "Output only. [Output Only] Description of this License Code."
        },
        "selfLink": {
          "readOnly": true,
          "type": "string",
          "description": "Output only. [Output Only] URL of license corresponding to this License Code."
        }
      },
      "type": "object"
    }
  }
}