Class AnnotationSpecName
Resource name for the AnnotationSpec
resource.
Inheritance
Inherited Members
Namespace: Google.Cloud.AutoML.V1
Assembly: Google.Cloud.AutoML.V1.dll
Syntax
public sealed class AnnotationSpecName : IResourceName, IEquatable<AnnotationSpecName>
Constructors
AnnotationSpecName(String, String, String, String)
Constructs a new instance of a AnnotationSpecName class from the component parts of pattern
projects/{project}/locations/{location}/datasets/{dataset}/annotationSpecs/{annotation_spec}
Declaration
public AnnotationSpecName(string projectId, string locationId, string datasetId, string annotationSpecId)
Parameters
Type | Name | Description |
---|---|---|
System.String | projectId | The |
System.String | locationId | The |
System.String | datasetId | The |
System.String | annotationSpecId | The |
Properties
AnnotationSpecId
The AnnotationSpec
ID. Will not be null
, unless this instance contains an unparsed resource
name.
Declaration
public string AnnotationSpecId { get; }
Property Value
Type | Description |
---|---|
System.String |
DatasetId
The Dataset
ID. Will not be null
, unless this instance contains an unparsed resource name.
Declaration
public string DatasetId { get; }
Property Value
Type | Description |
---|---|
System.String |
IsKnownPattern
Whether this instance contains a resource name with a known pattern.
Declaration
public bool IsKnownPattern { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
Implements
LocationId
The Location
ID. Will not be null
, unless this instance contains an unparsed resource name.
Declaration
public string LocationId { get; }
Property Value
Type | Description |
---|---|
System.String |
ProjectId
The Project
ID. Will not be null
, unless this instance contains an unparsed resource name.
Declaration
public string ProjectId { get; }
Property Value
Type | Description |
---|---|
System.String |
Type
The AnnotationSpecName.ResourceNameType of the contained resource name.
Declaration
public AnnotationSpecName.ResourceNameType Type { get; }
Property Value
Type | Description |
---|---|
AnnotationSpecName.ResourceNameType |
UnparsedResource
The contained UnparsedResourceName. Only non-null
if this instance contains an
unparsed resource name.
Declaration
public UnparsedResourceName UnparsedResource { get; }
Property Value
Type | Description |
---|---|
UnparsedResourceName |
Methods
Format(String, String, String, String)
Formats the IDs into the string representation of this AnnotationSpecName with pattern
projects/{project}/locations/{location}/datasets/{dataset}/annotationSpecs/{annotation_spec}
.
Declaration
public static string Format(string projectId, string locationId, string datasetId, string annotationSpecId)
Parameters
Type | Name | Description |
---|---|---|
System.String | projectId | The |
System.String | locationId | The |
System.String | datasetId | The |
System.String | annotationSpecId | The |
Returns
Type | Description |
---|---|
System.String | The string representation of this AnnotationSpecName with pattern
|
FormatProjectLocationDatasetAnnotationSpec(String, String, String, String)
Formats the IDs into the string representation of this AnnotationSpecName with pattern
projects/{project}/locations/{location}/datasets/{dataset}/annotationSpecs/{annotation_spec}
.
Declaration
public static string FormatProjectLocationDatasetAnnotationSpec(string projectId, string locationId, string datasetId, string annotationSpecId)
Parameters
Type | Name | Description |
---|---|---|
System.String | projectId | The |
System.String | locationId | The |
System.String | datasetId | The |
System.String | annotationSpecId | The |
Returns
Type | Description |
---|---|
System.String | The string representation of this AnnotationSpecName with pattern
|
FromProjectLocationDatasetAnnotationSpec(String, String, String, String)
Creates a AnnotationSpecName with the pattern
projects/{project}/locations/{location}/datasets/{dataset}/annotationSpecs/{annotation_spec}
.
Declaration
public static AnnotationSpecName FromProjectLocationDatasetAnnotationSpec(string projectId, string locationId, string datasetId, string annotationSpecId)
Parameters
Type | Name | Description |
---|---|---|
System.String | projectId | The |
System.String | locationId | The |
System.String | datasetId | The |
System.String | annotationSpecId | The |
Returns
Type | Description |
---|---|
AnnotationSpecName | A new instance of AnnotationSpecName constructed from the provided ids. |
FromUnparsed(UnparsedResourceName)
Creates a AnnotationSpecName containing an unparsed resource name.
Declaration
public static AnnotationSpecName FromUnparsed(UnparsedResourceName unparsedResourceName)
Parameters
Type | Name | Description |
---|---|---|
UnparsedResourceName | unparsedResourceName | The unparsed resource name. Must not be |
Returns
Type | Description |
---|---|
AnnotationSpecName | A new instance of AnnotationSpecName containing the provided
|
GetHashCode()
Returns a hash code for this resource name.
Declaration
public override int GetHashCode()
Returns
Type | Description |
---|---|
System.Int32 |
Overrides
Parse(String)
Parses the given resource name string into a new AnnotationSpecName instance.
Declaration
public static AnnotationSpecName Parse(string annotationSpecName)
Parameters
Type | Name | Description |
---|---|---|
System.String | annotationSpecName | The resource name in string form. Must not be |
Returns
Type | Description |
---|---|
AnnotationSpecName | The parsed AnnotationSpecName if successful. |
Remarks
To parse successfully, the resource name must be formatted as one of the following:
-
projects/{project}/locations/{location}/datasets/{dataset}/annotationSpecs/{annotation_spec}
Parse(String, Boolean)
Parses the given resource name string into a new AnnotationSpecName instance; optionally allowing an unparseable resource name.
Declaration
public static AnnotationSpecName Parse(string annotationSpecName, bool allowUnparsed)
Parameters
Type | Name | Description |
---|---|---|
System.String | annotationSpecName | The resource name in string form. Must not be |
System.Boolean | allowUnparsed | If |
Returns
Type | Description |
---|---|
AnnotationSpecName | The parsed AnnotationSpecName if successful. |
Remarks
To parse successfully, the resource name must be formatted as one of the following:
-
projects/{project}/locations/{location}/datasets/{dataset}/annotationSpecs/{annotation_spec}
allowUnparsed
is true
.
ToString()
The string representation of the resource name.
Declaration
public override string ToString()
Returns
Type | Description |
---|---|
System.String | The string representation of the resource name. |
Overrides
Implements
TryParse(String, out AnnotationSpecName)
Tries to parse the given resource name string into a new AnnotationSpecName instance.
Declaration
public static bool TryParse(string annotationSpecName, out AnnotationSpecName result)
Parameters
Type | Name | Description |
---|---|---|
System.String | annotationSpecName | The resource name in string form. Must not be |
AnnotationSpecName | result | When this method returns, the parsed AnnotationSpecName, or |
Returns
Type | Description |
---|---|
System.Boolean |
|
Remarks
To parse successfully, the resource name must be formatted as one of the following:
-
projects/{project}/locations/{location}/datasets/{dataset}/annotationSpecs/{annotation_spec}
TryParse(String, Boolean, out AnnotationSpecName)
Tries to parse the given resource name string into a new AnnotationSpecName instance; optionally allowing an unparseable resource name.
Declaration
public static bool TryParse(string annotationSpecName, bool allowUnparsed, out AnnotationSpecName result)
Parameters
Type | Name | Description |
---|---|---|
System.String | annotationSpecName | The resource name in string form. Must not be |
System.Boolean | allowUnparsed | If |
AnnotationSpecName | result | When this method returns, the parsed AnnotationSpecName, or |
Returns
Type | Description |
---|---|
System.Boolean |
|
Remarks
To parse successfully, the resource name must be formatted as one of the following:
-
projects/{project}/locations/{location}/datasets/{dataset}/annotationSpecs/{annotation_spec}
allowUnparsed
is true
.
Operators
Equality(AnnotationSpecName, AnnotationSpecName)
Declaration
public static bool operator ==(AnnotationSpecName a, AnnotationSpecName b)
Parameters
Type | Name | Description |
---|---|---|
AnnotationSpecName | a | |
AnnotationSpecName | b |
Returns
Type | Description |
---|---|
System.Boolean |
Inequality(AnnotationSpecName, AnnotationSpecName)
Declaration
public static bool operator !=(AnnotationSpecName a, AnnotationSpecName b)
Parameters
Type | Name | Description |
---|---|---|
AnnotationSpecName | a | |
AnnotationSpecName | b |
Returns
Type | Description |
---|---|
System.Boolean |