public sealed class QuotaFailure.Types.Violation : IMessage<QuotaFailure.Types.Violation>, IEquatable<QuotaFailure.Types.Violation>, IDeepCloneable<QuotaFailure.Types.Violation>, IBufferMessage, IMessage
A message type used to describe a single quota violation. For example, a
daily quota or a custom quota that was exceeded.
The API Service from which the QuotaFailure.Violation orginates. In
some cases, Quota issues originate from an API Service other than the one
that was called. In other words, a dependency of the called API Service
could be the cause of the QuotaFailure, and this field would have the
dependency API service name.
For example, if the called API is Kubernetes Engine API
(container.googleapis.com), and a quota violation occurs in the
Kubernetes Engine API itself, this field would be
"container.googleapis.com". On the other hand, if the quota violation
occurs when the Kubernetes Engine API creates VMs in the Compute Engine
API (compute.googleapis.com), this field would be
"compute.googleapis.com".
A description of how the quota check failed. Clients can use this
description to find more about the quota configuration in the service's
public documentation, or find the relevant quota limit to adjust through
developer console.
For example: "Service disabled" or "Daily Limit for read operations
exceeded".
The new quota value being rolled out at the time of the violation. At the
completion of the rollout, this value will be enforced in place of
quota_value. If no rollout is in progress at the time of the violation,
this field is not set.
For example, if at the time of the violation a rollout is in progress
changing the number of CPUs quota from 10 to 20, 20 would be the value of
this field.
public MapField<string, string> QuotaDimensions { get; }
The dimensions of the violated quota. Every non-global quota is enforced
on a set of dimensions. While quota metric defines what to count, the
dimensions specify for what aspects the counter should be increased.
For example, the quota "CPUs per region per VM family" enforces a limit
on the metric "compute.googleapis.com/cpus_per_vm_family" on dimensions
"region" and "vm_family". And if the violation occurred in region
"us-central1" and for VM family "n1", the quota_dimensions would be,
{
"region": "us-central1",
"vm_family": "n1",
}
When a quota is enforced globally, the quota_dimensions would always be
empty.
The metric of the violated quota. A quota metric is a named counter to
measure usage, such as API requests or CPUs. When an activity occurs in a
service, such as Virtual Machine allocation, one or more quota metrics
may be affected.
For example, "compute.googleapis.com/cpus_per_vm_family",
"storage.googleapis.com/internet_egress_bandwidth".
The enforced quota value at the time of the QuotaFailure.
For example, if the enforced quota value at the time of the
QuotaFailure on the number of CPUs is "10", then the value of this
field would reflect this quantity.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-08-28 UTC."],[[["\u003cp\u003e\u003ccode\u003eQuotaFailure.Types.Violation\u003c/code\u003e is a message type within the \u003ccode\u003eGoogle.Rpc\u003c/code\u003e namespace that details a single quota violation, like exceeding a daily limit.\u003c/p\u003e\n"],["\u003cp\u003eThis class implements interfaces such as \u003ccode\u003eIMessage\u003c/code\u003e, \u003ccode\u003eIEquatable\u003c/code\u003e, \u003ccode\u003eIDeepCloneable\u003c/code\u003e, and \u003ccode\u003eIBufferMessage\u003c/code\u003e, providing functionalities for message manipulation and equality checks.\u003c/p\u003e\n"],["\u003cp\u003eThe class provides properties \u003ccode\u003eDescription\u003c/code\u003e and \u003ccode\u003eSubject\u003c/code\u003e to explain the nature and target of the quota failure, and it has constant fields \u003ccode\u003eDescriptionFieldNumber\u003c/code\u003e and \u003ccode\u003eSubjectFieldNumber\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003eIt has methods like \u003ccode\u003eCalculateSize()\u003c/code\u003e, \u003ccode\u003eClone()\u003c/code\u003e, \u003ccode\u003eEquals()\u003c/code\u003e, \u003ccode\u003eGetHashCode()\u003c/code\u003e, \u003ccode\u003eMergeFrom()\u003c/code\u003e, \u003ccode\u003eToString()\u003c/code\u003e and \u003ccode\u003eWriteTo()\u003c/code\u003e, that manages its internal data and operations.\u003c/p\u003e\n"],["\u003cp\u003eThe class can be constructed using the default constructor, \u003ccode\u003eViolation()\u003c/code\u003e, or by providing another \u003ccode\u003eQuotaFailure.Types.Violation\u003c/code\u003e object to copy from.\u003c/p\u003e\n"]]],[],null,["# Class QuotaFailure.Types.Violation (2.17.0)\n\nVersion latestkeyboard_arrow_down\n\n- [2.17.0 (latest)](/dotnet/docs/reference/Google.Api.CommonProtos/latest/Google.Rpc.QuotaFailure.Types.Violation)\n- [2.15.0](/dotnet/docs/reference/Google.Api.CommonProtos/2.15.0/Google.Rpc.QuotaFailure.Types.Violation)\n- [2.10.0](/dotnet/docs/reference/Google.Api.CommonProtos/2.10.0/Google.Rpc.QuotaFailure.Types.Violation)\n- [2.2.0](/dotnet/docs/reference/Google.Api.CommonProtos/2.2.0/Google.Rpc.QuotaFailure.Types.Violation) \n\n public sealed class QuotaFailure.Types.Violation : IMessage\u003cQuotaFailure.Types.Violation\u003e, IEquatable\u003cQuotaFailure.Types.Violation\u003e, IDeepCloneable\u003cQuotaFailure.Types.Violation\u003e, IBufferMessage, IMessage\n\nA message type used to describe a single quota violation. For example, a\ndaily quota or a custom quota that was exceeded. \n\nInheritance\n-----------\n\n[object](https://learn.microsoft.com/dotnet/api/system.object) \\\u003e QuotaFailure.Types.Violation \n\nImplements\n----------\n\n[IMessage](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IMessage-1.html)[QuotaFailure](/dotnet/docs/reference/Google.Api.CommonProtos/latest/Google.Rpc.QuotaFailure)[Types](/dotnet/docs/reference/Google.Api.CommonProtos/latest/Google.Rpc.QuotaFailure.Types)[Violation](/dotnet/docs/reference/Google.Api.CommonProtos/latest/Google.Rpc.QuotaFailure.Types.Violation), [IEquatable](https://learn.microsoft.com/dotnet/api/system.iequatable-1)[QuotaFailure](/dotnet/docs/reference/Google.Api.CommonProtos/latest/Google.Rpc.QuotaFailure)[Types](/dotnet/docs/reference/Google.Api.CommonProtos/latest/Google.Rpc.QuotaFailure.Types)[Violation](/dotnet/docs/reference/Google.Api.CommonProtos/latest/Google.Rpc.QuotaFailure.Types.Violation), [IDeepCloneable](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IDeepCloneable-1.html)[QuotaFailure](/dotnet/docs/reference/Google.Api.CommonProtos/latest/Google.Rpc.QuotaFailure)[Types](/dotnet/docs/reference/Google.Api.CommonProtos/latest/Google.Rpc.QuotaFailure.Types)[Violation](/dotnet/docs/reference/Google.Api.CommonProtos/latest/Google.Rpc.QuotaFailure.Types.Violation), [IBufferMessage](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IBufferMessage.html), [IMessage](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IMessage.html) \n\nInherited Members\n-----------------\n\n[object.Equals(object, object)](https://learn.microsoft.com/dotnet/api/system.object.equals#system-object-equals(system-object-system-object)) \n[object.GetType()](https://learn.microsoft.com/dotnet/api/system.object.gettype) \n[object.ReferenceEquals(object, object)](https://learn.microsoft.com/dotnet/api/system.object.referenceequals)\n\nNamespace\n---------\n\n[Google.Rpc](/dotnet/docs/reference/Google.Api.CommonProtos/latest/Google.Rpc)\n\nAssembly\n--------\n\nGoogle.Api.CommonProtos.dll\n\nConstructors\n------------\n\n### Violation()\n\n public Violation()\n\n### Violation(Violation)\n\n public Violation(QuotaFailure.Types.Violation other)\n\nFields\n------\n\n### ApiServiceFieldNumber\n\n public const int ApiServiceFieldNumber = 3\n\nField number for the \"api_service\" field.\n\n### DescriptionFieldNumber\n\n public const int DescriptionFieldNumber = 2\n\nField number for the \"description\" field.\n\n### FutureQuotaValueFieldNumber\n\n public const int FutureQuotaValueFieldNumber = 8\n\nField number for the \"future_quota_value\" field.\n\n### QuotaDimensionsFieldNumber\n\n public const int QuotaDimensionsFieldNumber = 6\n\nField number for the \"quota_dimensions\" field.\n\n### QuotaIdFieldNumber\n\n public const int QuotaIdFieldNumber = 5\n\nField number for the \"quota_id\" field.\n\n### QuotaMetricFieldNumber\n\n public const int QuotaMetricFieldNumber = 4\n\nField number for the \"quota_metric\" field.\n\n### QuotaValueFieldNumber\n\n public const int QuotaValueFieldNumber = 7\n\nField number for the \"quota_value\" field.\n\n### SubjectFieldNumber\n\n public const int SubjectFieldNumber = 1\n\nField number for the \"subject\" field.\n\nProperties\n----------\n\n### ApiService\n\n public string ApiService { get; set; }\n\nThe API Service from which the `QuotaFailure.Violation` orginates. In\nsome cases, Quota issues originate from an API Service other than the one\nthat was called. In other words, a dependency of the called API Service\ncould be the cause of the `QuotaFailure`, and this field would have the\ndependency API service name.\n\nFor example, if the called API is Kubernetes Engine API\n(container.googleapis.com), and a quota violation occurs in the\nKubernetes Engine API itself, this field would be\n\"container.googleapis.com\". On the other hand, if the quota violation\noccurs when the Kubernetes Engine API creates VMs in the Compute Engine\nAPI (compute.googleapis.com), this field would be\n\"compute.googleapis.com\".\n\n### Description\n\n public string Description { get; set; }\n\nA description of how the quota check failed. Clients can use this\ndescription to find more about the quota configuration in the service's\npublic documentation, or find the relevant quota limit to adjust through\ndeveloper console.\n\nFor example: \"Service disabled\" or \"Daily Limit for read operations\nexceeded\".\n\n### Descriptor\n\n public static MessageDescriptor Descriptor { get; }\n\n### FutureQuotaValue\n\n public long FutureQuotaValue { get; set; }\n\nThe new quota value being rolled out at the time of the violation. At the\ncompletion of the rollout, this value will be enforced in place of\nquota_value. If no rollout is in progress at the time of the violation,\nthis field is not set.\n\nFor example, if at the time of the violation a rollout is in progress\nchanging the number of CPUs quota from 10 to 20, 20 would be the value of\nthis field.\n\n### HasFutureQuotaValue\n\n public bool HasFutureQuotaValue { get; }\n\nGets whether the \"future_quota_value\" field is set\n\n### Parser\n\n public static MessageParser\u003cQuotaFailure.Types.Violation\u003e Parser { get; }\n\n### QuotaDimensions\n\n public MapField\u003cstring, string\u003e QuotaDimensions { get; }\n\nThe dimensions of the violated quota. Every non-global quota is enforced\non a set of dimensions. While quota metric defines what to count, the\ndimensions specify for what aspects the counter should be increased.\n\nFor example, the quota \"CPUs per region per VM family\" enforces a limit\non the metric \"compute.googleapis.com/cpus_per_vm_family\" on dimensions\n\"region\" and \"vm_family\". And if the violation occurred in region\n\"us-central1\" and for VM family \"n1\", the quota_dimensions would be,\n\n{\n\"region\": \"us-central1\",\n\"vm_family\": \"n1\",\n}\n\nWhen a quota is enforced globally, the quota_dimensions would always be\nempty.\n\n### QuotaId\n\n public string QuotaId { get; set; }\n\nThe id of the violated quota. Also know as \"limit name\", this is the\nunique identifier of a quota in the context of an API service.\n\nFor example, \"CPUS-PER-VM-FAMILY-per-project-region\".\n\n### QuotaMetric\n\n public string QuotaMetric { get; set; }\n\nThe metric of the violated quota. A quota metric is a named counter to\nmeasure usage, such as API requests or CPUs. When an activity occurs in a\nservice, such as Virtual Machine allocation, one or more quota metrics\nmay be affected.\n\nFor example, \"compute.googleapis.com/cpus_per_vm_family\",\n\"storage.googleapis.com/internet_egress_bandwidth\".\n\n### QuotaValue\n\n public long QuotaValue { get; set; }\n\nThe enforced quota value at the time of the `QuotaFailure`.\n\nFor example, if the enforced quota value at the time of the\n`QuotaFailure` on the number of CPUs is \"10\", then the value of this\nfield would reflect this quantity.\n\n### Subject\n\n public string Subject { get; set; }\n\nThe subject on which the quota check failed.\nFor example, \"clientip:\\\u003cip address of client\\\u003e\" or \"project:\\\u003cGoogle\ndeveloper project id\\\u003e\".\n\nMethods\n-------\n\n### CalculateSize()\n\n public int CalculateSize()\n\n### ClearFutureQuotaValue()\n\n public void ClearFutureQuotaValue()\n\nClears the value of the \"future_quota_value\" field\n\n### Clone()\n\n public QuotaFailure.Types.Violation Clone()\n\n### Equals(Violation)\n\n public bool Equals(QuotaFailure.Types.Violation other)\n\n### Equals(object)\n\n public override bool Equals(object other)\n\n**Overrides** \n[object.Equals(object)](https://learn.microsoft.com/dotnet/api/system.object.equals#system-object-equals(system-object))\n\n### GetHashCode()\n\n public override int GetHashCode()\n\n**Overrides** \n[object.GetHashCode()](https://learn.microsoft.com/dotnet/api/system.object.gethashcode)\n\n### MergeFrom(CodedInputStream)\n\n public void MergeFrom(CodedInputStream input)\n\n### MergeFrom(Violation)\n\n public void MergeFrom(QuotaFailure.Types.Violation other)\n\n### ToString()\n\n public override string ToString()\n\n**Overrides** \n[object.ToString()](https://learn.microsoft.com/dotnet/api/system.object.tostring)\n\n### WriteTo(CodedOutputStream)\n\n public void WriteTo(CodedOutputStream output)"]]