Class ZoneName (1.0.0)

public sealed class ZoneName : IResourceName, IEquatable<ZoneName>

Resource name for the Zone resource.

Inheritance

Object > ZoneName

Namespace

Google.Cloud.Dataplex.V1

Assembly

Google.Cloud.Dataplex.V1.dll

Constructors

ZoneName(String, String, String, String)

public ZoneName(string projectId, string locationId, string lakeId, string zoneId)

Constructs a new instance of a ZoneName class from the component parts of pattern projects/{project}/locations/{location}/lakes/{lake}/zones/{zone}

Parameters
NameDescription
projectIdString

The Project ID. Must not be null or empty.

locationIdString

The Location ID. Must not be null or empty.

lakeIdString

The Lake ID. Must not be null or empty.

zoneIdString

The Zone ID. Must not be null or empty.

Properties

IsKnownPattern

public bool IsKnownPattern { get; }

Whether this instance contains a resource name with a known pattern.

Property Value
TypeDescription
Boolean

LakeId

public string LakeId { get; }

The Lake ID. Will not be null, unless this instance contains an unparsed resource name.

Property Value
TypeDescription
String

LocationId

public string LocationId { get; }

The Location ID. Will not be null, unless this instance contains an unparsed resource name.

Property Value
TypeDescription
String

ProjectId

public string ProjectId { get; }

The Project ID. Will not be null, unless this instance contains an unparsed resource name.

Property Value
TypeDescription
String

Type

public ZoneName.ResourceNameType Type { get; }

The ZoneName.ResourceNameType of the contained resource name.

Property Value
TypeDescription
ZoneName.ResourceNameType

UnparsedResource

public UnparsedResourceName UnparsedResource { get; }

The contained UnparsedResourceName. Only non-null if this instance contains an unparsed resource name.

Property Value
TypeDescription
UnparsedResourceName

ZoneId

public string ZoneId { get; }

The Zone ID. Will not be null, unless this instance contains an unparsed resource name.

Property Value
TypeDescription
String

Methods

Format(String, String, String, String)

public static string Format(string projectId, string locationId, string lakeId, string zoneId)

Formats the IDs into the string representation of this ZoneName with pattern projects/{project}/locations/{location}/lakes/{lake}/zones/{zone}.

Parameters
NameDescription
projectIdString

The Project ID. Must not be null or empty.

locationIdString

The Location ID. Must not be null or empty.

lakeIdString

The Lake ID. Must not be null or empty.

zoneIdString

The Zone ID. Must not be null or empty.

Returns
TypeDescription
String

The string representation of this ZoneName with pattern projects/{project}/locations/{location}/lakes/{lake}/zones/{zone}.

FormatProjectLocationLakeZone(String, String, String, String)

public static string FormatProjectLocationLakeZone(string projectId, string locationId, string lakeId, string zoneId)

Formats the IDs into the string representation of this ZoneName with pattern projects/{project}/locations/{location}/lakes/{lake}/zones/{zone}.

Parameters
NameDescription
projectIdString

The Project ID. Must not be null or empty.

locationIdString

The Location ID. Must not be null or empty.

lakeIdString

The Lake ID. Must not be null or empty.

zoneIdString

The Zone ID. Must not be null or empty.

Returns
TypeDescription
String

The string representation of this ZoneName with pattern projects/{project}/locations/{location}/lakes/{lake}/zones/{zone}.

FromProjectLocationLakeZone(String, String, String, String)

public static ZoneName FromProjectLocationLakeZone(string projectId, string locationId, string lakeId, string zoneId)

Creates a ZoneName with the pattern projects/{project}/locations/{location}/lakes/{lake}/zones/{zone}.

Parameters
NameDescription
projectIdString

The Project ID. Must not be null or empty.

locationIdString

The Location ID. Must not be null or empty.

lakeIdString

The Lake ID. Must not be null or empty.

zoneIdString

The Zone ID. Must not be null or empty.

Returns
TypeDescription
ZoneName

A new instance of ZoneName constructed from the provided ids.

FromUnparsed(UnparsedResourceName)

public static ZoneName FromUnparsed(UnparsedResourceName unparsedResourceName)

Creates a ZoneName containing an unparsed resource name.

Parameter
NameDescription
unparsedResourceNameUnparsedResourceName

The unparsed resource name. Must not be null.

Returns
TypeDescription
ZoneName

A new instance of ZoneName containing the provided unparsedResourceName.

GetHashCode()

public override int GetHashCode()

Returns a hash code for this resource name.

Returns
TypeDescription
Int32
Overrides

Parse(String)

public static ZoneName Parse(string zoneName)

Parses the given resource name string into a new ZoneName instance.

Parameter
NameDescription
zoneNameString

The resource name in string form. Must not be null.

Returns
TypeDescription
ZoneName

The parsed ZoneName if successful.

Remarks

To parse successfully, the resource name must be formatted as one of the following:

  • projects/{project}/locations/{location}/lakes/{lake}/zones/{zone}

Parse(String, Boolean)

public static ZoneName Parse(string zoneName, bool allowUnparsed)

Parses the given resource name string into a new ZoneName instance; optionally allowing an unparseable resource name.

Parameters
NameDescription
zoneNameString

The resource name in string form. Must not be null.

allowUnparsedBoolean

If true will successfully store an unparseable resource name into the UnparsedResource property; otherwise will throw an ArgumentException if an unparseable resource name is specified.

Returns
TypeDescription
ZoneName

The parsed ZoneName if successful.

Remarks

To parse successfully, the resource name must be formatted as one of the following:

  • projects/{project}/locations/{location}/lakes/{lake}/zones/{zone}
Or may be in any format if allowUnparsed is true.

ToString()

public override string ToString()

The string representation of the resource name.

Returns
TypeDescription
String

The string representation of the resource name.

Overrides

TryParse(String, out ZoneName)

public static bool TryParse(string zoneName, out ZoneName result)

Tries to parse the given resource name string into a new ZoneName instance.

Parameters
NameDescription
zoneNameString

The resource name in string form. Must not be null.

resultZoneName

When this method returns, the parsed ZoneName, or null if parsing failed.

Returns
TypeDescription
Boolean

true if the name was parsed successfully; false otherwise.

Remarks

To parse successfully, the resource name must be formatted as one of the following:

  • projects/{project}/locations/{location}/lakes/{lake}/zones/{zone}

TryParse(String, Boolean, out ZoneName)

public static bool TryParse(string zoneName, bool allowUnparsed, out ZoneName result)

Tries to parse the given resource name string into a new ZoneName instance; optionally allowing an unparseable resource name.

Parameters
NameDescription
zoneNameString

The resource name in string form. Must not be null.

allowUnparsedBoolean

If true will successfully store an unparseable resource name into the UnparsedResource property; otherwise will throw an ArgumentException if an unparseable resource name is specified.

resultZoneName

When this method returns, the parsed ZoneName, or null if parsing failed.

Returns
TypeDescription
Boolean

true if the name was parsed successfully; false otherwise.

Remarks

To parse successfully, the resource name must be formatted as one of the following:

  • projects/{project}/locations/{location}/lakes/{lake}/zones/{zone}
Or may be in any format if allowUnparsed is true.

Operators

Equality(ZoneName, ZoneName)

public static bool operator ==(ZoneName a, ZoneName b)
Parameters
NameDescription
aZoneName
bZoneName
Returns
TypeDescription
Boolean

Inequality(ZoneName, ZoneName)

public static bool operator !=(ZoneName a, ZoneName b)
Parameters
NameDescription
aZoneName
bZoneName
Returns
TypeDescription
Boolean