public sealed class ProjectName : IResourceName, IEquatable<ProjectName>Resource name for the Project resource.
Namespace
Grafeas.V1Assembly
Grafeas.V1.dll
Constructors
ProjectName(String)
public ProjectName(string projectId)Constructs a new instance of a ProjectName class from the component parts of pattern
projects/{project}
| Parameter | |
|---|---|
| Name | Description | 
projectId | 
        StringThe   | 
      
Properties
IsKnownPattern
public bool IsKnownPattern { get; }Whether this instance contains a resource name with a known pattern.
| Property Value | |
|---|---|
| Type | Description | 
Boolean | 
        |
ProjectId
public string ProjectId { get; }The Project ID. Will not be null, unless this instance contains an unparsed resource name.
| Property Value | |
|---|---|
| Type | Description | 
String | 
        |
Type
public ProjectName.ResourceNameType Type { get; }The ProjectName.ResourceNameType of the contained resource name.
| Property Value | |
|---|---|
| Type | Description | 
ProjectName.ResourceNameType | 
        |
UnparsedResource
public UnparsedResourceName UnparsedResource { get; }The contained UnparsedResourceName. Only non-null if this instance contains an
unparsed resource name.
| Property Value | |
|---|---|
| Type | Description | 
UnparsedResourceName | 
        |
Methods
Format(String)
public static string Format(string projectId)Formats the IDs into the string representation of this ProjectName with pattern
projects/{project}.
| Parameter | |
|---|---|
| Name | Description | 
projectId | 
        StringThe   | 
      
| Returns | |
|---|---|
| Type | Description | 
String | 
        The string representation of this ProjectName with pattern   | 
      
FormatProject(String)
public static string FormatProject(string projectId)Formats the IDs into the string representation of this ProjectName with pattern
projects/{project}.
| Parameter | |
|---|---|
| Name | Description | 
projectId | 
        StringThe   | 
      
| Returns | |
|---|---|
| Type | Description | 
String | 
        The string representation of this ProjectName with pattern   | 
      
FromProject(String)
public static ProjectName FromProject(string projectId)Creates a ProjectName with the pattern projects/{project}.
| Parameter | |
|---|---|
| Name | Description | 
projectId | 
        StringThe   | 
      
| Returns | |
|---|---|
| Type | Description | 
ProjectName | 
        A new instance of ProjectName constructed from the provided ids.  | 
      
FromUnparsed(UnparsedResourceName)
public static ProjectName FromUnparsed(UnparsedResourceName unparsedResourceName)Creates a ProjectName containing an unparsed resource name.
| Parameter | |
|---|---|
| Name | Description | 
unparsedResourceName | 
        UnparsedResourceNameThe unparsed resource name. Must not be   | 
      
| Returns | |
|---|---|
| Type | Description | 
ProjectName | 
        A new instance of ProjectName containing the provided   | 
      
GetHashCode()
public override int GetHashCode()Returns a hash code for this resource name.
| Returns | |
|---|---|
| Type | Description | 
Int32 | 
        |
Parse(String)
public static ProjectName Parse(string projectName)Parses the given resource name string into a new ProjectName instance.
| Parameter | |
|---|---|
| Name | Description | 
projectName | 
        StringThe resource name in string form. Must not be   | 
      
| Returns | |
|---|---|
| Type | Description | 
ProjectName | 
        The parsed ProjectName if successful.  | 
      
To parse successfully, the resource name must be formatted as one of the following:
projects/{project}
Parse(String, Boolean)
public static ProjectName Parse(string projectName, bool allowUnparsed)Parses the given resource name string into a new ProjectName instance; optionally allowing an unparseable resource name.
| Parameters | |
|---|---|
| Name | Description | 
projectName | 
        StringThe resource name in string form. Must not be   | 
      
allowUnparsed | 
        BooleanIf   | 
      
| Returns | |
|---|---|
| Type | Description | 
ProjectName | 
        The parsed ProjectName if successful.  | 
      
To parse successfully, the resource name must be formatted as one of the following:
projects/{project}
allowUnparsed is true.
ToString()
public override string ToString()The string representation of the resource name.
| Returns | |
|---|---|
| Type | Description | 
String | 
        The string representation of the resource name.  | 
      
TryParse(String, out ProjectName)
public static bool TryParse(string projectName, out ProjectName result)Tries to parse the given resource name string into a new ProjectName instance.
| Parameters | |
|---|---|
| Name | Description | 
projectName | 
        StringThe resource name in string form. Must not be   | 
      
result | 
        ProjectNameWhen this method returns, the parsed ProjectName, or   | 
      
| Returns | |
|---|---|
| Type | Description | 
Boolean | 
        
  | 
      
To parse successfully, the resource name must be formatted as one of the following:
projects/{project}
TryParse(String, Boolean, out ProjectName)
public static bool TryParse(string projectName, bool allowUnparsed, out ProjectName result)Tries to parse the given resource name string into a new ProjectName instance; optionally allowing an unparseable resource name.
| Parameters | |
|---|---|
| Name | Description | 
projectName | 
        StringThe resource name in string form. Must not be   | 
      
allowUnparsed | 
        BooleanIf   | 
      
result | 
        ProjectNameWhen this method returns, the parsed ProjectName, or   | 
      
| Returns | |
|---|---|
| Type | Description | 
Boolean | 
        
  | 
      
To parse successfully, the resource name must be formatted as one of the following:
projects/{project}
allowUnparsed is true.
Operators
Equality(ProjectName, ProjectName)
public static bool operator ==(ProjectName a, ProjectName b)| Parameters | |
|---|---|
| Name | Description | 
a | 
        ProjectName | 
      
b | 
        ProjectName | 
      
| Returns | |
|---|---|
| Type | Description | 
Boolean | 
        |
Inequality(ProjectName, ProjectName)
public static bool operator !=(ProjectName a, ProjectName b)| Parameters | |
|---|---|
| Name | Description | 
a | 
        ProjectName | 
      
b | 
        ProjectName | 
      
| Returns | |
|---|---|
| Type | Description | 
Boolean | 
        |