public sealed class OrganizationName : IResourceName, IEquatable<OrganizationName>
Resource name for the 'organization' resource which is widespread across Google Cloud.
While most resource names are generated on a per-API basis, many APIs use an organization resource, and it's
useful to be able to pass values from one API to another.
If true will successfully store an unparseable resource name into the UnparsedResource
property; otherwise will throw an ArgumentException if an unparseable resource name is
specified.
If true will successfully store an unparseable resource name into the UnparsedResource
property; otherwise will throw an ArgumentException if an unparseable resource name is
specified.
[[["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\u003eThis document describes the \u003ccode\u003eOrganizationName\u003c/code\u003e class within the \u003ccode\u003eGoogle.Api.Gax.ResourceNames\u003c/code\u003e namespace, which represents a resource name for organizations in Google Cloud.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eOrganizationName\u003c/code\u003e class implements \u003ccode\u003eIResourceName\u003c/code\u003e and \u003ccode\u003eIEquatable<OrganizationName>\u003c/code\u003e, indicating it's a resource name type with comparison capabilities.\u003c/p\u003e\n"],["\u003cp\u003eYou can construct a \u003ccode\u003eOrganizationName\u003c/code\u003e instance using an organization ID, via the \u003ccode\u003eOrganizationName(string organizationId)\u003c/code\u003e constructor, or parse it from a string representation.\u003c/p\u003e\n"],["\u003cp\u003eThe class offers methods like \u003ccode\u003eFormat\u003c/code\u003e, \u003ccode\u003eFromOrganization\u003c/code\u003e, \u003ccode\u003eParse\u003c/code\u003e, and \u003ccode\u003eTryParse\u003c/code\u003e to manage the string representation and parsing of organization resource names, as well as \u003ccode\u003eEquals\u003c/code\u003e, and \u003ccode\u003eGetHashCode\u003c/code\u003e for comparison.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eOrganizationName\u003c/code\u003e class can handle unparsed resource names via the \u003ccode\u003eUnparsedResource\u003c/code\u003e property.\u003c/p\u003e\n"]]],[],null,["# Class OrganizationName (4.10.0)\n\nVersion latestkeyboard_arrow_down\n\n- [4.10.0 (latest)](/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.ResourceNames.OrganizationName)\n- [4.8.0](/dotnet/docs/reference/Google.Api.Gax/4.8.0/Google.Api.Gax.ResourceNames.OrganizationName)\n- [4.4.0](/dotnet/docs/reference/Google.Api.Gax/4.4.0/Google.Api.Gax.ResourceNames.OrganizationName)\n- [4.3.1](/dotnet/docs/reference/Google.Api.Gax/4.3.1/Google.Api.Gax.ResourceNames.OrganizationName)\n- [4.2.0](/dotnet/docs/reference/Google.Api.Gax/4.2.0/Google.Api.Gax.ResourceNames.OrganizationName)\n- [4.0.0](/dotnet/docs/reference/Google.Api.Gax/4.0.0/Google.Api.Gax.ResourceNames.OrganizationName)\n- [3.2.0](/dotnet/docs/reference/Google.Api.Gax/3.2.0/Google.Api.Gax.ResourceNames.OrganizationName) \n\n public sealed class OrganizationName : IResourceName, IEquatable\u003cOrganizationName\u003e\n\nResource name for the 'organization' resource which is widespread across Google Cloud.\nWhile most resource names are generated on a per-API basis, many APIs use an organization resource, and it's\nuseful to be able to pass values from one API to another. \n\nInheritance\n-----------\n\n[object](https://learn.microsoft.com/dotnet/api/system.object) \\\u003e OrganizationName \n\nImplements\n----------\n\n[IResourceName](/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.IResourceName), [IEquatable](https://learn.microsoft.com/dotnet/api/system.iequatable-1)[OrganizationName](/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.ResourceNames.OrganizationName) \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.ResourceNames](/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.ResourceNames)\n\nAssembly\n--------\n\nGoogle.Api.Gax.dll\n\nConstructors\n------------\n\n### OrganizationName(string)\n\n public OrganizationName(string organizationId)\n\nConstructs a new instance of a [OrganizationName](/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.ResourceNames.OrganizationName) class from the component parts of pattern\n`organizations/{organization}`\n\nProperties\n----------\n\n### IsKnownPattern\n\n public bool IsKnownPattern { get; }\n\nWhether this instance contains a resource name with a known pattern.\n\n### OrganizationId\n\n public string OrganizationId { get; }\n\nThe `Organization` ID. Will not be `null`, unless this instance contains an unparsed resource\nname.\n\n### Type\n\n public OrganizationName.ResourceNameType Type { get; }\n\nThe [OrganizationName.ResourceNameType](/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.ResourceNames.OrganizationName.ResourceNameType) of the contained resource name.\n\n### UnparsedResource\n\n public UnparsedResourceName UnparsedResource { get; }\n\nThe contained [UnparsedResourceName](/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.UnparsedResourceName). Only non-`null`if this instance contains an\nunparsed resource name.\n\nMethods\n-------\n\n### Equals(OrganizationName)\n\n public bool Equals(OrganizationName other)\n\n### Equals(object)\n\n public override bool Equals(object obj)\n\n**Overrides** \n[object.Equals(object)](https://learn.microsoft.com/dotnet/api/system.object.equals#system-object-equals(system-object))\n\n### Format(string)\n\n public static string Format(string organizationId)\n\nFormats the IDs into the string representation of this [OrganizationName](/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.ResourceNames.OrganizationName) with pattern\n`organizations/{organization}`.\n\n### FormatOrganization(string)\n\n public static string FormatOrganization(string organizationId)\n\nFormats the IDs into the string representation of this [OrganizationName](/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.ResourceNames.OrganizationName) with pattern\n`organizations/{organization}`.\n\n### FromOrganization(string)\n\n public static OrganizationName FromOrganization(string organizationId)\n\nCreates a [OrganizationName](/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.ResourceNames.OrganizationName) with the pattern `organizations/{organization}`.\n\n### FromUnparsed(UnparsedResourceName)\n\n public static OrganizationName FromUnparsed(UnparsedResourceName unparsedResourceName)\n\nCreates a [OrganizationName](/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.ResourceNames.OrganizationName) containing an unparsed resource name.\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### Parse(string)\n\n public static OrganizationName Parse(string organizationName)\n\nParses the given resource name string into a new [OrganizationName](/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.ResourceNames.OrganizationName) instance.\n\n**Remarks** \nTo parse successfully, the resource name must be formatted as one of the following:\n\n- `organizations/{organization}`\n\n\u003cbr /\u003e\n\n### Parse(string, bool)\n\n public static OrganizationName Parse(string organizationName, bool allowUnparsed)\n\nParses the given resource name string into a new [OrganizationName](/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.ResourceNames.OrganizationName) instance; optionally\nallowing an unparseable resource name.\n\n**Remarks** \nTo parse successfully, the resource name must be formatted as one of the following:\n\n- `organizations/{organization}`\n\nOr may be in any format if `allowUnparsed` is `true`.\n\n\u003cbr /\u003e\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### TryParse(string, out OrganizationName)\n\n public static bool TryParse(string organizationName, out OrganizationName result)\n\nTries to parse the given resource name string into a new [OrganizationName](/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.ResourceNames.OrganizationName) instance.\n\n**Remarks** \nTo parse successfully, the resource name must be formatted as one of the following:\n\n- `organizations/{organization}`\n\n\u003cbr /\u003e\n\n### TryParse(string, bool, out OrganizationName)\n\n public static bool TryParse(string organizationName, bool allowUnparsed, out OrganizationName result)\n\nTries to parse the given resource name string into a new [OrganizationName](/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.ResourceNames.OrganizationName) instance; optionally\nallowing an unparseable resource name.\n\n**Remarks** \nTo parse successfully, the resource name must be formatted as one of the following:\n\n- `organizations/{organization}`\n\nOr may be in any format if `allowUnparsed` is `true`.\n\n\u003cbr /\u003e\n\nOperators\n---------\n\n### operator ==(OrganizationName, OrganizationName)\n\n public static bool operator ==(OrganizationName a, OrganizationName b)\n\n### operator !=(OrganizationName, OrganizationName)\n\n public static bool operator !=(OrganizationName a, OrganizationName b)"]]