The service controller environment to use. If empty, no control plane
feature (like quota and billing) will be enabled. The recommended value for
most services is servicecontrol.googleapis.com
[[["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\u003eThe \u003ccode\u003eControl\u003c/code\u003e class is used to select and configure the service controller for a given service, primarily for features like quota and billing.\u003c/p\u003e\n"],["\u003cp\u003eThe latest version of \u003ccode\u003eControl\u003c/code\u003e is 2.15.0, with older versions 2.10.0 and 2.2.0 also available.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eEnvironment\u003c/code\u003e property specifies the service controller environment, and setting it to \u003ccode\u003eservicecontrol.googleapis.com\u003c/code\u003e is recommended for enabling control plane features.\u003c/p\u003e\n"],["\u003cp\u003e\u003ccode\u003eMethodPolicies\u003c/code\u003e property allows for the definition of policies that are applied to API methods within the service.\u003c/p\u003e\n"],["\u003cp\u003eThe class implements multiple interfaces, including \u003ccode\u003eIMessage\u003c/code\u003e, \u003ccode\u003eIEquatable\u003c/code\u003e, \u003ccode\u003eIDeepCloneable\u003c/code\u003e, and \u003ccode\u003eIBufferMessage\u003c/code\u003e, and can be deeply cloned, merged and compared for equality.\u003c/p\u003e\n"]]],[],null,["# Class Control (2.17.0)\n\nVersion latestkeyboard_arrow_down\n\n- [2.17.0 (latest)](/dotnet/docs/reference/Google.Api.CommonProtos/latest/Google.Api.Control)\n- [2.15.0](/dotnet/docs/reference/Google.Api.CommonProtos/2.15.0/Google.Api.Control)\n- [2.10.0](/dotnet/docs/reference/Google.Api.CommonProtos/2.10.0/Google.Api.Control)\n- [2.2.0](/dotnet/docs/reference/Google.Api.CommonProtos/2.2.0/Google.Api.Control) \n\n public sealed class Control : IMessage\u003cControl\u003e, IEquatable\u003cControl\u003e, IDeepCloneable\u003cControl\u003e, IBufferMessage, IMessage\n\nSelects and configures the service controller used by the service.\n\nExample: \n\n control:\n environment: servicecontrol.googleapis.com\n\nInheritance\n-----------\n\n[object](https://learn.microsoft.com/dotnet/api/system.object) \\\u003e Control \n\nImplements\n----------\n\n[IMessage](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IMessage-1.html)[Control](/dotnet/docs/reference/Google.Api.CommonProtos/latest/Google.Api.Control), [IEquatable](https://learn.microsoft.com/dotnet/api/system.iequatable-1)[Control](/dotnet/docs/reference/Google.Api.CommonProtos/latest/Google.Api.Control), [IDeepCloneable](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IDeepCloneable-1.html)[Control](/dotnet/docs/reference/Google.Api.CommonProtos/latest/Google.Api.Control), [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### Control()\n\n public Control()\n\n### Control(Control)\n\n public Control(Control other)\n\nFields\n------\n\n### EnvironmentFieldNumber\n\n public const int EnvironmentFieldNumber = 1\n\nField number for the \"environment\" field.\n\n### MethodPoliciesFieldNumber\n\n public const int MethodPoliciesFieldNumber = 4\n\nField number for the \"method_policies\" field.\n\nProperties\n----------\n\n### Descriptor\n\n public static MessageDescriptor Descriptor { get; }\n\n### Environment\n\n public string Environment { get; set; }\n\nThe service controller environment to use. If empty, no control plane\nfeature (like quota and billing) will be enabled. The recommended value for\nmost services is servicecontrol.googleapis.com\n\n### MethodPolicies\n\n public RepeatedField\u003cMethodPolicy\u003e MethodPolicies { get; }\n\nDefines policies applying to the API methods of the service.\n\n### Parser\n\n public static MessageParser\u003cControl\u003e Parser { get; }\n\nMethods\n-------\n\n### CalculateSize()\n\n public int CalculateSize()\n\n### Clone()\n\n public Control Clone()\n\n### Equals(Control)\n\n public bool Equals(Control 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(Control)\n\n public void MergeFrom(Control 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)"]]