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-09-09 UTC."],[[["\u003cp\u003eThe latest version of the \u003ccode\u003eOrganizationLocationName\u003c/code\u003e class in the Google Cloud Logging v2 API is 4.4.0, and it is used for managing resource names for \u003ccode\u003eOrganizationLocation\u003c/code\u003e resources.\u003c/p\u003e\n"],["\u003cp\u003e\u003ccode\u003eOrganizationLocationName\u003c/code\u003e implements \u003ccode\u003eIResourceName\u003c/code\u003e and \u003ccode\u003eIEquatable\u003c/code\u003e, providing functionalities for resource name representation, equality checks, and is derived from the object class.\u003c/p\u003e\n"],["\u003cp\u003eThis class is constructed using an organization ID and a location ID, and provides methods to format, parse, and validate resource names based on the pattern \u003ccode\u003eorganizations/{organization}/locations/{location}\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003eKey properties of \u003ccode\u003eOrganizationLocationName\u003c/code\u003e include \u003ccode\u003eIsKnownPattern\u003c/code\u003e, \u003ccode\u003eLocationId\u003c/code\u003e, \u003ccode\u003eOrganizationId\u003c/code\u003e, \u003ccode\u003eType\u003c/code\u003e, and \u003ccode\u003eUnparsedResource\u003c/code\u003e, giving information about the resource name.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eOrganizationLocationName\u003c/code\u003e class offers methods for parsing and formatting resource names, handling unparsed resource names, and determining if resource names are equal or different.\u003c/p\u003e\n"]]],[],null,["# Google Cloud Logging v2 API - Class OrganizationLocationName (4.4.0)\n\nVersion latestkeyboard_arrow_down\n\n- [4.4.0 (latest)](/dotnet/docs/reference/Google.Cloud.Logging.V2/latest/Google.Cloud.Logging.V2.OrganizationLocationName)\n- [4.3.0](/dotnet/docs/reference/Google.Cloud.Logging.V2/4.3.0/Google.Cloud.Logging.V2.OrganizationLocationName)\n- [4.2.0](/dotnet/docs/reference/Google.Cloud.Logging.V2/4.2.0/Google.Cloud.Logging.V2.OrganizationLocationName)\n- [4.1.0](/dotnet/docs/reference/Google.Cloud.Logging.V2/4.1.0/Google.Cloud.Logging.V2.OrganizationLocationName)\n- [4.0.0](/dotnet/docs/reference/Google.Cloud.Logging.V2/4.0.0/Google.Cloud.Logging.V2.OrganizationLocationName)\n- [3.6.0](/dotnet/docs/reference/Google.Cloud.Logging.V2/3.6.0/Google.Cloud.Logging.V2.OrganizationLocationName)\n- [3.5.0](/dotnet/docs/reference/Google.Cloud.Logging.V2/3.5.0/Google.Cloud.Logging.V2.OrganizationLocationName)\n- [3.4.0](/dotnet/docs/reference/Google.Cloud.Logging.V2/3.4.0/Google.Cloud.Logging.V2.OrganizationLocationName)\n- [3.3.0](/dotnet/docs/reference/Google.Cloud.Logging.V2/3.3.0/Google.Cloud.Logging.V2.OrganizationLocationName) \n\n public sealed class OrganizationLocationName : IResourceName, IEquatable\u003cOrganizationLocationName\u003e\n\nReference documentation and code samples for the Google Cloud Logging v2 API class OrganizationLocationName.\n\nResource name for the `OrganizationLocation` resource. \n\nInheritance\n-----------\n\n[object](https://learn.microsoft.com/dotnet/api/system.object) \\\u003e OrganizationLocationName \n\nImplements\n----------\n\n[IResourceName](https://github.com/googleapis/gax-dotnet/blob/83f42b5edc4529818dbdb34d9ea9ecc3c04f7b6e/Google.Api.Gax/IResourceName.cs), [IEquatable](https://learn.microsoft.com/dotnet/api/system.iequatable-1)[OrganizationLocationName](/dotnet/docs/reference/Google.Cloud.Logging.V2/latest/Google.Cloud.Logging.V2.OrganizationLocationName) \n\nInherited Members\n-----------------\n\n[object.GetType()](https://learn.microsoft.com/dotnet/api/system.object.gettype)\n\nNamespace\n---------\n\n[Google.Cloud.Logging.V2](/dotnet/docs/reference/Google.Cloud.Logging.V2/latest/Google.Cloud.Logging.V2)\n\nAssembly\n--------\n\nGoogle.Cloud.Logging.V2.dll\n\nConstructors\n------------\n\n### OrganizationLocationName(string, string)\n\n public OrganizationLocationName(string organizationId, string locationId)\n\nConstructs a new instance of a [OrganizationLocationName](/dotnet/docs/reference/Google.Cloud.Logging.V2/latest/Google.Cloud.Logging.V2.OrganizationLocationName) class from the component parts of\npattern `organizations/{organization}/locations/{location}`\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### LocationId\n\n public string LocationId { get; }\n\nThe `Location` ID. Will not be `null`, unless this instance contains an unparsed resource name.\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 OrganizationLocationName.ResourceNameType Type { get; }\n\nThe [OrganizationLocationName.ResourceNameType](/dotnet/docs/reference/Google.Cloud.Logging.V2/latest/Google.Cloud.Logging.V2.OrganizationLocationName.ResourceNameType) of the contained resource name.\n\n### UnparsedResource\n\n public UnparsedResourceName UnparsedResource { get; }\n\nThe contained [UnparsedResourceName](https://github.com/googleapis/gax-dotnet/blob/83f42b5edc4529818dbdb34d9ea9ecc3c04f7b6e/Google.Api.Gax/UnparsedResourceName.cs). Only non-`null` if this instance contains an\nunparsed resource name.\n\nMethods\n-------\n\n### Format(string, string)\n\n public static string Format(string organizationId, string locationId)\n\nFormats the IDs into the string representation of this [OrganizationLocationName](/dotnet/docs/reference/Google.Cloud.Logging.V2/latest/Google.Cloud.Logging.V2.OrganizationLocationName) with pattern\n`organizations/{organization}/locations/{location}`.\n\n### FormatOrganizationLocation(string, string)\n\n public static string FormatOrganizationLocation(string organizationId, string locationId)\n\nFormats the IDs into the string representation of this [OrganizationLocationName](/dotnet/docs/reference/Google.Cloud.Logging.V2/latest/Google.Cloud.Logging.V2.OrganizationLocationName) with pattern\n`organizations/{organization}/locations/{location}`.\n\n### FromOrganizationLocation(string, string)\n\n public static OrganizationLocationName FromOrganizationLocation(string organizationId, string locationId)\n\nCreates a [OrganizationLocationName](/dotnet/docs/reference/Google.Cloud.Logging.V2/latest/Google.Cloud.Logging.V2.OrganizationLocationName) with the pattern\n`organizations/{organization}/locations/{location}`.\n\n### FromUnparsed(UnparsedResourceName)\n\n public static OrganizationLocationName FromUnparsed(UnparsedResourceName unparsedResourceName)\n\nCreates a [OrganizationLocationName](/dotnet/docs/reference/Google.Cloud.Logging.V2/latest/Google.Cloud.Logging.V2.OrganizationLocationName) containing an unparsed resource name.\n\n### GetHashCode()\n\n public override int GetHashCode()\n\nReturns a hash code for this resource name.\n\n**Overrides** \n[object.GetHashCode()](https://learn.microsoft.com/dotnet/api/system.object.gethashcode)\n\n### Parse(string)\n\n public static OrganizationLocationName Parse(string organizationLocationName)\n\nParses the given resource name string into a new [OrganizationLocationName](/dotnet/docs/reference/Google.Cloud.Logging.V2/latest/Google.Cloud.Logging.V2.OrganizationLocationName) instance.\n\n**Remarks** \nTo parse successfully, the resource name must be formatted as one of the following:\n\n- `organizations/{organization}/locations/{location}`\n\n\u003cbr /\u003e\n\n### Parse(string, bool)\n\n public static OrganizationLocationName Parse(string organizationLocationName, bool allowUnparsed)\n\nParses the given resource name string into a new [OrganizationLocationName](/dotnet/docs/reference/Google.Cloud.Logging.V2/latest/Google.Cloud.Logging.V2.OrganizationLocationName) 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}/locations/{location}`\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\nThe string representation of the resource name.\n\n**Overrides** \n[object.ToString()](https://learn.microsoft.com/dotnet/api/system.object.tostring)\n\n### TryParse(string, out OrganizationLocationName)\n\n public static bool TryParse(string organizationLocationName, out OrganizationLocationName result)\n\nTries to parse the given resource name string into a new [OrganizationLocationName](/dotnet/docs/reference/Google.Cloud.Logging.V2/latest/Google.Cloud.Logging.V2.OrganizationLocationName) instance.\n\n**Remarks** \nTo parse successfully, the resource name must be formatted as one of the following:\n\n- `organizations/{organization}/locations/{location}`\n\n\u003cbr /\u003e\n\n### TryParse(string, bool, out OrganizationLocationName)\n\n public static bool TryParse(string organizationLocationName, bool allowUnparsed, out OrganizationLocationName result)\n\nTries to parse the given resource name string into a new [OrganizationLocationName](/dotnet/docs/reference/Google.Cloud.Logging.V2/latest/Google.Cloud.Logging.V2.OrganizationLocationName) instance;\noptionally allowing 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}/locations/{location}`\n\nOr may be in any format if `allowUnparsed` is `true`.\n\n\u003cbr /\u003e\n\nOperators\n---------\n\n### operator ==(OrganizationLocationName, OrganizationLocationName)\n\n public static bool operator ==(OrganizationLocationName a, OrganizationLocationName b)\n\nDetermines whether two specified resource names have the same value.\n\n### operator !=(OrganizationLocationName, OrganizationLocationName)\n\n public static bool operator !=(OrganizationLocationName a, OrganizationLocationName b)\n\nDetermines whether two specified resource names have different values."]]