// Copyright 2023 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//      https://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

// Generated by the C++ microgenerator.
// If you make any local changes, they will be lost.
// file:///workspace/generator/discovery/compute_public_google_rest_v1.json
// revision: 20231110

syntax = "proto3";

package google.cloud.cpp.compute.v1;

import "google/cloud/compute/v1/internal/common_001.proto";
import "google/cloud/compute/v1/internal/common_003.proto";
import "google/cloud/compute/v1/internal/common_020.proto";
import "google/cloud/compute/v1/internal/common_034.proto";
import "google/cloud/compute/v1/internal/common_038.proto";
import "google/cloud/compute/v1/internal/common_072.proto";

message CustomerEncryptionKeyProtectedDisk {
  // Decrypts data associated with the disk with a customer-supplied encryption
  // key.
  optional CustomerEncryptionKey disk_encryption_key = 1
      [json_name = "diskEncryptionKey"];

  // Specifies a valid partial or full URL to an existing Persistent Disk
  // resource. This field is only applicable for persistent disks. For example:
  // "source": "/compute/v1/projects/project_id/zones/zone/disks/ disk_name
  optional string source = 2 [json_name = "source"];
}

// A set of Display Device options
message DisplayDevice {
  // Defines whether the instance has Display enabled.
  optional bool enable_display = 1 [json_name = "enableDisplay"];
}

// A guest attributes entry.
message GuestAttributes {
  // [Output Only] Type of the resource. Always compute#guestAttributes for
  // guest attributes entry.
  optional string kind = 1 [json_name = "kind"];

  // The path to be queried. This can be the default namespace ('') or a nested
  // namespace ('\/') or a specified key ('\/\').
  optional string query_path = 2 [json_name = "queryPath"];

  // [Output Only] The value of the requested queried path.
  optional GuestAttributesValue query_value = 3 [json_name = "queryValue"];

  // [Output Only] Server-defined URL for this resource.
  optional string self_link = 4 [json_name = "selfLink"];

  // The key to search for.
  optional string variable_key = 5 [json_name = "variableKey"];

  // [Output Only] The value found for the requested key.
  optional string variable_value = 6 [json_name = "variableValue"];
}

// A guest attributes namespace/key/value entry.
message GuestAttributesEntry {
  // Key for the guest attribute entry.
  optional string key = 1 [json_name = "key"];

  // Namespace for the guest attribute entry.
  optional string namespace = 2 [json_name = "namespace"];

  // Value for the guest attribute entry.
  optional string value = 3 [json_name = "value"];
}

// Array of guest attribute namespace/key/value tuples.
message GuestAttributesValue {
  repeated GuestAttributesEntry items = 1 [json_name = "items"];
}

