Class AnnotationSpecSetName (2.0.0-beta01)

public sealed class AnnotationSpecSetName : IResourceName, IEquatable<AnnotationSpecSetName>

Resource name for the AnnotationSpecSet resource.

Inheritance

Object > AnnotationSpecSetName

Namespace

Google.Cloud.DataLabeling.V1Beta1

Assembly

Google.Cloud.DataLabeling.V1Beta1.dll

Constructors

AnnotationSpecSetName(String, String)

public AnnotationSpecSetName(string projectId, string annotationSpecSetId)

Constructs a new instance of a AnnotationSpecSetName class from the component parts of pattern projects/{project}/annotationSpecSets/{annotation_spec_set}

Parameters
NameDescription
projectIdString

The Project ID. Must not be null or empty.

annotationSpecSetIdString

The AnnotationSpecSet ID. Must not be null or empty.

Properties

AnnotationSpecSetId

public string AnnotationSpecSetId { get; }

The AnnotationSpecSet ID. Will not be null, unless this instance contains an unparsed resource name.

Property Value
TypeDescription
String

IsKnownPattern

public bool IsKnownPattern { get; }

Whether this instance contains a resource name with a known pattern.

Property Value
TypeDescription
Boolean

ProjectId

public string ProjectId { get; }

The Project ID. Will not be null, unless this instance contains an unparsed resource name.

Property Value
TypeDescription
String

Type

public AnnotationSpecSetName.ResourceNameType Type { get; }

The AnnotationSpecSetName.ResourceNameType of the contained resource name.

Property Value
TypeDescription
AnnotationSpecSetName.ResourceNameType

UnparsedResource

public UnparsedResourceName UnparsedResource { get; }

The contained UnparsedResourceName. Only non-null if this instance contains an unparsed resource name.

Property Value
TypeDescription
UnparsedResourceName

Methods

Format(String, String)

public static string Format(string projectId, string annotationSpecSetId)

Formats the IDs into the string representation of this AnnotationSpecSetName with pattern projects/{project}/annotationSpecSets/{annotation_spec_set}.

Parameters
NameDescription
projectIdString

The Project ID. Must not be null or empty.

annotationSpecSetIdString

The AnnotationSpecSet ID. Must not be null or empty.

Returns
TypeDescription
String

The string representation of this AnnotationSpecSetName with pattern projects/{project}/annotationSpecSets/{annotation_spec_set}.

FormatProjectAnnotationSpecSet(String, String)

public static string FormatProjectAnnotationSpecSet(string projectId, string annotationSpecSetId)

Formats the IDs into the string representation of this AnnotationSpecSetName with pattern projects/{project}/annotationSpecSets/{annotation_spec_set}.

Parameters
NameDescription
projectIdString

The Project ID. Must not be null or empty.

annotationSpecSetIdString

The AnnotationSpecSet ID. Must not be null or empty.

Returns
TypeDescription
String

The string representation of this AnnotationSpecSetName with pattern projects/{project}/annotationSpecSets/{annotation_spec_set}.

FromProjectAnnotationSpecSet(String, String)

public static AnnotationSpecSetName FromProjectAnnotationSpecSet(string projectId, string annotationSpecSetId)

Creates a AnnotationSpecSetName with the pattern projects/{project}/annotationSpecSets/{annotation_spec_set}.

Parameters
NameDescription
projectIdString

The Project ID. Must not be null or empty.

annotationSpecSetIdString

The AnnotationSpecSet ID. Must not be null or empty.

Returns
TypeDescription
AnnotationSpecSetName

A new instance of AnnotationSpecSetName constructed from the provided ids.

FromUnparsed(UnparsedResourceName)

public static AnnotationSpecSetName FromUnparsed(UnparsedResourceName unparsedResourceName)

Creates a AnnotationSpecSetName containing an unparsed resource name.

Parameter
NameDescription
unparsedResourceNameUnparsedResourceName

The unparsed resource name. Must not be null.

Returns
TypeDescription
AnnotationSpecSetName

A new instance of AnnotationSpecSetName containing the provided unparsedResourceName.

GetHashCode()

public override int GetHashCode()

Returns a hash code for this resource name.

Returns
TypeDescription
Int32
Overrides

Parse(String)

public static AnnotationSpecSetName Parse(string annotationSpecSetName)

Parses the given resource name string into a new AnnotationSpecSetName instance.

Parameter
NameDescription
annotationSpecSetNameString

The resource name in string form. Must not be null.

Returns
TypeDescription
AnnotationSpecSetName

The parsed AnnotationSpecSetName if successful.

Remarks

To parse successfully, the resource name must be formatted as one of the following:

  • projects/{project}/annotationSpecSets/{annotation_spec_set}

Parse(String, Boolean)

public static AnnotationSpecSetName Parse(string annotationSpecSetName, bool allowUnparsed)

Parses the given resource name string into a new AnnotationSpecSetName instance; optionally allowing an unparseable resource name.

Parameters
NameDescription
annotationSpecSetNameString

The resource name in string form. Must not be null.

allowUnparsedBoolean

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.

Returns
TypeDescription
AnnotationSpecSetName

The parsed AnnotationSpecSetName if successful.

Remarks

To parse successfully, the resource name must be formatted as one of the following:

  • projects/{project}/annotationSpecSets/{annotation_spec_set}
Or may be in any format if allowUnparsed is true.

ToString()

public override string ToString()

The string representation of the resource name.

Returns
TypeDescription
String

The string representation of the resource name.

Overrides

TryParse(String, out AnnotationSpecSetName)

public static bool TryParse(string annotationSpecSetName, out AnnotationSpecSetName result)

Tries to parse the given resource name string into a new AnnotationSpecSetName instance.

Parameters
NameDescription
annotationSpecSetNameString

The resource name in string form. Must not be null.

resultAnnotationSpecSetName

When this method returns, the parsed AnnotationSpecSetName, or null if parsing failed.

Returns
TypeDescription
Boolean

true if the name was parsed successfully; false otherwise.

Remarks

To parse successfully, the resource name must be formatted as one of the following:

  • projects/{project}/annotationSpecSets/{annotation_spec_set}

TryParse(String, Boolean, out AnnotationSpecSetName)

public static bool TryParse(string annotationSpecSetName, bool allowUnparsed, out AnnotationSpecSetName result)

Tries to parse the given resource name string into a new AnnotationSpecSetName instance; optionally allowing an unparseable resource name.

Parameters
NameDescription
annotationSpecSetNameString

The resource name in string form. Must not be null.

allowUnparsedBoolean

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.

resultAnnotationSpecSetName

When this method returns, the parsed AnnotationSpecSetName, or null if parsing failed.

Returns
TypeDescription
Boolean

true if the name was parsed successfully; false otherwise.

Remarks

To parse successfully, the resource name must be formatted as one of the following:

  • projects/{project}/annotationSpecSets/{annotation_spec_set}
Or may be in any format if allowUnparsed is true.

Operators

Equality(AnnotationSpecSetName, AnnotationSpecSetName)

public static bool operator ==(AnnotationSpecSetName a, AnnotationSpecSetName b)
Parameters
NameDescription
aAnnotationSpecSetName
bAnnotationSpecSetName
Returns
TypeDescription
Boolean

Inequality(AnnotationSpecSetName, AnnotationSpecSetName)

public static bool operator !=(AnnotationSpecSetName a, AnnotationSpecSetName b)
Parameters
NameDescription
aAnnotationSpecSetName
bAnnotationSpecSetName
Returns
TypeDescription
Boolean