organization:
  name: organization
  collection: securitycenter.organizations
  attributes:
  - &organization
    parameter_name: organizationsId
    attribute_name: organization
    help: |
      (Optional) If the full resource name isn't provided e.g. organizations/123, then provide the
      organization id which is the suffix of the organization. Example: organizations/123, the id is
      123.
    fallthroughs:
    - hook: googlecloudsdk.command_lib.scc.hooks:GetDefaultOrganization
      hint:
        Set the organization property in configuration using `gcloud config set scc/organization`
        if it is not specified in command line.
  disable_auto_completers: false

parent:
  name: parent
  collection: securitycenter.organizations
  attributes:
  - &parent
    parameter_name: organizationsId
    attribute_name: parent
    help: |
      (Optional) Provide the full resource name, [RESOURCE_TYPE/RESOURCE_ID], of the parent
      organization, folder, or project resource. For example, `organizations/123` or `parent/456`.
      If the parent is an organization, you can specify just the organization ID. For example,
      `123`.
    fallthroughs:
    - hook: googlecloudsdk.command_lib.scc.hooks:GetDefaultParent
      hint:
        Set the parent property in configuration using `gcloud config set scc/parent`
        if it is not specified in command line
  disable_auto_completers: false

asset:
  name: asset
  collection: securitycenter.organizations.assets
  attributes:
  - *organization
  - &asset
    parameter_name: assetsId
    attribute_name: asset
    help: |
      (Optional) If the full resource name isn't provided e.g. organizations/123/assets/456, then
      provide the asset id which is the suffix of the asset. Example: organizations/123/assets/456,
      the id is 456.
  disable_auto_completers: false

source:
  name: source
  collection: securitycenter.organizations.sources
  attributes:
  - *organization
  - &source
    parameter_name: sourcesId
    attribute_name: source
    help: |
      (Optional) If the full resource name isn't provided e.g. organizations/123/sources/456, then
      provide the source id which is the suffix of the source.
      Example: organizations/123/sources/456, the id is 456.
  disable_auto_completers: false

finding:
  name: finding
  collection: securitycenter.organizations.sources.findings
  attributes:
  - *organization
  - *source
  - &finding
    parameter_name: findingId
    attribute_name: finding
    help: |
      (Optional) If the full resource name isn't provided e.g.
      organizations/123/sources/456/findings/789, then provide the finding id which is the suffix of
      the finding. Example: organizations/123/sources/456/findings/789, the id is 789.
  disable_auto_completers: false

operation:
  name: operation
  collection: securitycenter.organizations.operations
  request_id_field: operationId
  attributes:
  - *organization
  - &operation
    parameter_name: operationsId
    attribute_name: operation
    help: |
      Cloud SCC (Security Command Center) long running operation.

notification:
  name: notification
  collection: securitycenter.organizations.notificationConfigs
  attributes:
  - *organization
  - &notification
    parameter_name: notificationConfigsId
    attribute_name: notification
    help: |
      (Optional) If the full resource name isn't provided e.g. organizations/123/notificationConfigs/456, then
      provide the notification id which is the suffix of the notification config.
      Example: organizations/123/notificationConfigs/456, the id is 456.
  disable_auto_completers: false

security_posture_org:
  name: organization
  collection: securityposture.organizations
  attributes:
  - &security_posture_org
    parameter_name: organizationsId
    attribute_name: organization
    help: |
      ID of the organization which is the parent of the resource.

security_posture_location:
  name: location
  collection: securityposture.organizations.locations
  attributes:
  - *security_posture_org
  - &security_posture_location
    parameter_name: locationsId
    attribute_name: location
    help: |
      ID of the location where the resource exists (for example, global).

posture:
  name: posture
  collection: securityposture.organizations.locations.postures
  request_id_field: postureId
  attributes:
  - *security_posture_org
  - *security_posture_location
  - &posture
    parameter_name: posturesId
    attribute_name: posture
    help: Security Posture resource
  disable_auto_completers: false

# Posture resource spec, to be used for ExtractPostures API, which has a different request_id_field.
posture_for_extract:
  name: posture
  collection: securityposture.organizations.locations.postures
  request_id_field: extractPostureRequest.postureId
  attributes:
  - *security_posture_org
  - *security_posture_location
  - &posture_for_extract
    parameter_name: posturesId
    attribute_name: posture
    help: Security Posture resource
  disable_auto_completers: false

posture_deployment:
  name: posture_deployment
  collection: securityposture.organizations.locations.postureDeployments
  request_id_field: postureDeploymentId
  attributes:
  - *security_posture_org
  - *security_posture_location
  - &posture_deployment
    parameter_name: postureDeploymentsId
    attribute_name: posture_deployment
    help: Security Posture Deployment resource
  disable_auto_completers: false

posture_template:
  name: posture_template
  collection: securityposture.organizations.locations.postureTemplates
  request_id_field: postureTemplateId
  attributes:
  - *security_posture_org
  - *security_posture_location
  - &posture_template
    parameter_name: postureTemplatesId
    attribute_name: posture_template
    help: Security Posture Template resource
  disable_auto_completers: false