// Represents an Instance resource. An instance is a virtual machine that is
// hosted on Google Cloud Platform. For more information, read Virtual Machine
// Instances.
message Instance {
  // Controls for advanced machine-related behavior features.
  optional AdvancedMachineFeatures advanced_machine_features = 1
      [json_name = "advancedMachineFeatures"];

  // Allows this instance to send and receive packets with non-matching
  // destination or source IPs. This is required if you plan to use this
  // instance to forward routes. For more information, see Enabling IP
  // Forwarding .
  optional bool can_ip_forward = 2 [json_name = "canIpForward"];

  optional ConfidentialInstanceConfig confidential_instance_config = 3
      [json_name = "confidentialInstanceConfig"];

  // [Output Only] The CPU platform used by this instance.
  optional string cpu_platform = 4 [json_name = "cpuPlatform"];

  // [Output Only] Creation timestamp in RFC3339 text format.
  optional string creation_timestamp = 5 [json_name = "creationTimestamp"];

  // Whether the resource should be protected against deletion.
  optional bool deletion_protection = 6 [json_name = "deletionProtection"];

  // An optional description of this resource. Provide this property when you
  // create the resource.
  optional string description = 7 [json_name = "description"];

  // Array of disks associated with this instance. Persistent disks must be
  // created before you can assign them.
  repeated AttachedDisk disks = 8 [json_name = "disks"];

  // Enables display device for the instance.
  optional DisplayDevice display_device = 9 [json_name = "displayDevice"];

  // Specifies a fingerprint for this resource, which is essentially a hash of
  // the instance's contents and used for optimistic locking. The fingerprint is
  // initially generated by Compute Engine and changes after every request to
  // modify or update the instance. You must always provide an up-to-date
  // fingerprint hash in order to update the instance. To see the latest
  // fingerprint, make get() request to the instance.
  optional string fingerprint = 10 [json_name = "fingerprint"];

  // A list of the type and count of accelerator cards attached to the instance.
  repeated AcceleratorConfig guest_accelerators = 11
      [json_name = "guestAccelerators"];

  // Specifies the hostname of the instance. The specified hostname must be
  // RFC1035 compliant. If hostname is not specified, the default hostname is
  // [INSTANCE_NAME].c.[PROJECT_ID].internal when using the global DNS, and
  // [INSTANCE_NAME].[ZONE].c.[PROJECT_ID].internal when using zonal DNS.
  optional string hostname = 12 [json_name = "hostname"];

  // [Output Only] The unique identifier for the resource. This identifier is
  // defined by the server.
  optional string id = 13 [json_name = "id"];

  // Encrypts suspended data for an instance with a customer-managed encryption
  // key. If you are creating a new instance, this field will encrypt the local
  // SSD and in-memory contents of the instance during the suspend operation. If
  // you do not provide an encryption key when creating the instance, then the
  // local SSD and in-memory contents will be encrypted using an automatically
  // generated key during the suspend operation.
  optional CustomerEncryptionKey instance_encryption_key = 45
      [json_name = "instanceEncryptionKey"];

  // KeyRevocationActionType of the instance. Supported options are "STOP" and
  // "NONE". The default value is "NONE" if it is not specified.
  // KEY_REVOCATION_ACTION_TYPE_UNSPECIFIED: Default value. This value is
  // unused.
  // NONE: Indicates user chose no operation.
  // STOP: Indicates user chose to opt for VM shutdown on key revocation.
  optional string key_revocation_action_type = 14
      [json_name = "keyRevocationActionType"];

  // [Output Only] Type of the resource. Always compute#instance for instances.
  optional string kind = 15 [json_name = "kind"];

  // A fingerprint for this request, which is essentially a hash of the label's
  // contents and used for optimistic locking. The fingerprint is initially
  // generated by Compute Engine and changes after every request to modify or
  // update labels. You must always provide an up-to-date fingerprint hash in
  // order to update or change labels. To see the latest fingerprint, make get()
  // request to the instance.
  optional string label_fingerprint = 16 [json_name = "labelFingerprint"];

  // Labels to apply to this instance. These can be later modified by the
  // setLabels method.
  map<string, string> labels = 17 [json_name = "labels"];

  // [Output Only] Last start timestamp in RFC3339 text format.
  optional string last_start_timestamp = 18 [json_name = "lastStartTimestamp"];

  // [Output Only] Last stop timestamp in RFC3339 text format.
  optional string last_stop_timestamp = 19 [json_name = "lastStopTimestamp"];

  // [Output Only] Last suspended timestamp in RFC3339 text format.
  optional string last_suspended_timestamp = 20
      [json_name = "lastSuspendedTimestamp"];

  // Full or partial URL of the machine type resource to use for this instance,
  // in the format: zones/zone/machineTypes/machine-type. This is provided by
  // the client when the instance is created. For example, the following is a
  // valid partial url to a predefined machine type:
  // zones/us-central1-f/machineTypes/n1-standard-1 To create a custom machine
  // type, provide a URL to a machine type in the following format, where CPUS
  // is 1 or an even number up to 32 (2, 4, 6, ... 24, etc), and MEMORY is the
  // total memory for this instance. Memory must be a multiple of 256 MB and
  // must be supplied in MB (e.g. 5 GB of memory is 5120 MB):
  // zones/zone/machineTypes/custom-CPUS-MEMORY For example:
  // zones/us-central1-f/machineTypes/custom-4-5120 For a full list of
  // restrictions, read the Specifications for custom machine types.
  optional string machine_type = 21 [json_name = "machineType"];

  // The metadata key/value pairs assigned to this instance. This includes
  // custom metadata and predefined keys.
  optional Metadata metadata = 22 [json_name = "metadata"];

  // Specifies a minimum CPU platform for the VM instance. Applicable values are
  // the friendly names of CPU platforms, such as minCpuPlatform: "Intel
  // Haswell" or minCpuPlatform: "Intel Sandy Bridge".
  optional string min_cpu_platform = 23 [json_name = "minCpuPlatform"];

  // The name of the resource, provided by the client when initially creating
  // the resource. The resource name must be 1-63 characters long, and comply
  // with RFC1035. Specifically, the name must be 1-63 characters long and match
  // the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first
  // character must be a lowercase letter, and all following characters must be
  // a dash, lowercase letter, or digit, except the last character, which cannot
  // be a dash.
  optional string name = 24 [json_name = "name"];

  // An array of network configurations for this instance. These specify how
  // interfaces are configured to interact with other network services, such as
  // connecting to the internet. Multiple interfaces are supported per instance.
  repeated NetworkInterface network_interfaces = 25
      [json_name = "networkInterfaces"];

  optional NetworkPerformanceConfig network_performance_config = 26
      [json_name = "networkPerformanceConfig"];

  // Input only. [Input Only] Additional params passed with the request, but not
  // persisted as part of resource payload.
  optional InstanceParams params = 27 [json_name = "params"];

  // The private IPv6 google access type for the VM. If not specified, use
  // INHERIT_FROM_SUBNETWORK as default.
  // ENABLE_BIDIRECTIONAL_ACCESS_TO_GOOGLE: Bidirectional private IPv6 access
  // to/from Google services. If specified, the subnetwork who is attached to
  // the instance's default network interface will be assigned an internal IPv6
  // prefix if it doesn't have before.
  // ENABLE_OUTBOUND_VM_ACCESS_TO_GOOGLE: Outbound private IPv6 access from VMs
  // in this subnet to Google services. If specified, the subnetwork who is
  // attached to the instance's default network interface will be assigned an
  // internal IPv6 prefix if it doesn't have before.
  // INHERIT_FROM_SUBNETWORK: Each network interface inherits
  // PrivateIpv6GoogleAccess from its subnetwork.
  optional string private_ipv6_google_access = 28
      [json_name = "privateIpv6GoogleAccess"];

  // Specifies the reservations that this instance can consume from.
  optional ReservationAffinity reservation_affinity = 29
      [json_name = "reservationAffinity"];

  // Resource policies applied to this instance.
  repeated string resource_policies = 30 [json_name = "resourcePolicies"];

  // [Output Only] Specifies values set for instance attributes as compared to
  // the values requested by user in the corresponding input only field.
  optional ResourceStatus resource_status = 31 [json_name = "resourceStatus"];

  // [Output Only] Reserved for future use.
  optional bool satisfies_pzs = 32 [json_name = "satisfiesPzs"];

  // Sets the scheduling options for this instance.
  optional Scheduling scheduling = 33 [json_name = "scheduling"];

  // [Output Only] Server-defined URL for this resource.
  optional string self_link = 34 [json_name = "selfLink"];

  // A list of service accounts, with their specified scopes, authorized for
  // this instance. Only one service account per VM instance is supported.
  // Service accounts generate access tokens that can be accessed through the
  // metadata server and used to authenticate applications on the instance. See
  // Service Accounts for more information.
  repeated ServiceAccount service_accounts = 35 [json_name = "serviceAccounts"];

  optional ShieldedInstanceConfig shielded_instance_config = 36
      [json_name = "shieldedInstanceConfig"];

  optional ShieldedInstanceIntegrityPolicy shielded_instance_integrity_policy =
      37 [json_name = "shieldedInstanceIntegrityPolicy"];

  // Source machine image
  optional string source_machine_image = 38 [json_name = "sourceMachineImage"];

  // Source machine image encryption key when creating an instance from a
  // machine image.
  optional CustomerEncryptionKey source_machine_image_encryption_key = 39
      [json_name = "sourceMachineImageEncryptionKey"];

  // [Output Only] Whether a VM has been restricted for start because Compute
  // Engine has detected suspicious activity.
  optional bool start_restricted = 40 [json_name = "startRestricted"];

  // [Output Only] The status of the instance. One of the following values:
  // PROVISIONING, STAGING, RUNNING, STOPPING, SUSPENDING, SUSPENDED, REPAIRING,
  // and TERMINATED. For more information about the status of the instance, see
  // Instance life cycle.
  // DEPROVISIONING: The instance is halted and we are performing tear down
  // tasks like network deprogramming, releasing quota, IP, tearing down disks
  // etc.
  // PROVISIONING: Resources are being allocated for the instance.
  // REPAIRING: The instance is in repair.
  // RUNNING: The instance is running.
  // STAGING: All required resources have been allocated and the instance is
  // being started.
  // STOPPED: The instance has stopped successfully.
  // STOPPING: The instance is currently stopping (either being deleted or
  // killed).
  // SUSPENDED: The instance has suspended.
  // SUSPENDING: The instance is suspending.
  // TERMINATED: The instance has stopped (either by explicit action or
  // underlying failure).
  optional string status = 41 [json_name = "status"];

  // [Output Only] An optional, human-readable explanation of the status.
  optional string status_message = 42 [json_name = "statusMessage"];

  // Tags to apply to this instance. Tags are used to identify valid sources or
  // targets for network firewalls and are specified by the client during
  // instance creation. The tags can be later modified by the setTags method.
  // Each tag within the list must comply with RFC1035. Multiple tags can be
  // specified via the 'tags.items' field.
  optional Tags tags = 43 [json_name = "tags"];

  // [Output Only] URL of the zone where the instance resides. You must specify
  // this field as part of the HTTP request URL. It is not settable as a field
  // in the request body.
  optional string zone = 44 [json_name = "zone"];
}

