public sealed class TemplatedResourceName : IResourceName, IEquatable<TemplatedResourceName>Class for representing and working with resource names.
Namespace
Google.Api.GaxAssembly
Google.Api.Gax.dll
Remarks
A resource name is represented by a PathTemplate, an assignment of resource IDs to parameters in the template, and an optional service name. This class allows the service name and resource IDs to be modified, but only within the same template.
Constructors
TemplatedResourceName(PathTemplate, params string[])
public TemplatedResourceName(PathTemplate template, params string[] resourceIds)Creates a resource name with the given template and resource IDs.
The resource IDs are cloned, so later changes to resourceIds
are ignored. This constructor does not populate the ServiceName property,
but that can be set after construction.
| Parameters | |
|---|---|
| Name | Description |
template |
PathTemplateThe template for the new resource name. Must not be null. |
resourceIds |
stringThe resource IDs to populate template parameters with. Must not be null. |
Properties
IsKnownPattern
public bool IsKnownPattern { get; }Whether this instance contains a resource name with a known pattern.
| Property Value | |
|---|---|
| Type | Description |
bool |
|
this[int]
public string this[int index] { get; set; }Gets or sets the identifier for the specified parameter index.
| Parameter | |
|---|---|
| Name | Description |
index |
intThe index of the parameter value to retrieve. |
| Property Value | |
|---|---|
| Type | Description |
string |
The identifier within the resource name at the given parameter index. |
this[string]
public string this[string parameterName] { get; set; }Gets or sets the identifier for the specified parameter name.
| Parameter | |
|---|---|
| Name | Description |
parameterName |
stringThe name of the parameter value to retrieve. |