Google Cloud Data Loss Prevention v2 API - Class ColumnDataProfileName (4.8.0)

public sealed class ColumnDataProfileName : IResourceName, IEquatable<ColumnDataProfileName>

Reference documentation and code samples for the Google Cloud Data Loss Prevention v2 API class ColumnDataProfileName.

Resource name for the ColumnDataProfile resource.

Inheritance

object > ColumnDataProfileName

Namespace

Google.Cloud.Dlp.V2

Assembly

Google.Cloud.Dlp.V2.dll

Constructors

ColumnDataProfileName(string, string, string)

public ColumnDataProfileName(string organizationId, string locationId, string columnDataProfileId)

Constructs a new instance of a ColumnDataProfileName class from the component parts of pattern organizations/{organization}/locations/{location}/columnDataProfiles/{column_data_profile}

Parameters
NameDescription
organizationIdstring

The Organization ID. Must not be null or empty.

locationIdstring

The Location ID. Must not be null or empty.

columnDataProfileIdstring

The ColumnDataProfile ID. Must not be null or empty.

Properties

ColumnDataProfileId

public string ColumnDataProfileId { get; }

The ColumnDataProfile 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
bool

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 ColumnDataProfileName.ResourceNameType Type { get; }

The ColumnDataProfileName.ResourceNameType of the contained resource name.

Property Value
TypeDescription
ColumnDataProfileNameResourceNameType

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 organizationId, string locationId, string columnDataProfileId)

Formats the IDs into the string representation of this ColumnDataProfileName with pattern organizations/{organization}/locations/{location}/columnDataProfiles/{column_data_profile}.

Parameters
NameDescription
organizationIdstring

The Organization ID. Must not be null or empty.

locationIdstring

The Location ID. Must not be null or empty.

columnDataProfileIdstring

The ColumnDataProfile ID. Must not be null or empty.

Returns
TypeDescription
string

The string representation of this ColumnDataProfileName with pattern organizations/{organization}/locations/{location}/columnDataProfiles/{column_data_profile}.

FormatOrganizationLocationColumnDataProfile(string, string, string)

public static string FormatOrganizationLocationColumnDataProfile(string organizationId, string locationId, string columnDataProfileId)

Formats the IDs into the string representation of this ColumnDataProfileName with pattern organizations/{organization}/locations/{location}/columnDataProfiles/{column_data_profile}.

Parameters
NameDescription
organizationIdstring

The Organization ID. Must not be null or empty.

locationIdstring

The Location ID. Must not be null or empty.

columnDataProfileIdstring

The ColumnDataProfile ID. Must not be null or empty.

Returns
TypeDescription
string

The string representation of this ColumnDataProfileName with pattern organizations/{organization}/locations/{location}/columnDataProfiles/{column_data_profile}.

FormatProjectLocationColumnDataProfile(string, string, string)

public static string FormatProjectLocationColumnDataProfile(string projectId, string locationId, string columnDataProfileId)

Formats the IDs into the string representation of this ColumnDataProfileName with pattern projects/{project}/locations/{location}/columnDataProfiles/{column_data_profile}.

Parameters
NameDescription
projectIdstring

The Project ID. Must not be null or empty.

locationIdstring

The Location ID. Must not be null or empty.

columnDataProfileIdstring

The ColumnDataProfile ID. Must not be null or empty.

Returns
TypeDescription
string

The string representation of this ColumnDataProfileName with pattern projects/{project}/locations/{location}/columnDataProfiles/{column_data_profile}.

FromOrganizationLocationColumnDataProfile(string, string, string)

public static ColumnDataProfileName FromOrganizationLocationColumnDataProfile(string organizationId, string locationId, string columnDataProfileId)

Creates a ColumnDataProfileName with the pattern organizations/{organization}/locations/{location}/columnDataProfiles/{column_data_profile}.

Parameters
NameDescription
organizationIdstring

The Organization ID. Must not be null or empty.

locationIdstring

The Location ID. Must not be null or empty.

columnDataProfileIdstring

