public sealed class GatewayName : IResourceName, IEquatable<GatewayName>
Reference documentation and code samples for the API Gateway v1 API class GatewayName.
Resource name for the Gateway
resource.
Namespace
Google.Cloud.ApiGateway.V1Assembly
Google.Cloud.ApiGateway.V1.dll
Constructors
GatewayName(String, String, String)
public GatewayName(string projectId, string locationId, string gatewayId)
Constructs a new instance of a GatewayName class from the component parts of pattern
projects/{project}/locations/{location}/gateways/{gateway}
Parameters | |
---|---|
Name | Description |
projectId | String The |
locationId | String The |
gatewayId | String The |
Properties
GatewayId
public string GatewayId { get; }
The Gateway
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 |
Boolean |
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 GatewayName.ResourceNameType Type { get; }
The GatewayName.ResourceNameType of the contained resource name.
Property Value | |
---|---|
Type | Description |
GatewayName.ResourceNameType |
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 gatewayId)
Formats the IDs into the string representation of this GatewayName with pattern
projects/{project}/locations/{location}/gateways/{gateway}
.
Parameters | |
---|---|
Name | Description |
projectId | String The |
locationId | String The |
gatewayId | String The |
Returns | |
---|---|
Type | Description |
String | The string representation of this GatewayName with pattern
|
FormatProjectLocationGateway(String, String, String)
public static string FormatProjectLocationGateway(string projectId, string locationId, string gatewayId)
Formats the IDs into the string representation of this GatewayName with pattern
projects/{project}/locations/{location}/gateways/{gateway}
.
Parameters | |
---|---|
Name | Description |
projectId | String The |
locationId | String The |
gatewayId | String The |
Returns | |
---|---|
Type | Description |
String | The string representation of this GatewayName with pattern
|
FromProjectLocationGateway(String, String, String)
public static GatewayName FromProjectLocationGateway(string projectId, string locationId, string gatewayId)
Creates a GatewayName with the pattern
projects/{project}/locations/{location}/gateways/{gateway}
.
Parameters | |
---|---|
Name | Description |
projectId | String The |
locationId | String The |
gatewayId | String The |
Returns | |
---|---|
Type | Description |
GatewayName | A new instance of GatewayName constructed from the provided ids. |
FromUnparsed(UnparsedResourceName)
public static GatewayName FromUnparsed(UnparsedResourceName unparsedResourceName)
Creates a GatewayName containing an unparsed resource name.
Parameter | |
---|---|
Name | Description |
unparsedResourceName | UnparsedResourceName The unparsed resource name. Must not be |
Returns | |
---|---|
Type | Description |
GatewayName | A new instance of GatewayName containing the provided |
GetHashCode()
public override int GetHashCode()
Returns a hash code for this resource name.
Returns | |
---|---|
Type | Description |
Int32 |
Parse(String)
public static GatewayName Parse(string gatewayName)
Parses the given resource name string into a new GatewayName instance.
Parameter | |
---|---|
Name | Description |
gatewayName | String The resource name in string form. Must not be |
Returns | |
---|---|
Type | Description |
GatewayName | The parsed GatewayName if successful. |
To parse successfully, the resource name must be formatted as one of the following:
projects/{project}/locations/{location}/gateways/{gateway}
Parse(String, Boolean)
public static GatewayName Parse(string gatewayName, bool allowUnparsed)
Parses the given resource name string into a new GatewayName instance; optionally allowing an unparseable resource name.
Parameters | |
---|---|
Name | Description |
gatewayName | String The resource name in string form. Must not be |
allowUnparsed | Boolean If |
Returns | |
---|---|
Type | Description |
GatewayName | The parsed GatewayName if successful. |
To parse successfully, the resource name must be formatted as one of the following:
projects/{project}/locations/{location}/gateways/{gateway}
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 GatewayName)
public static bool TryParse(string gatewayName, out GatewayName result)
Tries to parse the given resource name string into a new GatewayName instance.
Parameters | |
---|---|
Name | Description |
gatewayName | String The resource name in string form. Must not be |
result | GatewayName When this method returns, the parsed GatewayName, or |
Returns | |
---|---|
Type | Description |
Boolean |
|
To parse successfully, the resource name must be formatted as one of the following:
projects/{project}/locations/{location}/gateways/{gateway}
TryParse(String, Boolean, out GatewayName)
public static bool TryParse(string gatewayName, bool allowUnparsed, out GatewayName result)
Tries to parse the given resource name string into a new GatewayName instance; optionally allowing an unparseable resource name.
Parameters | |
---|---|
Name | Description |
gatewayName | String The resource name in string form. Must not be |
allowUnparsed | Boolean If |
result | GatewayName When this method returns, the parsed GatewayName, or |
Returns | |
---|---|
Type | Description |
Boolean |
|
To parse successfully, the resource name must be formatted as one of the following:
projects/{project}/locations/{location}/gateways/{gateway}
allowUnparsed
is true
.
Operators
Equality(GatewayName, GatewayName)
public static bool operator ==(GatewayName a, GatewayName b)
Parameters | |
---|---|
Name | Description |
a | GatewayName |
b | GatewayName |
Returns | |
---|---|
Type | Description |
Boolean |
Inequality(GatewayName, GatewayName)
public static bool operator !=(GatewayName a, GatewayName b)
Parameters | |
---|---|
Name | Description |
a | GatewayName |
b | GatewayName |
Returns | |
---|---|
Type | Description |
Boolean |