{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/google-cloud-vmware-engine/json-schema/google-cloud-vmware-engine-upgrade-schema.json",
  "title": "Upgrade",
  "description": "Describes Private cloud Upgrade.",
  "x-generated": "2026-11-11",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/google-cloud-vmware-engine-projects-api-openapi.yml#/components/schemas/Upgrade",
  "properties": {
    "type": {
      "enum": [
        "TYPE_UNSPECIFIED",
        "VSPHERE_UPGRADE",
        "VSPHERE_PATCH",
        "WORKAROUND",
        "FIRMWARE_UPGRADE",
        "SWITCH_UPGRADE",
        "OTHER",
        "INFRASTRUCTURE_UPGRADE"
      ],
      "readOnly": true,
      "description": "Output only. Output Only. The type of upgrade.",
      "type": "string"
    },
    "endTime": {
      "description": "Output only. Output Only. End time of the upgrade.",
      "format": "google-datetime",
      "type": "string",
      "readOnly": true
    },
    "updateTime": {
      "readOnly": true,
      "type": "string",
      "format": "google-datetime",
      "description": "Output only. Output Only. Last update time of this resource."
    },
    "name": {
      "readOnly": true,
      "description": "Output only. Identifier. The resource name of the private cloud `Upgrade`. Resource names are schemeless URIs that follow the conventions in https://cloud.google.com/apis/design/resource_names. For example: `projects/my-project/locations/us-west1-a/privateClouds/my-cloud/upgrades/my-upgrade`",
      "type": "string"
    },
    "version": {
      "type": "string",
      "description": "Output only. ",
      "readOnly": true
    },
    "componentUpgrades": {
      "readOnly": true,
      "type": "array",
      "items": {
        "$ref": "#/$defs/VmwareUpgradeComponent"
      },
      "description": "Output only. Output Only. The list of component upgrades."
    },
    "estimatedDuration": {
      "type": "string",
      "readOnly": true,
      "description": "Output only. Output Only. The estimated total duration of the upgrade. This information can be used to plan or schedule upgrades to minimize disruptions. Please note that the estimated duration is only an estimate. The actual upgrade duration may vary.",
      "format": "google-duration"
    },
    "createTime": {
      "description": "Output only. Output Only. Creation time of this resource.",
      "format": "google-datetime",
      "readOnly": true,
      "type": "string"
    },
    "startVersion": {
      "description": "Output only. Output Only. The start version",
      "type": "string",
      "readOnly": true
    },
    "uid": {
      "description": "Output only. System-generated unique identifier for the resource.",
      "type": "string",
      "readOnly": true
    },
    "etag": {
      "type": "string",
      "description": "The etag for the upgrade resource. If this is provided on update, it must match the server's etag."
    },
    "state": {
      "type": "string",
      "enum": [
        "STATE_UNSPECIFIED",
        "SCHEDULED",
        "ONGOING",
        "SUCCEEDED",
        "PAUSED",
        "FAILED",
        "CANCELLING",
        "CANCELLED",
        "RESCHEDULING"
      ],
      "description": "Output only. The current state of the upgrade.",
      "readOnly": true
    },
    "targetVersion": {
      "readOnly": true,
      "type": "string",
      "description": "Output only. Output Only. The target version"
    },
    "description": {
      "readOnly": true,
      "type": "string",
      "description": "Output only. Output Only. The description of the upgrade. This is used to provide additional information about the private cloud upgrade, such as the upgrade's purpose, the changes included in the upgrade, or any other relevant information about the upgrade."
    },
    "schedule": {
      "$ref": "#/$defs/Schedule",
      "description": "Schedule details for the upgrade."
    }
  },
  "type": "object",
  "$defs": {
    "Constraints": {
      "description": "Constraints to be applied while editing a schedule. These constraints ensure that `Upgrade` specific requirements are met.",
      "properties": {
        "rescheduleDateRange": {
          "$ref": "#/$defs/Interval",
          "description": "Output only. Output Only. The user can only reschedule an upgrade that starts within this range."
        },
        "disallowedIntervals": {
          "readOnly": true,
          "description": "Output only. Output Only. A list of intervals in which maintenance windows are not allowed. Any time window that overlaps with any of these intervals will be considered invalid.",
          "type": "array",
          "items": {
            "$ref": "#/$defs/WeeklyTimeInterval"
          }
        },
        "minHoursWeek": {
          "type": "integer",
          "description": "Output only. The minimum number of weekly hours must be allotted for the upgrade activities. This is just a minimum; the schedule can assign more weekly hours.",
          "format": "int32",
          "readOnly": true
        },
        "minHoursDay": {
          "readOnly": true,
          "description": "Output only. Minimum number of hours must be allotted for the upgrade activities for each selected day. This is a minimum; the upgrade schedule can allot more hours for the given day.",
          "type": "integer",
          "format": "int32"
        }
      },
      "type": "object"
    },
    "Interval": {
      "properties": {
        "startTime": {
          "description": "Optional. Inclusive start of the interval. If specified, a Timestamp matching this interval will have to be the same or after the start.",
          "type": "string",
          "format": "google-datetime"
        },
        "endTime": {
          "description": "Optional. Exclusive end of the interval. If specified, a Timestamp matching this interval will have to be before the end.",
          "type": "string",
          "format": "google-datetime"
        }
      },
      "description": "Represents a time interval, encoded as a Timestamp start (inclusive) and a Timestamp end (exclusive). The start must be less than or equal to the end. When the start equals the end, the interval is empty (matches no time). When both start and end are unspecified, the interval matches any time.",
      "type": "object"
    },
    "Schedule": {
      "description": "Schedule for the upgrade.",
      "properties": {
        "constraints": {
          "$ref": "#/$defs/Constraints",
          "description": "Output only. Output Only. Constraints applied to the schedule. These constraints should be applicable at the time of any rescheduling."
        },
        "weeklyWindows": {
          "items": {
            "$ref": "#/$defs/TimeWindow"
          },
          "description": "Required. Weekly time windows for upgrade activities. The server performs upgrade activities during these time windows to minimize disruptions.",
          "type": "array"
        },
        "startTime": {
          "format": "google-datetime",
          "type": "string",
          "description": "Required. The scheduled start time for the upgrade."
        },
        "lastEditor": {
          "enum": [
            "EDITOR_UNSPECIFIED",
            "SYSTEM",
            "USER"
          ],
          "description": "Output only. Output Only. Indicates who most recently edited the upgrade schedule. The value is updated whenever the upgrade is rescheduled.",
          "readOnly": true,
          "type": "string"
        },
        "editWindow": {
          "$ref": "#/$defs/Interval",
          "description": "Output only. Output Only. The schedule is open for edits during this time interval or window."
        }
      },
      "type": "object"
    },
    "TimeOfDay": {
      "description": "Represents a time of day. The date and time zone are either not significant or are specified elsewhere. An API may choose to allow leap seconds. Related types are google.type.Date and `google.protobuf.Timestamp`.",
      "type": "object",
      "properties": {
        "hours": {
          "description": "Hours of a day in 24 hour format. Must be greater than or equal to 0 and typically must be less than or equal to 23. An API may choose to allow the value \"24:00:00\" for scenarios like business closing time.",
          "type": "integer",
          "format": "int32"
        },
        "nanos": {
          "format": "int32",
          "description": "Fractions of seconds, in nanoseconds. Must be greater than or equal to 0 and less than or equal to 999,999,999.",
          "type": "integer"
        },
        "seconds": {
          "type": "integer",
          "description": "Seconds of a minute. Must be greater than or equal to 0 and typically must be less than or equal to 59. An API may allow the value 60 if it allows leap-seconds.",
          "format": "int32"
        },
        "minutes": {
          "format": "int32",
          "type": "integer",
          "description": "Minutes of an hour. Must be greater than or equal to 0 and less than or equal to 59."
        }
      }
    },
    "TimeWindow": {
      "description": "Represents the time window to perform upgrade activities.",
      "properties": {
        "startTime": {
          "$ref": "#/$defs/TimeOfDay",
          "description": "Required. Time in UTC when the window starts."
        },
        "duration": {
          "type": "string",
          "description": "Required. The duration of the window. The max allowed duration for any window is 24 hours.",
          "format": "google-duration"
        },
        "dayOfWeek": {
          "type": "string",
          "description": "Required. Day of the week for this window.",
          "enum": [
            "DAY_OF_WEEK_UNSPECIFIED",
            "MONDAY",
            "TUESDAY",
            "WEDNESDAY",
            "THURSDAY",
            "FRIDAY",
            "SATURDAY",
            "SUNDAY"
          ]
        }
      },
      "type": "object"
    },
    "VmwareUpgradeComponent": {
      "properties": {
        "componentType": {
          "enum": [
            "VMWARE_COMPONENT_TYPE_UNSPECIFIED",
            "VCENTER",
            "ESXI",
            "NSXT_UC",
            "NSXT_EDGE",
            "NSXT_MGR",
            "HCX",
            "VSAN",
            "DVS",
            "NAMESERVER_VM",
            "KMS_VM",
            "WITNESS_VM",
            "NSXT",
            "CLUSTER",
            "VM_TOOLS"
          ],
          "description": "Output only. Type of component",
          "readOnly": true,
          "type": "string"
        },
        "state": {
          "type": "string",
          "readOnly": true,
          "enum": [
            "STATE_UNSPECIFIED",
            "RUNNING",
            "PAUSED",
            "SUCCEEDED",
            "FAILED",
            "NOT_STARTED",
            "NOT_APPLICABLE"
          ],
          "description": "Output only. Component's upgrade state."
        }
      },
      "description": "Per component upgrade resource",
      "type": "object"
    },
    "WeeklyTimeInterval": {
      "properties": {
        "startDay": {
          "description": "Output only. The day on which the interval starts.",
          "type": "string",
          "readOnly": true,
          "enum": [
            "DAY_OF_WEEK_UNSPECIFIED",
            "MONDAY",
            "TUESDAY",
            "WEDNESDAY",
            "THURSDAY",
            "FRIDAY",
            "SATURDAY",
            "SUNDAY"
          ]
        },
        "endDay": {
          "type": "string",
          "enum": [
            "DAY_OF_WEEK_UNSPECIFIED",
            "MONDAY",
            "TUESDAY",
            "WEDNESDAY",
            "THURSDAY",
            "FRIDAY",
            "SATURDAY",
            "SUNDAY"
          ],
          "description": "Output only. The day on which the interval ends. Can be same as start day.",
          "readOnly": true
        },
        "startTime": {
          "$ref": "#/$defs/TimeOfDay",
          "description": "Output only. The time on the start day at which the interval starts."
        },
        "endTime": {
          "$ref": "#/$defs/TimeOfDay",
          "description": "Output only. The time on the end day at which the interval ends."
        }
      },
      "type": "object",
      "description": "Represents a time interval, spanning across days of the week. Until local timezones are supported, this interval is in UTC."
    }
  }
}