[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-08-07 UTC."],[[["\u003cp\u003eThe \u003ccode\u003eAffinityConfig\u003c/code\u003e class, found within the \u003ccode\u003eGoogle.Api.Gax.Grpc.Gcp\u003c/code\u003e namespace, is the latest version 4.10.0.\u003c/p\u003e\n"],["\u003cp\u003eThis class is part of the \u003ccode\u003eGoogle.Api.Gax.Grpc.dll\u003c/code\u003e assembly and 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.\u003c/p\u003e\n"],["\u003cp\u003e\u003ccode\u003eAffinityConfig\u003c/code\u003e contains properties \u003ccode\u003eAffinityKey\u003c/code\u003e and \u003ccode\u003eCommand\u003c/code\u003e, which define the field path for affinity and the affinity command, respectively.\u003c/p\u003e\n"],["\u003cp\u003eThe class provides methods for calculating size (\u003ccode\u003eCalculateSize\u003c/code\u003e), cloning (\u003ccode\u003eClone\u003c/code\u003e), merging data (\u003ccode\u003eMergeFrom\u003c/code\u003e), and handling equality checks (\u003ccode\u003eEquals\u003c/code\u003e), along with \u003ccode\u003eToString()\u003c/code\u003e and \u003ccode\u003eGetHashCode()\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003eThe class also contains static members like \u003ccode\u003eDescriptor\u003c/code\u003e and \u003ccode\u003eParser\u003c/code\u003e, providing metadata and parsing functionality.\u003c/p\u003e\n"]]],[],null,["# Class AffinityConfig (4.10.0)\n\nVersion latestkeyboard_arrow_down\n\n- [4.10.0 (latest)](/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.Gcp.AffinityConfig)\n- [4.8.0](/dotnet/docs/reference/Google.Api.Gax/4.8.0/Google.Api.Gax.Grpc.Gcp.AffinityConfig)\n- [4.4.0](/dotnet/docs/reference/Google.Api.Gax/4.4.0/Google.Api.Gax.Grpc.Gcp.AffinityConfig)\n- [4.3.1](/dotnet/docs/reference/Google.Api.Gax/4.3.1/Google.Api.Gax.Grpc.Gcp.AffinityConfig)\n- [4.2.0](/dotnet/docs/reference/Google.Api.Gax/4.2.0/Google.Api.Gax.Grpc.Gcp.AffinityConfig)\n- [4.0.0](/dotnet/docs/reference/Google.Api.Gax/4.0.0/Google.Api.Gax.Grpc.Gcp.AffinityConfig)\n- [3.2.0](/dotnet/docs/reference/Google.Api.Gax/3.2.0/Google.Api.Gax.Grpc.Gcp.AffinityConfig) \n\n public sealed class AffinityConfig : IMessage\u003cAffinityConfig\u003e, IEquatable\u003cAffinityConfig\u003e, IDeepCloneable\u003cAffinityConfig\u003e, IBufferMessage, IMessage\n\nInheritance\n-----------\n\n[object](https://learn.microsoft.com/dotnet/api/system.object) \\\u003e AffinityConfig \n\nImplements\n----------\n\n[IMessage](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IMessage-1.html)[AffinityConfig](/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.Gcp.AffinityConfig), [IEquatable](https://learn.microsoft.com/dotnet/api/system.iequatable-1)[AffinityConfig](/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.Gcp.AffinityConfig), [IDeepCloneable](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IDeepCloneable-1.html)[AffinityConfig](/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.Gcp.AffinityConfig), [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.Gax.Grpc.Gcp](/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.Gcp)\n\nAssembly\n--------\n\nGoogle.Api.Gax.Grpc.dll\n\nConstructors\n------------\n\n### AffinityConfig()\n\n public AffinityConfig()\n\n### AffinityConfig(AffinityConfig)\n\n public AffinityConfig(AffinityConfig other)\n\nFields\n------\n\n### AffinityKeyFieldNumber\n\n public const int AffinityKeyFieldNumber = 3\n\nField number for the \"affinity_key\" field.\n\n### CommandFieldNumber\n\n public const int CommandFieldNumber = 2\n\nField number for the \"command\" field.\n\nProperties\n----------\n\n### AffinityKey\n\n public string AffinityKey { get; set; }\n\nThe field path of the affinity key in the request/response message.\nFor example: \"f.a\", \"f.b.d\", etc.\n\n### Command\n\n public AffinityConfig.Types.Command Command { get; set; }\n\nThe affinity command applies on the selected gRPC methods.\n\n### Descriptor\n\n public static MessageDescriptor Descriptor { get; }\n\n### Parser\n\n public static MessageParser\u003cAffinityConfig\u003e Parser { get; }\n\nMethods\n-------\n\n### CalculateSize()\n\n public int CalculateSize()\n\nCalculates the size of this message in Protocol Buffer wire format, in bytes.\n\n### Clone()\n\n public AffinityConfig Clone()\n\nCreates a deep clone of this object.\n\n### Equals(AffinityConfig)\n\n public bool Equals(AffinityConfig 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(AffinityConfig)\n\n public void MergeFrom(AffinityConfig other)\n\nMerges the given message into this one.\n\n**Remarks** \nSee the user guide for precise merge semantics.\n\n### MergeFrom(CodedInputStream)\n\n public void MergeFrom(CodedInputStream input)\n\nMerges the data from the specified coded input stream with the current message.\n\n**Remarks** \nSee the user guide for precise merge semantics.\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)\n\nWrites the data to the given coded output stream."]]