message InstanceAggregatedList {
  // [Output Only] Unique identifier for the resource; defined by the server.
  optional string id = 1 [json_name = "id"];

  // An object that contains a list of instances scoped by zone.
  map<string, InstancesScopedList> items = 2 [json_name = "items"];

  // [Output Only] Type of resource. Always compute#instanceAggregatedList for
  // aggregated lists of Instance resources.
  optional string kind = 3 [json_name = "kind"];

  // [Output Only] This token allows you to get the next page of results for
  // list requests. If the number of results is larger than maxResults, use the
  // nextPageToken as a value for the query parameter pageToken in the next list
  // request. Subsequent list requests will have their own nextPageToken to
  // continue paging through the results.
  optional string next_page_token = 4 [json_name = "nextPageToken"];

  // [Output Only] Server-defined URL for this resource.
  optional string self_link = 5 [json_name = "selfLink"];

  // [Output Only] Unreachable resources.
  repeated string unreachables = 6 [json_name = "unreachables"];

  message Warning {
    // [Output Only] A warning code, if applicable. For example, Compute Engine
    // returns NO_RESULTS_ON_PAGE if there are no results in the response.
    // CLEANUP_FAILED: Warning about failed cleanup of transient changes made by
    // a failed operation.
    // DEPRECATED_RESOURCE_USED: A link to a deprecated resource was created.
    // DEPRECATED_TYPE_USED: When deploying and at least one of the resources
    // has a type marked as deprecated
    // DISK_SIZE_LARGER_THAN_IMAGE_SIZE: The user created a boot disk that is
    // larger than image size.
    // EXPERIMENTAL_TYPE_USED: When deploying and at least one of the resources
    // has a type marked as experimental
    // EXTERNAL_API_WARNING: Warning that is present in an external api call
    // FIELD_VALUE_OVERRIDEN: Warning that value of a field has been overridden.
    // Deprecated unused field.
    // INJECTED_KERNELS_DEPRECATED: The operation involved use of an injected
    // kernel, which is deprecated.
    // INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB: A WEIGHTED_MAGLEV backend
    // service is associated with a health check that is not of type
    // HTTP/HTTPS/HTTP2.
    // LARGE_DEPLOYMENT_WARNING: When deploying a deployment with a exceedingly
    // large number of resources
    // LIST_OVERHEAD_QUOTA_EXCEED: Resource can't be retrieved due to list
    // overhead quota exceed which captures the amount of resources filtered out
    // by user-defined list filter.
    // MISSING_TYPE_DEPENDENCY: A resource depends on a missing type
    // NEXT_HOP_ADDRESS_NOT_ASSIGNED: The route's nextHopIp address is not
    // assigned to an instance on the network.
    // NEXT_HOP_CANNOT_IP_FORWARD: The route's next hop instance cannot ip
    // forward.
    // NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE: The route's nextHopInstance URL
    // refers to an instance that does not have an ipv6 interface on the same
    // network as the route.
    // NEXT_HOP_INSTANCE_NOT_FOUND: The route's nextHopInstance URL refers to an
    // instance that does not exist.
    // NEXT_HOP_INSTANCE_NOT_ON_NETWORK: The route's nextHopInstance URL refers
    // to an instance that is not on the same network as the route.
    // NEXT_HOP_NOT_RUNNING: The route's next hop instance does not have a
    // status of RUNNING.
    // NOT_CRITICAL_ERROR: Error which is not critical. We decided to continue
    // the process despite the mentioned error.
    // NO_RESULTS_ON_PAGE: No results are present on a particular list page.
    // PARTIAL_SUCCESS: Success is reported, but some results may be missing due
    // to errors
    // REQUIRED_TOS_AGREEMENT: The user attempted to use a resource that
    // requires a TOS they have not accepted.
    // RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING: Warning that a resource is in
    // use.
    // RESOURCE_NOT_DELETED: One or more of the resources set to auto-delete
    // could not be deleted because they were in use.
    // SCHEMA_VALIDATION_IGNORED: When a resource schema validation is ignored.
    // SINGLE_INSTANCE_PROPERTY_TEMPLATE: Instance template used in instance
    // group manager is valid as such, but its application does not make a lot
    // of sense, because it allows only single instance in instance group.
    // UNDECLARED_PROPERTIES: When undeclared properties in the schema are
    // present
    // UNREACHABLE: A given scope cannot be reached.
    optional string code = 1 [json_name = "code"];

    message DataItem {
      // [Output Only] A key that provides more detail on the warning being
      // returned. For example, for warnings where there are no results in a
      // list request for a particular zone, this key might be scope and the key
      // value might be the zone name. Other examples might be a key indicating
      // a deprecated resource and a suggested replacement, or a warning about
      // invalid network settings (for example, if an instance attempts to
      // perform IP forwarding but is not enabled for IP forwarding).
      optional string key = 1 [json_name = "key"];

      // [Output Only] A warning data value corresponding to the key.
      optional string value = 2 [json_name = "value"];
    }

    // [Output Only] Metadata about this warning in key: value format. For
    // example: "data": [ { "key": "scope", "value": "zones/us-east1-d" }
    repeated DataItem data = 2 [json_name = "data"];

    // [Output Only] A human-readable description of the warning code.
    optional string message = 3 [json_name = "message"];
  }

  // [Output Only] Informational warning message.
  optional Warning warning = 7 [json_name = "warning"];
}

