{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/google-cloud-assured-workloads/json-schema/google-cloud-assured-workloads-google-cloud-assuredworkloads-v1-list-violations-response-schema.json",
  "title": "GoogleCloudAssuredworkloadsV1ListViolationsResponse",
  "description": "Response message for the `ListViolations` method.",
  "x-generated": "2026-11-11",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/google-cloud-assured-workloads-organizations-api-openapi.yml#/components/schemas/GoogleCloudAssuredworkloadsV1ListViolationsResponse",
  "properties": {
    "nextPageToken": {
      "type": "string",
      "description": "A token that can be sent as `page_token` to retrieve the next page. If this field is empty, there are no subsequent pages."
    },
    "totalSize": {
      "type": "integer",
      "description": "The total number of violations that match the request, across all pages. This field might not be populated for all requests; when it's not populated, its value is `0`.",
      "format": "int32"
    },
    "violations": {
      "description": "The list of violations.",
      "type": "array",
      "items": {
        "$ref": "#/$defs/GoogleCloudAssuredworkloadsV1Violation"
      }
    }
  },
  "type": "object",
  "$defs": {
    "GoogleCloudAssuredworkloadsV1Violation": {
      "description": "A compliance violation that's detected by Assured Workloads monitoring. A violation is created when an organization policy or a resource in a workload (or a Data Boundary scope) changes in a way that doesn't comply with the controls of the applicable compliance regime or framework.",
      "type": "object",
      "properties": {
        "exceptionAuditLogLink": {
          "description": "Output only. Immutable. A link to the Cloud Audit Logs entries that contain the business justification that was provided when the violation was acknowledged. Format: `https://console.cloud.google.com/logs/query;query={logName}{protoPayload.resourceName}{protoPayload.methodName}{timeRange}{organization}`",
          "type": "string",
          "readOnly": true
        },
        "childResourceViolationCount": {
          "type": "integer",
          "description": "Optional. Output only. For organization policy violations, the number of resource violations that are associated with this violation. This field is `0` for resource violations.",
          "readOnly": true,
          "format": "int32"
        },
        "affectedFrameworks": {
          "description": "Output only. The IDs of the compliance frameworks that are affected by this violation. For example, `builtin-fedramp-high`. This field is only populated when using `VIOLATION_VIEW_DATA_BOUNDARY`.",
          "type": "array",
          "items": {
            "type": "string"
          },
          "readOnly": true
        },
        "orgPolicyConstraint": {
          "description": "Output only. Immutable. Deprecated: This field is deprecated and might be removed in a future version of the API. Use `non_compliant_org_policy` instead, which contains the full resource name of the organization policy, including the constraint name. The organization policy constraint that was changed in a non-compliant way, which resulted in this violation.",
          "readOnly": true,
          "type": "string",
          "deprecated": true
        },
        "beginTime": {
          "type": "string",
          "readOnly": true,
          "format": "google-datetime",
          "description": "Output only. The time of the event that triggered the violation."
        },
        "name": {
          "description": "Output only. Immutable. The resource name of the violation. Format: `organizations/{organization}/locations/{location}/workloads/{workload_id}/violations/{violations_id}`",
          "readOnly": true,
          "type": "string"
        },
        "acknowledgementTime": {
          "description": "Optional. The time when the violation was first acknowledged. To find the most recent time that the violation was acknowledged, check `exception_contexts`. This field is absent when `acknowledged` is `false`.",
          "format": "google-datetime",
          "type": "string"
        },
        "resourceName": {
          "type": "string",
          "description": "Optional. Output only. For resource violations, the full resource name of the non-compliant resource. For example, `//storage.googleapis.com/myprojectxyz-testbucket`. This field is empty for organization policy violations.",
          "readOnly": true
        },
        "acknowledged": {
          "type": "boolean",
          "description": "Whether the violation has been acknowledged."
        },
        "associatedOrgPolicyViolationId": {
          "description": "Optional. Output only. For resource violations, the ID of the organization policy violation that caused this resource violation. This field is empty for organization policy violations.",
          "readOnly": true,
          "type": "string"
        },
        "resolveTime": {
          "format": "google-datetime",
          "type": "string",
          "readOnly": true,
          "description": "Output only. The time of the event that resolved the violation. This field is empty if the violation is unresolved."
        },
        "nonCompliantOrgPolicy": {
          "type": "string",
          "description": "Output only. Immutable. The name of the organization policy that was modified with a non-compliant change and resulted in this violation. Formats: * `projects/{project_number}/policies/{constraint_name}` * `folders/{folder_id}/policies/{constraint_name}` * `organizations/{organization_id}/policies/{constraint_name}`",
          "readOnly": true
        },
        "violationType": {
          "enum": [
            "VIOLATION_TYPE_UNSPECIFIED",
            "ORG_POLICY",
            "RESOURCE"
          ],
          "readOnly": true,
          "type": "string",
          "description": "Output only. The type of the violation."
        },
        "resourceType": {
          "readOnly": true,
          "type": "string",
          "description": "Optional. Output only. For resource violations, the type of the non-compliant resource. For example, `compute.googleapis.com/Disk`. This field is empty for organization policy violations."
        },
        "remediation": {
          "$ref": "#/$defs/GoogleCloudAssuredworkloadsV1ViolationRemediation",
          "description": "Output only. The remediation guidance for the violation."
        },
        "exceptionContexts": {
          "readOnly": true,
          "items": {
            "$ref": "#/$defs/GoogleCloudAssuredworkloadsV1ViolationExceptionContext"
          },
          "description": "Output only. The details of all of the acknowledgements (exceptions) for the violation.",
          "type": "array"
        },
        "updateTime": {
          "description": "Output only. The time when the violation record was last updated.",
          "type": "string",
          "format": "google-datetime",
          "readOnly": true
        },
        "description": {
          "readOnly": true,
          "type": "string",
          "description": "Output only. A description of the violation. For example, `OrgPolicy gcp.resourceLocations has non compliant value.`"
        },
        "parentProjectNumber": {
          "description": "Optional. Output only. For resource violations, the number of the project that contains the non-compliant resource. This field is empty for organization policy violations.",
          "type": "string",
          "readOnly": true
        },
        "remediationMarkdown": {
          "type": "string",
          "description": "Output only. The remediation instructions for the violation, in Markdown format. This field is only populated by `GetViolation` when using `VIOLATION_VIEW_DATA_BOUNDARY`. When this field isn't populated, see `remediation` instead.",
          "readOnly": true
        },
        "auditLogLink": {
          "description": "Output only. Immutable. A link to the Cloud Audit Logs entries for the violated resource. Format: `https://console.cloud.google.com/logs/query;query={logName}{protoPayload.resourceName}{timeRange}{folder}`",
          "readOnly": true,
          "type": "string"
        },
        "category": {
          "type": "string",
          "readOnly": true,
          "description": "Output only. The category that the violation is mapped to. For example, `Location`, `Service Usage`, `Access`, or `Encryption`."
        },
        "state": {
          "enum": [
            "STATE_UNSPECIFIED",
            "RESOLVED",
            "UNRESOLVED",
            "EXCEPTION"
          ],
          "readOnly": true,
          "type": "string",
          "description": "Output only. The state of the violation."
        }
      }
    },
    "GoogleCloudAssuredworkloadsV1ViolationExceptionContext": {
      "type": "object",
      "description": "Details about an acknowledgement (exception) of a violation.",
      "properties": {
        "userName": {
          "type": "string",
          "description": "The name of the user (or service account) who acknowledged the violation."
        },
        "acknowledgementTime": {
          "type": "string",
          "description": "The time when the violation was acknowledged.",
          "format": "google-datetime"
        },
        "comment": {
          "description": "The business justification that was provided when the violation was acknowledged.",
          "type": "string"
        }
      }
    },
    "GoogleCloudAssuredworkloadsV1ViolationRemediation": {
      "properties": {
        "compliantValues": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "The values that can resolve the violation. For example, for list organization policy violations, this field contains the list of allowed or denied values."
        },
        "remediationType": {
          "enum": [
            "REMEDIATION_TYPE_UNSPECIFIED",
            "REMEDIATION_BOOLEAN_ORG_POLICY_VIOLATION",
            "REMEDIATION_LIST_ALLOWED_VALUES_ORG_POLICY_VIOLATION",
            "REMEDIATION_LIST_DENIED_VALUES_ORG_POLICY_VIOLATION",
            "REMEDIATION_RESTRICT_CMEK_CRYPTO_KEY_PROJECTS_ORG_POLICY_VIOLATION",
            "REMEDIATION_RESOURCE_VIOLATION",
            "REMEDIATION_RESOURCE_VIOLATION_NON_CMEK_SERVICES"
          ],
          "description": "Output only. The remediation type, which is based on the type of organization policy values that were violated.",
          "readOnly": true,
          "type": "string"
        },
        "instructions": {
          "$ref": "#/$defs/GoogleCloudAssuredworkloadsV1ViolationRemediationInstructions",
          "description": "Required. The instructions to resolve the violation."
        }
      },
      "description": "Remediation guidance to resolve a compliance violation.",
      "type": "object"
    },
    "GoogleCloudAssuredworkloadsV1ViolationRemediationInstructions": {
      "properties": {
        "consoleInstructions": {
          "$ref": "#/$defs/GoogleCloudAssuredworkloadsV1ViolationRemediationInstructionsConsole",
          "description": "Instructions to resolve the violation by using the Google Cloud console."
        },
        "gcloudInstructions": {
          "$ref": "#/$defs/GoogleCloudAssuredworkloadsV1ViolationRemediationInstructionsGcloud",
          "description": "Instructions to resolve the violation by using the gcloud CLI."
        }
      },
      "description": "Instructions to remediate a violation.",
      "type": "object"
    },
    "GoogleCloudAssuredworkloadsV1ViolationRemediationInstructionsConsole": {
      "properties": {
        "steps": {
          "description": "The steps to resolve the violation by using the Google Cloud console.",
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "additionalLinks": {
          "description": "Additional URLs with more information about the steps.",
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "consoleUris": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "Links to the Google Cloud console pages where the violation can be resolved."
        }
      },
      "type": "object",
      "description": "Instructions to remediate a violation by using the Google Cloud console."
    },
    "GoogleCloudAssuredworkloadsV1ViolationRemediationInstructionsGcloud": {
      "type": "object",
      "properties": {
        "additionalLinks": {
          "type": "array",
          "description": "Additional URLs with more information about the steps.",
          "items": {
            "type": "string"
          }
        },
        "steps": {
          "items": {
            "type": "string"
          },
          "type": "array",
          "description": "The steps to resolve the violation by using the gcloud CLI."
        },
        "gcloudCommands": {
          "description": "The gcloud CLI commands that resolve the violation.",
          "type": "array",
          "items": {
            "type": "string"
          }
        }
      },
      "description": "Instructions to remediate a violation by using the Google Cloud CLI."
    }
  }
}