GKE Hub v1 API - Class RBACRoleBindingName (2.8.0)

public sealed class RBACRoleBindingName : IResourceName, IEquatable<RBACRoleBindingName>

Reference documentation and code samples for the GKE Hub v1 API class RBACRoleBindingName.

Resource name for the RBACRoleBinding resource.

Inheritance

object > RBACRoleBindingName

Namespace

Google.Cloud.GkeHub.V1

Assembly

Google.Cloud.GkeHub.V1.dll

Constructors

RBACRoleBindingName(string, string, string, string)

public RBACRoleBindingName(string projectId, string locationId, string scopeId, string rbacrolebindingId)

Constructs a new instance of a RBACRoleBindingName class from the component parts of pattern projects/{project}/locations/{location}/scopes/{scope}/rbacrolebindings/{rbacrolebinding}

Parameters
Name Description
projectId string

The Project ID. Must not be null or empty.

locationId string

The Location ID. Must not be null or empty.

scopeId string

The Scope ID. Must not be null or empty.

rbacrolebindingId string

The Rbacrolebinding 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
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

MembershipId

public string MembershipId { get; }

The Membership 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

RbacrolebindingId

public string RbacrolebindingId { get; }

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

Property Value
Type Description
string

ScopeId

public string ScopeId { get; }

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

Property Value
Type Description
string

Type

public RBACRoleBindingName.ResourceNameType Type { get; }

The RBACRoleBindingName.ResourceNameType of the contained resource name.

Property Value
Type Description
RBACRoleBindingNameResourceNameType

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, string)

public static string Format(string projectId, string locationId, string scopeId, string rbacrolebindingId)

Formats the IDs into the string representation of this RBACRoleBindingName with pattern projects/{project}/locations/{location}/scopes/{scope}/rbacrolebindings/{rbacrolebinding}.

Parameters
Name Description
projectId string

The Project ID. Must not be null or empty.

locationId string

The Location ID. Must not be null or empty.

scopeId string

The Scope ID. Must not be null or empty.

rbacrolebindingId string

The Rbacrolebinding ID. Must not be null or empty.

Returns
Type Description
string

The string representation of this RBACRoleBindingName with pattern projects/{project}/locations/{location}/scopes/{scope}/rbacrolebindings/{rbacrolebinding}.

FormatProjectLocationMembershipRbacrolebinding(string, string, string, string)

public static string FormatProjectLocationMembershipRbacrolebinding(string projectId, string locationId, string membershipId, string rbacrolebindingId)

Formats the IDs into the string representation of this RBACRoleBindingName with pattern projects/{project}/locations/{location}/memberships/{membership}/rbacrolebindings/{rbacrolebinding}.

Parameters
Name Description
projectId string

The Project ID. Must not be null or empty.

locationId string

The Location ID. Must not be null or empty.

membershipId string

The Membership ID. Must not be null or empty.

rbacrolebindingId string

The Rbacrolebinding ID. Must not be null or empty.

Returns
Type Description
string

The string representation of this RBACRoleBindingName with pattern projects/{project}/locations/{location}/memberships/{membership}/rbacrolebindings/{rbacrolebinding}.

FormatProjectLocationScopeRbacrolebinding(string, string, string, string)

public static string FormatProjectLocationScopeRbacrolebinding(string projectId, string locationId, string scopeId, string rbacrolebindingId)

Formats the IDs into the string representation of this RBACRoleBindingName with pattern projects/{project}/locations/{location}/scopes/{scope}/rbacrolebindings/{rbacrolebinding}.

Parameters
Name Description
projectId string

The Project ID. Must not be null or empty.

locationId string

The Location ID. Must not be null or empty.

scopeId string

The Scope ID. Must not be null or empty.

rbacrolebindingId string

The Rbacrolebinding ID. Must not be null or empty.

Returns
Type Description
string

The string representation of this RBACRoleBindingName with pattern projects/{project}/locations/{location}/scopes/{scope}/rbacrolebindings/{rbacrolebinding}.

FromProjectLocationMembershipRbacrolebinding(string, string, string, string)

public static RBACRoleBindingName FromProjectLocationMembershipRbacrolebinding(string projectId, string locationId, string membershipId, string rbacrolebindingId)

Creates a RBACRoleBindingName with the pattern projects/{project}/locations/{location}/memberships/{membership}/rbacrolebindings/{rbacrolebinding}.

Parameters
Name Description
projectId string

The Project ID. Must not be null or empty.

locationId string

The Location ID. Must not be null or empty.

membershipId string

The Membership ID. Must not be null or empty.

