public sealed class AnswerName : IResourceName, IEquatable<AnswerName>Reference documentation and code samples for the Discovery Engine v1 API class AnswerName.
Resource name for the Answer resource.
Namespace
Google.Cloud.DiscoveryEngine.V1Assembly
Google.Cloud.DiscoveryEngine.V1.dll
Constructors
AnswerName(string, string, string, string, string)
public AnswerName(string projectId, string locationId, string dataStoreId, string sessionId, string answerId)Constructs a new instance of a AnswerName class from the component parts of pattern
projects/{project}/locations/{location}/dataStores/{data_store}/sessions/{session}/answers/{answer}
| Parameters | |
|---|---|
| Name | Description |
projectId |
stringThe |
locationId |
stringThe |
dataStoreId |
stringThe |
sessionId |
stringThe |
answerId |
stringThe |
Properties
AnswerId
public string AnswerId { get; }The Answer ID. May be null, depending on which resource name is contained by this instance.
| Property Value | |
|---|---|
| Type | Description |
string |
|
CollectionId
public string CollectionId { get; }The Collection ID. May be null, depending on which resource name is contained by this
instance.
| Property Value | |
|---|---|
| Type | Description |
string |
|
DataStoreId
public string DataStoreId { get; }The DataStore ID. May be null, depending on which resource name is contained by this instance.
| Property Value | |
|---|---|
| Type | Description |
string |
|
EngineId
public string EngineId { get; }The Engine ID. May be null, depending on which resource name is contained by this instance.
| 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. May be null, depending on which resource name is contained by this instance.
| Property Value | |
|---|---|
| Type | Description |
string |
|
ProjectId
public string ProjectId { get; }The Project ID. May be null, depending on which resource name is contained by this instance.
| Property Value | |
|---|---|
| Type | Description |
string |
|
SessionId
public string SessionId { get; }The Session ID. May be null, depending on which resource name is contained by this instance.
| Property Value | |
|---|---|
| Type | Description |
string |
|
Type
public AnswerName.ResourceNameType Type { get; }The AnswerName.ResourceNameType of the contained resource name.
| Property Value | |
|---|---|
| Type | Description |
AnswerNameResourceNameType |
|
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 dataStoreId, string sessionId, string answerId)Formats the IDs into the string representation of this AnswerName with pattern
projects/{project}/locations/{location}/dataStores/{data_store}/sessions/{session}/answers/{answer}.
| Parameters | |
|---|---|
| Name | Description |
projectId |
stringThe |
locationId |
stringThe |
dataStoreId |
stringThe |
sessionId |
stringThe |
answerId |
stringThe |
| Returns | |
|---|---|
| Type | Description |
string |
The string representation of this AnswerName with pattern
|
FormatProjectLocationCollectionDataStoreSessionAnswer(string, string, string, string, string, string)
public static string FormatProjectLocationCollectionDataStoreSessionAnswer(string projectId, string locationId, string collectionId, string dataStoreId, string sessionId, string answerId)Formats the IDs into the string representation of this AnswerName with pattern
projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/sessions/{session}/answers/{answer}
.
| Parameters | |
|---|---|
| Name | Description |
projectId |
stringThe |
locationId |
stringThe |
collectionId |
stringThe |
dataStoreId |
stringThe |
sessionId |
stringThe |
answerId |
stringThe |
| Returns | |
|---|---|
| Type | Description |
string |
The string representation of this AnswerName with pattern
|
FormatProjectLocationCollectionEngineSessionAnswer(string, string, string, string, string, string)
public static string FormatProjectLocationCollectionEngineSessionAnswer(string projectId, string locationId, string collectionId, string engineId, string sessionId, string answerId)Formats the IDs into the string representation of this AnswerName with pattern
projects/{project}/locations/{location}/collections/{collection}/engines/{engine}/sessions/{session}/answers/{answer}
.
| Parameters | |
|---|---|
| Name | Description |
projectId |
stringThe |
locationId |
stringThe |
collectionId |
stringThe |
engineId |
stringThe |
sessionId |
stringThe |
answerId |
stringThe |
| Returns | |
|---|---|
| Type | Description |
string |
The string representation of this AnswerName with pattern
|
FormatProjectLocationDataStoreSessionAnswer(string, string, string, string, string)
public static string FormatProjectLocationDataStoreSessionAnswer(string projectId, string locationId, string dataStoreId, string sessionId, string answerId)Formats the IDs into the string representation of this AnswerName with pattern
projects/{project}/locations/{location}/dataStores/{data_store}/sessions/{session}/answers/{answer}.
| Parameters | |
|---|---|
| Name | Description |
projectId |
stringThe |
locationId |
stringThe |
dataStoreId |
stringThe |
sessionId |
stringThe |
answerId |
stringThe |
| Returns | |
|---|---|
| Type | Description |
string |
The string representation of this AnswerName with pattern
|
FromProjectLocationCollectionDataStoreSessionAnswer(string, string, string, string, string, string)
public static AnswerName FromProjectLocationCollectionDataStoreSessionAnswer(string projectId, string locationId, string collectionId, string dataStoreId, string sessionId, string answerId)Creates a AnswerName with the pattern
projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/sessions/{session}/answers/{answer}
.
| Parameters | |
|---|---|
| Name | Description |
projectId |
stringThe |
locationId |
stringThe |
collectionId |
stringThe |
dataStoreId |
stringThe |
sessionId |
stringThe |
answerId |
stringThe |
| Returns | |
|---|---|
| Type | Description |
AnswerName |
A new instance of AnswerName constructed from the provided ids. |
FromProjectLocationCollectionEngineSessionAnswer(string, string, string, string, string, string)
public static AnswerName FromProjectLocationCollectionEngineSessionAnswer(string projectId, string locationId, string collectionId, string engineId, string sessionId, string answerId)Creates a AnswerName with the pattern
projects/{project}/locations/{location}/collections/{collection}/engines/{engine}/sessions/{session}/answers/{answer}
.
| Parameters | |
|---|---|
| Name | Description |
projectId |
stringThe |
locationId |
stringThe |
collectionId |
stringThe |
engineId |
stringThe |
sessionId |
stringThe |
answerId |
stringThe |
| Returns | |
|---|---|
| Type | Description |
AnswerName |
A new instance of AnswerName constructed from the provided ids. |
FromProjectLocationDataStoreSessionAnswer(string, string, string, string, string)
public static AnswerName FromProjectLocationDataStoreSessionAnswer(string projectId, string locationId, string dataStoreId, string sessionId, string answerId)Creates a AnswerName with the pattern
projects/{project}/locations/{location}/dataStores/{data_store}/sessions/{session}/answers/{answer}.
| Parameters | |
|---|---|
| Name | Description |
projectId |
stringThe |
locationId |
stringThe |
dataStoreId |
stringThe |
sessionId |
stringThe |
answerId |
stringThe |
| Returns | |
|---|---|
| Type | Description |
AnswerName |
A new instance of AnswerName constructed from the provided ids. |
FromUnparsed(UnparsedResourceName)
public static AnswerName FromUnparsed(UnparsedResourceName unparsedResourceName)Creates a AnswerName containing an unparsed resource name.
| Parameter | |
|---|---|
| Name | Description |
unparsedResourceName |
UnparsedResourceNameThe unparsed resource name. Must not be |
| Returns | |
|---|---|
| Type | Description |
AnswerName |
A new instance of AnswerName containing the provided |
GetHashCode()
public override int GetHashCode()Returns a hash code for this resource name.
| Returns | |
|---|---|
| Type | Description |
int |
|
Parse(string)
public static AnswerName Parse(string answerName)Parses the given resource name string into a new AnswerName instance.
| Parameter | |
|---|---|
| Name | Description |
answerName |
stringThe resource name in string form. Must not be |
| Returns | |
|---|---|
| Type | Description |
AnswerName |
The parsed AnswerName if successful. |
To parse successfully, the resource name must be formatted as one of the following:
-
projects/{project}/locations/{location}/dataStores/{data_store}/sessions/{session}/answers/{answer} -
projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/sessions/{session}/answers/{answer} -
projects/{project}/locations/{location}/collections/{collection}/engines/{engine}/sessions/{session}/answers/{answer}
Parse(string, bool)
public static AnswerName Parse(string answerName, bool allowUnparsed)Parses the given resource name string into a new AnswerName instance; optionally allowing an unparseable resource name.
| Parameters | |
|---|---|
| Name | Description |
answerName |
stringThe resource name in string form. Must not be |
allowUnparsed |
boolIf |
| Returns | |
|---|---|
| Type | Description |
AnswerName |
The parsed AnswerName if successful. |
To parse successfully, the resource name must be formatted as one of the following:
-
projects/{project}/locations/{location}/dataStores/{data_store}/sessions/{session}/answers/{answer} -
projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/sessions/{session}/answers/{answer} -
projects/{project}/locations/{location}/collections/{collection}/engines/{engine}/sessions/{session}/answers/{answer}
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 AnswerName)
public static bool TryParse(string answerName, out AnswerName result)Tries to parse the given resource name string into a new AnswerName instance.
| Parameters | |
|---|---|
| Name | Description |
answerName |
stringThe resource name in string form. Must not be |
result |
AnswerNameWhen this method returns, the parsed AnswerName, or |
| Returns | |
|---|---|
| Type | Description |
bool |
|
To parse successfully, the resource name must be formatted as one of the following:
-
projects/{project}/locations/{location}/dataStores/{data_store}/sessions/{session}/answers/{answer} -
projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/sessions/{session}/answers/{answer} -
projects/{project}/locations/{location}/collections/{collection}/engines/{engine}/sessions/{session}/answers/{answer}
TryParse(string, bool, out AnswerName)
public static bool TryParse(string answerName, bool allowUnparsed, out AnswerName result)Tries to parse the given resource name string into a new AnswerName instance; optionally allowing an unparseable resource name.
| Parameters | |
|---|---|
| Name | Description |
answerName |
stringThe resource name in string form. Must not be |
allowUnparsed |
boolIf |
result |
AnswerNameWhen this method returns, the parsed AnswerName, or |
| Returns | |
|---|---|
| Type | Description |
bool |
|
To parse successfully, the resource name must be formatted as one of the following:
-
projects/{project}/locations/{location}/dataStores/{data_store}/sessions/{session}/answers/{answer} -
projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/sessions/{session}/answers/{answer} -
projects/{project}/locations/{location}/collections/{collection}/engines/{engine}/sessions/{session}/answers/{answer}
allowUnparsed is true.
Operators
operator ==(AnswerName, AnswerName)
public static bool operator ==(AnswerName a, AnswerName b)Determines whether two specified resource names have the same value.
| Parameters | |
|---|---|
| Name | Description |
a |
AnswerNameThe first resource name to compare, or null. |
b |
AnswerNameThe second resource name to compare, or null. |
| Returns | |
|---|---|
| Type | Description |
bool |
true if the value of |
operator !=(AnswerName, AnswerName)
public static bool operator !=(AnswerName a, AnswerName b)Determines whether two specified resource names have different values.
| Parameters | |
|---|---|
| Name | Description |
a |
AnswerNameThe first resource name to compare, or null. |
b |
AnswerNameThe second resource name to compare, or null. |
| Returns | |
|---|---|
| Type | Description |
bool |
true if the value of |