report:
  name: report
  collection: securityposture.organizations.locations.reports
  request_id_field: reportId
  attributes:
  - *security_posture_org
  - *security_posture_location
  - &report
    parameter_name: reportsId
    attribute_name: report
    help: IaC Validation report resource
  disable_auto_completers: false

prediction:
  name: prediction
  collection: securityposture.organizations.locations.predictions
  request_id_field: predictionId
  attributes:
  - *security_posture_org
  - *security_posture_location
  - &prediction
    parameter_name: predictionsId
    attribute_name: prediction
    help: SCC Posture Prediction resource
  disable_auto_completers: false

artifact_scan_guard_organization_attribute: &artifact_scan_guard_organization_attribute
  parameter_name: organizationsId
  attribute_name: organization
  help: |
    Organization ID.

artifact_scan_guard_project_attribute: &artifact_scan_guard_project_attribute
  parameter_name: projectsId
  attribute_name: project
  help: |
    Project ID or number.

artifact_scan_guard_location_attribute: &artifact_scan_guard_location_attribute
  parameter_name: locationsId
  attribute_name: location
  help: |
    ID of the location where the resource exists (for example, global).

artifact_scan_guard_operation_id_attribute: &artifact_scan_guard_operation_id_attribute
  parameter_name: operationsId
  attribute_name: operation
  help: Artifact Guard Operation resource ID.

artifact_scan_guard_organization:
  name: organization
  collection: artifactscanguard.organizations
  attributes:
  - &artifact_scan_guard_organization
    <<: *artifact_scan_guard_organization_attribute
  disable_auto_completers: false

artifact_scan_guard_project:
  name: project
  collection: artifactscanguard.projects
  attributes:
  - &artifact_scan_guard_project
    <<: *artifact_scan_guard_project_attribute
  disable_auto_completers: false
artifact_scan_guard_location:
  name: location
  resource_type_fallthroughs: true
  attributes:
  - *artifact_scan_guard_organization
  - *artifact_scan_guard_project
  - &artifact_scan_guard_location
    <<: *artifact_scan_guard_location_attribute
  collection_path_pattern:
  - artifactscanguard.organizations.locations
  - artifactscanguard.projects.locations

organization_or_project_location:
  name: location
  plural_name: locations
  resources:
  - name: location
    plural_name: locations
    collection: artifactscanguard.organizations.locations
    attributes:
    - *artifact_scan_guard_organization
    - *artifact_scan_guard_location
    disable_auto_completers: true
  - name: location
    plural_name: locations
    collection: artifactscanguard.projects.locations
    attributes:
    - *artifact_scan_guard_project
    - *artifact_scan_guard_location
    disable_auto_completers: true

organization_or_project_location_policy:
  name: policy
  resources:
  - name: policy
    plural_name: policies
    collection: artifactscanguard.organizations.locations.policies
    request_id_field: policyId
    attributes:
    - *artifact_scan_guard_organization
    - *artifact_scan_guard_location
    - &artifact_scan_guard_policy
      parameter_name: policiesId
      attribute_name: policy
      help: Artifact Guard Policy resource ID.
    disable_auto_completers: true
  - name: policy
    plural_name: policies
    collection: artifactscanguard.projects.locations.policies
    request_id_field: policyId
    attributes:
    - *artifact_scan_guard_project
    - *artifact_scan_guard_location
    - *artifact_scan_guard_policy
    disable_auto_completers: true


organization_or_project_location_connector:
  name: connector
  plural_name: connectors
  resources:
  - name: connector
    plural_name: connectors
    collection: artifactscanguard.organizations.locations.connectors
    request_id_field: connectorId
    attributes:
    - *artifact_scan_guard_organization
    - *artifact_scan_guard_location
    - parameter_name: connectorsId
      attribute_name: connector
      help: Artifact Guard Connector resource ID.
    disable_auto_completers: true
  - name: connector
    plural_name: connectors
    collection: artifactscanguard.projects.locations.connectors
    request_id_field: connectorId
    attributes:
    - *artifact_scan_guard_project
    - *artifact_scan_guard_location
    - parameter_name: connectorsId
      attribute_name: connector
      help: Artifact Guard Connector resource ID.
    disable_auto_completers: true

artifact_scan_guard_operation:
  name: operation
  resources:
  - name: operation
    plural_name: operations
    collection: artifactscanguard.organizations.locations.operations
    request_id_field: operationId
    attributes:
    - *artifact_scan_guard_organization_attribute
    - *artifact_scan_guard_location_attribute
    - *artifact_scan_guard_operation_id_attribute
    disable_auto_completers: true
  - name: operation
    plural_name: operations
    collection: artifactscanguard.projects.locations.operations
    request_id_field: operationId
    attributes:
    - *artifact_scan_guard_project_attribute
    - *artifact_scan_guard_location_attribute
    - *artifact_scan_guard_operation_id_attribute
    disable_auto_completers: true
