{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/google-cloud-iam/json-schema/google-cloud-iam-google-cloud-policysimulator-v1-list-org-policy-violations-response-schema.json",
  "title": "GoogleCloudPolicysimulatorV1ListOrgPolicyViolationsResponse",
  "description": "ListOrgPolicyViolationsResponse is the response message for OrgPolicyViolationsPreviewService.ListOrgPolicyViolations",
  "x-generated": "2026-11-11",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/google-cloud-iam-policysimulator-organizations-api-openapi.yml#/components/schemas/GoogleCloudPolicysimulatorV1ListOrgPolicyViolationsResponse",
  "properties": {
    "nextPageToken": {
      "type": "string",
      "description": "A token that you can use to retrieve the next page of results. If this field is omitted, there are no subsequent pages."
    },
    "orgPolicyViolations": {
      "type": "array",
      "description": "The list of OrgPolicyViolations",
      "items": {
        "$ref": "#/$defs/GoogleCloudPolicysimulatorV1OrgPolicyViolation"
      }
    }
  },
  "type": "object",
  "$defs": {
    "GoogleCloudOrgpolicyV2CustomConstraint": {
      "description": "A custom constraint defined by customers which can *only* be applied to the given resource types and organization. By creating a custom constraint, customers can apply policies of this custom constraint. *Creating a custom constraint itself does NOT apply any policy enforcement*.",
      "properties": {
        "description": {
          "type": "string",
          "description": "Detailed information about this custom policy constraint. The max length of the description is 2000 characters."
        },
        "actionType": {
          "type": "string",
          "enum": [
            "ACTION_TYPE_UNSPECIFIED",
            "ALLOW",
            "DENY"
          ],
          "description": "Allow or deny type."
        },
        "resourceTypes": {
          "description": "Immutable. The resource instance type on which this policy applies. Format will be of the form : `/` Example: * `compute.googleapis.com/Instance`.",
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "condition": {
          "description": "A Common Expression Language (CEL) condition which is used in the evaluation of the constraint. For example: `resource.instanceName.matches(\"(production|test)_(.+_)?[\\d]+\")` or, `resource.management.auto_upgrade == true` The max length of the condition is 1000 characters.",
          "type": "string"
        },
        "updateTime": {
          "description": "Output only. The last time this custom constraint was updated. This represents the last time that the `CreateCustomConstraint` or `UpdateCustomConstraint` methods were called.",
          "format": "google-datetime",
          "readOnly": true,
          "type": "string"
        },
        "methodTypes": {
          "description": "All the operations being applied for this constraint.",
          "type": "array",
          "items": {
            "type": "string",
            "enum": [
              "METHOD_TYPE_UNSPECIFIED",
              "CREATE",
              "UPDATE",
              "DELETE",
              "REMOVE_GRANT",
              "GOVERN_TAGS"
            ]
          }
        },
        "displayName": {
          "description": "One line display name for the UI. The max length of the display_name is 200 characters.",
          "type": "string"
        },
        "name": {
          "type": "string",
          "description": "Immutable. Name of the constraint. This is unique within the organization. The name must be of the form: * `organizations/{organization_id}/customConstraints/{custom_constraint_id}` Example: `organizations/123/customConstraints/custom.createOnlyE2TypeVms` The max length is 71 characters and the minimum length is 1. Note that the prefix `organizations/{organization_id}/customConstraints/custom.` is not counted."
        }
      },
      "type": "object"
    },
    "GoogleCloudPolicysimulatorV1OrgPolicyViolation": {
      "description": "OrgPolicyViolation is a resource representing a single resource violating a single OrgPolicy constraint.",
      "properties": {
        "name": {
          "type": "string",
          "description": "The name of the `OrgPolicyViolation`. Example: organizations/my-example-org/locations/global/orgPolicyViolationsPreviews/506a5f7f/orgPolicyViolations/38ce`"
        },
        "resource": {
          "$ref": "#/$defs/GoogleCloudPolicysimulatorV1ResourceContext",
          "description": "The resource violating the constraint."
        },
        "error": {
          "$ref": "#/$defs/GoogleRpcStatus",
          "description": "Any error encountered during the evaluation."
        },
        "customConstraint": {
          "$ref": "#/$defs/GoogleCloudOrgpolicyV2CustomConstraint",
          "description": "The custom constraint being violated."
        }
      },
      "type": "object"
    },
    "GoogleCloudPolicysimulatorV1ResourceContext": {
      "properties": {
        "resource": {
          "description": "The full name of the resource. Example: `//compute.googleapis.com/projects/my_project_123/zones/zone1/instances/instance1` See [Resource names](https://cloud.google.com/apis/design/resource_names#full_resource_name) for more information.",
          "type": "string"
        },
        "assetType": {
          "type": "string",
          "description": "The asset type of the resource as defined by CAIS. Example: `compute.googleapis.com/Firewall` See [Supported asset types](https://cloud.google.com/asset-inventory/docs/supported-asset-types) for more information."
        },
        "ancestors": {
          "description": "The ancestry path of the resource in Google Cloud [resource hierarchy](https://cloud.google.com/resource-manager/docs/cloud-platform-resource-hierarchy), represented as a list of relative resource names. An ancestry path starts with the closest ancestor in the hierarchy and ends at root. If the resource is a project, folder, or organization, the ancestry path starts from the resource itself. Example: `[\"projects/123456789\", \"folders/5432\", \"organizations/1234\"]`",
          "type": "array",
          "items": {
            "type": "string"
          }
        }
      },
      "description": "ResourceContext provides the context we know about a resource. It is similar in concept to google.cloud.asset.v1.Resource, but focuses on the information specifically used by Simulator.",
      "type": "object"
    },
    "GoogleRpcStatus": {
      "type": "object",
      "properties": {
        "details": {
          "description": "A list of messages that carry the error details. There is a common set of message types for APIs to use.",
          "type": "array",
          "items": {
            "additionalProperties": {
              "description": "Properties of the object. Contains field @type with type URL."
            },
            "type": "object"
          }
        },
        "message": {
          "description": "A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the google.rpc.Status.details field, or localized by the client.",
          "type": "string"
        },
        "code": {
          "format": "int32",
          "type": "integer",
          "description": "The status code, which should be an enum value of google.rpc.Code."
        }
      },
      "description": "The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors)."
    }
  }
}