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"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-08-07 UTC."],[[["\u003cp\u003eThe \u003ccode\u003eOrderName\u003c/code\u003e class in the Google Cloud Commerce Consumer Procurement v1 API represents the resource name for an \u003ccode\u003eOrder\u003c/code\u003e resource.\u003c/p\u003e\n"],["\u003cp\u003eIt can be constructed with a billing account ID and an order ID using the format \u003ccode\u003ebillingAccounts/{billing_account}/orders/{order}\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003eThe class provides methods for formatting, parsing, and validating order resource names, allowing for flexible management of OrderName instances.\u003c/p\u003e\n"],["\u003cp\u003eIt contains properties for retrieving the Billing Account ID, Order ID, the type of resource name, and a boolean indicating whether the instance has a known resource name pattern.\u003c/p\u003e\n"],["\u003cp\u003eThe latest version of this API class is 1.4.0, and other versions such as 1.3.0, 1.2.0, 1.1.0, and 1.0.0 are also available.\u003c/p\u003e\n"]]],[],null,["# Cloud Commerce Consumer Procurement v1 API - Class OrderName (1.5.0)\n\nVersion latestkeyboard_arrow_down\n\n- [1.5.0 (latest)](/dotnet/docs/reference/Google.Cloud.Commerce.Consumer.Procurement.V1/latest/Google.Cloud.Commerce.Consumer.Procurement.V1.OrderName)\n- [1.4.0](/dotnet/docs/reference/Google.Cloud.Commerce.Consumer.Procurement.V1/1.4.0/Google.Cloud.Commerce.Consumer.Procurement.V1.OrderName)\n- [1.3.0](/dotnet/docs/reference/Google.Cloud.Commerce.Consumer.Procurement.V1/1.3.0/Google.Cloud.Commerce.Consumer.Procurement.V1.OrderName)\n- [1.2.0](/dotnet/docs/reference/Google.Cloud.Commerce.Consumer.Procurement.V1/1.2.0/Google.Cloud.Commerce.Consumer.Procurement.V1.OrderName)\n- [1.1.0](/dotnet/docs/reference/Google.Cloud.Commerce.Consumer.Procurement.V1/1.1.0/Google.Cloud.Commerce.Consumer.Procurement.V1.OrderName)\n- [1.0.0](/dotnet/docs/reference/Google.Cloud.Commerce.Consumer.Procurement.V1/1.0.0/Google.Cloud.Commerce.Consumer.Procurement.V1.OrderName) \n\n public sealed class OrderName : IResourceName, IEquatable\u003cOrderName\u003e\n\nReference documentation and code samples for the Cloud Commerce Consumer Procurement v1 API class OrderName.\n\nResource name for the `Order` resource. \n\nInheritance\n-----------\n\n[object](https://learn.microsoft.com/dotnet/api/system.object) \\\u003e OrderName \n\nImplements\n----------\n\n[IResourceName](https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.IResourceName.html), [IEquatable](https://learn.microsoft.com/dotnet/api/system.iequatable-1)[OrderName](/dotnet/docs/reference/Google.Cloud.Commerce.Consumer.Procurement.V1/latest/Google.Cloud.Commerce.Consumer.Procurement.V1.OrderName) \n\nInherited Members\n-----------------\n\n[object.GetType()](https://learn.microsoft.com/dotnet/api/system.object.gettype)\n\nNamespace\n---------\n\n[Google.Cloud.Commerce.Consumer.Procurement.V1](/dotnet/docs/reference/Google.Cloud.Commerce.Consumer.Procurement.V1/latest/Google.Cloud.Commerce.Consumer.Procurement.V1)\n\nAssembly\n--------\n\nGoogle.Cloud.Commerce.Consumer.Procurement.V1.dll\n\nConstructors\n------------\n\n### OrderName(string, string)\n\n public OrderName(string billingAccountId, string orderId)\n\nConstructs a new instance of a [OrderName](/dotnet/docs/reference/Google.Cloud.Commerce.Consumer.Procurement.V1/latest/Google.Cloud.Commerce.Consumer.Procurement.V1.OrderName) class from the component parts of pattern\n`billingAccounts/{billing_account}/orders/{order}`\n\nProperties\n----------\n\n### BillingAccountId\n\n public string BillingAccountId { get; }\n\nThe `BillingAccount` ID. Will not be `null`, unless this instance contains an unparsed resource\nname.\n\n### IsKnownPattern\n\n public bool IsKnownPattern { get; }\n\nWhether this instance contains a resource name with a known pattern.\n\n### OrderId\n\n public string OrderId { get; }\n\nThe `Order` ID. Will not be `null`, unless this instance contains an unparsed resource name.\n\n### Type\n\n public OrderName.ResourceNameType Type { get; }\n\nThe [OrderName.ResourceNameType](/dotnet/docs/reference/Google.Cloud.Commerce.Consumer.Procurement.V1/latest/Google.Cloud.Commerce.Consumer.Procurement.V1.OrderName.ResourceNameType) of the contained resource name.\n\n### UnparsedResource\n\n public UnparsedResourceName UnparsedResource { get; }\n\nThe contained [UnparsedResourceName](https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.UnparsedResourceName.html). 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 billingAccountId, string orderId)\n\nFormats the IDs into the string representation of this [OrderName](/dotnet/docs/reference/Google.Cloud.Commerce.Consumer.Procurement.V1/latest/Google.Cloud.Commerce.Consumer.Procurement.V1.OrderName) with pattern\n`billingAccounts/{billing_account}/orders/{order}`.\n\n### FormatBillingAccountOrder(string, string)\n\n public static string FormatBillingAccountOrder(string billingAccountId, string orderId)\n\nFormats the IDs into the string representation of this [OrderName](/dotnet/docs/reference/Google.Cloud.Commerce.Consumer.Procurement.V1/latest/Google.Cloud.Commerce.Consumer.Procurement.V1.OrderName) with pattern\n`billingAccounts/{billing_account}/orders/{order}`.\n\n### FromBillingAccountOrder(string, string)\n\n public static OrderName FromBillingAccountOrder(string billingAccountId, string orderId)\n\nCreates a [OrderName](/dotnet/docs/reference/Google.Cloud.Commerce.Consumer.Procurement.V1/latest/Google.Cloud.Commerce.Consumer.Procurement.V1.OrderName) with the pattern `billingAccounts/{billing_account}/orders/{order}`.\n\n### FromUnparsed(UnparsedResourceName)\n\n public static OrderName FromUnparsed(UnparsedResourceName unparsedResourceName)\n\nCreates a [OrderName](/dotnet/docs/reference/Google.Cloud.Commerce.Consumer.Procurement.V1/latest/Google.Cloud.Commerce.Consumer.Procurement.V1.OrderName) 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 OrderName Parse(string orderName)\n\nParses the given resource name string into a new [OrderName](/dotnet/docs/reference/Google.Cloud.Commerce.Consumer.Procurement.V1/latest/Google.Cloud.Commerce.Consumer.Procurement.V1.OrderName) instance.\n\n**Remarks** \nTo parse successfully, the resource name must be formatted as one of the following:\n\n- `billingAccounts/{billing_account}/orders/{order}`\n\n\u003cbr /\u003e\n\n### Parse(string, bool)\n\n public static OrderName Parse(string orderName, bool allowUnparsed)\n\nParses the given resource name string into a new [OrderName](/dotnet/docs/reference/Google.Cloud.Commerce.Consumer.Procurement.V1/latest/Google.Cloud.Commerce.Consumer.Procurement.V1.OrderName) 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- `billingAccounts/{billing_account}/orders/{order}`\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 OrderName)\n\n public static bool TryParse(string orderName, out OrderName result)\n\nTries to parse the given resource name string into a new [OrderName](/dotnet/docs/reference/Google.Cloud.Commerce.Consumer.Procurement.V1/latest/Google.Cloud.Commerce.Consumer.Procurement.V1.OrderName) instance.\n\n**Remarks** \nTo parse successfully, the resource name must be formatted as one of the following:\n\n- `billingAccounts/{billing_account}/orders/{order}`\n\n\u003cbr /\u003e\n\n### TryParse(string, bool, out OrderName)\n\n public static bool TryParse(string orderName, bool allowUnparsed, out OrderName result)\n\nTries to parse the given resource name string into a new [OrderName](/dotnet/docs/reference/Google.Cloud.Commerce.Consumer.Procurement.V1/latest/Google.Cloud.Commerce.Consumer.Procurement.V1.OrderName) 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- `billingAccounts/{billing_account}/orders/{order}`\n\nOr may be in any format if `allowUnparsed` is `true`.\n\n\u003cbr /\u003e\n\nOperators\n---------\n\n### operator ==(OrderName, OrderName)\n\n public static bool operator ==(OrderName a, OrderName b)\n\nDetermines whether two specified resource names have the same value.\n\n### operator !=(OrderName, OrderName)\n\n public static bool operator !=(OrderName a, OrderName b)\n\nDetermines whether two specified resource names have different values."]]