Class BillingAccountLocationName (4.0.0)

public sealed class BillingAccountLocationName : IResourceName, IEquatable<BillingAccountLocationName>

Resource name for the BillingAccountLocation resource.

Inheritance

Object > BillingAccountLocationName

Namespace

Google.Cloud.Logging.V2

Assembly

Google.Cloud.Logging.V2.dll

Constructors

BillingAccountLocationName(String, String)

public BillingAccountLocationName(string billingAccountId, string locationId)

Constructs a new instance of a BillingAccountLocationName class from the component parts of pattern billingAccounts/{billing_account}/locations/{location}

Parameters
NameDescription
billingAccountIdString

The BillingAccount ID. Must not be null or empty.

locationIdString

The Location ID. Must not be null or empty.

Properties

BillingAccountId

public string BillingAccountId { get; }

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

Property Value
TypeDescription
String

IsKnownPattern

public bool IsKnownPattern { get; }

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

Property Value
TypeDescription
Boolean

LocationId

public string LocationId { get; }

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

Property Value
TypeDescription
String

Type

public BillingAccountLocationName.ResourceNameType Type { get; }

The BillingAccountLocationName.ResourceNameType of the contained resource name.

Property Value
TypeDescription
BillingAccountLocationName.ResourceNameType

UnparsedResource

public UnparsedResourceName UnparsedResource { get; }

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

Property Value
TypeDescription
UnparsedResourceName

Methods

Format(String, String)

public static string Format(string billingAccountId, string locationId)

Formats the IDs into the string representation of this BillingAccountLocationName with pattern billingAccounts/{billing_account}/locations/{location}.

Parameters
NameDescription
billingAccountIdString

The BillingAccount ID. Must not be null or empty.

locationIdString

The Location ID. Must not be null or empty.

Returns
TypeDescription
String

The string representation of this BillingAccountLocationName with pattern billingAccounts/{billing_account}/locations/{location}.

FormatBillingAccountLocation(String, String)

public static string FormatBillingAccountLocation(string billingAccountId, string locationId)

Formats the IDs into the string representation of this BillingAccountLocationName with pattern billingAccounts/{billing_account}/locations/{location}.

Parameters
NameDescription
billingAccountIdString

The BillingAccount ID. Must not be null or empty.

locationIdString

The Location ID. Must not be null or empty.

Returns
TypeDescription
String

The string representation of this BillingAccountLocationName with pattern billingAccounts/{billing_account}/locations/{location}.

FromBillingAccountLocation(String, String)

public static BillingAccountLocationName FromBillingAccountLocation(string billingAccountId, string locationId)

Creates a BillingAccountLocationName with the pattern billingAccounts/{billing_account}/locations/{location}.

Parameters
NameDescription
billingAccountIdString

The BillingAccount ID. Must not be null or empty.

locationIdString

The Location ID. Must not be null or empty.

Returns
TypeDescription
BillingAccountLocationName

A new instance of BillingAccountLocationName constructed from the provided ids.

FromUnparsed(UnparsedResourceName)

public static BillingAccountLocationName FromUnparsed(UnparsedResourceName unparsedResourceName)

Creates a BillingAccountLocationName containing an unparsed resource name.

Parameter
NameDescription
unparsedResourceNameUnparsedResourceName

The unparsed resource name. Must not be null.

Returns
TypeDescription
BillingAccountLocationName

A new instance of BillingAccountLocationName 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 BillingAccountLocationName Parse(string billingAccountLocationName)

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

Parameter
NameDescription
billingAccountLocationNameString

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

Returns
TypeDescription
BillingAccountLocationName

The parsed BillingAccountLocationName if successful.

Remarks

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

  • billingAccounts/{billing_account}/locations/{location}

Parse(String, Boolean)

public static BillingAccountLocationName Parse(string billingAccountLocationName, bool allowUnparsed)

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

Parameters
NameDescription
billingAccountLocationNameString

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
BillingAccountLocationName

The parsed BillingAccountLocationName if successful.

Remarks

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

  • billingAccounts/{billing_account}/locations/{location}
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 BillingAccountLocationName)

public static bool TryParse(string billingAccountLocationName, out BillingAccountLocationName result)

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

Parameters
NameDescription
billingAccountLocationNameString

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

resultBillingAccountLocationName

When this method returns, the parsed BillingAccountLocationName, 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:

  • billingAccounts/{billing_account}/locations/{location}

TryParse(String, Boolean, out BillingAccountLocationName)

public static bool TryParse(string billingAccountLocationName, bool allowUnparsed, out BillingAccountLocationName result)

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

Parameters
NameDescription
billingAccountLocationNameString

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.

resultBillingAccountLocationName

When this method returns, the parsed BillingAccountLocationName, 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:

  • billingAccounts/{billing_account}/locations/{location}
Or may be in any format if allowUnparsed is true.

Operators

Equality(BillingAccountLocationName, BillingAccountLocationName)

public static bool operator ==(BillingAccountLocationName a, BillingAccountLocationName b)
Parameters
NameDescription
aBillingAccountLocationName
bBillingAccountLocationName
Returns
TypeDescription
Boolean

Inequality(BillingAccountLocationName, BillingAccountLocationName)

public static bool operator !=(BillingAccountLocationName a, BillingAccountLocationName b)
Parameters
NameDescription
aBillingAccountLocationName
bBillingAccountLocationName
Returns
TypeDescription
Boolean