public sealed class Distribution.Types.BucketOptions : IMessage<Distribution.Types.BucketOptions>, IEquatable<Distribution.Types.BucketOptions>, IDeepCloneable<Distribution.Types.BucketOptions>, IBufferMessage, IMessage
BucketOptions describes the bucket boundaries used to create a histogram
for the distribution. The buckets can be in a linear sequence, an
exponential sequence, or each bucket can be specified explicitly.
BucketOptions does not include the number of values in each bucket.
A bucket has an inclusive lower bound and exclusive upper bound for the
values that are counted for that bucket. The upper bound of a bucket must
be strictly greater than the lower bound. The sequence of N buckets for a
distribution consists of an underflow bucket (number 0), zero or more
finite buckets (number 1 through N - 2) and an overflow bucket (number N -
1). The buckets are contiguous: the lower bound of bucket i (i > 0) is the
same as the upper bound of bucket i - 1. The buckets span the whole range
of finite values: lower bound of the underflow bucket is -infinity and the
upper bound of the overflow bucket is +infinity. The finite buckets are
so-called because both bounds are finite.
[[["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\u003eBucketOptions\u003c/code\u003e is a class that defines the boundaries for creating a histogram for a distribution, offering linear, exponential, or explicitly defined sequences.\u003c/p\u003e\n"],["\u003cp\u003eThe class implements several interfaces including \u003ccode\u003eIMessage\u003c/code\u003e, \u003ccode\u003eIEquatable\u003c/code\u003e, \u003ccode\u003eIDeepCloneable\u003c/code\u003e, and \u003ccode\u003eIBufferMessage\u003c/code\u003e, supporting operations like deep cloning and message handling.\u003c/p\u003e\n"],["\u003cp\u003e\u003ccode\u003eBucketOptions\u003c/code\u003e includes constructors, fields like \u003ccode\u003eExplicitBucketsFieldNumber\u003c/code\u003e, \u003ccode\u003eExponentialBucketsFieldNumber\u003c/code\u003e, and \u003ccode\u003eLinearBucketsFieldNumber\u003c/code\u003e, and properties for accessing the descriptor and bucket types.\u003c/p\u003e\n"],["\u003cp\u003eThe class features methods such as \u003ccode\u003eClone()\u003c/code\u003e, \u003ccode\u003eEquals()\u003c/code\u003e, \u003ccode\u003eGetHashCode()\u003c/code\u003e, and \u003ccode\u003eMergeFrom()\u003c/code\u003e, which allow for deep cloning, comparison, hashing, and merging of \u003ccode\u003eBucketOptions\u003c/code\u003e instances.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eBucketOptions\u003c/code\u003e class supports three types of buckets: \u003ccode\u003eExplicitBuckets\u003c/code\u003e, \u003ccode\u003eExponentialBuckets\u003c/code\u003e, and \u003ccode\u003eLinearBuckets\u003c/code\u003e, each one providing different ways of defining the bucket ranges.\u003c/p\u003e\n"]]],[],null,["# Class Distribution.Types.BucketOptions (2.17.0)\n\nVersion latestkeyboard_arrow_down\n\n- [2.17.0 (latest)](/dotnet/docs/reference/Google.Api.CommonProtos/latest/Google.Api.Distribution.Types.BucketOptions)\n- [2.15.0](/dotnet/docs/reference/Google.Api.CommonProtos/2.15.0/Google.Api.Distribution.Types.BucketOptions)\n- [2.10.0](/dotnet/docs/reference/Google.Api.CommonProtos/2.10.0/Google.Api.Distribution.Types.BucketOptions)\n- [2.2.0](/dotnet/docs/reference/Google.Api.CommonProtos/2.2.0/Google.Api.Distribution.Types.BucketOptions) \n\n public sealed class Distribution.Types.BucketOptions : IMessage\u003cDistribution.Types.BucketOptions\u003e, IEquatable\u003cDistribution.Types.BucketOptions\u003e, IDeepCloneable\u003cDistribution.Types.BucketOptions\u003e, IBufferMessage, IMessage\n\n`BucketOptions` describes the bucket boundaries used to create a histogram\nfor the distribution. The buckets can be in a linear sequence, an\nexponential sequence, or each bucket can be specified explicitly.\n`BucketOptions` does not include the number of values in each bucket.\n\nA bucket has an inclusive lower bound and exclusive upper bound for the\nvalues that are counted for that bucket. The upper bound of a bucket must\nbe strictly greater than the lower bound. The sequence of N buckets for a\ndistribution consists of an underflow bucket (number 0), zero or more\nfinite buckets (number 1 through N - 2) and an overflow bucket (number N -\n1). The buckets are contiguous: the lower bound of bucket i (i \\\u003e 0) is the\nsame as the upper bound of bucket i - 1. The buckets span the whole range\nof finite values: lower bound of the underflow bucket is -infinity and the\nupper bound of the overflow bucket is +infinity. The finite buckets are\nso-called because both bounds are finite. \n\nInheritance\n-----------\n\n[object](https://learn.microsoft.com/dotnet/api/system.object) \\\u003e Distribution.Types.BucketOptions \n\nImplements\n----------\n\n[IMessage](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IMessage-1.html)[Distribution](/dotnet/docs/reference/Google.Api.CommonProtos/latest/Google.Api.Distribution)[Types](/dotnet/docs/reference/Google.Api.CommonProtos/latest/Google.Api.Distribution.Types)[BucketOptions](/dotnet/docs/reference/Google.Api.CommonProtos/latest/Google.Api.Distribution.Types.BucketOptions), [IEquatable](https://learn.microsoft.com/dotnet/api/system.iequatable-1)[Distribution](/dotnet/docs/reference/Google.Api.CommonProtos/latest/Google.Api.Distribution)[Types](/dotnet/docs/reference/Google.Api.CommonProtos/latest/Google.Api.Distribution.Types)[BucketOptions](/dotnet/docs/reference/Google.Api.CommonProtos/latest/Google.Api.Distribution.Types.BucketOptions), [IDeepCloneable](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IDeepCloneable-1.html)[Distribution](/dotnet/docs/reference/Google.Api.CommonProtos/latest/Google.Api.Distribution)[Types](/dotnet/docs/reference/Google.Api.CommonProtos/latest/Google.Api.Distribution.Types)[BucketOptions](/dotnet/docs/reference/Google.Api.CommonProtos/latest/Google.Api.Distribution.Types.BucketOptions), [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.Api](/dotnet/docs/reference/Google.Api.CommonProtos/latest/Google.Api)\n\nAssembly\n--------\n\nGoogle.Api.CommonProtos.dll\n\nConstructors\n------------\n\n### BucketOptions()\n\n public BucketOptions()\n\n### BucketOptions(BucketOptions)\n\n public BucketOptions(Distribution.Types.BucketOptions other)\n\nFields\n------\n\n### ExplicitBucketsFieldNumber\n\n public const int ExplicitBucketsFieldNumber = 3\n\nField number for the \"explicit_buckets\" field.\n\n### ExponentialBucketsFieldNumber\n\n public const int ExponentialBucketsFieldNumber = 2\n\nField number for the \"exponential_buckets\" field.\n\n### LinearBucketsFieldNumber\n\n public const int LinearBucketsFieldNumber = 1\n\nField number for the \"linear_buckets\" field.\n\nProperties\n----------\n\n### Descriptor\n\n public static MessageDescriptor Descriptor { get; }\n\n### ExplicitBuckets\n\n public Distribution.Types.BucketOptions.Types.Explicit ExplicitBuckets { get; set; }\n\nThe explicit buckets.\n\n### ExponentialBuckets\n\n public Distribution.Types.BucketOptions.Types.Exponential ExponentialBuckets { get; set; }\n\nThe exponential buckets.\n\n### LinearBuckets\n\n public Distribution.Types.BucketOptions.Types.Linear LinearBuckets { get; set; }\n\nThe linear bucket.\n\n### OptionsCase\n\n public Distribution.Types.BucketOptions.OptionsOneofCase OptionsCase { get; }\n\n### Parser\n\n public static MessageParser\u003cDistribution.Types.BucketOptions\u003e Parser { get; }\n\nMethods\n-------\n\n### CalculateSize()\n\n public int CalculateSize()\n\n### ClearOptions()\n\n public void ClearOptions()\n\n### Clone()\n\n public Distribution.Types.BucketOptions Clone()\n\n### Equals(BucketOptions)\n\n public bool Equals(Distribution.Types.BucketOptions 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(BucketOptions)\n\n public void MergeFrom(Distribution.Types.BucketOptions other)\n\n### MergeFrom(CodedInputStream)\n\n public void MergeFrom(CodedInputStream input)\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)"]]