Output only. Time of the event which fixed the Violation. If the violation is ACTIVE this will be empty.
↳ category
string
Output only. Category under which this violation is mapped. e.g. Location, Service Usage, Access, Encryption, etc.
↳ state
int
Output only. State of the violation
↳ non_compliant_org_policy
string
Output only. Immutable. Name of the OrgPolicy which was modified with non-compliant change and resulted this violation. Format:projects/{project_number}/policies/{constraint_name}folders/{folder_id}/policies/{constraint_name}organizations/{organization_id}/policies/{constraint_name}
Output only. Category under which this violation is mapped.
e.g. Location, Service Usage, Access, Encryption, etc.
Returns
Type
Description
string
setCategory
Output only. Category under which this violation is mapped.
e.g. Location, Service Usage, Access, Encryption, etc.
Parameter
Name
Description
var
string
Returns
Type
Description
$this
getState
Output only. State of the violation
Returns
Type
Description
int
setState
Output only. State of the violation
Parameter
Name
Description
var
int
Returns
Type
Description
$this
getNonCompliantOrgPolicy
Output only. Immutable. Name of the OrgPolicy which was modified with
non-compliant change and resulted this violation. Format:projects/{project_number}/policies/{constraint_name}folders/{folder_id}/policies/{constraint_name}organizations/{organization_id}/policies/{constraint_name}
Returns
Type
Description
string
setNonCompliantOrgPolicy
Output only. Immutable. Name of the OrgPolicy which was modified with
non-compliant change and resulted this violation. Format:projects/{project_number}/policies/{constraint_name}folders/{folder_id}/policies/{constraint_name}organizations/{organization_id}/policies/{constraint_name}
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-09-04 UTC."],[],[],null,["# Google Cloud Cloud Controls Partner V1beta Client - Class Violation (0.4.1)\n\nVersion latestkeyboard_arrow_down\n\n- [0.4.1 (latest)](/php/docs/reference/cloud-cloudcontrolspartner/latest/V1beta.Violation)\n- [0.4.0](/php/docs/reference/cloud-cloudcontrolspartner/0.4.0/V1beta.Violation)\n- [0.3.0](/php/docs/reference/cloud-cloudcontrolspartner/0.3.0/V1beta.Violation)\n- [0.2.2](/php/docs/reference/cloud-cloudcontrolspartner/0.2.2/V1beta.Violation)\n- [0.1.4](/php/docs/reference/cloud-cloudcontrolspartner/0.1.4/V1beta.Violation) \n| **Beta**\n|\n|\n| This library is covered by the [Pre-GA Offerings Terms](/terms/service-terms#1)\n| of the Terms of Service. Pre-GA libraries might have limited support,\n| and changes to pre-GA libraries might not be compatible with other pre-GA versions.\n| For more information, see the\n[launch stage descriptions](/products#product-launch-stages). \nReference documentation and code samples for the Google Cloud Cloud Controls Partner V1beta Client class Violation.\n\nDetails of resource Violation\n\nGenerated from protobuf message `google.cloud.cloudcontrolspartner.v1beta.Violation`\n\nNamespace\n---------\n\nGoogle \\\\ Cloud \\\\ CloudControlsPartner \\\\ V1beta\n\nMethods\n-------\n\n### __construct\n\nConstructor.\n\n### getName\n\nIdentifier. Format:\n`organizations/{organization}/locations/{location}/customers/{customer}/workloads/{workload}/violations/{violation}`\n\n### setName\n\nIdentifier. Format:\n`organizations/{organization}/locations/{location}/customers/{customer}/workloads/{workload}/violations/{violation}`\n\n### getDescription\n\nOutput only. Description for the Violation.\n\ne.g. OrgPolicy gcp.resourceLocations has non compliant value.\n\n### setDescription\n\nOutput only. Description for the Violation.\n\ne.g. OrgPolicy gcp.resourceLocations has non compliant value.\n\n### getBeginTime\n\nOutput only. Time of the event which triggered the Violation.\n\n### hasBeginTime\n\n### clearBeginTime\n\n### setBeginTime\n\nOutput only. Time of the event which triggered the Violation.\n\n### getUpdateTime\n\nOutput only. The last time when the Violation record was updated.\n\n### hasUpdateTime\n\n### clearUpdateTime\n\n### setUpdateTime\n\nOutput only. The last time when the Violation record was updated.\n\n### getResolveTime\n\nOutput only. Time of the event which fixed the Violation.\n\nIf the violation is ACTIVE this will be empty.\n\n### hasResolveTime\n\n### clearResolveTime\n\n### setResolveTime\n\nOutput only. Time of the event which fixed the Violation.\n\nIf the violation is ACTIVE this will be empty.\n\n### getCategory\n\nOutput only. Category under which this violation is mapped.\n\ne.g. Location, Service Usage, Access, Encryption, etc.\n\n### setCategory\n\nOutput only. Category under which this violation is mapped.\n\ne.g. Location, Service Usage, Access, Encryption, etc.\n\n### getState\n\nOutput only. State of the violation\n\n### setState\n\nOutput only. State of the violation\n\n### getNonCompliantOrgPolicy\n\nOutput only. Immutable. Name of the OrgPolicy which was modified with\nnon-compliant change and resulted this violation. Format:\n`projects/{project_number}/policies/{constraint_name}`\n`folders/{folder_id}/policies/{constraint_name}`\n`organizations/{organization_id}/policies/{constraint_name}`\n\n### setNonCompliantOrgPolicy\n\nOutput only. Immutable. Name of the OrgPolicy which was modified with\nnon-compliant change and resulted this violation. Format:\n`projects/{project_number}/policies/{constraint_name}`\n`folders/{folder_id}/policies/{constraint_name}`\n`organizations/{organization_id}/policies/{constraint_name}`\n\n### getFolderId\n\nThe folder_id of the violation\n\n### setFolderId\n\nThe folder_id of the violation\n\n### getRemediation\n\nOutput only. Compliance violation remediation\n\n### hasRemediation\n\n### clearRemediation\n\n### setRemediation\n\nOutput only. Compliance violation remediation"]]