public sealed class DiscoveredApiObservationName : IResourceName, IEquatable<DiscoveredApiObservationName>
Reference documentation and code samples for the API hub v1 API class DiscoveredApiObservationName.
Resource name for the DiscoveredApiObservation
resource.
Namespace
Google.Cloud.ApiHub.V1Assembly
Google.Cloud.ApiHub.V1.dll
Constructors
DiscoveredApiObservationName(string, string, string)
public DiscoveredApiObservationName(string projectId, string locationId, string discoveredApiObservationId)
Constructs a new instance of a DiscoveredApiObservationName class from the component parts of
pattern projects/{project}/locations/{location}/discoveredApiObservations/{discovered_api_observation}
Parameters | |
---|---|
Name | Description |
projectId |
string The |
locationId |
string The |
discoveredApiObservationId |
string The |
Properties
DiscoveredApiObservationId
public string DiscoveredApiObservationId { get; }
The DiscoveredApiObservation
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 |
Type
public DiscoveredApiObservationName.ResourceNameType Type { get; }
The DiscoveredApiObservationName.ResourceNameType of the contained resource name.
Property Value | |
---|---|
Type | Description |
DiscoveredApiObservationNameResourceNameType |
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)
public static string Format(string projectId, string locationId, string discoveredApiObservationId)
Formats the IDs into the string representation of this DiscoveredApiObservationName with
pattern projects/{project}/locations/{location}/discoveredApiObservations/{discovered_api_observation}
.
Parameters | |
---|---|
Name | Description |
projectId |
string The |
locationId |
string The |
discoveredApiObservationId |
string The |
Returns | |
---|---|
Type | Description |
string |
The string representation of this DiscoveredApiObservationName with pattern
|
FormatProjectLocationDiscoveredApiObservation(string, string, string)
public static string FormatProjectLocationDiscoveredApiObservation(string projectId, string locationId, string discoveredApiObservationId)
Formats the IDs into the string representation of this DiscoveredApiObservationName with
pattern projects/{project}/locations/{location}/discoveredApiObservations/{discovered_api_observation}
.
Parameters | |
---|---|
Name | Description |
projectId |
string The |
locationId |
string The |
discoveredApiObservationId |
string The |
Returns | |
---|---|
Type | Description |
string |
The string representation of this DiscoveredApiObservationName with pattern
|
FromProjectLocationDiscoveredApiObservation(string, string, string)
public static DiscoveredApiObservationName FromProjectLocationDiscoveredApiObservation(string projectId, string locationId, string discoveredApiObservationId)
Creates a DiscoveredApiObservationName with the pattern
projects/{project}/locations/{location}/discoveredApiObservations/{discovered_api_observation}
.
Parameters | |
---|---|
Name | Description |
projectId |
string The |
locationId |
string The |
discoveredApiObservationId |
string The |
Returns | |
---|---|
Type | Description |
DiscoveredApiObservationName |
A new instance of DiscoveredApiObservationName constructed from the provided ids. |
FromUnparsed(UnparsedResourceName)
public static DiscoveredApiObservationName FromUnparsed(UnparsedResourceName unparsedResourceName)
Creates a DiscoveredApiObservationName containing an unparsed resource name.
Parameter | |
---|---|
Name | Description |
unparsedResourceName |
UnparsedResourceName The unparsed resource name. Must not be |
Returns | |
---|---|
Type | Description |
DiscoveredApiObservationName |
A new instance of DiscoveredApiObservationName containing the provided
|
GetHashCode()
public override int GetHashCode()
Returns a hash code for this resource name.
Returns | |
---|---|
Type | Description |
int |
Parse(string)
public static DiscoveredApiObservationName Parse(string discoveredApiObservationName)
Parses the given resource name string into a new DiscoveredApiObservationName instance.
Parameter | |
---|---|
Name | Description |
discoveredApiObservationName |
string The resource name in string form. Must not be |
Returns | |
---|---|
Type | Description |
DiscoveredApiObservationName |
The parsed DiscoveredApiObservationName if successful. |
To parse successfully, the resource name must be formatted as one of the following:
-
projects/{project}/locations/{location}/discoveredApiObservations/{discovered_api_observation}
Parse(string, bool)
public static DiscoveredApiObservationName Parse(string discoveredApiObservationName, bool allowUnparsed)
Parses the given resource name string into a new DiscoveredApiObservationName instance; optionally allowing an unparseable resource name.
Parameters | |
---|---|
Name | Description |
discoveredApiObservationName |
string The resource name in string form. Must not be |
allowUnparsed |
bool If |
Returns | |
---|---|
Type | Description |
DiscoveredApiObservationName |
The parsed DiscoveredApiObservationName if successful. |
To parse successfully, the resource name must be formatted as one of the following:
-
projects/{project}/locations/{location}/discoveredApiObservations/{discovered_api_observation}
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 DiscoveredApiObservationName)
public static bool TryParse(string discoveredApiObservationName, out DiscoveredApiObservationName result)
Tries to parse the given resource name string into a new DiscoveredApiObservationName instance.
Parameters | |
---|---|
Name | Description |
discoveredApiObservationName |
string The resource name in string form. Must not be |
result |
DiscoveredApiObservationName When this method returns, the parsed DiscoveredApiObservationName, or |
Returns | |
---|---|
Type | Description |
bool |
|
To parse successfully, the resource name must be formatted as one of the following:
-
projects/{project}/locations/{location}/discoveredApiObservations/{discovered_api_observation}
TryParse(string, bool, out DiscoveredApiObservationName)
public static bool TryParse(string discoveredApiObservationName, bool allowUnparsed, out DiscoveredApiObservationName result)
Tries to parse the given resource name string into a new DiscoveredApiObservationName instance; optionally allowing an unparseable resource name.
Parameters | |
---|---|
Name | Description |
discoveredApiObservationName |
string The resource name in string form. Must not be |
allowUnparsed |
bool If |
result |
DiscoveredApiObservationName When this method returns, the parsed DiscoveredApiObservationName, or |
Returns | |
---|---|
Type | Description |
bool |
|
To parse successfully, the resource name must be formatted as one of the following:
-
projects/{project}/locations/{location}/discoveredApiObservations/{discovered_api_observation}
allowUnparsed
is true
.
Operators
operator ==(DiscoveredApiObservationName, DiscoveredApiObservationName)
public static bool operator ==(DiscoveredApiObservationName a, DiscoveredApiObservationName b)
Determines whether two specified resource names have the same value.
Parameters | |
---|---|
Name | Description |
a |
DiscoveredApiObservationName The first resource name to compare, or null. |
b |
DiscoveredApiObservationName The second resource name to compare, or null. |
Returns | |
---|---|
Type | Description |
bool |
true if the value of |
operator !=(DiscoveredApiObservationName, DiscoveredApiObservationName)
public static bool operator !=(DiscoveredApiObservationName a, DiscoveredApiObservationName b)
Determines whether two specified resource names have different values.
Parameters | |
---|---|
Name | Description |
a |
DiscoveredApiObservationName The first resource name to compare, or null. |
b |
DiscoveredApiObservationName The second resource name to compare, or null. |
Returns | |
---|---|
Type | Description |
bool |
true if the value of |