Audit Manager v1 API - Class AuditScheduleName (1.3.0)

public sealed class AuditScheduleName : IResourceName, IEquatable<AuditScheduleName>

Reference documentation and code samples for the Audit Manager v1 API class AuditScheduleName.

Resource name for the AuditSchedule resource.

Inheritance

object > AuditScheduleName

Namespace

Google.Cloud.AuditManager.V1

Assembly

Google.Cloud.AuditManager.V1.dll

Constructors

AuditScheduleName(string, string, string)

public AuditScheduleName(string projectId, string locationId, string auditScheduleId)

Constructs a new instance of a AuditScheduleName class from the component parts of pattern projects/{project}/locations/{location}/auditSchedules/{audit_schedule}

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.

auditScheduleId string

The AuditSchedule ID. Must not be null or empty.

Properties

AuditScheduleId

public string AuditScheduleId { get; }

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

Property Value
Type Description
string

FolderId

public string FolderId { get; }

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

Property Value
Type Description
string

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

OrganizationId

public string OrganizationId { get; }

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

Type

public AuditScheduleName.ResourceNameType Type { get; }

The AuditScheduleName.ResourceNameType of the contained resource name.

Property Value
Type Description
AuditScheduleNameResourceNameType

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)

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

Formats the IDs into the string representation of this AuditScheduleName with pattern projects/{project}/locations/{location}/auditSchedules/{audit_schedule}.

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.

auditScheduleId string

The AuditSchedule ID. Must not be null or empty.

Returns
Type Description
string

The string representation of this AuditScheduleName with pattern projects/{project}/locations/{location}/auditSchedules/{audit_schedule}.

FormatFolderLocationAuditSchedule(string, string, string)

public static string FormatFolderLocationAuditSchedule(string folderId, string locationId, string auditScheduleId)

Formats the IDs into the string representation of this AuditScheduleName with pattern folders/{folder}/locations/{location}/auditSchedules/{audit_schedule}.

Parameters
Name Description
folderId string

The Folder ID. Must not be null or empty.

locationId string

The Location ID. Must not be null or empty.

auditScheduleId string

The AuditSchedule ID. Must not be null or empty.

Returns
Type Description
string

The string representation of this AuditScheduleName with pattern folders/{folder}/locations/{location}/auditSchedules/{audit_schedule}.

FormatOrganizationLocationAuditSchedule(string, string, string)

public static string FormatOrganizationLocationAuditSchedule(string organizationId, string locationId, string auditScheduleId)

Formats the IDs into the string representation of this AuditScheduleName with pattern organizations/{organization}/locations/{location}/auditSchedules/{audit_schedule}.

Parameters
Name Description
organizationId string

The Organization ID. Must not be null or empty.

locationId string

The Location ID. Must not be null or empty.

auditScheduleId string

The AuditSchedule ID. Must not be null or empty.

Returns
Type Description
string

The string representation of this AuditScheduleName with pattern organizations/{organization}/locations/{location}/auditSchedules/{audit_schedule}.

FormatProjectLocationAuditSchedule(string, string, string)

public static string FormatProjectLocationAuditSchedule(string projectId, string locationId, string auditScheduleId)

Formats the IDs into the string representation of this AuditScheduleName with pattern projects/{project}/locations/{location}/auditSchedules/{audit_schedule}.

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.

auditScheduleId string

The AuditSchedule ID. Must not be null or empty.

Returns
Type Description
string

The string representation of this AuditScheduleName with pattern projects/{project}/locations/{location}/auditSchedules/{audit_schedule}.

FromFolderLocationAuditSchedule(string, string, string)

public static AuditScheduleName FromFolderLocationAuditSchedule(string folderId, string locationId, string auditScheduleId)

Creates a AuditScheduleName with the pattern folders/{folder}/locations/{location}/auditSchedules/{audit_schedule}.

Parameters
Name Description
folderId string

The Folder ID. Must not be null or empty.

locationId string

The Location ID. Must not be null or empty.

auditScheduleId string