// Contains a list of instances.
message InstanceList {
  // [Output Only] Unique identifier for the resource; defined by the server.
  optional string id = 1 [json_name = "id"];

  // A list of Instance resources.
  repeated Instance items = 2 [json_name = "items"];

  // [Output Only] Type of resource. Always compute#instanceList for lists of
  // Instance resources.
  optional string kind = 3 [json_name = "kind"];

  // [Output Only] This token allows you to get the next page of results for
  // list requests. If the number of results is larger than maxResults, use the
  // nextPageToken as a value for the query parameter pageToken in the next list
  // request. Subsequent list requests will have their own nextPageToken to
  // continue paging through the results.
  optional string next_page_token = 4 [json_name = "nextPageToken"];

  // [Output Only] Server-defined URL for this resource.
  optional string self_link = 5 [json_name = "selfLink"];

  message Warning {
    // [Output Only] A warning code, if applicable. For example, Compute Engine
    // returns NO_RESULTS_ON_PAGE if there are no results in the response.
    // CLEANUP_FAILED: Warning about failed cleanup of transient changes made by
    // a failed operation.
    // DEPRECATED_RESOURCE_USED: A link to a deprecated resource was created.
    // DEPRECATED_TYPE_USED: When deploying and at least one of the resources
    // has a type marked as deprecated
    // DISK_SIZE_LARGER_THAN_IMAGE_SIZE: The user created a boot disk that is
    // larger than image size.
    // EXPERIMENTAL_TYPE_USED: When deploying and at least one of the resources
    // has a type marked as experimental
    // EXTERNAL_API_WARNING: Warning that is present in an external api call
    // FIELD_VALUE_OVERRIDEN: Warning that value of a field has been overridden.
    // Deprecated unused field.
    // INJECTED_KERNELS_DEPRECATED: The operation involved use of an injected
    // kernel, which is deprecated.
    // INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB: A WEIGHTED_MAGLEV backend
    // service is associated with a health check that is not of type
    // HTTP/HTTPS/HTTP2.
    // LARGE_DEPLOYMENT_WARNING: When deploying a deployment with a exceedingly
    // large number of resources
    // LIST_OVERHEAD_QUOTA_EXCEED: Resource can't be retrieved due to list
    // overhead quota exceed which captures the amount of resources filtered out
    // by user-defined list filter.
    // MISSING_TYPE_DEPENDENCY: A resource depends on a missing type
    // NEXT_HOP_ADDRESS_NOT_ASSIGNED: The route's nextHopIp address is not
    // assigned to an instance on the network.
    // NEXT_HOP_CANNOT_IP_FORWARD: The route's next hop instance cannot ip
    // forward.
    // NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE: The route's nextHopInstance URL
    // refers to an instance that does not have an ipv6 interface on the same
    // network as the route.
    // NEXT_HOP_INSTANCE_NOT_FOUND: The route's nextHopInstance URL refers to an
    // instance that does not exist.
    // NEXT_HOP_INSTANCE_NOT_ON_NETWORK: The route's nextHopInstance URL refers
    // to an instance that is not on the same network as the route.
    // NEXT_HOP_NOT_RUNNING: The route's next hop instance does not have a
    // status of RUNNING.
    // NOT_CRITICAL_ERROR: Error which is not critical. We decided to continue
    // the process despite the mentioned error.
    // NO_RESULTS_ON_PAGE: No results are present on a particular list page.
    // PARTIAL_SUCCESS: Success is reported, but some results may be missing due
    // to errors
    // REQUIRED_TOS_AGREEMENT: The user attempted to use a resource that
    // requires a TOS they have not accepted.
    // RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING: Warning that a resource is in
    // use.
    // RESOURCE_NOT_DELETED: One or more of the resources set to auto-delete
    // could not be deleted because they were in use.
    // SCHEMA_VALIDATION_IGNORED: When a resource schema validation is ignored.
    // SINGLE_INSTANCE_PROPERTY_TEMPLATE: Instance template used in instance
    // group manager is valid as such, but its application does not make a lot
    // of sense, because it allows only single instance in instance group.
    // UNDECLARED_PROPERTIES: When undeclared properties in the schema are
    // present
    // UNREACHABLE: A given scope cannot be reached.
    optional string code = 1 [json_name = "code"];

    message DataItem {
      // [Output Only] A key that provides more detail on the warning being
      // returned. For example, for warnings where there are no results in a
      // list request for a particular zone, this key might be scope and the key
      // value might be the zone name. Other examples might be a key indicating
      // a deprecated resource and a suggested replacement, or a warning about
      // invalid network settings (for example, if an instance attempts to
      // perform IP forwarding but is not enabled for IP forwarding).
      optional string key = 1 [json_name = "key"];

      // [Output Only] A warning data value corresponding to the key.
      optional string value = 2 [json_name = "value"];
    }

    // [Output Only] Metadata about this warning in key: value format. For
    // example: "data": [ { "key": "scope", "value": "zones/us-east1-d" }
    repeated DataItem data = 2 [json_name = "data"];

    // [Output Only] A human-readable description of the warning code.
    optional string message = 3 [json_name = "message"];
  }

  // [Output Only] Informational warning message.
  optional Warning warning = 6 [json_name = "warning"];
}

