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-04 UTC."],[[["\u003cp\u003eThe \u003ccode\u003eTaskName\u003c/code\u003e class represents the resource name for a \u003ccode\u003eTask\u003c/code\u003e within Google Cloud Tasks v2beta3 API, following the pattern \u003ccode\u003eprojects/{project}/locations/{location}/queues/{queue}/tasks/{task}\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003eThis class provides methods to construct, format, parse, and validate \u003ccode\u003eTaskName\u003c/code\u003e instances using project, location, queue, and task IDs, and also handles unparsed resource names.\u003c/p\u003e\n"],["\u003cp\u003eIt also has properties for retrieving individual components of the resource name, such as \u003ccode\u003eProjectId\u003c/code\u003e, \u003ccode\u003eLocationId\u003c/code\u003e, \u003ccode\u003eQueueId\u003c/code\u003e, and \u003ccode\u003eTaskId\u003c/code\u003e, in addition to its general \u003ccode\u003eType\u003c/code\u003e property.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eTaskName\u003c/code\u003e class supports string representation and comparison, and implements \u003ccode\u003eIResourceName\u003c/code\u003e and \u003ccode\u003eIEquatable<TaskName>\u003c/code\u003e interfaces for resource management and equality checking.\u003c/p\u003e\n"],["\u003cp\u003eThe latest version of the API documented is \u003ccode\u003e3.0.0-beta07\u003c/code\u003e, and the provided documentation includes versions \u003ccode\u003e3.0.0-beta06\u003c/code\u003e and \u003ccode\u003e2.0.0-beta08\u003c/code\u003e as well.\u003c/p\u003e\n"]]],[],null,["# Google Cloud Tasks v2beta3 API - Class TaskName (3.0.0-beta07)\n\nVersion latestkeyboard_arrow_down\n\n- [3.0.0-beta07 (latest)](/dotnet/docs/reference/Google.Cloud.Tasks.V2Beta3/latest/Google.Cloud.Tasks.V2Beta3.TaskName)\n- [3.0.0-beta06](/dotnet/docs/reference/Google.Cloud.Tasks.V2Beta3/3.0.0-beta06/Google.Cloud.Tasks.V2Beta3.TaskName)\n- [2.0.0-beta08](/dotnet/docs/reference/Google.Cloud.Tasks.V2Beta3/2.0.0-beta08/Google.Cloud.Tasks.V2Beta3.TaskName) \n\n public sealed class TaskName : IResourceName, IEquatable\u003cTaskName\u003e\n\nReference documentation and code samples for the Google Cloud Tasks v2beta3 API class TaskName.\n\nResource name for the `Task` resource. \n\nInheritance\n-----------\n\n[object](https://learn.microsoft.com/dotnet/api/system.object) \\\u003e TaskName \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)[TaskName](/dotnet/docs/reference/Google.Cloud.Tasks.V2Beta3/latest/Google.Cloud.Tasks.V2Beta3.TaskName) \n\nInherited Members\n-----------------\n\n[object.GetType()](https://learn.microsoft.com/dotnet/api/system.object.gettype)\n\nNamespace\n---------\n\n[Google.Cloud.Tasks.V2Beta3](/dotnet/docs/reference/Google.Cloud.Tasks.V2Beta3/latest/Google.Cloud.Tasks.V2Beta3)\n\nAssembly\n--------\n\nGoogle.Cloud.Tasks.V2Beta3.dll\n\nConstructors\n------------\n\n### TaskName(string, string, string, string)\n\n public TaskName(string projectId, string locationId, string queueId, string taskId)\n\nConstructs a new instance of a [TaskName](/dotnet/docs/reference/Google.Cloud.Tasks.V2Beta3/latest/Google.Cloud.Tasks.V2Beta3.TaskName) class from the component parts of pattern\n`projects/{project}/locations/{location}/queues/{queue}/tasks/{task}`\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### ProjectId\n\n public string ProjectId { get; }\n\nThe `Project` ID. Will not be `null`, unless this instance contains an unparsed resource name.\n\n### QueueId\n\n public string QueueId { get; }\n\nThe `Queue` ID. Will not be `null`, unless this instance contains an unparsed resource name.\n\n### TaskId\n\n public string TaskId { get; }\n\nThe `Task` ID. Will not be `null`, unless this instance contains an unparsed resource name.\n\n### Type\n\n public TaskName.ResourceNameType Type { get; }\n\nThe [TaskName.ResourceNameType](/dotnet/docs/reference/Google.Cloud.Tasks.V2Beta3/latest/Google.Cloud.Tasks.V2Beta3.TaskName.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, string, string)\n\n public static string Format(string projectId, string locationId, string queueId, string taskId)\n\nFormats the IDs into the string representation of this [TaskName](/dotnet/docs/reference/Google.Cloud.Tasks.V2Beta3/latest/Google.Cloud.Tasks.V2Beta3.TaskName) with pattern\n`projects/{project}/locations/{location}/queues/{queue}/tasks/{task}`.\n\n### FormatProjectLocationQueueTask(string, string, string, string)\n\n public static string FormatProjectLocationQueueTask(string projectId, string locationId, string queueId, string taskId)\n\nFormats the IDs into the string representation of this [TaskName](/dotnet/docs/reference/Google.Cloud.Tasks.V2Beta3/latest/Google.Cloud.Tasks.V2Beta3.TaskName) with pattern\n`projects/{project}/locations/{location}/queues/{queue}/tasks/{task}`.\n\n### FromProjectLocationQueueTask(string, string, string, string)\n\n public static TaskName FromProjectLocationQueueTask(string projectId, string locationId, string queueId, string taskId)\n\nCreates a [TaskName](/dotnet/docs/reference/Google.Cloud.Tasks.V2Beta3/latest/Google.Cloud.Tasks.V2Beta3.TaskName) with the pattern\n`projects/{project}/locations/{location}/queues/{queue}/tasks/{task}`.\n\n### FromUnparsed(UnparsedResourceName)\n\n public static TaskName FromUnparsed(UnparsedResourceName unparsedResourceName)\n\nCreates a [TaskName](/dotnet/docs/reference/Google.Cloud.Tasks.V2Beta3/latest/Google.Cloud.Tasks.V2Beta3.TaskName) 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 TaskName Parse(string taskName)\n\nParses the given resource name string into a new [TaskName](/dotnet/docs/reference/Google.Cloud.Tasks.V2Beta3/latest/Google.Cloud.Tasks.V2Beta3.TaskName) instance.\n\n**Remarks** \nTo parse successfully, the resource name must be formatted as one of the following:\n\n- `projects/{project}/locations/{location}/queues/{queue}/tasks/{task}`\n\n\u003cbr /\u003e\n\n### Parse(string, bool)\n\n public static TaskName Parse(string taskName, bool allowUnparsed)\n\nParses the given resource name string into a new [TaskName](/dotnet/docs/reference/Google.Cloud.Tasks.V2Beta3/latest/Google.Cloud.Tasks.V2Beta3.TaskName) 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- `projects/{project}/locations/{location}/queues/{queue}/tasks/{task}`\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 TaskName)\n\n public static bool TryParse(string taskName, out TaskName result)\n\nTries to parse the given resource name string into a new [TaskName](/dotnet/docs/reference/Google.Cloud.Tasks.V2Beta3/latest/Google.Cloud.Tasks.V2Beta3.TaskName) instance.\n\n**Remarks** \nTo parse successfully, the resource name must be formatted as one of the following:\n\n- `projects/{project}/locations/{location}/queues/{queue}/tasks/{task}`\n\n\u003cbr /\u003e\n\n### TryParse(string, bool, out TaskName)\n\n public static bool TryParse(string taskName, bool allowUnparsed, out TaskName result)\n\nTries to parse the given resource name string into a new [TaskName](/dotnet/docs/reference/Google.Cloud.Tasks.V2Beta3/latest/Google.Cloud.Tasks.V2Beta3.TaskName) 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- `projects/{project}/locations/{location}/queues/{queue}/tasks/{task}`\n\nOr may be in any format if `allowUnparsed` is `true`.\n\n\u003cbr /\u003e\n\nOperators\n---------\n\n### operator ==(TaskName, TaskName)\n\n public static bool operator ==(TaskName a, TaskName b)\n\nDetermines whether two specified resource names have the same value.\n\n### operator !=(TaskName, TaskName)\n\n public static bool operator !=(TaskName a, TaskName b)\n\nDetermines whether two specified resource names have different values."]]