Show / Hide Table of Contents

Class OrganizationName

Resource name for the 'organization' resource which is widespread across Google Cloud Platform. While most resource names are generated on a per-API basis, many APIs use an organization resource, and it's useful to be able to pass values from one API to another.

Inheritance
System.Object
OrganizationName
Implements
IResourceName
System.IEquatable<OrganizationName>
Inherited Members
System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetType()
System.Object.MemberwiseClone()
Namespace: Google.Api.Gax.ResourceNames
Assembly: Google.Api.Gax.dll
Syntax
public sealed class OrganizationName : IResourceName, IEquatable<OrganizationName>

Constructors

OrganizationName(String)

Constructs a new instance of the OrganizationName resource name class from its component parts.

Declaration
public OrganizationName(string organizationId)
Parameters
Type Name Description
System.String organizationId

The organization ID. Must not be null.

Properties

Kind

The kind of resource name.

Declaration
public ResourceNameKind Kind { get; }
Property Value
Type Description
ResourceNameKind
Implements
IResourceName.Kind

OrganizationId

The organization ID. Never null.

Declaration
public string OrganizationId { get; }
Property Value
Type Description
System.String

Methods

Equals(OrganizationName)

Declaration
public bool Equals(OrganizationName other)
Parameters
Type Name Description
OrganizationName other
Returns
Type Description
System.Boolean
Implements
System.IEquatable<T>.Equals(T)

Equals(Object)

Declaration
public override bool Equals(object obj)
Parameters
Type Name Description
System.Object obj
Returns
Type Description
System.Boolean
Overrides
System.Object.Equals(System.Object)

Format(String)

Formats the IDs into the string representation of the OrganizationName.

Declaration
public static string Format(string organizationId)
Parameters
Type Name Description
System.String organizationId

The organization ID. Must not be null.

Returns
Type Description
System.String

The string representation of the OrganizationName.

GetHashCode()

Declaration
public override int GetHashCode()
Returns
Type Description
System.Int32
Overrides
System.Object.GetHashCode()

Parse(String)

Parses the given organization resource name in string form into a new OrganizationName instance.

Declaration
public static OrganizationName Parse(string organizationName)
Parameters
Type Name Description
System.String organizationName

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

Returns
Type Description
OrganizationName

The parsed OrganizationName if successful.

ToString()

The string representation of the resource name.

Declaration
public override string ToString()
Returns
Type Description
System.String

The string representation of the resource name.

Overrides
System.Object.ToString()
Implements
IResourceName.ToString()

TryParse(String, out OrganizationName)

Tries to parse the given organization resource name in string form into a new OrganizationName instance.

Declaration
public static bool TryParse(string organizationName, out OrganizationName result)
Parameters
Type Name Description
System.String organizationName

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

OrganizationName result

When this method returns, the parsed OrganizationName, or null if parsing fails.

Returns
Type Description
System.Boolean

true if the name was parsed successfully; false otherwise.

Remarks

This method still throws System.ArgumentNullException if organizationName is null, as this would usually indicate a programming error rather than a data error.

Operators

Equality(OrganizationName, OrganizationName)

Declaration
public static bool operator ==(OrganizationName a, OrganizationName b)
Parameters
Type Name Description
OrganizationName a
OrganizationName b
Returns
Type Description
System.Boolean

Inequality(OrganizationName, OrganizationName)

Declaration
public static bool operator !=(OrganizationName a, OrganizationName b)
Parameters
Type Name Description
OrganizationName a
OrganizationName b
Returns
Type Description
System.Boolean
Back to top