// Contains a list of instance referrers.
message InstanceListReferrers {
  // [Output Only] Unique identifier for the resource; defined by the server.
  optional string id = 1 [json_name = "id"];

  // A list of Reference resources.
  repeated Reference items = 2 [json_name = "items"];

  // [Output Only] Type of resource. Always compute#instanceListReferrers for
  // lists of Instance referrers.
  optional string kind = 3 [json_name = "kind"];

  // [Output Only] This token allows you to get the next page of results for
  // list requests. If the number of results is larger than maxResults, use the
  // nextPageToken as a value for the query parameter pageToken in the next list
  // request. Subsequent list requests will have their own nextPageToken to
  // continue paging through the results.
  optional string next_page_token = 4 [json_name = "nextPageToken"];

  // [Output Only] Server-defined URL for this resource.
  optional string self_link = 5 [json_name = "selfLink"];

  message Warning {
    // [Output Only] A warning code, if applicable. For example, Compute Engine
    // returns NO_RESULTS_ON_PAGE if there are no results in the response.
    // CLEANUP_FAILED: Warning about failed cleanup of transient changes made by
    // a failed operation.
    // DEPRECATED_RESOURCE_USED: A link to a deprecated resource was created.
    // DEPRECATED_TYPE_USED: When deploying and at least one of the resources
    // has a type marked as deprecated
    // DISK_SIZE_LARGER_THAN_IMAGE_SIZE: The user created a boot disk that is
    // larger than image size.
    // EXPERIMENTAL_TYPE_USED: When deploying and at least one of the resources
    // has a type marked as experimental
    // EXTERNAL_API_WARNING: Warning that is present in an external api call
    // FIELD_VALUE_OVERRIDEN: Warning that value of a field has been overridden.
    // Deprecated unused field.
    // INJECTED_KERNELS_DEPRECATED: The operation involved use of an injected
    // kernel, which is deprecated.
    // INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB: A WEIGHTED_MAGLEV backend
    // service is associated with a health check that is not of type
    // HTTP/HTTPS/HTTP2.
    // LARGE_DEPLOYMENT_WARNING: When deploying a deployment with a exceedingly
    // large number of resources
    // LIST_OVERHEAD_QUOTA_EXCEED: Resource can't be retrieved due to list
    // overhead quota exceed which captures the amount of resources filtered out
    // by user-defined list filter.
    // MISSING_TYPE_DEPENDENCY: A resource depends on a missing type
    // NEXT_HOP_ADDRESS_NOT_ASSIGNED: The route's nextHopIp address is not
    // assigned to an instance on the network.
    // NEXT_HOP_CANNOT_IP_FORWARD: The route's next hop instance cannot ip
    // forward.
    // NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE: The route's nextHopInstance URL
    // refers to an instance that does not have an ipv6 interface on the same
    // network as the route.
    // NEXT_HOP_INSTANCE_NOT_FOUND: The route's nextHopInstance URL refers to an
    // instance that does not exist.
    // NEXT_HOP_INSTANCE_NOT_ON_NETWORK: The route's nextHopInstance URL refers
    // to an instance that is not on the same network as the route.
    // NEXT_HOP_NOT_RUNNING: The route's next hop instance does not have a
    // status of RUNNING.
    // NOT_CRITICAL_ERROR: Error which is not critical. We decided to continue
    // the process despite the mentioned error.
    // NO_RESULTS_ON_PAGE: No results are present on a particular list page.
    // PARTIAL_SUCCESS: Success is reported, but some results may be missing due
    // to errors
    // REQUIRED_TOS_AGREEMENT: The user attempted to use a resource that
    // requires a TOS they have not accepted.
    // RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING: Warning that a resource is in
    // use.
    // RESOURCE_NOT_DELETED: One or more of the resources set to auto-delete
    // could not be deleted because they were in use.
    // SCHEMA_VALIDATION_IGNORED: When a resource schema validation is ignored.
    // SINGLE_INSTANCE_PROPERTY_TEMPLATE: Instance template used in instance
    // group manager is valid as such, but its application does not make a lot
    // of sense, because it allows only single instance in instance group.
    // UNDECLARED_PROPERTIES: When undeclared properties in the schema are
    // present
    // UNREACHABLE: A given scope cannot be reached.
    optional string code = 1 [json_name = "code"];

    message DataItem {
      // [Output Only] A key that provides more detail on the warning being
      // returned. For example, for warnings where there are no results in a
      // list request for a particular zone, this key might be scope and the key
      // value might be the zone name. Other examples might be a key indicating
      // a deprecated resource and a suggested replacement, or a warning about
      // invalid network settings (for example, if an instance attempts to
      // perform IP forwarding but is not enabled for IP forwarding).
      optional string key = 1 [json_name = "key"];

      // [Output Only] A warning data value corresponding to the key.
      optional string value = 2 [json_name = "value"];
    }

    // [Output Only] Metadata about this warning in key: value format. For
    // example: "data": [ { "key": "scope", "value": "zones/us-east1-d" }
    repeated DataItem data = 2 [json_name = "data"];

    // [Output Only] A human-readable description of the warning code.
    optional string message = 3 [json_name = "message"];
  }

  // [Output Only] Informational warning message.
  optional Warning warning = 6 [json_name = "warning"];
}

