Class LogBucketName (3.5.0)

public sealed class LogBucketName : IResourceName, IEquatable<LogBucketName>

Resource name for the LogBucket resource.

Inheritance

Object > LogBucketName

Namespace

Google.Cloud.Logging.V2

Assembly

Google.Cloud.Logging.V2.dll

Constructors

LogBucketName(String, String, String)

public LogBucketName(string projectId, string locationId, string bucketId)

Constructs a new instance of a LogBucketName class from the component parts of pattern projects/{project}/locations/{location}/buckets/{bucket}

Parameters
NameDescription
projectIdString

The Project ID. Must not be null or empty.

locationIdString

The Location ID. Must not be null or empty.

bucketIdString

The Bucket ID. Must not be null or empty.

Properties

BillingAccountId

public string BillingAccountId { get; }

The BillingAccount ID. May be null, depending on which resource name is contained by this instance.

Property Value
TypeDescription
String

BucketId

public string BucketId { get; }

The Bucket ID. May be null, depending on which resource name is contained by this instance.

Property Value
TypeDescription
String

FolderId

public string FolderId { get; }

The Folder ID. May be null, depending on which resource name is contained by this instance.

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. May be null, depending on which resource name is contained by this instance.

Property Value
TypeDescription
String

OrganizationId

public string OrganizationId { get; }

The Organization ID. May be null, depending on which resource name is contained by this instance.

Property Value
TypeDescription
String

ProjectId

public string ProjectId { get; }

The Project ID. May be null, depending on which resource name is contained by this instance.

Property Value
TypeDescription
String

Type

public LogBucketName.ResourceNameType Type { get; }

The LogBucketName.ResourceNameType of the contained resource name.

Property Value
TypeDescription
LogBucketName.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, String)

public static string Format(string projectId, string locationId, string bucketId)

Formats the IDs into the string representation of this LogBucketName with pattern projects/{project}/locations/{location}/buckets/{bucket}.

Parameters
NameDescription
projectIdString

The Project ID. Must not be null or empty.

locationIdString

The Location ID. Must not be null or empty.

bucketIdString

The Bucket ID. Must not be null or empty.

Returns
TypeDescription
String

The string representation of this LogBucketName with pattern projects/{project}/locations/{location}/buckets/{bucket}.

FormatBillingAccountLocationBucket(String, String, String)

public static string FormatBillingAccountLocationBucket(string billingAccountId, string locationId, string bucketId)

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

Parameters
NameDescription
billingAccountIdString

The BillingAccount ID. Must not be null or empty.

locationIdString

The Location ID. Must not be null or empty.

bucketIdString

The Bucket ID. Must not be null or empty.

Returns
TypeDescription
String

The string representation of this LogBucketName with pattern billingAccounts/{billing_account}/locations/{location}/buckets/{bucket}.

FormatFolderLocationBucket(String, String, String)

public static string FormatFolderLocationBucket(string folderId, string locationId, string bucketId)

Formats the IDs into the string representation of this LogBucketName with pattern folders/{folder}/locations/{location}/buckets/{bucket}.

Parameters
NameDescription
folderIdString

The Folder ID. Must not be null or empty.

locationIdString

The Location ID. Must not be null or empty.

bucketIdString

The Bucket ID. Must not be null or empty.

Returns
TypeDescription
String

The string representation of this LogBucketName with pattern folders/{folder}/locations/{location}/buckets/{bucket}.

FormatOrganizationLocationBucket(String, String, String)

public static string FormatOrganizationLocationBucket(string organizationId, string locationId, string bucketId)

Formats the IDs into the string representation of this LogBucketName with pattern organizations/{organization}/locations/{location}/buckets/{bucket}.

Parameters
NameDescription
organizationIdString

The Organization ID. Must not be null or empty.

locationIdString

The Location ID. Must not be null or empty.

bucketIdString

The Bucket ID. Must not be null or empty.

Returns
TypeDescription
String

The string representation of this LogBucketName with pattern organizations/{organization}/locations/{location}/buckets/{bucket}.

FormatProjectLocationBucket(String, String, String)

public static string FormatProjectLocationBucket(string projectId, string locationId, string bucketId)

Formats the IDs into the string representation of this LogBucketName with pattern projects/{project}/locations/{location}/buckets/{bucket}.

Parameters
NameDescription
projectIdString

The Project ID. Must not be null or empty.

locationIdString

The Location ID. Must not be null or empty.

bucketIdString

The Bucket ID. Must not be null or empty.

Returns
TypeDescription
String

The string representation of this LogBucketName with pattern projects/{project}/locations/{location}/buckets/{bucket}.

FromBillingAccountLocationBucket(String, String, String)

public static LogBucketName FromBillingAccountLocationBucket(string billingAccountId, string locationId, string bucketId)

Creates a LogBucketName with the pattern billingAccounts/{billing_account}/locations/{location}/buckets/{bucket}.