rbacrolebindingId string

The Rbacrolebinding ID. Must not be null or empty.

Returns
Type Description
RBACRoleBindingName

A new instance of RBACRoleBindingName constructed from the provided ids.

FromProjectLocationScopeRbacrolebinding(string, string, string, string)

public static RBACRoleBindingName FromProjectLocationScopeRbacrolebinding(string projectId, string locationId, string scopeId, string rbacrolebindingId)

Creates a RBACRoleBindingName with the pattern projects/{project}/locations/{location}/scopes/{scope}/rbacrolebindings/{rbacrolebinding}.

Parameters
Name Description
projectId string

The Project ID. Must not be null or empty.

locationId string

The Location ID. Must not be null or empty.

scopeId string

The Scope ID. Must not be null or empty.

rbacrolebindingId string

The Rbacrolebinding ID. Must not be null or empty.

Returns
Type Description
RBACRoleBindingName

A new instance of RBACRoleBindingName constructed from the provided ids.

FromUnparsed(UnparsedResourceName)

public static RBACRoleBindingName FromUnparsed(UnparsedResourceName unparsedResourceName)

Creates a RBACRoleBindingName containing an unparsed resource name.

Parameter
Name Description
unparsedResourceName UnparsedResourceName

The unparsed resource name. Must not be null.

Returns
Type Description
RBACRoleBindingName

A new instance of RBACRoleBindingName containing the provided unparsedResourceName.

GetHashCode()

public override int GetHashCode()

Returns a hash code for this resource name.

Returns
Type Description
int
Overrides

Parse(string)

public static RBACRoleBindingName Parse(string rBACRoleBindingName)

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

Parameter
Name Description
rBACRoleBindingName string

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

Returns
Type Description
RBACRoleBindingName

The parsed RBACRoleBindingName if successful.

Remarks

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

  • projects/{project}/locations/{location}/scopes/{scope}/rbacrolebindings/{rbacrolebinding}
  • projects/{project}/locations/{location}/memberships/{membership}/rbacrolebindings/{rbacrolebinding}

Parse(string, bool)

public static RBACRoleBindingName Parse(string rBACRoleBindingName, bool allowUnparsed)

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

Parameters
Name Description
rBACRoleBindingName string

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

allowUnparsed bool

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
Type Description
RBACRoleBindingName

The parsed RBACRoleBindingName if successful.

Remarks

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

  • projects/{project}/locations/{location}/scopes/{scope}/rbacrolebindings/{rbacrolebinding}
  • projects/{project}/locations/{location}/memberships/{membership}/rbacrolebindings/{rbacrolebinding}
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.

Overrides

TryParse(string, out RBACRoleBindingName)

public static bool TryParse(string rBACRoleBindingName, out RBACRoleBindingName result)

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

Parameters
Name Description
rBACRoleBindingName string

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

result RBACRoleBindingName

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

Returns
Type Description
bool

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}/scopes/{scope}/rbacrolebindings/{rbacrolebinding}
  • projects/{project}/locations/{location}/memberships/{membership}/rbacrolebindings/{rbacrolebinding}

TryParse(string, bool, out RBACRoleBindingName)

public static bool TryParse(string rBACRoleBindingName, bool allowUnparsed, out RBACRoleBindingName result)

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

Parameters
Name Description
rBACRoleBindingName string

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

allowUnparsed bool

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.

result RBACRoleBindingName

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

Returns
Type Description
bool

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}/scopes/{scope}/rbacrolebindings/{rbacrolebinding}
  • projects/{project}/locations/{location}/memberships/{membership}/rbacrolebindings/{rbacrolebinding}
Or may be in any format if allowUnparsed is true.

Operators

operator ==(RBACRoleBindingName, RBACRoleBindingName)

public static bool operator ==(RBACRoleBindingName a, RBACRoleBindingName b)

Determines whether two specified resource names have the same value.

Parameters
Name Description
a RBACRoleBindingName

The first resource name to compare, or null.

b RBACRoleBindingName

The second resource name to compare, or null.

Returns
Type Description
bool

true if the value of a is the same as the value of b; otherwise, false.

operator !=(RBACRoleBindingName, RBACRoleBindingName)

public static bool operator !=(RBACRoleBindingName a, RBACRoleBindingName b)

Determines whether two specified resource names have different values.

Parameters
Name Description
a RBACRoleBindingName

The first resource name to compare, or null.

b RBACRoleBindingName

The second resource name to compare, or null.

Returns
Type Description
bool

true if the value of a is different from the value of b; otherwise, false.