// Additional instance params.
message InstanceParams {
  // Resource manager tags to be bound to the instance. Tag keys and values have
  // the same definition as resource manager tags. Keys must be in the format
  // `tagKeys/{tag_key_id}`, and values are in the format `tagValues/456`. The
  // field is ignored (both PUT & PATCH) when empty.
  map<string, string> resource_manager_tags = 1
      [json_name = "resourceManagerTags"];
}

message InstancesAddResourcePoliciesRequest {
  // Resource policies to be added to this instance.
  repeated string resource_policies = 1 [json_name = "resourcePolicies"];
}

message InstancesGetEffectiveFirewallsResponse {
  // Effective firewalls from firewall policies.
  repeated InstancesGetEffectiveFirewallsResponseEffectiveFirewallPolicy
      firewall_policys = 1 [json_name = "firewallPolicys"];

  // Effective firewalls on the instance.
  repeated Firewall firewalls = 2 [json_name = "firewalls"];
}

message InstancesGetEffectiveFirewallsResponseEffectiveFirewallPolicy {
  // [Output Only] Deprecated, please use short name instead. The display name
  // of the firewall policy.
  optional string display_name = 1 [json_name = "displayName"];

  // [Output Only] The name of the firewall policy.
  optional string name = 2 [json_name = "name"];

  // The rules that apply to the network.
  repeated FirewallPolicyRule rules = 3 [json_name = "rules"];

  // [Output Only] The short name of the firewall policy.
  optional string short_name = 4 [json_name = "shortName"];

  // [Output Only] The type of the firewall policy. Can be one of HIERARCHY,
  // NETWORK, NETWORK_REGIONAL.
  // HIERARCHY:
  // NETWORK:
  // NETWORK_REGIONAL:
  // UNSPECIFIED:
  optional string type = 5 [json_name = "type"];
}

message InstancesRemoveResourcePoliciesRequest {
  // Resource policies to be removed from this instance.
  repeated string resource_policies = 1 [json_name = "resourcePolicies"];
}