The ColumnDataProfile ID. Must not be null or empty.

Returns
TypeDescription
ColumnDataProfileName

A new instance of ColumnDataProfileName constructed from the provided ids.

FromProjectLocationColumnDataProfile(string, string, string)

public static ColumnDataProfileName FromProjectLocationColumnDataProfile(string projectId, string locationId, string columnDataProfileId)

Creates a ColumnDataProfileName with the pattern projects/{project}/locations/{location}/columnDataProfiles/{column_data_profile}.

Parameters
NameDescription
projectIdstring

The Project ID. Must not be null or empty.

locationIdstring

The Location ID. Must not be null or empty.

columnDataProfileIdstring

The ColumnDataProfile ID. Must not be null or empty.

Returns
TypeDescription
ColumnDataProfileName

A new instance of ColumnDataProfileName constructed from the provided ids.

FromUnparsed(UnparsedResourceName)

public static ColumnDataProfileName FromUnparsed(UnparsedResourceName unparsedResourceName)

Creates a ColumnDataProfileName containing an unparsed resource name.

Parameter
NameDescription
unparsedResourceNameUnparsedResourceName

The unparsed resource name. Must not be null.

Returns
TypeDescription
ColumnDataProfileName

A new instance of ColumnDataProfileName containing the provided unparsedResourceName.

GetHashCode()

public override int GetHashCode()

Returns a hash code for this resource name.

Returns
TypeDescription
int
Overrides

Parse(string)

public static ColumnDataProfileName Parse(string columnDataProfileName)

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

Parameter
NameDescription
columnDataProfileNamestring

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

Returns
TypeDescription
ColumnDataProfileName

The parsed ColumnDataProfileName if successful.

Remarks

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

  • organizations/{organization}/locations/{location}/columnDataProfiles/{column_data_profile}
  • projects/{project}/locations/{location}/columnDataProfiles/{column_data_profile}

Parse(string, bool)

public static ColumnDataProfileName Parse(string columnDataProfileName, bool allowUnparsed)

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

Parameters
NameDescription
columnDataProfileNamestring

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

allowUnparsedbool

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
ColumnDataProfileName

The parsed ColumnDataProfileName if successful.

Remarks

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

  • organizations/{organization}/locations/{location}/columnDataProfiles/{column_data_profile}
  • projects/{project}/locations/{location}/columnDataProfiles/{column_data_profile}
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 ColumnDataProfileName)

public static bool TryParse(string columnDataProfileName, out ColumnDataProfileName result)

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

Parameters
NameDescription
columnDataProfileNamestring

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

resultColumnDataProfileName

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

Returns
TypeDescription
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:

  • organizations/{organization}/locations/{location}/columnDataProfiles/{column_data_profile}
  • projects/{project}/locations/{location}/columnDataProfiles/{column_data_profile}

TryParse(string, bool, out ColumnDataProfileName)

public static bool TryParse(string columnDataProfileName, bool allowUnparsed, out ColumnDataProfileName result)

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

Parameters
NameDescription
columnDataProfileNamestring

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

allowUnparsedbool

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.

resultColumnDataProfileName

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

Returns
TypeDescription
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:

  • organizations/{organization}/locations/{location}/columnDataProfiles/{column_data_profile}
  • projects/{project}/locations/{location}/columnDataProfiles/{column_data_profile}
Or may be in any format if allowUnparsed is true.

Operators

operator ==(ColumnDataProfileName, ColumnDataProfileName)

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

Determines whether two specified resource names have the same value.

Parameters
NameDescription
aColumnDataProfileName

The first resource name to compare, or null.

bColumnDataProfileName

The second resource name to compare, or null.

Returns
TypeDescription
bool

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

operator !=(ColumnDataProfileName, ColumnDataProfileName)

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

Determines whether two specified resource names have different values.

Parameters
NameDescription
aColumnDataProfileName

The first resource name to compare, or null.

bColumnDataProfileName

The second resource name to compare, or null.

Returns
TypeDescription
bool

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