Parameters
NameDescription
billingAccountIdString

The BillingAccount ID. Must not be null or empty.

locationIdString

The Location ID. Must not be null or empty.

bucketIdString

The Bucket ID. Must not be null or empty.

Returns
TypeDescription
LogBucketName

A new instance of LogBucketName constructed from the provided ids.

FromFolderLocationBucket(String, String, String)

public static LogBucketName FromFolderLocationBucket(string folderId, string locationId, string bucketId)

Creates a LogBucketName with the pattern folders/{folder}/locations/{location}/buckets/{bucket}.

Parameters
NameDescription
folderIdString

The Folder ID. Must not be null or empty.

locationIdString

The Location ID. Must not be null or empty.

bucketIdString

The Bucket ID. Must not be null or empty.

Returns
TypeDescription
LogBucketName

A new instance of LogBucketName constructed from the provided ids.

FromOrganizationLocationBucket(String, String, String)

public static LogBucketName FromOrganizationLocationBucket(string organizationId, string locationId, string bucketId)

Creates a LogBucketName with the pattern organizations/{organization}/locations/{location}/buckets/{bucket}.

Parameters
NameDescription
organizationIdString

The Organization ID. Must not be null or empty.

locationIdString

The Location ID. Must not be null or empty.

bucketIdString

The Bucket ID. Must not be null or empty.

Returns
TypeDescription
LogBucketName

A new instance of LogBucketName constructed from the provided ids.

FromProjectLocationBucket(String, String, String)

public static LogBucketName FromProjectLocationBucket(string projectId, string locationId, string bucketId)

Creates a LogBucketName with the pattern projects/{project}/locations/{location}/buckets/{bucket}.

Parameters
NameDescription
projectIdString

The Project ID. Must not be null or empty.

locationIdString

The Location ID. Must not be null or empty.

bucketIdString

The Bucket ID. Must not be null or empty.

Returns
TypeDescription
LogBucketName

A new instance of LogBucketName constructed from the provided ids.

FromUnparsed(UnparsedResourceName)

public static LogBucketName FromUnparsed(UnparsedResourceName unparsedResourceName)

Creates a LogBucketName containing an unparsed resource name.

Parameter
NameDescription
unparsedResourceNameUnparsedResourceName

The unparsed resource name. Must not be null.

Returns
TypeDescription
LogBucketName

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

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

Parameter
NameDescription
logBucketNameString

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

Returns
TypeDescription
LogBucketName

The parsed LogBucketName if successful.

Remarks

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

  • projects/{project}/locations/{location}/buckets/{bucket}
  • organizations/{organization}/locations/{location}/buckets/{bucket}
  • folders/{folder}/locations/{location}/buckets/{bucket}
  • billingAccounts/{billing_account}/locations/{location}/buckets/{bucket}

Parse(String, Boolean)

public static LogBucketName Parse(string logBucketName, bool allowUnparsed)

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

Parameters
NameDescription
logBucketNameString

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
LogBucketName

The parsed LogBucketName if successful.

Remarks

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

  • projects/{project}/locations/{location}/buckets/{bucket}
  • organizations/{organization}/locations/{location}/buckets/{bucket}
  • folders/{folder}/locations/{location}/buckets/{bucket}
  • billingAccounts/{billing_account}/locations/{location}/buckets/{bucket}
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 LogBucketName)

public static bool TryParse(string logBucketName, out LogBucketName result)

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

Parameters
NameDescription
logBucketNameString

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

resultLogBucketName

When this method returns, the parsed LogBucketName, 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}/buckets/{bucket}
  • organizations/{organization}/locations/{location}/buckets/{bucket}
  • folders/{folder}/locations/{location}/buckets/{bucket}
  • billingAccounts/{billing_account}/locations/{location}/buckets/{bucket}

TryParse(String, Boolean, out LogBucketName)

public static bool TryParse(string logBucketName, bool allowUnparsed, out LogBucketName result)

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

Parameters
NameDescription
logBucketNameString

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.

resultLogBucketName

When this method returns, the parsed LogBucketName, 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}/buckets/{bucket}
  • organizations/{organization}/locations/{location}/buckets/{bucket}
  • folders/{folder}/locations/{location}/buckets/{bucket}
  • billingAccounts/{billing_account}/locations/{location}/buckets/{bucket}
Or may be in any format if allowUnparsed is true.

Operators

Equality(LogBucketName, LogBucketName)

public static bool operator ==(LogBucketName a, LogBucketName b)
Parameters
NameDescription
aLogBucketName
bLogBucketName
Returns
TypeDescription
Boolean

Inequality(LogBucketName, LogBucketName)

public static bool operator !=(LogBucketName a, LogBucketName b)
Parameters
NameDescription
aLogBucketName
bLogBucketName
Returns
TypeDescription
Boolean