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 provides reference documentation for the \u003ccode\u003eLocationName\u003c/code\u003e class within the Advisory Notifications v1 API, detailing its properties, constructors, and methods.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eLocationName\u003c/code\u003e class represents a resource name for the \u003ccode\u003eLocation\u003c/code\u003e resource, and it can be constructed using organization and location IDs or project and location IDs, following patterns such as \u003ccode\u003eorganizations/{organization}/locations/{location}\u003c/code\u003e and \u003ccode\u003eprojects/{project}/locations/{location}\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003eThe class provides methods for formatting, parsing, and creating instances of \u003ccode\u003eLocationName\u003c/code\u003e from strings, as well as methods for determining the type of resource name contained, along with unparsed resource names.\u003c/p\u003e\n"],["\u003cp\u003eThe latest version of this resource is \u003ccode\u003e1.7.0\u003c/code\u003e however there are versions available from \u003ccode\u003e1.0.0\u003c/code\u003e to the latest.\u003c/p\u003e\n"],["\u003cp\u003eThe LocationName class implements the \u003ccode\u003eIResourceName\u003c/code\u003e and \u003ccode\u003eIEquatable\u003c/code\u003e interfaces, and its instances can be compared for equality and inequality using overloaded operators.\u003c/p\u003e\n"]]],[],null,["# Advisory Notifications v1 API - Class LocationName (1.7.0)\n\nVersion latestkeyboard_arrow_down\n\n- [1.7.0 (latest)](/dotnet/docs/reference/Google.Cloud.AdvisoryNotifications.V1/latest/Google.Cloud.AdvisoryNotifications.V1.LocationName)\n- [1.6.0](/dotnet/docs/reference/Google.Cloud.AdvisoryNotifications.V1/1.6.0/Google.Cloud.AdvisoryNotifications.V1.LocationName)\n- [1.5.0](/dotnet/docs/reference/Google.Cloud.AdvisoryNotifications.V1/1.5.0/Google.Cloud.AdvisoryNotifications.V1.LocationName)\n- [1.4.0](/dotnet/docs/reference/Google.Cloud.AdvisoryNotifications.V1/1.4.0/Google.Cloud.AdvisoryNotifications.V1.LocationName)\n- [1.3.0](/dotnet/docs/reference/Google.Cloud.AdvisoryNotifications.V1/1.3.0/Google.Cloud.AdvisoryNotifications.V1.LocationName)\n- [1.2.0](/dotnet/docs/reference/Google.Cloud.AdvisoryNotifications.V1/1.2.0/Google.Cloud.AdvisoryNotifications.V1.LocationName)\n- [1.1.0](/dotnet/docs/reference/Google.Cloud.AdvisoryNotifications.V1/1.1.0/Google.Cloud.AdvisoryNotifications.V1.LocationName)\n- [1.0.0](/dotnet/docs/reference/Google.Cloud.AdvisoryNotifications.V1/1.0.0/Google.Cloud.AdvisoryNotifications.V1.LocationName) \n\n public sealed class LocationName : IResourceName, IEquatable\u003cLocationName\u003e\n\nReference documentation and code samples for the Advisory Notifications v1 API class LocationName.\n\nResource name for the `Location` resource. \n\nInheritance\n-----------\n\n[object](https://learn.microsoft.com/dotnet/api/system.object) \\\u003e LocationName \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)[LocationName](/dotnet/docs/reference/Google.Cloud.AdvisoryNotifications.V1/latest/Google.Cloud.AdvisoryNotifications.V1.LocationName) \n\nInherited Members\n-----------------\n\n[object.GetType()](https://learn.microsoft.com/dotnet/api/system.object.gettype)\n\nNamespace\n---------\n\n[Google.Cloud.AdvisoryNotifications.V1](/dotnet/docs/reference/Google.Cloud.AdvisoryNotifications.V1/latest/Google.Cloud.AdvisoryNotifications.V1)\n\nAssembly\n--------\n\nGoogle.Cloud.AdvisoryNotifications.V1.dll\n\nConstructors\n------------\n\n### LocationName(string, string)\n\n public LocationName(string organizationId, string locationId)\n\nConstructs a new instance of a [LocationName](/dotnet/docs/reference/Google.Cloud.AdvisoryNotifications.V1/latest/Google.Cloud.AdvisoryNotifications.V1.LocationName) class from the component parts of pattern\n`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. May be `null`, depending on which resource name is contained by this instance.\n\n### OrganizationId\n\n public string OrganizationId { get; }\n\nThe `Organization` ID. May be `null`, depending on which resource name is contained by this\ninstance.\n\n### ProjectId\n\n public string ProjectId { get; }\n\nThe `Project` ID. May be `null`, depending on which resource name is contained by this instance.\n\n### Type\n\n public LocationName.ResourceNameType Type { get; }\n\nThe [LocationName.ResourceNameType](/dotnet/docs/reference/Google.Cloud.AdvisoryNotifications.V1/latest/Google.Cloud.AdvisoryNotifications.V1.LocationName.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 [LocationName](/dotnet/docs/reference/Google.Cloud.AdvisoryNotifications.V1/latest/Google.Cloud.AdvisoryNotifications.V1.LocationName) 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 [LocationName](/dotnet/docs/reference/Google.Cloud.AdvisoryNotifications.V1/latest/Google.Cloud.AdvisoryNotifications.V1.LocationName) with pattern\n`organizations/{organization}/locations/{location}`.\n\n### FormatProjectLocation(string, string)\n\n public static string FormatProjectLocation(string projectId, string locationId)\n\nFormats the IDs into the string representation of this [LocationName](/dotnet/docs/reference/Google.Cloud.AdvisoryNotifications.V1/latest/Google.Cloud.AdvisoryNotifications.V1.LocationName) with pattern\n`projects/{project}/locations/{location}`.\n\n### FromOrganizationLocation(string, string)\n\n public static LocationName FromOrganizationLocation(string organizationId, string locationId)\n\nCreates a [LocationName](/dotnet/docs/reference/Google.Cloud.AdvisoryNotifications.V1/latest/Google.Cloud.AdvisoryNotifications.V1.LocationName) with the pattern `organizations/{organization}/locations/{location}`\n.\n\n### FromProjectLocation(string, string)\n\n public static LocationName FromProjectLocation(string projectId, string locationId)\n\nCreates a [LocationName](/dotnet/docs/reference/Google.Cloud.AdvisoryNotifications.V1/latest/Google.Cloud.AdvisoryNotifications.V1.LocationName) with the pattern `projects/{project}/locations/{location}`.\n\n### FromUnparsed(UnparsedResourceName)\n\n public static LocationName FromUnparsed(UnparsedResourceName unparsedResourceName)\n\nCreates a [LocationName](/dotnet/docs/reference/Google.Cloud.AdvisoryNotifications.V1/latest/Google.Cloud.AdvisoryNotifications.V1.LocationName) 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 LocationName Parse(string locationName)\n\nParses the given resource name string into a new [LocationName](/dotnet/docs/reference/Google.Cloud.AdvisoryNotifications.V1/latest/Google.Cloud.AdvisoryNotifications.V1.LocationName) 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- `projects/{project}/locations/{location}`\n\n\u003cbr /\u003e\n\n### Parse(string, bool)\n\n public static LocationName Parse(string locationName, bool allowUnparsed)\n\nParses the given resource name string into a new [LocationName](/dotnet/docs/reference/Google.Cloud.AdvisoryNotifications.V1/latest/Google.Cloud.AdvisoryNotifications.V1.LocationName) instance; optionally allowing an\nunparseable 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- `projects/{project}/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 LocationName)\n\n public static bool TryParse(string locationName, out LocationName result)\n\nTries to parse the given resource name string into a new [LocationName](/dotnet/docs/reference/Google.Cloud.AdvisoryNotifications.V1/latest/Google.Cloud.AdvisoryNotifications.V1.LocationName) 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- `projects/{project}/locations/{location}`\n\n\u003cbr /\u003e\n\n### TryParse(string, bool, out LocationName)\n\n public static bool TryParse(string locationName, bool allowUnparsed, out LocationName result)\n\nTries to parse the given resource name string into a new [LocationName](/dotnet/docs/reference/Google.Cloud.AdvisoryNotifications.V1/latest/Google.Cloud.AdvisoryNotifications.V1.LocationName) 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- `projects/{project}/locations/{location}`\n\nOr may be in any format if `allowUnparsed` is `true`.\n\n\u003cbr /\u003e\n\nOperators\n---------\n\n### operator ==(LocationName, LocationName)\n\n public static bool operator ==(LocationName a, LocationName b)\n\nDetermines whether two specified resource names have the same value.\n\n### operator !=(LocationName, LocationName)\n\n public static bool operator !=(LocationName a, LocationName b)\n\nDetermines whether two specified resource names have different values."]]