// Copyright 2026 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
//
//     http://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.

syntax = "proto3";

package google.cloud.commerceproducer.v1beta;

import "google/api/field_behavior.proto";
import "google/api/resource.proto";
import "google/protobuf/duration.proto";
import "google/protobuf/timestamp.proto";
import "google/type/decimal.proto";
import "google/type/money.proto";

option csharp_namespace = "Google.Cloud.CommerceProducer.V1Beta";
option go_package = "cloud.google.com/go/commerceproducer/apiv1beta/commerceproducerpb;commerceproducerpb";
option java_multiple_files = true;
option java_outer_classname = "SkuProto";
option java_package = "com.google.cloud.commerceproducer.v1beta";
option php_namespace = "Google\\Cloud\\CommerceProducer\\V1beta";
option ruby_package = "Google::Cloud::CommerceProducer::V1beta";

// Message describing the Sku resource.
//
// Encapsulates and represents a stock keeping unit (SKU), the atomic unit of
// pricing and billing in Google Cloud. Each customer charge is associated with
// and originates from exactly one SKU. While the Cloud Marketplace Sku resource
// shares a close relationship with the public [Sku resource in the Cloud
// Billing
// API](https://cloud.google.com/billing/docs/how-to/get-pricing-information-api),
// Cloud Marketplace SKUs are represented here with additional information in
// an alternative format tailored for use by Cloud Marketplace partners, and are
// not necessarily public and by extension are not generally visible in the
// Cloud Billing API or the [Google Cloud Public
// SKUs](https://cloud.google.com/skus).
//
// Note on terminology: While the name of the resource derives from the acronym
// 'SKU' it is named 'Sku' for consistency with other resource type names, and
// may be rendered variously as 'Sku', 'sku', or 'SKU' across this and other
// documentation.
message Sku {
  option (google.api.resource) = {
    type: "commerceproducer.googleapis.com/Sku"
    pattern: "projects/{project}/locations/{location}/services/{service}/skus/{sku}"
    plural: "skus"
    singular: "sku"
  };

  // The price of the SKU, active during a particular time range.
  // Prices are in all cases in USD. Customers are billed in the currency of
  // their billing account, subject to the currency conversion rate in effect
  // at the time.
  message SkuPrice {
    // Representation for a SKU that is not active and has no price.
    message InactiveSkuPrice {}

    // Details about a SKU pricing usage of a [partner-reported custom billing
    // metric](https://cloud.google.com/service-infrastructure/docs/reporting-billing-metrics)
    // defined by the partner in the Service Management API and reported using
    // the Service Control API.
    //
    // The customer's usage charge is computed by converting the customer's
    // reported consumption to the SKU's composite price unit and applying the
    // graduated price from the appropriate price tier.
    message ManagedServiceMetricUsageFee {
      // The billing model applied to bill the customer's usage.
      oneof price_structure {
        // Output only. [Tiered
        // pricing](https://cloud.google.com/billing/docs/how-to/pricing-table#tiered-pricing)
        // of the SKU.
        TieredPrice tiered_price = 2
            [(google.api.field_behavior) = OUTPUT_ONLY];
      }

      // Output only. The name of the metric, in canonical format.
      //
      // Note that in the canonical format the first character of the path
      // component of the metric name is always uppercase, which may differ
      // from the metric name in the service config. For example, a metric
      // appearing in the service config as 'example.com/example_metric' will
      // appear here in the SKU as 'example.com/Example_metric'. In the Service
      // Management and Service Control APIs these two metric names are
      // considered distinct, either or both may be defined, and usage must be
      // reported using a name matching the name of a metric defined in the
      // service config. But for billing purposes usage reported using either
      // name will be aggregated under the canonical metric name.
      //
      // Example: "example.com/Example_metric"
      string canonical_metric = 1 [(google.api.field_behavior) = OUTPUT_ONLY];
    }

    // Details about a SKU pricing usage of a [Compute Engine
    // License](https://cloud.google.com/compute/docs/licenses/about).
    //
    // The SKU applies to a single license, and may be further scoped to a
    // [Compute
    // Engine VM Instance](https://cloud.google.com/compute/docs/instances)
    // machine resource type (e.g. "vCPU") and size range for that machine
    // resource. Instances deployed from [Compute
    // Engine Images](https://cloud.google.com/compute/docs/images)
    // incorporating the target license and (if applicable) matching the machine
    // resource type size range will be charged by the SKU. A single license may
    // be priced by multiple SKUs covering different combinations of machine
    // resource type and size range, allowing a single running instance to be
    // charged by up to one SKU per machine resource type, with pricing tiered
    // according to machine shape.
    message ComputeEngineLicenseUsageFee {
      // The range of machine resource values that the SKU applies to.
      message MachineResourceRange {
        // Output only. The inclusive lower bound of the range.
        // While the number zero may be the start of a range, it is not a
        // possible machine resource value. An instance cannot exist with zero
        // vCPU or memory, and an instance with no attached accelerators lacks a
        // GPU dimension entirely rather than having a GPU count of zero.
        int64 start_value = 1 [(google.api.field_behavior) = OUTPUT_ONLY];

        // Output only. The exclusive upper bound of the range.
        // If no end value is specified, the range is unbounded from above.
        optional int64 end_value = 2
            [(google.api.field_behavior) = OUTPUT_ONLY];
      }

      // The machine resource type that the SKU applies to, if any.
      enum MachineResource {
        // The SKU applies to all instances irrespective of machine shape.
        // This is referred to as "instance-based pricing" because the price
        // is the same for all instances.
        MACHINE_RESOURCE_UNSPECIFIED = 0;

        // The SKU applies based on the instance's vCPU count.
        VCPU_COUNT = 1;

        // The SKU applies based on the instance's memory size in bytes.
        MEMORY_BYTES = 2;

        // The SKU applies based on the instance's GPU count.
        GPU_COUNT = 3;
      }

      // Determines how the customer's usage is calculated.
      enum UsageCalculation {
        // Unused.
        USAGE_CALCULATION_UNSPECIFIED = 0;

        // Usage is calculated from instance runtime.
        // The customer's usage is metered according to the [Compute Engine VM
        // instance pricing
        // model](https://cloud.google.com/compute/vm-instance-pricing),
        // measured on a per-instance basis in units of hours, with a minimum
        // duration of one minute and an increment of one second.
        //
        // A SKU using this usage calculation is referred to as "flat" because
        // the customer's usage charge is independent of the instance's machine
        // resource shape apart from determining whether the SKU applies to the
        // instance.
        INSTANCE_RUNTIME = 1;

        // Usage is calculated from instance runtime and size.
        // This calculation mode is only applicable to resource-based SKUs.
        // Usage is calculated by measuring the instance runtime in the same
        // manner as for `INSTANCE_RUNTIME` and multiplying by the instance's
        // machine resource value matching the SKU's machine resource type.
        // This converts the price from per-instance-hour to
        // per-instance-hour-per-machine-resource, which changes the price unit
        // for memory SKUs to 'GiBy.h'. The price unit otherwise remains 'h'
        // because the other machine resources are dimensionless.
        //
        // A SKU using this usage calculation is referred to as "linear" because
        // the customer's usage charge is linearly proportional to the
        // instance's machine resource value.
        LINEAR_RESOURCE_SCALED_INSTANCE_RUNTIME = 2;
      }

      // The billing model applied to bill the customer's usage
      // arising from running instances covered by the scope of the SKU.
      oneof price_structure {
        // The price per unit of usage.
        // The customer's usage charge is computed by measuring the customer's
        // consumption denominated in price units and multiplying by this price.
        google.type.Money price_per_unit = 6;
      }

      // Output only. The license code of the target Compute Engine License.
      // Note that this is the numeric license code itself in uint64 format used
      // to reference licenses attached to images, not the resource name of the
      // related [Compute Engine LicenseCode
      // resource](https://cloud.google.com/compute/docs/reference/rest/v1/licenseCodes).
      //
      // Example: "1234567890123456789"
      string license_code = 1 [(google.api.field_behavior) = OUTPUT_ONLY];

      // Output only. The machine resource type that the SKU applies to, if any.
      // SKUs with a non-default value are referred to as "resource-based" SKUs.
      MachineResource machine_resource = 2
          [(google.api.field_behavior) = OUTPUT_ONLY];

      // Output only. The range of machine resource values that the SKU applies
      // to. Unset when the SKU is not scoped to a particular machine resource
      // type. The collection of SKUs in effect at any given time targeting the
      // same license and machine resource type will cover all possible values
      // for that machine resource type without overlap. Such a collection of
      // SKUs form a "tiered" price structure over the possible values of the
      // machine resource, with each SKU acting as a "tier".
      //
      // NOTE: This is distinct from a SKU with [tiered
      // pricing](https://cloud.google.com/billing/docs/how-to/pricing-table#tiered-pricing).
      MachineResourceRange machine_resource_range = 3
          [(google.api.field_behavior) = OUTPUT_ONLY];

      // Output only. Determines how the customer's usage is calculated.
      UsageCalculation usage_calculation = 4
          [(google.api.field_behavior) = OUTPUT_ONLY];

      // Output only. The price unit of the SKU.
      // See https://ucum.org/ucum.html for the format of the price unit.
      // For linear-priced memory SKUs, the price unit is 'GiBy.h'.
      // For all other SKUs, the price unit is 'h'. This includes linear-priced
      // vCPU and GPU SKUs because these resources have unitless dimensions and
      // the application of these scaling factors does not change the price
      // unit.
      string unit = 5 [(google.api.field_behavior) = OUTPUT_ONLY];
    }

    // Details about a SKU pricing usage of software running on a Kubernetes
    // Engine pod.
    //
    // The SKU applies to pods annotated with the SKU's parent service name, and
    // may be further scoped to a [k8s pod resource
    // type](https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/)
    // (e.g. "CPU") and size range for that resource type. Running pods
    // annotated with the parent service's service name and matching the pod
    // resource type size range will be charged by the SKU. A service may be
    // priced by multiple SKUs covering different combinations of pod resource
    // type and size range, allowing a single running pod to be charged by up to
    // one SKU per pod resource type, with pricing tiered according to pod
    // shape.
    message KubernetesEnginePodUsageFee {
      // The range of pod resource values that the SKU applies to.
      message PodResourceRange {
        // Output only. The inclusive lower bound of the range.
        int64 start_value = 1 [(google.api.field_behavior) = OUTPUT_ONLY];

        // Output only. The exclusive upper bound of the range.
        // If no end value is specified, the range is unbounded from above.
        optional int64 end_value = 2
            [(google.api.field_behavior) = OUTPUT_ONLY];
      }

      // The pod [resource
      // type](https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/)
      // that the SKU applies to.
      enum PodResource {
        // Unused.
        POD_RESOURCE_UNSPECIFIED = 0;

        // The SKU applies based on the pod's [vCPU
        // count](https://kubernetes.io/docs/tasks/configure-pod-container/assign-cpu-resource/).
        VCPU_COUNT = 1;

        // The SKU applies based on the pod's [memory
        // size](https://kubernetes.io/docs/tasks/configure-pod-container/assign-memory-resource/)
        // in bytes.
        MEMORY_BYTES = 2;

        // The SKU applies based on the pod's GPU count.
        GPU_COUNT = 3;

        // The SKU applies based on the pod's [TPU
        // count](https://cloud.google.com/kubernetes-engine/docs/concepts/tpus#how_tpus_work).
        TPU_COUNT = 4;
      }

      // Determines how the customer's usage is calculated.
      enum UsageCalculation {
        // Unused.
        USAGE_CALCULATION_UNSPECIFIED = 0;

        // Usage is calculated from pod runtime.
        // The customer's usage is metered in a manner similar to the [GKE
        // Autopilot mode for pods without specific hardware
        // requirements](https://cloud.google.com/kubernetes-engine/pricing),
        // priced on a per-pod basis in units of hours and measured in
        // one-second increments, with no minimum duration.
        //
        // A SKU using this usage calculation is referred to as "flat" because
        // the customer's usage charge is independent of the pod shape apart
        // from determining whether the SKU applies to the pod.
        POD_RUNTIME = 1;

        // Usage is calculated from pod runtime and size.
        // This calculation mode is only applicable to resource-based SKUs.
        // Usage is calculated by measuring the pod runtime in the same manner
        // as for `POD_RUNTIME` and multiplying by the pod's resource value
        // matching the SKU's pod resource type.
        // This converts the price from per-pod-hour to
        // per-pod-hour-per-resource, which changes the price unit for memory
        // SKUs to 'GiBy.h'. The price unit otherwise remains 'h' because the
        // other resources are dimensionless.
        //
        // A SKU using this usage calculation is referred to as "linear" because
        // the customer's usage charge is linearly proportional to the
        // pod's resource value.
        LINEAR_RESOURCE_SCALED_POD_RUNTIME = 2;
      }

      // The billing model applied to meter and bill the customer's usage
      // arising from running k8s pods covered by the scope of the SKU.
      oneof price_structure {
        // The price per unit of usage.
        // The customer's usage charge is computed by measuring the customer's
        // consumption denominated in price units and multiplying by this price.
        google.type.Money price_per_unit = 6;
      }

      // Output only. The pod resource type that the SKU applies to.
      // SKUs with a non-default value are referred to as "resource-based" SKUs.
      PodResource pod_resource = 2 [(google.api.field_behavior) = OUTPUT_ONLY];

      // Output only. The range of pod resource values that the SKU applies to.
      // The collection of SKUs in effect at any given time targeting the same
      // service annotation and pod resource type will cover all possible values
      // for that pod resource type without overlap. Such a collection of SKUs
      // form a "tiered" price structure over the possible values of the pod
      // resource, with each SKU acting as a "tier".
      //
      // NOTE: This is distinct from a SKU with [tiered
      // pricing](https://cloud.google.com/billing/docs/how-to/pricing-table#tiered-pricing).
      PodResourceRange pod_resource_range = 3
          [(google.api.field_behavior) = OUTPUT_ONLY];

      // Output only. Determines how the customer's usage is calculated.
      UsageCalculation usage_calculation = 4
          [(google.api.field_behavior) = OUTPUT_ONLY];

      // Output only. The price unit of the SKU.
      // See https://ucum.org/ucum.html for the format of the price unit.
      // For linear-priced memory SKUs, the price unit is 'GiBy.h'.
      // For all other SKUs, the price unit is 'h'. This includes linear-priced
      // VCPU, GPU, and TPU SKUs because these resources have unitless
      // dimensions and the application of these scaling factors does not change
      // the price unit.
      string unit = 5 [(google.api.field_behavior) = OUTPUT_ONLY];
    }

    // Details about a SKU pricing usage of an [AI Platform Managed Model
    // (MaaS)](https://docs.cloud.google.com/gemini-enterprise-agent-platform/models/partner-models/use-partner-models).
    message AiPlatformManagedModelUsageFee {
      // The usage metric that the SKU applies to.
      message AiPlatformManagedModelUsageMetric {
        // Input tokens read from the input to the prediction endpoint.
        // The unit for this metric is dimensionless.
        message InputTokensMetric {}

        // Input tokens read from the cache.
        // The unit for this metric is dimensionless.
        message CacheReadInputTokensMetric {}

        // Input tokens written to the cache.
        // The unit for this metric is dimensionless.
        message CacheWriteInputTokensMetric {
          // Output only. The duration the write is retained in the cache.
          google.protobuf.Duration ttl = 1
              [(google.api.field_behavior) = OUTPUT_ONLY];
        }

        // Output tokens returned from the prediction endpoint.
        // The unit for this metric is dimensionless.
        message OutputTokensMetric {}

        // Web search requests executed by the model.
        // The unit for this metric is dimensionless.
        message WebSearchRequestsMetric {}

        // The usage metric that the SKU applies to.
        oneof metric {
          // Output only. Input tokens read from the prediction endpoint input.
          InputTokensMetric input_tokens_metric = 1
              [(google.api.field_behavior) = OUTPUT_ONLY];

          // Output only. Input tokens read from the cache.
          CacheReadInputTokensMetric cache_read_input_tokens_metric = 2
              [(google.api.field_behavior) = OUTPUT_ONLY];

          // Output only. Input tokens written to the cache.
          CacheWriteInputTokensMetric cache_write_input_tokens_metric = 3
              [(google.api.field_behavior) = OUTPUT_ONLY];

          // Output only. Output tokens returned from the prediction endpoint.
          OutputTokensMetric output_tokens_metric = 4
              [(google.api.field_behavior) = OUTPUT_ONLY];

          // Output only. Web search requests executed by the model.
          WebSearchRequestsMetric web_search_requests_metric = 5
              [(google.api.field_behavior) = OUTPUT_ONLY];
        }
      }

      // The range of aggregated input token values covered by the SKU.
      //
      // A request to a managed model has an aggregated input token value
      // determined by the sum of the metric values of the input token metrics.
      //
      // * input tokens
      // * cache read input tokens
      // * cache write input tokens
      message CombinedRequestInputTokensRange {
        // Output only. The inclusive lower bound of the range.
        int64 start_value = 1 [(google.api.field_behavior) = OUTPUT_ONLY];

        // Output only. The exclusive upper bound of the range.
        // If no end value is specified, the range is unbounded from above.
        optional int64 end_value = 2
            [(google.api.field_behavior) = OUTPUT_ONLY];
      }

      // Additional details present for historical provisioned throughput
      // "overage" SKUs that applied charges only to usage above the customer's
      // provisioned throughput quota threshold.
      message ProvisionedThroughputOverage {
        // Output only. The service whose usage the overage SKU applied to.
        string service = 1 [
          (google.api.field_behavior) = OUTPUT_ONLY,
          (google.api.resource_reference) = {
            child_type: "commerceproducer.googleapis.com/Service"
          }
        ];
      }

      // The prediction modes of requests that the SKU applies to.
      enum PredictionMode {
        // The SKU does not distinguish between prediction modes.
        PREDICTION_MODE_UNSPECIFIED = 0;

        // The SKU applies to online prediction.
        ONLINE_PREDICTION = 1;

        // The SKU applies to batch prediction.
        BATCH_PREDICTION = 2;
      }

      // The billing model applied to bill the customer's usage.
      oneof price_structure {
        // Output only. [Tiered
        // pricing](https://cloud.google.com/billing/docs/how-to/pricing-table#tiered-pricing)
        // of the SKU.
        TieredPrice tiered_price = 7
            [(google.api.field_behavior) = OUTPUT_ONLY];
      }

      // Output only. The usage metric that the SKU applies to.
      AiPlatformManagedModelUsageMetric usage_metric = 1
          [(google.api.field_behavior) = OUTPUT_ONLY];

      // Output only. The model endpoint location where usage is priced by this
      // SKU. If no location is specified, the SKU applies to usage in all
      // locations.
      AiPlatformManagedModelEndpointLocation location = 3
          [(google.api.field_behavior) = OUTPUT_ONLY];

      // Output only. The prediction mode of requests that the SKU applies to.
      PredictionMode prediction_mode = 4
          [(google.api.field_behavior) = OUTPUT_ONLY];

      // Output only. The range of aggregated input token values covered by the
      // SKU. Unset if the SKU is not scoped to a particular range. A request is
      // in scope for this SKU if its aggregated input token value falls within
      // the range. The collection of SKUs in effect at any given time scoped to
      // a particular aggregated input token value range will cover all possible
      // values without overlap. Such a collection of SKUs form a "tiered" price
      // structure over the possible value, with each SKU acting as a "tier".
      //
      // NOTE: This is distinct from a SKU with [tiered
      // pricing](https://cloud.google.com/billing/docs/how-to/pricing-table#tiered-pricing).
      CombinedRequestInputTokensRange combined_request_input_tokens_range = 5
          [(google.api.field_behavior) = OUTPUT_ONLY];

      // Output only. Set when the SKU is a historical provisioned throughput
      // overage SKU. Starting 2025-08-26 such SKUs have no effect, and usage in
      // excess of provisioned throughput quota is now metered as standard
      // usage. This field is set only in historical SKU timeline entries for
      // overage SKUs belonging to partners that offered provisioned throughput
      // for AI Platform managed model products prior to the unification of
      // standard usage and provisioned throughput overage metering.
      ProvisionedThroughputOverage provisioned_throughput_overage = 6
          [(google.api.field_behavior) = OUTPUT_ONLY];
    }

    // Details about a SKU pricing reservation of [AI Platform Provisioned
    // Throughput](https://docs.cloud.google.com/gemini-enterprise-agent-platform/models/provisioned-throughput).
    //
    // Customers may purchase provisioned throughput reservations for AI
    // Platform managed model products. This provides the customer with
    // provisioned throughput quota for a particular model and location. Model
    // usage below the provisioned throughput quota threshold is voided and is
    // not charged by the product's managed model usage fees.
    message AiPlatformProvisionedThroughputFee {
      // The provisioned throughput reservation term priced by this SKU.
      oneof term {
        // Output only. The duration of the provisioned throughput reservation
        // in months.
        int32 term_duration_months = 2
            [(google.api.field_behavior) = OUTPUT_ONLY];
      }

      // The billing model applied to bill the customer's usage.
      oneof price_structure {
        // The price per [Generative AI Scale Unit
        // (GSU)](https://docs.cloud.google.com/gemini-enterprise-agent-platform/models/provisioned-throughput/measure-provisioned-throughput)
        // per `unit`.
        // A provisioned throughput reservation reserves a certain number of
        // GSUs, and the customer is billed for those GSUs on a continuous basis
        // for the duration of the reservation.
        google.type.Money gsu_price_per_unit = 4;
      }

      // Output only. The location where provisioned throughput is priced by
      // this SKU.
      AiPlatformManagedModelEndpointLocation location = 1
          [(google.api.field_behavior) = OUTPUT_ONLY];

      // Output only. The price unit of the SKU.
      // See https://ucum.org/ucum.html for the format of the price unit.
      // Since provisioned throughput reservations are billed by duration, this
      // will always be a time unit. The price unit of a provisioned throughput
      // SKU is not necessarily the same as the reservation term.
      // This field is unrelated to the [Generative AI Scale Unit
      // (GSU)](https://docs.cloud.google.com/gemini-enterprise-agent-platform/models/provisioned-throughput/measure-provisioned-throughput).
      //
      // Currently the unit is always months ('mo').
      // Additional time units may be supported in future.
      //
      // The customary unit month ('mo') requires special handling to account
      // for the variable duration of months. A price may be denominated in
      // units of months, but the duration the reservation is active is measured
      // in metric time and customers are billed on that basis. The exact hourly
      // or per-second price can be calculated by dividing the monthly price
      // by the number of hours or seconds in the desired month. A reservation
      // active for N months is rarely billed exactly N times the monthly price.
      // This is intended and is not a billing error.
      string unit = 3 [(google.api.field_behavior) = OUTPUT_ONLY];
    }

    // Details about a SKU pricing usage of an [AI Platform Self Deployed
    // Model](https://docs.cloud.google.com/gemini-enterprise-agent-platform/models/model-garden/self-deployed-models).
    message AiPlatformDeployedModelUsageFee {
      // Determines how the customer's usage is calculated.
      enum UsageCalculation {
        // Unused.
        USAGE_CALCULATION_UNSPECIFIED = 0;

        // Usage is calculated from deployment runtime and size.
        // Usage is calculated by measuring the deployment runtime in hours and
        // multiplying by the amount of the deployed model's hardware resource
        // matching the SKU's hardware resource type.
        // This results in a composite `unit` of hours ('h') multiplied by the
        // unit that denominates the hardware resource, though note that
        // multiplying by the dimensionless unit ("1") has no effect.
        LINEAR_RESOURCE_SCALED_DEPLOYMENT_RUNTIME = 2;
      }

      // The type of hardware to which the SKU's licensing fee applies.
      // Models are deployed with a customer-specified
      // [MachineSpec](https://docs.cloud.google.com/gemini-enterprise-agent-platform/reference/rest/v1/MachineSpec)
      // that determines the hardware resources used by the model.
      oneof hardware_resource {
        // Output only. The SKU applies to a specific accelerator type.
        // Contains the name of the matching [AI Platform AcceleratorType](
        // https://docs.cloud.google.com/gemini-enterprise-agent-platform/reference/rest/v1/MachineSpec#AcceleratorType).
        // The corresponding linear scaling value is the dimensionless
        // [`accelerator_count`](https://docs.cloud.google.com/gemini-enterprise-agent-platform/reference/rest/v1/MachineSpec#FIELDS.accelerator_count).
        string accelerator_type = 2 [(google.api.field_behavior) = OUTPUT_ONLY];
      }

      // The billing model applied to bill the customer's usage
      // arising from running deployed models covered by the scope of the SKU.
      oneof price_structure {
        // Output only. The price per unit of usage.
        // The customer's usage charge is computed by measuring the customer's
        // consumption denominated in price units and multiplying by this price.
        google.type.Money price_per_unit = 5
            [(google.api.field_behavior) = OUTPUT_ONLY];
      }

      // Output only. The price unit of the SKU.
      // See https://ucum.org/ucum.html for the format of the price unit.
      // Currently the unit is always hours ('h'). This may change in future.
      string unit = 3 [(google.api.field_behavior) = OUTPUT_ONLY];

      // Output only. Determines how the customer's usage is calculated.
      UsageCalculation usage_calculation = 4
          [(google.api.field_behavior) = OUTPUT_ONLY];
    }

    // Details about a SKU charging a flat subscription fee.
    message FlatSubscriptionFee {
      // The billing model applied to bill the customer's subscription.
      oneof price_structure {
        // Output only. The price per time unit the subscription is active.
        google.type.Money price_per_unit = 3
            [(google.api.field_behavior) = OUTPUT_ONLY];
      }

      // Output only. The unit of the subscription SKU.
      // See https://ucum.org/ucum.html for the format of the price unit.
      // Since subscriptions are billed by duration, this will always be a time
      // unit. The price unit of a subscription SKU is not necessarily the same
      // as the subscription period of the corresponding StandardOffers.
      //
      // Currently the unit is always months ('mo').
      // Additional time units may be supported in future.
      //
      // The unit month ('mo') is a customary time unit and requires special
      // handling to account for the variable duration of months. A price may be
      // denominated in units of months, but the duration the subscription is
      // active is measured in metric time and customers are billed on that
      // basis. The exact hourly or per-second price can be calculated by
      // dividing the monthly price by the number of hours or seconds in the
      // desired month. A subscription active for N months is rarely billed
      // exactly N times the monthly price. This is intended and is not a
      // billing error.
      string unit = 2 [(google.api.field_behavior) = OUTPUT_ONLY];
    }

    // Price structure for a SKU charging a [tiered
    // price](https://cloud.google.com/billing/docs/how-to/pricing-table#tiered-pricing).
    message TieredPrice {
      // A [price
      // tier](https://cloud.google.com/billing/docs/how-to/pricing-table#tiered-pricing)
      // pricing metric usage within a range.
      //
      // Each marginal unit of usage is priced according to the price tier in
      // which it falls.
      message PriceTier {
        // Output only. Inclusive lower bound of the tier interval, denominated
        // in `unit`.
        google.type.Decimal start_amount = 1
            [(google.api.field_behavior) = OUTPUT_ONLY];

        // Output only. The price per `price_unit_count` of `unit` in the tier.
        // The price is applied fractionally if the customer's usage within the
        // tier is not an integer multiple of `price_unit_count`.
        google.type.Money price = 2 [(google.api.field_behavior) = OUTPUT_ONLY];
      }

      // Output only. Usage unit used for defining price tiers and for scaling
      // with the price_unit_count to form the composite price unit.
      //
      // See https://ucum.org/ucum.html for the format of the price unit.
      // A unitless dimension, such as a count, is represented as `1`.
      string unit = 1 [(google.api.field_behavior) = OUTPUT_ONLY];

      // Output only. The display description of the unit, supplied at time of
      // onboarding. This value is recommended to be set at least for
      // dimensionless metrics, but may be empty if no description was provided
      // at time of onboarding.
      string unit_description = 2 [(google.api.field_behavior) = OUTPUT_ONLY];

      // Output only. Scaling  the `unit` by the `price_unit_count` forms the
      // composite "price unit" which is priced by the price tiers.
      //
      // This scaling factor is in addition to any numerical prefix symbol on
      // the `unit`, so the same composite "price unit" can be represented in
      // several ways, differing only in their presentation to users.
      //
      // Examples:
      //
      // * $1    per 1    bytes     : unit = By,  price_unit_count = 1
      // * $1000 per 1    kilobytes : unit = kBy, price_unit_count = 1
      // * $5000 per 5    kilobytes : unit = kBy, price_unit_count = 5
      google.type.Decimal price_unit_count = 3
          [(google.api.field_behavior) = OUTPUT_ONLY];

      // Output only. The list of price tiers for the SKU, ordered by the
      // start_amount.
      //
      // The tiers are non-overlapping and are collectively bounded below by
      // zero and unbounded above to cover the entire range of possible metric
      // usage. Each tier is bounded below inclusively by its start_amount and
      // bounded above exclusively by the start_amount of the next tier, or else
      // unbounded above if there is no next tier.
      //
      // Usage of the metric is aggregated by customer billing account on a
      // monthly basis and billed in a graduated manner according to the price
      // tiers, with each marginal unit of usage priced accoring to the tier in
      // which it falls.
      repeated PriceTier price_tiers = 4
          [(google.api.field_behavior) = OUTPUT_ONLY];
    }

    // Location scope for a SKU that applies to an AI Platform Managed Model
    // endpoint.
    message AiPlatformManagedModelEndpointLocation {
      // The location scope of the SKU.
      oneof location {
        // Output only. The SKU applies to a region.
        string region_id = 1 [(google.api.field_behavior) = OUTPUT_ONLY];

        // Output only. The SKU applies to a [global
        // endpoint](https://docs.cloud.google.com/gemini-enterprise-agent-platform/resources/locations).
        // **Note**: This is distinct from the conventional meaning of "global"
        // as a SKU that applies to all locations.
        bool global_endpoint = 2 [(google.api.field_behavior) = OUTPUT_ONLY];

        // Output only. The SKU applies to a multi-region.
        string multi_region_id = 3 [(google.api.field_behavior) = OUTPUT_ONLY];
      }
    }

    // The type of the SKU.
    oneof sku_type {
      // Output only. The SKU has been disabled and has no price.
      // SKUs, once created and allowed to go into effect, are never deleted.
      // Disabled SKUs may accumulate over the lifetime of a product as the
      // product's pricing evolves, and are retained for historical reference.
      // A SKU in this state generally remains in this state indefinitely, but
      // may be reactivated if needed. Clients must not depend on inactive SKUs
      // remaining inactive.
      InactiveSkuPrice inactive = 2 [(google.api.field_behavior) = OUTPUT_ONLY];

      // Output only. The SKU prices usage reported by the partner for a
      // partner-defined custom billing metric.
      ManagedServiceMetricUsageFee managed_service_metric_usage_fee = 3
          [(google.api.field_behavior) = OUTPUT_ONLY];

      // Output only. The SKU prices usage of a Compute Engine License via a
      // license fee applied to running instances that use the license.
      ComputeEngineLicenseUsageFee gce_license_usage_fee = 4
          [(google.api.field_behavior) = OUTPUT_ONLY];

      // Output only. The SKU prices usage of software deployed on Kubernetes
      // Engine.
      KubernetesEnginePodUsageFee gke_pod_usage_fee = 5
          [(google.api.field_behavior) = OUTPUT_ONLY];

      // Output only. The SKU prices usage of an AI Platform Managed Model
      // (MaaS).
      AiPlatformManagedModelUsageFee ai_platform_managed_model_usage_fee = 6
          [(google.api.field_behavior) = OUTPUT_ONLY];

      // Output only. The SKU prices reservation of AI Platform provisioned
      // throughput.
      AiPlatformProvisionedThroughputFee
          ai_platform_provisioned_throughput_fee = 7
          [(google.api.field_behavior) = OUTPUT_ONLY];

      // Output only. The SKU prices usage of an AI model deployed on AI
      // Platform.
      AiPlatformDeployedModelUsageFee ai_platform_deployed_model_usage_fee = 8
          [(google.api.field_behavior) = OUTPUT_ONLY];

      // Output only. The SKU applies a flat subscription fee.
      FlatSubscriptionFee flat_subscription_fee = 9
          [(google.api.field_behavior) = OUTPUT_ONLY];
    }

    // Output only. The start of the time interval during which this price is
    // effective.
    google.protobuf.Timestamp effective_time = 1
        [(google.api.field_behavior) = OUTPUT_ONLY];
  }

  // Output only. Identifier. Name of the SKU.
  string name = 1 [
    (google.api.field_behavior) = IDENTIFIER,
    (google.api.field_behavior) = OUTPUT_ONLY
  ];

  // Output only. Description of the SKU.
  string description = 2 [(google.api.field_behavior) = OUTPUT_ONLY];

  // Output only. Timeline of the SKU prices, in chronological order by
  // `effective_time`.
  //
  // Each entry is active in the time range starting inclusively from the
  // entry's `effective_time` and ending exclusively at the next entry's
  // `effective_time`, if one exists, or else remaining active indefinitely if
  // it is the final entry. The currently active entry is the entry with the
  // latest `effective_time` that is in the past. Because of scheduled future
  // price changes the currently active entry may not be the last entry in the
  // timeline. A SKU does not necessarily have a currently active entry, as the
  // SKU's first timeline entry may have an `effective_time` in the future.
  repeated SkuPrice sku_price_timeline = 3
      [(google.api.field_behavior) = OUTPUT_ONLY];
}
