public sealed class AddressGroupName : IResourceName, IEquatable<AddressGroupName>Reference documentation and code samples for the Network Security v1 API class AddressGroupName.
Resource name for the AddressGroup resource.
Namespace
Google.Cloud.NetworkSecurity.V1Assembly
Google.Cloud.NetworkSecurity.V1.dll
Constructors
AddressGroupName(string, string, string)
public AddressGroupName(string projectId, string locationId, string addressGroupId)Constructs a new instance of a AddressGroupName class from the component parts of pattern
projects/{project}/locations/{location}/addressGroups/{address_group}
| Parameters | |
|---|---|
| Name | Description |
projectId |
stringThe |
locationId |
stringThe |
addressGroupId |
stringThe |
Properties
AddressGroupId
public string AddressGroupId { get; }The AddressGroup 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 |
|
OrganizationId
public string OrganizationId { get; }The Organization 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 |
|
Type
public AddressGroupName.ResourceNameType Type { get; }The AddressGroupName.ResourceNameType of the contained resource name.
| Property Value | |
|---|---|
| Type | Description |
AddressGroupNameResourceNameType |
|
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 addressGroupId)Formats the IDs into the string representation of this AddressGroupName with pattern
projects/{project}/locations/{location}/addressGroups/{address_group}.
| Parameters | |
|---|---|
| Name | Description |
projectId |
stringThe |
locationId |
stringThe |
addressGroupId |
stringThe |
| Returns | |
|---|---|
| Type | Description |
string |
The string representation of this AddressGroupName with pattern
|
FormatOrganizationLocationAddressGroup(string, string, string)
public static string FormatOrganizationLocationAddressGroup(string organizationId, string locationId, string addressGroupId)Formats the IDs into the string representation of this AddressGroupName with pattern
organizations/{organization}/locations/{location}/addressGroups/{address_group}.
| Parameters | |
|---|---|
| Name | Description |
organizationId |
stringThe |
locationId |
stringThe |
addressGroupId |
stringThe |
| Returns | |
|---|---|
| Type | Description |
string |
The string representation of this AddressGroupName with pattern
|
FormatProjectLocationAddressGroup(string, string, string)
public static string FormatProjectLocationAddressGroup(string projectId, string locationId, string addressGroupId)Formats the IDs into the string representation of this AddressGroupName with pattern
projects/{project}/locations/{location}/addressGroups/{address_group}.
| Parameters | |
|---|---|
| Name | Description |
projectId |
stringThe |
locationId |
stringThe |
addressGroupId |
stringThe |
| Returns | |
|---|---|
| Type | Description |
string |
The string representation of this AddressGroupName with pattern
|
FromOrganizationLocationAddressGroup(string, string, string)
public static AddressGroupName FromOrganizationLocationAddressGroup(string organizationId, string locationId, string addressGroupId)Creates a AddressGroupName with the pattern
organizations/{organization}/locations/{location}/addressGroups/{address_group}.
| Parameters | |
|---|---|
| Name | Description |
organizationId |
stringThe |
locationId |
stringThe |
addressGroupId |
stringThe |
| Returns | |
|---|---|
| Type | Description |
AddressGroupName |
A new instance of AddressGroupName constructed from the provided ids. |
FromProjectLocationAddressGroup(string, string, string)
public static AddressGroupName FromProjectLocationAddressGroup(string projectId, string locationId, string addressGroupId)Creates a AddressGroupName with the pattern
projects/{project}/locations/{location}/addressGroups/{address_group}.
| Parameters | |
|---|---|
| Name | Description |
projectId |
stringThe |
locationId |
stringThe |
addressGroupId |
stringThe |
| Returns | |
|---|---|
| Type | Description |
AddressGroupName |
A new instance of AddressGroupName constructed from the provided ids. |
FromUnparsed(UnparsedResourceName)
public static AddressGroupName FromUnparsed(UnparsedResourceName unparsedResourceName)Creates a AddressGroupName containing an unparsed resource name.
| Parameter | |
|---|---|
| Name | Description |
unparsedResourceName |
UnparsedResourceNameThe unparsed resource name. Must not be |
| Returns | |
|---|---|
| Type | Description |
AddressGroupName |
A new instance of AddressGroupName containing the provided
|
GetHashCode()
public override int GetHashCode()Returns a hash code for this resource name.
| Returns | |
|---|---|
| Type | Description |
int |
|
Parse(string)
public static AddressGroupName Parse(string addressGroupName)Parses the given resource name string into a new AddressGroupName instance.
| Parameter | |
|---|---|
| Name | Description |
addressGroupName |
stringThe resource name in string form. Must not be |
| Returns | |
|---|---|
| Type | Description |
AddressGroupName |
The parsed AddressGroupName if successful. |
To parse successfully, the resource name must be formatted as one of the following:
projects/{project}/locations/{location}/addressGroups/{address_group}-
organizations/{organization}/locations/{location}/addressGroups/{address_group}
Parse(string, bool)
public static AddressGroupName Parse(string addressGroupName, bool allowUnparsed)Parses the given resource name string into a new AddressGroupName instance; optionally allowing an unparseable resource name.
| Parameters | |
|---|---|
| Name | Description |
addressGroupName |
stringThe resource name in string form. Must not be |
allowUnparsed |
boolIf |
| Returns | |
|---|---|
| Type | Description |
AddressGroupName |
The parsed AddressGroupName if successful. |
To parse successfully, the resource name must be formatted as one of the following:
projects/{project}/locations/{location}/addressGroups/{address_group}-
organizations/{organization}/locations/{location}/addressGroups/{address_group}
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. |
TryParse(string, out AddressGroupName)
public static bool TryParse(string addressGroupName, out AddressGroupName result)Tries to parse the given resource name string into a new AddressGroupName instance.
| Parameters | |
|---|---|
| Name | Description |
addressGroupName |
stringThe resource name in string form. Must not be |
result |
AddressGroupNameWhen this method returns, the parsed AddressGroupName, or |
| Returns | |
|---|---|
| Type | Description |
bool |
|
To parse successfully, the resource name must be formatted as one of the following:
projects/{project}/locations/{location}/addressGroups/{address_group}-
organizations/{organization}/locations/{location}/addressGroups/{address_group}
TryParse(string, bool, out AddressGroupName)
public static bool TryParse(string addressGroupName, bool allowUnparsed, out AddressGroupName result)Tries to parse the given resource name string into a new AddressGroupName instance; optionally allowing an unparseable resource name.
| Parameters | |
|---|---|
| Name | Description |
addressGroupName |
stringThe resource name in string form. Must not be |
allowUnparsed |
boolIf |
result |
AddressGroupNameWhen this method returns, the parsed AddressGroupName, or |
| Returns | |
|---|---|
| Type | Description |
bool |
|
To parse successfully, the resource name must be formatted as one of the following:
projects/{project}/locations/{location}/addressGroups/{address_group}-
organizations/{organization}/locations/{location}/addressGroups/{address_group}
Or may be in any format if allowUnparsed is true.
Operators
operator ==(AddressGroupName, AddressGroupName)
public static bool operator ==(AddressGroupName a, AddressGroupName b)Determines whether two specified resource names have the same value.
| Parameters | |
|---|---|
| Name | Description |
a |
AddressGroupNameThe first resource name to compare, or null. |
b |
AddressGroupNameThe second resource name to compare, or null. |
| Returns | |
|---|---|
| Type | Description |
bool |
true if the value of |
operator !=(AddressGroupName, AddressGroupName)
public static bool operator !=(AddressGroupName a, AddressGroupName b)Determines whether two specified resource names have different values.
| Parameters | |
|---|---|
| Name | Description |
a |
AddressGroupNameThe first resource name to compare, or null. |
b |
AddressGroupNameThe second resource name to compare, or null. |
| Returns | |
|---|---|
| Type | Description |
bool |
true if the value of |