message InstancesScopedList {
  // [Output Only] A list of instances contained in this scope.
  repeated Instance instances = 1 [json_name = "instances"];

  message Warning {
    // [Output Only] A warning code, if applicable. For example, Compute Engine
    // returns NO_RESULTS_ON_PAGE if there are no results in the response.
    // CLEANUP_FAILED: Warning about failed cleanup of transient changes made by
    // a failed operation.
    // DEPRECATED_RESOURCE_USED: A link to a deprecated resource was created.
    // DEPRECATED_TYPE_USED: When deploying and at least one of the resources
    // has a type marked as deprecated
    // DISK_SIZE_LARGER_THAN_IMAGE_SIZE: The user created a boot disk that is
    // larger than image size.
    // EXPERIMENTAL_TYPE_USED: When deploying and at least one of the resources
    // has a type marked as experimental
    // EXTERNAL_API_WARNING: Warning that is present in an external api call
    // FIELD_VALUE_OVERRIDEN: Warning that value of a field has been overridden.
    // Deprecated unused field.
    // INJECTED_KERNELS_DEPRECATED: The operation involved use of an injected
    // kernel, which is deprecated.
    // INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB: A WEIGHTED_MAGLEV backend
    // service is associated with a health check that is not of type
    // HTTP/HTTPS/HTTP2.
    // LARGE_DEPLOYMENT_WARNING: When deploying a deployment with a exceedingly
    // large number of resources
    // LIST_OVERHEAD_QUOTA_EXCEED: Resource can't be retrieved due to list
    // overhead quota exceed which captures the amount of resources filtered out
    // by user-defined list filter.
    // MISSING_TYPE_DEPENDENCY: A resource depends on a missing type
    // NEXT_HOP_ADDRESS_NOT_ASSIGNED: The route's nextHopIp address is not
    // assigned to an instance on the network.
    // NEXT_HOP_CANNOT_IP_FORWARD: The route's next hop instance cannot ip
    // forward.
    // NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE: The route's nextHopInstance URL
    // refers to an instance that does not have an ipv6 interface on the same
    // network as the route.
    // NEXT_HOP_INSTANCE_NOT_FOUND: The route's nextHopInstance URL refers to an
    // instance that does not exist.
    // NEXT_HOP_INSTANCE_NOT_ON_NETWORK: The route's nextHopInstance URL refers
    // to an instance that is not on the same network as the route.
    // NEXT_HOP_NOT_RUNNING: The route's next hop instance does not have a
    // status of RUNNING.
    // NOT_CRITICAL_ERROR: Error which is not critical. We decided to continue
    // the process despite the mentioned error.
    // NO_RESULTS_ON_PAGE: No results are present on a particular list page.
    // PARTIAL_SUCCESS: Success is reported, but some results may be missing due
    // to errors
    // REQUIRED_TOS_AGREEMENT: The user attempted to use a resource that
    // requires a TOS they have not accepted.
    // RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING: Warning that a resource is in
    // use.
    // RESOURCE_NOT_DELETED: One or more of the resources set to auto-delete
    // could not be deleted because they were in use.
    // SCHEMA_VALIDATION_IGNORED: When a resource schema validation is ignored.
    // SINGLE_INSTANCE_PROPERTY_TEMPLATE: Instance template used in instance
    // group manager is valid as such, but its application does not make a lot
    // of sense, because it allows only single instance in instance group.
    // UNDECLARED_PROPERTIES: When undeclared properties in the schema are
    // present
    // UNREACHABLE: A given scope cannot be reached.
    optional string code = 1 [json_name = "code"];

    message DataItem {
      // [Output Only] A key that provides more detail on the warning being
      // returned. For example, for warnings where there are no results in a
      // list request for a particular zone, this key might be scope and the key
      // value might be the zone name. Other examples might be a key indicating
      // a deprecated resource and a suggested replacement, or a warning about
      // invalid network settings (for example, if an instance attempts to
      // perform IP forwarding but is not enabled for IP forwarding).
      optional string key = 1 [json_name = "key"];

      // [Output Only] A warning data value corresponding to the key.
      optional string value = 2 [json_name = "value"];
    }

    // [Output Only] Metadata about this warning in key: value format. For
    // example: "data": [ { "key": "scope", "value": "zones/us-east1-d" }
    repeated DataItem data = 2 [json_name = "data"];

    // [Output Only] A human-readable description of the warning code.
    optional string message = 3 [json_name = "message"];
  }

  // [Output Only] Informational warning which replaces the list of instances
  // when the list is empty.
  optional Warning warning = 2 [json_name = "warning"];
}

message InstancesSetLabelsRequest {
  // Fingerprint of the previous set of labels for this resource, used to
  // prevent conflicts. Provide the latest fingerprint value when making a
  // request to add or change labels.
  optional string label_fingerprint = 1 [json_name = "labelFingerprint"];

  map<string, string> labels = 2 [json_name = "labels"];
}

message InstancesSetMachineResourcesRequest {
  // A list of the type and count of accelerator cards attached to the instance.
  repeated AcceleratorConfig guest_accelerators = 1
      [json_name = "guestAccelerators"];
}

message InstancesSetMachineTypeRequest {
  // Full or partial URL of the machine type resource. See Machine Types for a
  // full list of machine types. For example:
  // zones/us-central1-f/machineTypes/n1-standard-1
  optional string machine_type = 1 [json_name = "machineType"];
}

message InstancesSetMinCpuPlatformRequest {
  // Minimum cpu/platform this instance should be started at.
  optional string min_cpu_platform = 1 [json_name = "minCpuPlatform"];
}

message InstancesSetNameRequest {
  // The current name of this resource, used to prevent conflicts. Provide the
  // latest name when making a request to change name.
  optional string current_name = 1 [json_name = "currentName"];

  // The name to be applied to the instance. Needs to be RFC 1035 compliant.
  optional string name = 2 [json_name = "name"];
}

message InstancesSetSecurityPolicyRequest {
  // The network interfaces that the security policy will be applied to. Network
  // interfaces use the nicN naming format. You can only set a security policy
  // for network interfaces with an access config.
  repeated string network_interfaces = 1 [json_name = "networkInterfaces"];

  // A full or partial URL to a security policy to add to this instance. If this
  // field is set to an empty string it will remove the associated security
  // policy.
  optional string security_policy = 2 [json_name = "securityPolicy"];
}