The AuditSchedule ID. Must not be null or empty.

Returns
Type Description
AuditScheduleName

A new instance of AuditScheduleName constructed from the provided ids.

FromOrganizationLocationAuditSchedule(string, string, string)

public static AuditScheduleName FromOrganizationLocationAuditSchedule(string organizationId, string locationId, string auditScheduleId)

Creates a AuditScheduleName with the pattern organizations/{organization}/locations/{location}/auditSchedules/{audit_schedule}.

Parameters
Name Description
organizationId string

The Organization ID. Must not be null or empty.

locationId string

The Location ID. Must not be null or empty.

auditScheduleId string

The AuditSchedule ID. Must not be null or empty.

Returns
Type Description
AuditScheduleName

A new instance of AuditScheduleName constructed from the provided ids.

FromProjectLocationAuditSchedule(string, string, string)

public static AuditScheduleName FromProjectLocationAuditSchedule(string projectId, string locationId, string auditScheduleId)

Creates a AuditScheduleName with the pattern projects/{project}/locations/{location}/auditSchedules/{audit_schedule}.

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.

auditScheduleId string

The AuditSchedule ID. Must not be null or empty.

Returns
Type Description
AuditScheduleName

A new instance of AuditScheduleName constructed from the provided ids.

FromUnparsed(UnparsedResourceName)

public static AuditScheduleName FromUnparsed(UnparsedResourceName unparsedResourceName)

Creates a AuditScheduleName containing an unparsed resource name.

Parameter
Name Description
unparsedResourceName UnparsedResourceName

The unparsed resource name. Must not be null.

Returns
Type Description
AuditScheduleName

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

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

Parameter
Name Description
auditScheduleName string

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

Returns
Type Description
AuditScheduleName

The parsed AuditScheduleName if successful.

Remarks

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

  • projects/{project}/locations/{location}/auditSchedules/{audit_schedule}
  • folders/{folder}/locations/{location}/auditSchedules/{audit_schedule}
  • organizations/{organization}/locations/{location}/auditSchedules/{audit_schedule}

Parse(string, bool)

public static AuditScheduleName Parse(string auditScheduleName, bool allowUnparsed)

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

Parameters
Name Description
auditScheduleName 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
AuditScheduleName

The parsed AuditScheduleName if successful.

Remarks

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

  • projects/{project}/locations/{location}/auditSchedules/{audit_schedule}
  • folders/{folder}/locations/{location}/auditSchedules/{audit_schedule}
  • organizations/{organization}/locations/{location}/auditSchedules/{audit_schedule}

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 AuditScheduleName)

public static bool TryParse(string auditScheduleName, out AuditScheduleName result)

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

Parameters
Name Description
auditScheduleName string

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

result AuditScheduleName

When this method returns, the parsed AuditScheduleName, 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}/auditSchedules/{audit_schedule}
  • folders/{folder}/locations/{location}/auditSchedules/{audit_schedule}
  • organizations/{organization}/locations/{location}/auditSchedules/{audit_schedule}

TryParse(string, bool, out AuditScheduleName)

public static bool TryParse(string auditScheduleName, bool allowUnparsed, out AuditScheduleName result)

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

Parameters
Name Description
auditScheduleName 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 AuditScheduleName

When this method returns, the parsed AuditScheduleName, 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}/auditSchedules/{audit_schedule}
  • folders/{folder}/locations/{location}/auditSchedules/{audit_schedule}
  • organizations/{organization}/locations/{location}/auditSchedules/{audit_schedule}

Or may be in any format if allowUnparsed is true.

Operators

operator ==(AuditScheduleName, AuditScheduleName)

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

Determines whether two specified resource names have the same value.

Parameters
Name Description
a AuditScheduleName

The first resource name to compare, or null.

b AuditScheduleName

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 !=(AuditScheduleName, AuditScheduleName)

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

Determines whether two specified resource names have different values.

Parameters
Name Description
a AuditScheduleName

The first resource name to compare, or null.

b AuditScheduleName

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.