public sealed class ExampleName : IResourceName, IEquatable<ExampleName>
Resource name for the Example
resource.
Namespace
Google.Cloud.DataLabeling.V1Beta1Assembly
Google.Cloud.DataLabeling.V1Beta1.dll
Constructors
ExampleName(String, String, String, String)
public ExampleName(string projectId, string datasetId, string annotatedDatasetId, string exampleId)
Constructs a new instance of a ExampleName class from the component parts of pattern
projects/{project}/datasets/{dataset}/annotatedDatasets/{annotated_dataset}/examples/{example}
Parameters | |
---|---|
Name | Description |
projectId | String The |
datasetId | String The |
annotatedDatasetId | String The |
exampleId | String The |
Properties
AnnotatedDatasetId
public string AnnotatedDatasetId { get; }
The AnnotatedDataset
ID. Will not be null
, unless this instance contains an unparsed resource
name.
Property Value | |
---|---|
Type | Description |
String |
DatasetId
public string DatasetId { get; }
The Dataset
ID. Will not be null
, unless this instance contains an unparsed resource name.
Property Value | |
---|---|
Type | Description |
String |
ExampleId
public string ExampleId { get; }
The Example
ID. Will not be null
, unless this instance contains an unparsed resource name.
Property Value | |
---|---|
Type | Description |
String |
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 ExampleName.ResourceNameType Type { get; }
The ExampleName.ResourceNameType of the contained resource name.
Property Value | |
---|---|
Type | Description |
ExampleName.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, String, String, String)
public static string Format(string projectId, string datasetId, string annotatedDatasetId, string exampleId)
Formats the IDs into the string representation of this ExampleName with pattern
projects/{project}/datasets/{dataset}/annotatedDatasets/{annotated_dataset}/examples/{example}
.
Parameters | |
---|---|
Name | Description |
projectId | String The |
datasetId | String The |
annotatedDatasetId | String The |
exampleId | String The |
Returns | |
---|---|
Type | Description |
String | The string representation of this ExampleName with pattern
|
FormatProjectDatasetAnnotatedDatasetExample(String, String, String, String)
public static string FormatProjectDatasetAnnotatedDatasetExample(string projectId, string datasetId, string annotatedDatasetId, string exampleId)
Formats the IDs into the string representation of this ExampleName with pattern
projects/{project}/datasets/{dataset}/annotatedDatasets/{annotated_dataset}/examples/{example}
.
Parameters | |
---|---|
Name | Description |
projectId | String The |
datasetId | String The |
annotatedDatasetId | String The |
exampleId | String The |
Returns | |
---|---|
Type | Description |
String | The string representation of this ExampleName with pattern
|
FromProjectDatasetAnnotatedDatasetExample(String, String, String, String)
public static ExampleName FromProjectDatasetAnnotatedDatasetExample(string projectId, string datasetId, string annotatedDatasetId, string exampleId)
Creates a ExampleName with the pattern
projects/{project}/datasets/{dataset}/annotatedDatasets/{annotated_dataset}/examples/{example}
.
Parameters | |
---|---|
Name | Description |
projectId | String The |
datasetId | String The |
annotatedDatasetId | String The |
exampleId | String The |
Returns | |
---|---|
Type | Description |
ExampleName | A new instance of ExampleName constructed from the provided ids. |
FromUnparsed(UnparsedResourceName)
public static ExampleName FromUnparsed(UnparsedResourceName unparsedResourceName)
Creates a ExampleName containing an unparsed resource name.
Parameter | |
---|---|
Name | Description |
unparsedResourceName | UnparsedResourceName The unparsed resource name. Must not be |
Returns | |
---|---|
Type | Description |
ExampleName | A new instance of ExampleName containing the provided |
GetHashCode()
public override int GetHashCode()
Returns a hash code for this resource name.
Returns | |
---|---|
Type | Description |
Int32 |
Parse(String)
public static ExampleName Parse(string exampleName)
Parses the given resource name string into a new ExampleName instance.
Parameter | |
---|---|
Name | Description |
exampleName | String The resource name in string form. Must not be |
Returns | |
---|---|
Type | Description |
ExampleName | The parsed ExampleName if successful. |
To parse successfully, the resource name must be formatted as one of the following:
-
projects/{project}/datasets/{dataset}/annotatedDatasets/{annotated_dataset}/examples/{example}
Parse(String, Boolean)
public static ExampleName Parse(string exampleName, bool allowUnparsed)
Parses the given resource name string into a new ExampleName instance; optionally allowing an unparseable resource name.
Parameters | |
---|---|
Name | Description |
exampleName | String The resource name in string form. Must not be |
allowUnparsed | Boolean If |
Returns | |
---|---|
Type | Description |
ExampleName | The parsed ExampleName if successful. |
To parse successfully, the resource name must be formatted as one of the following:
-
projects/{project}/datasets/{dataset}/annotatedDatasets/{annotated_dataset}/examples/{example}
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 ExampleName)
public static bool TryParse(string exampleName, out ExampleName result)
Tries to parse the given resource name string into a new ExampleName instance.
Parameters | |
---|---|
Name | Description |
exampleName | String The resource name in string form. Must not be |
result | ExampleName When this method returns, the parsed ExampleName, or |
Returns | |
---|---|
Type | Description |
Boolean |
|
To parse successfully, the resource name must be formatted as one of the following:
-
projects/{project}/datasets/{dataset}/annotatedDatasets/{annotated_dataset}/examples/{example}
TryParse(String, Boolean, out ExampleName)
public static bool TryParse(string exampleName, bool allowUnparsed, out ExampleName result)
Tries to parse the given resource name string into a new ExampleName instance; optionally allowing an unparseable resource name.
Parameters | |
---|---|
Name | Description |
exampleName | String The resource name in string form. Must not be |
allowUnparsed | Boolean If |
result | ExampleName When this method returns, the parsed ExampleName, or |
Returns | |
---|---|
Type | Description |
Boolean |
|
To parse successfully, the resource name must be formatted as one of the following:
-
projects/{project}/datasets/{dataset}/annotatedDatasets/{annotated_dataset}/examples/{example}
allowUnparsed
is true
.
Operators
Equality(ExampleName, ExampleName)
public static bool operator ==(ExampleName a, ExampleName b)
Parameters | |
---|---|
Name | Description |
a | ExampleName |
b | ExampleName |
Returns | |
---|---|
Type | Description |
Boolean |
Inequality(ExampleName, ExampleName)
public static bool operator !=(ExampleName a, ExampleName b)
Parameters | |
---|---|
Name | Description |
a | ExampleName |
b | ExampleName |
Returns | |
---|---|
Type | Description |
Boolean |