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 page provides documentation for the \u003ccode\u003ePosixAccountName\u003c/code\u003e class within the \u003ccode\u003eGoogle.Cloud.OsLogin.Common\u003c/code\u003e namespace, detailing its properties, methods, and usage.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003ePosixAccountName\u003c/code\u003e class represents a resource name for a \u003ccode\u003ePosixAccount\u003c/code\u003e and uses the pattern \u003ccode\u003eusers/{user}/projects/{project}\u003c/code\u003e for its format.\u003c/p\u003e\n"],["\u003cp\u003eThe latest version of the \u003ccode\u003eGoogle.Cloud.OsLogin.Common\u003c/code\u003e library, which contains the \u003ccode\u003ePosixAccountName\u003c/code\u003e class, is version 3.3.0, and previous versions from 3.2.0 to 2.2.0 are also available.\u003c/p\u003e\n"],["\u003cp\u003eYou can construct \u003ccode\u003ePosixAccountName\u003c/code\u003e objects from user and project IDs, or parse them from strings, including handling unparsed resource names, and these objects can be compared for equality or inequality.\u003c/p\u003e\n"],["\u003cp\u003eThe class implements \u003ccode\u003eIResourceName\u003c/code\u003e and \u003ccode\u003eIEquatable<PosixAccountName>\u003c/code\u003e interfaces, providing methods to format, parse, and manage Posix account resource names with various options and checks.\u003c/p\u003e\n"]]],[],null,["# Google.Cloud.OsLogin.Common - Class PosixAccountName (3.3.0)\n\nVersion latestkeyboard_arrow_down\n\n- [3.3.0 (latest)](/dotnet/docs/reference/Google.Cloud.OsLogin.Common/latest/Google.Cloud.OsLogin.Common.PosixAccountName)\n- [3.2.0](/dotnet/docs/reference/Google.Cloud.OsLogin.Common/3.2.0/Google.Cloud.OsLogin.Common.PosixAccountName)\n- [3.1.0](/dotnet/docs/reference/Google.Cloud.OsLogin.Common/3.1.0/Google.Cloud.OsLogin.Common.PosixAccountName)\n- [3.0.0](/dotnet/docs/reference/Google.Cloud.OsLogin.Common/3.0.0/Google.Cloud.OsLogin.Common.PosixAccountName)\n- [2.3.0](/dotnet/docs/reference/Google.Cloud.OsLogin.Common/2.3.0/Google.Cloud.OsLogin.Common.PosixAccountName)\n- [2.2.0](/dotnet/docs/reference/Google.Cloud.OsLogin.Common/2.2.0/Google.Cloud.OsLogin.Common.PosixAccountName) \n\n public sealed class PosixAccountName : IResourceName, IEquatable\u003cPosixAccountName\u003e\n\nReference documentation and code samples for the Google.Cloud.OsLogin.Common class PosixAccountName.\n\nResource name for the `PosixAccount` resource. \n\nInheritance\n-----------\n\n[object](https://learn.microsoft.com/dotnet/api/system.object) \\\u003e PosixAccountName \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)[PosixAccountName](/dotnet/docs/reference/Google.Cloud.OsLogin.Common/latest/Google.Cloud.OsLogin.Common.PosixAccountName) \n\nInherited Members\n-----------------\n\n[object.GetType()](https://learn.microsoft.com/dotnet/api/system.object.gettype)\n\nNamespace\n---------\n\n[Google.Cloud.OsLogin.Common](/dotnet/docs/reference/Google.Cloud.OsLogin.Common/latest/Google.Cloud.OsLogin.Common)\n\nAssembly\n--------\n\nGoogle.Cloud.OsLogin.Common.dll\n\nConstructors\n------------\n\n### PosixAccountName(string, string)\n\n public PosixAccountName(string userId, string projectId)\n\nConstructs a new instance of a [PosixAccountName](/dotnet/docs/reference/Google.Cloud.OsLogin.Common/latest/Google.Cloud.OsLogin.Common.PosixAccountName) class from the component parts of pattern\n`users/{user}/projects/{project}`\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### 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### Type\n\n public PosixAccountName.ResourceNameType Type { get; }\n\nThe [PosixAccountName.ResourceNameType](/dotnet/docs/reference/Google.Cloud.OsLogin.Common/latest/Google.Cloud.OsLogin.Common.PosixAccountName.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\n### UserId\n\n public string UserId { get; }\n\nThe `User` ID. Will not be `null`, unless this instance contains an unparsed resource name.\n\nMethods\n-------\n\n### Format(string, string)\n\n public static string Format(string userId, string projectId)\n\nFormats the IDs into the string representation of this [PosixAccountName](/dotnet/docs/reference/Google.Cloud.OsLogin.Common/latest/Google.Cloud.OsLogin.Common.PosixAccountName) with pattern\n`users/{user}/projects/{project}`.\n\n### FormatUserProject(string, string)\n\n public static string FormatUserProject(string userId, string projectId)\n\nFormats the IDs into the string representation of this [PosixAccountName](/dotnet/docs/reference/Google.Cloud.OsLogin.Common/latest/Google.Cloud.OsLogin.Common.PosixAccountName) with pattern\n`users/{user}/projects/{project}`.\n\n### FromUnparsed(UnparsedResourceName)\n\n public static PosixAccountName FromUnparsed(UnparsedResourceName unparsedResourceName)\n\nCreates a [PosixAccountName](/dotnet/docs/reference/Google.Cloud.OsLogin.Common/latest/Google.Cloud.OsLogin.Common.PosixAccountName) containing an unparsed resource name.\n\n### FromUserProject(string, string)\n\n public static PosixAccountName FromUserProject(string userId, string projectId)\n\nCreates a [PosixAccountName](/dotnet/docs/reference/Google.Cloud.OsLogin.Common/latest/Google.Cloud.OsLogin.Common.PosixAccountName) with the pattern `users/{user}/projects/{project}`.\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 PosixAccountName Parse(string posixAccountName)\n\nParses the given resource name string into a new [PosixAccountName](/dotnet/docs/reference/Google.Cloud.OsLogin.Common/latest/Google.Cloud.OsLogin.Common.PosixAccountName) instance.\n\n**Remarks** \nTo parse successfully, the resource name must be formatted as one of the following:\n\n- `users/{user}/projects/{project}`\n\n\u003cbr /\u003e\n\n### Parse(string, bool)\n\n public static PosixAccountName Parse(string posixAccountName, bool allowUnparsed)\n\nParses the given resource name string into a new [PosixAccountName](/dotnet/docs/reference/Google.Cloud.OsLogin.Common/latest/Google.Cloud.OsLogin.Common.PosixAccountName) 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- `users/{user}/projects/{project}`\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 PosixAccountName)\n\n public static bool TryParse(string posixAccountName, out PosixAccountName result)\n\nTries to parse the given resource name string into a new [PosixAccountName](/dotnet/docs/reference/Google.Cloud.OsLogin.Common/latest/Google.Cloud.OsLogin.Common.PosixAccountName) instance.\n\n**Remarks** \nTo parse successfully, the resource name must be formatted as one of the following:\n\n- `users/{user}/projects/{project}`\n\n\u003cbr /\u003e\n\n### TryParse(string, bool, out PosixAccountName)\n\n public static bool TryParse(string posixAccountName, bool allowUnparsed, out PosixAccountName result)\n\nTries to parse the given resource name string into a new [PosixAccountName](/dotnet/docs/reference/Google.Cloud.OsLogin.Common/latest/Google.Cloud.OsLogin.Common.PosixAccountName) 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- `users/{user}/projects/{project}`\n\nOr may be in any format if `allowUnparsed` is `true`.\n\n\u003cbr /\u003e\n\nOperators\n---------\n\n### operator ==(PosixAccountName, PosixAccountName)\n\n public static bool operator ==(PosixAccountName a, PosixAccountName b)\n\nDetermines whether two specified resource names have the same value.\n\n### operator !=(PosixAccountName, PosixAccountName)\n\n public static bool operator !=(PosixAccountName a, PosixAccountName b)\n\nDetermines whether two specified resource names have different values."]]