message InstancesSetServiceAccountRequest {
  // Email address of the service account.
  optional string email = 1 [json_name = "email"];

  // The list of scopes to be made available for this service account.
  repeated string scopes = 2 [json_name = "scopes"];
}

message InstancesStartWithEncryptionKeyRequest {
  // Array of disks associated with this instance that are protected with a
  // customer-supplied encryption key. In order to start the instance, the disk
  // url and its corresponding key must be provided. If the disk is not
  // protected with a customer-supplied encryption key it should not be
  // specified.
  repeated CustomerEncryptionKeyProtectedDisk disks = 1 [json_name = "disks"];
}

// Represents a reference to a resource.
message Reference {
  // [Output Only] Type of the resource. Always compute#reference for
  // references.
  optional string kind = 1 [json_name = "kind"];

  // A description of the reference type with no implied semantics. Possible
  // values include: 1. MEMBER_OF
  optional string reference_type = 2 [json_name = "referenceType"];

  // URL of the resource which refers to the target.
  optional string referrer = 3 [json_name = "referrer"];

  // URL of the resource to which this reference points.
  optional string target = 4 [json_name = "target"];
}

// Contains output only fields. Use this sub-message for actual values set on
// Instance attributes as compared to the value requested by the user (intent)
// in their instance CRUD calls.
message ResourceStatus {
  // [Output Only] An opaque ID of the host on which the VM is running.
  optional string physical_host = 1 [json_name = "physicalHost"];

  optional UpcomingMaintenance upcoming_maintenance = 2
      [json_name = "upcomingMaintenance"];
}

// An instance's screenshot.
message Screenshot {
  // [Output Only] The Base64-encoded screenshot data.
  optional string contents = 1 [json_name = "contents"];

  // [Output Only] Type of the resource. Always compute#screenshot for the
  // screenshots.
  optional string kind = 2 [json_name = "kind"];
}

// An instance serial console output.
message SerialPortOutput {
  // [Output Only] The contents of the console output.
  optional string contents = 1 [json_name = "contents"];

  // [Output Only] Type of the resource. Always compute#serialPortOutput for
  // serial port output.
  optional string kind = 2 [json_name = "kind"];

  // [Output Only] The position of the next byte of content, regardless of
  // whether the content exists, following the output returned in the `contents`
  // property. Use this value in the next request as the start parameter.
  optional string next = 3 [json_name = "next"];

  // [Output Only] Server-defined URL for this resource.
  optional string self_link = 4 [json_name = "selfLink"];

  // The starting byte position of the output that was returned. This should
  // match the start parameter sent with the request. If the serial console
  // output exceeds the size of the buffer (1 MB), older output is overwritten
  // by newer content. The output start value will indicate the byte position of
  // the output that was returned, which might be different than the `start`
  // value that was specified in the request.
  optional string start = 5 [json_name = "start"];
}

// A Shielded Instance Identity.
message ShieldedInstanceIdentity {
  // An Endorsement Key (EK) made by the RSA 2048 algorithm issued to the
  // Shielded Instance's vTPM.
  optional ShieldedInstanceIdentityEntry encryption_key = 1
      [json_name = "encryptionKey"];

  // [Output Only] Type of the resource. Always compute#shieldedInstanceIdentity
  // for shielded Instance identity entry.
  optional string kind = 2 [json_name = "kind"];

  // An Attestation Key (AK) made by the RSA 2048 algorithm issued to the
  // Shielded Instance's vTPM.
  optional ShieldedInstanceIdentityEntry signing_key = 3
      [json_name = "signingKey"];
}

// A Shielded Instance Identity Entry.
message ShieldedInstanceIdentityEntry {
  // A PEM-encoded X.509 certificate. This field can be empty.
  optional string ek_cert = 1 [json_name = "ekCert"];

  // A PEM-encoded public key.
  optional string ek_pub = 2 [json_name = "ekPub"];
}

// The policy describes the baseline against which Instance boot integrity is
// measured.
message ShieldedInstanceIntegrityPolicy {
  // Updates the integrity policy baseline using the measurements from the VM
  // instance's most recent boot.
  optional bool update_auto_learn_policy = 1
      [json_name = "updateAutoLearnPolicy"];
}

// Upcoming Maintenance notification information.
message UpcomingMaintenance {
  // Indicates if the maintenance can be customer triggered.
  optional bool can_reschedule = 1 [json_name = "canReschedule"];

  // The latest time for the planned maintenance window to start. This timestamp
  // value is in RFC3339 text format.
  optional string latest_window_start_time = 2
      [json_name = "latestWindowStartTime"];

  // ONGOING: There is ongoing maintenance on this VM.
  // PENDING: There is pending maintenance.
  // UNKNOWN: Unknown maintenance status. Do not use this value.
  optional string maintenance_status = 3 [json_name = "maintenanceStatus"];

  // Defines the type of maintenance.
  // SCHEDULED: Scheduled maintenance (e.g. maintenance after uptime guarantee
  // is complete).
  // UNKNOWN_TYPE: No type specified. Do not use this value.
  // UNSCHEDULED: Unscheduled maintenance (e.g. emergency maintenance during
  // uptime guarantee).
  optional string type = 4 [json_name = "type"];

  // The time by which the maintenance disruption will be completed. This
  // timestamp value is in RFC3339 text format.
  optional string window_end_time = 5 [json_name = "windowEndTime"];

  // The current start time of the maintenance window. This timestamp value is
  // in RFC3339 text format.
  optional string window_start_time = 6 [json_name = "windowStartTime"];
}
