Table of Contents

Enum TrafficType

Namespace
GenerativeAI.Types
Assembly
GenerativeAI.dll

Output only. Traffic type. This shows whether a request consumes Pay-As-You-Go or Provisioned Throughput quota.

[JsonConverter(typeof(LenientTrafficTypeConverter))]
public enum TrafficType
Extension Methods

Fields

TRAFFIC_TYPE_UNSPECIFIED = 0

Unspecified request traffic type.

ON_DEMAND = 1

Type for Pay-As-You-Go traffic.

PROVISIONED_THROUGHPUT = 2

Type for Provisioned Throughput traffic.

ON_DEMAND_PRIORITY = 3

Type for Pay-As-You-Go priority traffic.

ON_DEMAND_FLEX = 4

Type for Pay-As-You-Go flex traffic.

ON_DEMAND_OFFPEAK = 5

On-demand traffic billed at off-peak rates.

Remarks

This enum uses a lenient JSON converter that gracefully handles unknown values by falling back to TRAFFIC_TYPE_UNSPECIFIED instead of throwing an exception. This prevents crashes when Google adds new TrafficType values to their API.