Design Center v1 API - Class CatalogTemplateName (1.0.0-beta01)

public sealed class CatalogTemplateName : IResourceName, IEquatable<CatalogTemplateName>

Reference documentation and code samples for the Design Center v1 API class CatalogTemplateName.

Resource name for the CatalogTemplate resource.

Inheritance

object > CatalogTemplateName

Namespace

Google.Cloud.DesignCenter.V1

Assembly

Google.Cloud.DesignCenter.V1.dll

Constructors

CatalogTemplateName(string, string, string, string, string)

public CatalogTemplateName(string projectId, string locationId, string spaceId, string catalogId, string catalogTemplateId)

Constructs a new instance of a CatalogTemplateName class from the component parts of pattern projects/{project}/locations/{location}/spaces/{space}/catalogs/{catalog}/templates/{catalog_template}

Parameters
Name Description
projectId string

The Project ID. Must not be null or empty.

locationId string

The Location ID. Must not be null or empty.

spaceId string

The Space ID. Must not be null or empty.

catalogId string

The Catalog ID. Must not be null or empty.

catalogTemplateId string

The CatalogTemplate ID. Must not be null or empty.

Properties

CatalogId

public string CatalogId { get; }

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

Property Value
Type Description
string

CatalogTemplateId

public string CatalogTemplateId { get; }

The CatalogTemplate 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
bool

LocationId

public string LocationId { get; }

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

Property Value
Type Description
string

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

SpaceId

public string SpaceId { get; }

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

Property Value
Type Description
string

Type

public CatalogTemplateName.ResourceNameType Type { get; }

The CatalogTemplateName.ResourceNameType of the contained resource name.

Property Value
Type Description
CatalogTemplateNameResourceNameType

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, string)

public static string Format(string projectId, string locationId, string spaceId, string catalogId, string catalogTemplateId)

Formats the IDs into the string representation of this CatalogTemplateName with pattern projects/{project}/locations/{location}/spaces/{space}/catalogs/{catalog}/templates/{catalog_template} .

Parameters
Name Description
projectId string

The Project ID. Must not be null or empty.

locationId string

The Location ID. Must not be null or empty.

spaceId string

The Space ID. Must not be null or empty.

catalogId string

The Catalog ID. Must not be null or empty.

catalogTemplateId string

The CatalogTemplate ID. Must not be null or empty.

Returns
Type Description
string

The string representation of this CatalogTemplateName with pattern projects/{project}/locations/{location}/spaces/{space}/catalogs/{catalog}/templates/{catalog_template} .

FormatProjectLocationSpaceCatalogCatalogTemplate(string, string, string, string, string)

public static string FormatProjectLocationSpaceCatalogCatalogTemplate(string projectId, string locationId, string spaceId, string catalogId, string catalogTemplateId)

Formats the IDs into the string representation of this CatalogTemplateName with pattern projects/{project}/locations/{location}/spaces/{space}/catalogs/{catalog}/templates/{catalog_template} .

Parameters
Name Description
projectId string

The Project ID. Must not be null or empty.

locationId string

The Location ID. Must not be null or empty.

spaceId string

The Space ID. Must not be null or empty.

catalogId string

The Catalog ID. Must not be null or empty.

catalogTemplateId string

The CatalogTemplate ID. Must not be null or empty.

Returns
Type Description
string

The string representation of this CatalogTemplateName with pattern projects/{project}/locations/{location}/spaces/{space}/catalogs/{catalog}/templates/{catalog_template} .

FromProjectLocationSpaceCatalogCatalogTemplate(string, string, string, string, string)

public static CatalogTemplateName FromProjectLocationSpaceCatalogCatalogTemplate(string projectId, string locationId, string spaceId, string catalogId, string catalogTemplateId)

Creates a CatalogTemplateName with the pattern projects/{project}/locations/{location}/spaces/{space}/catalogs/{catalog}/templates/{catalog_template} .

Parameters
Name Description
projectId string

The Project ID. Must not be null or empty.

locationId string

The Location ID. Must not be null or empty.

spaceId string

The Space ID. Must not be null or empty.

catalogId string

The Catalog ID. Must not be null or empty.

catalogTemplateId string

The CatalogTemplate ID. Must not be null or empty.

Returns
Type Description
CatalogTemplateName

A new instance of CatalogTemplateName constructed from the provided ids.

FromUnparsed(UnparsedResourceName)

public static CatalogTemplateName FromUnparsed(UnparsedResourceName unparsedResourceName)

Creates a CatalogTemplateName containing an unparsed resource name.

Parameter
Name Description
unparsedResourceName UnparsedResourceName

The unparsed resource name. Must not be null.

Returns
Type Description
CatalogTemplateName

A new instance of CatalogTemplateName containing the provided unparsedResourceName.

GetHashCode()

public override int GetHashCode()

Returns a hash code for this resource name.

Returns
Type Description
int
Overrides

Parse(string)

public static CatalogTemplateName Parse(string catalogTemplateName)

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

Parameter
Name Description
catalogTemplateName string

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

Returns
Type Description
CatalogTemplateName

The parsed CatalogTemplateName if successful.

Remarks

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

  • projects/{project}/locations/{location}/spaces/{space}/catalogs/{catalog}/templates/{catalog_template}

Parse(string, bool)

public static CatalogTemplateName Parse(string catalogTemplateName, bool allowUnparsed)

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

Parameters
Name Description
catalogTemplateName string

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

allowUnparsed bool

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
Type Description
CatalogTemplateName

The parsed CatalogTemplateName if successful.

Remarks

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

  • projects/{project}/locations/{location}/spaces/{space}/catalogs/{catalog}/templates/{catalog_template}

Or may be in any format if 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.

Overrides

TryParse(string, out CatalogTemplateName)

public static bool TryParse(string catalogTemplateName, out CatalogTemplateName result)

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

Parameters
Name Description
catalogTemplateName string

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

result CatalogTemplateName

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

Returns
Type Description
bool

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}/locations/{location}/spaces/{space}/catalogs/{catalog}/templates/{catalog_template}

TryParse(string, bool, out CatalogTemplateName)

public static bool TryParse(string catalogTemplateName, bool allowUnparsed, out CatalogTemplateName result)

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

Parameters
Name Description
catalogTemplateName string

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

allowUnparsed bool

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.

result CatalogTemplateName

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

Returns
Type Description
bool

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}/locations/{location}/spaces/{space}/catalogs/{catalog}/templates/{catalog_template}

Or may be in any format if allowUnparsed is true.

Operators

operator ==(CatalogTemplateName, CatalogTemplateName)

public static bool operator ==(CatalogTemplateName a, CatalogTemplateName b)

Determines whether two specified resource names have the same value.

Parameters
Name Description
a CatalogTemplateName

The first resource name to compare, or null.

b CatalogTemplateName

The second resource name to compare, or null.

Returns
Type Description
bool

true if the value of a is the same as the value of b; otherwise, false.

operator !=(CatalogTemplateName, CatalogTemplateName)

public static bool operator !=(CatalogTemplateName a, CatalogTemplateName b)

Determines whether two specified resource names have different values.

Parameters
Name Description
a CatalogTemplateName

The first resource name to compare, or null.

b CatalogTemplateName

The second resource name to compare, or null.

Returns
Type Description
bool

true if the value of a is different from the value of b; otherwise, false.