// 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_072.proto";
import "google/cloud/compute/v1/internal/common_088.proto";

message DiskMoveRequest {
  // The URL of the destination zone to move the disk. This can be a full or
  // partial URL. For example, the following are all valid URLs to a zone: -
  // https://www.googleapis.com/compute/v1/projects/project/zones/zone -
  // projects/project/zones/zone - zones/zone
  optional string destination_zone = 1 [json_name = "destinationZone"];

  // The URL of the target disk to move. This can be a full or partial URL. For
  // example, the following are all valid URLs to a disk: -
  // https://www.googleapis.com/compute/v1/projects/project/zones/zone
  // /disks/disk - projects/project/zones/zone/disks/disk -
  // zones/zone/disks/disk
  optional string target_disk = 2 [json_name = "targetDisk"];
}

message InstanceMoveRequest {
  // The URL of the destination zone to move the instance. This can be a full or
  // partial URL. For example, the following are all valid URLs to a zone: -
  // https://www.googleapis.com/compute/v1/projects/project/zones/zone -
  // projects/project/zones/zone - zones/zone
  optional string destination_zone = 1 [json_name = "destinationZone"];

  // The URL of the target instance to move. This can be a full or partial URL.
  // For example, the following are all valid URLs to an instance: -
  // https://www.googleapis.com/compute/v1/projects/project/zones/zone
  // /instances/instance - projects/project/zones/zone/instances/instance -
  // zones/zone/instances/instance
  optional string target_instance = 2 [json_name = "targetInstance"];
}

// Represents a Project resource. A project is used to organize resources in a
// Google Cloud Platform environment. For more information, read about the
// Resource Hierarchy.
message Project {
  // Metadata key/value pairs available to all instances contained in this
  // project. See Custom metadata for more information.
  optional Metadata common_instance_metadata = 1
      [json_name = "commonInstanceMetadata"];

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

  // This signifies the default network tier used for configuring resources of
  // the project and can only take the following values: PREMIUM, STANDARD.
  // Initially the default network tier is PREMIUM.
  // FIXED_STANDARD: Public internet quality with fixed bandwidth.
  // PREMIUM: High quality, Google-grade network tier, support for all
  // networking products.
  // STANDARD: Public internet quality, only limited support for other
  // networking products.
  // STANDARD_OVERRIDES_FIXED_STANDARD: (Output only) Temporary tier for
  // FIXED_STANDARD when fixed standard tier is expired or not configured.
  optional string default_network_tier = 3 [json_name = "defaultNetworkTier"];

  // [Output Only] Default service account used by VMs running in this project.
  optional string default_service_account = 4
      [json_name = "defaultServiceAccount"];

  // An optional textual description of the resource.
  optional string description = 5 [json_name = "description"];

  // Restricted features enabled for use on this project.
  repeated string enabled_features = 6 [json_name = "enabledFeatures"];

  // [Output Only] The unique identifier for the resource. This identifier is
  // defined by the server. This is *not* the project ID, and is just a unique
  // ID used by Compute Engine to identify resources.
  optional string id = 7 [json_name = "id"];

  // [Output Only] Type of the resource. Always compute#project for projects.
  optional string kind = 8 [json_name = "kind"];

  // The project ID. For example: my-example-project. Use the project ID to make
  // requests to Compute Engine.
  optional string name = 9 [json_name = "name"];

  // [Output Only] Quotas assigned to this project.
  repeated Quota quotas = 10 [json_name = "quotas"];

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

  // The naming prefix for daily usage reports and the Google Cloud Storage
  // bucket where they are stored.
  optional UsageExportLocation usage_export_location = 12
      [json_name = "usageExportLocation"];

  // [Output Only] Default internal DNS setting used by VMs running in this
  // project.
  // GLOBAL_DEFAULT:
  // UNSPECIFIED_VM_DNS_SETTING:
  // ZONAL_DEFAULT:
  // ZONAL_ONLY:
  optional string vm_dns_setting = 13 [json_name = "vmDnsSetting"];

  // [Output Only] The role this project has in a shared VPC configuration.
  // Currently, only projects with the host role, which is specified by the
  // value HOST, are differentiated.
  // HOST:
  // UNSPECIFIED_XPN_PROJECT_STATUS:
  optional string xpn_project_status = 14 [json_name = "xpnProjectStatus"];
}

message ProjectsDisableXpnResourceRequest {
  // Service resource (a.k.a service project) ID.
  optional XpnResourceId xpn_resource = 1 [json_name = "xpnResource"];
}

message ProjectsEnableXpnResourceRequest {
  // Service resource (a.k.a service project) ID.
  optional XpnResourceId xpn_resource = 1 [json_name = "xpnResource"];
}

message ProjectsGetXpnResources {
  // [Output Only] Type of resource. Always compute#projectsGetXpnResources for
  // lists of service resources (a.k.a service projects)
  optional string kind = 1 [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 = 2 [json_name = "nextPageToken"];

  // Service resources (a.k.a service projects) attached to this project as
  // their shared VPC host.
  repeated XpnResourceId resources = 3 [json_name = "resources"];
}

message ProjectsListXpnHostsRequest {
  // Optional organization ID managed by Cloud Resource Manager, for which to
  // list shared VPC host projects. If not specified, the organization will be
  // inferred from the project.
  optional string organization = 1 [json_name = "organization"];
}

message ProjectsSetDefaultNetworkTierRequest {
  // Default network tier to be set.
  // FIXED_STANDARD: Public internet quality with fixed bandwidth.
  // PREMIUM: High quality, Google-grade network tier, support for all
  // networking products.
  // STANDARD: Public internet quality, only limited support for other
  // networking products.
  // STANDARD_OVERRIDES_FIXED_STANDARD: (Output only) Temporary tier for
  // FIXED_STANDARD when fixed standard tier is expired or not configured.
  optional string network_tier = 1 [json_name = "networkTier"];
}

// The location in Cloud Storage and naming method of the daily usage report.
// Contains bucket_name and report_name prefix.
message UsageExportLocation {
  // The name of an existing bucket in Cloud Storage where the usage report
  // object is stored. The Google Service Account is granted write access to
  // this bucket. This can either be the bucket name by itself, such as
  // example-bucket, or the bucket name with gs:// or
  // https://storage.googleapis.com/ in front of it, such as
  // gs://example-bucket.
  optional string bucket_name = 1 [json_name = "bucketName"];

  // An optional prefix for the name of the usage report object stored in
  // bucketName. If not supplied, defaults to usage_gce. The report is stored as
  // a CSV file named report_name_prefix_gce_YYYYMMDD.csv where YYYYMMDD is the
  // day of the usage according to Pacific Time. If you supply a prefix, it
  // should conform to Cloud Storage object naming conventions.
  optional string report_name_prefix = 2 [json_name = "reportNamePrefix"];
}

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

  // [Output Only] A list of shared VPC host project URLs.
  repeated Project items = 2 [json_name = "items"];

  // [Output Only] Type of resource. Always compute#xpnHostList for lists of
  // shared VPC hosts.
  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"];
}

// Service resource (a.k.a service project) ID.
message XpnResourceId {
  // The ID of the service resource. In the case of projects, this field
  // supports project id (e.g., my-project-123) and project number (e.g.
  // 12345678).
  optional string id = 1 [json_name = "id"];

  // The type of the service resource.
  // PROJECT:
  // XPN_RESOURCE_TYPE_UNSPECIFIED:
  optional string type = 2 [json_name = "type"];
}
