# frozen_string_literal: true

# Copyright 2025 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

# Auto-generated by gapic-generator-ruby. DO NOT EDIT!


module Google
  module Cloud
    module CloudSecurityCompliance
      module V1
        # FrameworkDeployment represents deployment of a Framework on a target
        # resource. Supported target resources are organizations/\\{organization},
        # folders/\\{folder}, and projects/\\{project}.
        # @!attribute [rw] name
        #   @return [::String]
        #     Identifier. FrameworkDeployment name in the following format:
        #     organizations/\\{organization}/locations/\\{location}/frameworkDeployments/\\{framework_deployment_id}
        # @!attribute [rw] target_resource_config
        #   @return [::Google::Cloud::CloudSecurityCompliance::V1::TargetResourceConfig]
        #     Required. The details of the target resource on which the Framework is to
        #     be deployed. It can either be an existing target resource or a new target
        #     resource to be created.
        # @!attribute [r] computed_target_resource
        #   @return [::String]
        #     Output only. The resource on which the Framework is deployed based on the
        #     provided TargetResourceConfig in the following format:
        #     organizations/\\{organization}, folders/\\{folder} or projects/\\{project}
        # @!attribute [rw] framework
        #   @return [::Google::Cloud::CloudSecurityCompliance::V1::FrameworkReference]
        #     Required. Reference to the framework to be deployed.
        # @!attribute [rw] description
        #   @return [::String]
        #     Optional. User provided description of the Framework deployment
        # @!attribute [rw] cloud_control_metadata
        #   @return [::Array<::Google::Cloud::CloudSecurityCompliance::V1::CloudControlMetadata>]
        #     Required. Deployment mode and parameters for each of the Cloud Controls in
        #     the framework. Every Cloud Control in the framework must have a
        #     CloudControlMetadata.
        # @!attribute [r] deployment_state
        #   @return [::Google::Cloud::CloudSecurityCompliance::V1::DeploymentState]
        #     Output only. State of the Framework Deployment
        # @!attribute [r] create_time
        #   @return [::Google::Protobuf::Timestamp]
        #     Output only. The time at which the resource was created.
        # @!attribute [r] update_time
        #   @return [::Google::Protobuf::Timestamp]
        #     Output only. The time at which the resource last updated.
        # @!attribute [rw] etag
        #   @return [::String]
        #     Optional. To prevent concurrent updates from overwriting each other, always
        #     provide the `etag` when you update a FrameworkDeployment. You can also
        #     provide the `etag` when you delete a FrameworkDeployment, to help
        #     ensure that you're deleting the intended version of the
        #     FrameworkDeployment.
        # @!attribute [r] target_resource_display_name
        #   @return [::String]
        #     Output only. The display name of the target resource.
        # @!attribute [r] cloud_control_deployment_references
        #   @return [::Array<::Google::Cloud::CloudSecurityCompliance::V1::CloudControlDeploymentReference>]
        #     Output only. The references to the cloud control deployments. It has all
        #     the CloudControlDeployments which are either directly added in the
        #     framework or through a CloudControlGroup. Example: If a framework
        #     deployment deploys two cloud controls, cc-deployment-1 and cc-deployment-2,
        #     then the cloud_control_deployment_references will be:
        #     {
        #      cloud_control_deployment_reference: {
        #        cloud_control_deployment:
        #        "organizations/\\{organization}/locations/\\{location}/cloudControlDeployments/cc-deployment-1"
        #      },
        #      cloud_control_deployment_reference: {
        #       cloud_control_deployment:
        #       "organizations/\\{organization}/locations/\\{location}/cloudControlDeployments/cc-deployment-2"
        #      }
        class FrameworkDeployment
          include ::Google::Protobuf::MessageExts
          extend ::Google::Protobuf::MessageExts::ClassMethods
        end

        # CloudControlDeployment represents deployment of a CloudControl on a target
        # resource. Supported target resources are organizations/\\{organization},
        # folders/\\{folder}, and projects/\\{project}.
        # @!attribute [rw] name
        #   @return [::String]
        #     Identifier. CloudControlDeployment name in the following format:
        #     organizations/\\{organization}/locations/\\{location}/cloudControlDeployments/\\{cloud_control_deployment_id}
        # @!attribute [rw] target_resource_config
        #   @return [::Google::Cloud::CloudSecurityCompliance::V1::TargetResourceConfig]
        #     Required. The details of the target resource on which the CloudControl is
        #     to be deployed. It can either be an existing target resource or a new
        #     target resource to be created.
        # @!attribute [r] target_resource
        #   @return [::String]
        #     Output only. The resource on which the CloudControl is deployed based on
        #     the provided TargetResourceConfig in the following format:
        #     organizations/\\{organization}, folders/\\{folder} or projects/\\{project}.
        # @!attribute [rw] cloud_control_metadata
        #   @return [::Google::Cloud::CloudSecurityCompliance::V1::CloudControlMetadata]
        #     Required. Deployment mode and parameters for the Cloud Control.
        # @!attribute [rw] description
        #   @return [::String]
        #     Optional. User provided description of the CloudControl deployment
        # @!attribute [r] deployment_state
        #   @return [::Google::Cloud::CloudSecurityCompliance::V1::DeploymentState]
        #     Output only. State of the CloudControl deployment
        # @!attribute [r] create_time
        #   @return [::Google::Protobuf::Timestamp]
        #     Output only. The time at which the resource was created.
        # @!attribute [r] update_time
        #   @return [::Google::Protobuf::Timestamp]
        #     Output only. The time at which the resource last updated.
        # @!attribute [rw] etag
        #   @return [::String]
        #     Optional. To prevent concurrent updates from overwriting each other, always
        #     provide the `etag` when you update a CloudControlDeployment. You can also
        #     provide the `etag` when you delete a CloudControlDeployment, to help
        #     ensure that you're deleting the intended version of the
        #     CloudControlDeployment.
        # @!attribute [r] parameter_substituted_cloud_control
        #   @return [::Google::Cloud::CloudSecurityCompliance::V1::CloudControl]
        #     Output only. The CloudControl after substitution of given parameters.
        # @!attribute [r] framework_deployment_references
        #   @return [::Array<::Google::Cloud::CloudSecurityCompliance::V1::FrameworkDeploymentReference>]
        #     Output only. The references to the Framework deployments that this Cloud
        #     Control deployment is part of. A Cloud Control deployment can be part of
        #     multiple Framework deployments.
        # @!attribute [r] target_resource_display_name
        #   @return [::String]
        #     Output only. The display name of the target resource.
        class CloudControlDeployment
          include ::Google::Protobuf::MessageExts
          extend ::Google::Protobuf::MessageExts::ClassMethods
        end

        # TargetResourceConfig contains either the name of the target_resource or
        # contains the config to create a new target_resource.
        # @!attribute [rw] existing_target_resource
        #   @return [::String]
        #     Optional. CRM node in format organizations/\\{organization},
        #     folders/\\{folder}, or projects/\\{project}
        #
        #     Note: The following fields are mutually exclusive: `existing_target_resource`, `target_resource_creation_config`. If a field in that set is populated, all other fields in the set will automatically be cleared.
        # @!attribute [rw] target_resource_creation_config
        #   @return [::Google::Cloud::CloudSecurityCompliance::V1::TargetResourceCreationConfig]
        #     Optional. Config to create a new resource and use that as the
        #     target_resource for deployment.
        #
        #     Note: The following fields are mutually exclusive: `target_resource_creation_config`, `existing_target_resource`. If a field in that set is populated, all other fields in the set will automatically be cleared.
        class TargetResourceConfig
          include ::Google::Protobuf::MessageExts
          extend ::Google::Protobuf::MessageExts::ClassMethods
        end

        # TargetResourceCreationConfig contains the config to create a new resource to
        # be used as the target_resource of a deployment.
        # @!attribute [rw] folder_creation_config
        #   @return [::Google::Cloud::CloudSecurityCompliance::V1::FolderCreationConfig]
        #     Optional. Config to create a new folder to be used as the target_resource
        #     of a deployment.
        #
        #     Note: The following fields are mutually exclusive: `folder_creation_config`, `project_creation_config`. If a field in that set is populated, all other fields in the set will automatically be cleared.
        # @!attribute [rw] project_creation_config
        #   @return [::Google::Cloud::CloudSecurityCompliance::V1::ProjectCreationConfig]
        #     Optional. Config to create a new project to be used as the
        #     target_resource of a deployment.
        #
        #     Note: The following fields are mutually exclusive: `project_creation_config`, `folder_creation_config`. If a field in that set is populated, all other fields in the set will automatically be cleared.
        class TargetResourceCreationConfig
          include ::Google::Protobuf::MessageExts
          extend ::Google::Protobuf::MessageExts::ClassMethods
        end

        # FolderCreationConfig contains the config to create a new folder to be used
        # as the target_resource of a deployment.
        # @!attribute [rw] parent
        #   @return [::String]
        #     Required. The parent of the folder to be created. It can be an
        #     organizations/\\{org} or folders/\\{folder}
        # @!attribute [rw] folder_display_name
        #   @return [::String]
        #     Required. Display name of the folder to be created
        class FolderCreationConfig
          include ::Google::Protobuf::MessageExts
          extend ::Google::Protobuf::MessageExts::ClassMethods
        end

        # ProjectCreationConfig contains the config to create a new project to be used
        # as the target_resource of a deployment.
        # @!attribute [rw] parent
        #   @return [::String]
        #     Required. organizations/\\{org} or folders/\\{folder}
        # @!attribute [rw] project_display_name
        #   @return [::String]
        #     Required. Display name of the project to be created.
        # @!attribute [rw] billing_account_id
        #   @return [::String]
        #     Required. Billing account id to be used for the project.
        class ProjectCreationConfig
          include ::Google::Protobuf::MessageExts
          extend ::Google::Protobuf::MessageExts::ClassMethods
        end

        # CloudControlMetadata contains the enforcement mode and parameters of a Cloud
        # Control Deployment.
        # @!attribute [rw] cloud_control_details
        #   @return [::Google::Cloud::CloudSecurityCompliance::V1::CloudControlDetails]
        #     Required. Cloud control name and parameters.
        # @!attribute [rw] enforcement_mode
        #   @return [::Google::Cloud::CloudSecurityCompliance::V1::EnforcementMode]
        #     Required. Enforcement mode of the cloud control
        class CloudControlMetadata
          include ::Google::Protobuf::MessageExts
          extend ::Google::Protobuf::MessageExts::ClassMethods
        end

        # Request message for CreateFrameworkDeployment API.
        # @!attribute [rw] parent
        #   @return [::String]
        #     Required. The parent resource of the FrameworkDeployment in the format:
        #     organizations/\\{organization}/locations/\\{location}
        #     Only global location is supported.
        # @!attribute [rw] framework_deployment_id
        #   @return [::String]
        #     Optional. User provided identifier. It should be unique in scope of a
        #     parent. This is optional and if not provided, a random UUID will be
        #     generated.
        # @!attribute [rw] framework_deployment
        #   @return [::Google::Cloud::CloudSecurityCompliance::V1::FrameworkDeployment]
        #     Required. The FrameworkDeployment to be created.
        class CreateFrameworkDeploymentRequest
          include ::Google::Protobuf::MessageExts
          extend ::Google::Protobuf::MessageExts::ClassMethods
        end

        # Request message for DeleteFrameworkDeployment.
        # @!attribute [rw] name
        #   @return [::String]
        #     Required. name of the FrameworkDeployment to be deleted in the following
        #     format:
        #     organizations/\\{organization}/locations/\\{location}/frameworkDeployments/\\{framework_deployment_id}
        # @!attribute [rw] etag
        #   @return [::String]
        #     Optional. An opaque identifier for the current version of the resource.
        #
        #     If you provide this value, then it must match the existing value. If the
        #     values don't match, then the request fails with an
        #     [ABORTED][google.rpc.Code.ABORTED] error.
        #
        #     If you omit this value, then the resource is deleted regardless of its
        #     current `etag` value.
        class DeleteFrameworkDeploymentRequest
          include ::Google::Protobuf::MessageExts
          extend ::Google::Protobuf::MessageExts::ClassMethods
        end

        # Request message for GetFrameworkDeployment.
        # @!attribute [rw] name
        #   @return [::String]
        #     Required. FrameworkDeployment name in the following format:
        #     organizations/\\{organization}/locations/\\{location}/frameworkDeployments/\\{framework_deployment_id}
        class GetFrameworkDeploymentRequest
          include ::Google::Protobuf::MessageExts
          extend ::Google::Protobuf::MessageExts::ClassMethods
        end

        # Request message for ListFrameworkDeployments.
        # @!attribute [rw] parent
        #   @return [::String]
        #     Required. parent resource of the FrameworkDeployment in the format:
        #     organizations/\\{organization}/locations/\\{location}
        #     Only global location is supported.
        # @!attribute [rw] page_size
        #   @return [::Integer]
        #     Optional. Requested page size. Server may return fewer items than
        #     requested. If unspecified, server will pick an appropriate default.
        # @!attribute [rw] page_token
        #   @return [::String]
        #     Optional. A token identifying a page of results the server should return.
        # @!attribute [rw] filter
        #   @return [::String]
        #     Optional. Filter to be applied on the resource, defined by EBNF grammar
        #     https://google.aip.dev/assets/misc/ebnf-filtering.txt.
        # @!attribute [rw] order_by
        #   @return [::String]
        #     Optional. Sort results. Supported are "name", "name desc" or "" (unsorted).
        class ListFrameworkDeploymentsRequest
          include ::Google::Protobuf::MessageExts
          extend ::Google::Protobuf::MessageExts::ClassMethods
        end

        # Response message for ListFrameworkDeployments.
        # @!attribute [rw] framework_deployments
        #   @return [::Array<::Google::Cloud::CloudSecurityCompliance::V1::FrameworkDeployment>]
        #     The list of FrameworkDeployments.
        # @!attribute [rw] next_page_token
        #   @return [::String]
        #     A token identifying a page of results the server should return.
        class ListFrameworkDeploymentsResponse
          include ::Google::Protobuf::MessageExts
          extend ::Google::Protobuf::MessageExts::ClassMethods
        end

        # Request message for GetCloudControlDeployment.
        # @!attribute [rw] name
        #   @return [::String]
        #     Required. CloudControlDeployment name in the following format:
        #     organizations/\\{organization}/locations/\\{location}/cloudControlDeployments/\\{cloud_control_deployment_id}
        class GetCloudControlDeploymentRequest
          include ::Google::Protobuf::MessageExts
          extend ::Google::Protobuf::MessageExts::ClassMethods
        end

        # Request message for ListCloudControlDeployments.
        # @!attribute [rw] parent
        #   @return [::String]
        #     Required. parent resource of the CloudControlDeployment in the format:
        #     organizations/\\{organization}/locations/\\{location}
        #     Only global location is supported.
        # @!attribute [rw] page_size
        #   @return [::Integer]
        #     Optional. Requested page size. Server may return fewer items than
        #     requested. If unspecified, server will pick an appropriate default.
        # @!attribute [rw] page_token
        #   @return [::String]
        #     Optional. A token identifying a page of results the server should return.
        # @!attribute [rw] filter
        #   @return [::String]
        #     Optional. Filter to be applied on the resource, defined by EBNF grammar
        #     https://google.aip.dev/assets/misc/ebnf-filtering.txt.
        # @!attribute [rw] order_by
        #   @return [::String]
        #     Optional. Sort results. Supported are "name", "name desc" or "" (unsorted).
        class ListCloudControlDeploymentsRequest
          include ::Google::Protobuf::MessageExts
          extend ::Google::Protobuf::MessageExts::ClassMethods
        end

        # Response message for ListCloudControlDeployments.
        # @!attribute [rw] cloud_control_deployments
        #   @return [::Array<::Google::Cloud::CloudSecurityCompliance::V1::CloudControlDeployment>]
        #     The list of CloudControlDeployments.
        # @!attribute [rw] next_page_token
        #   @return [::String]
        #     A token identifying a page of results the server should return.
        class ListCloudControlDeploymentsResponse
          include ::Google::Protobuf::MessageExts
          extend ::Google::Protobuf::MessageExts::ClassMethods
        end

        # The reference to a CloudControlDeployment.
        # @!attribute [r] cloud_control_deployment
        #   @return [::String]
        #     Output only. The name of the CloudControlDeployment. The format is:
        #     organizations/\\{org}/locations/\\{location}/cloudControlDeployments/\\{cloud_control_deployment_id}
        class CloudControlDeploymentReference
          include ::Google::Protobuf::MessageExts
          extend ::Google::Protobuf::MessageExts::ClassMethods
        end

        # The reference to a FrameworkDeployment.
        # @!attribute [r] framework_deployment
        #   @return [::String]
        #     Output only. The name of the FrameworkDeployment. The format is:
        #     organizations/\\{org}/locations/\\{location}/frameworkDeployments/\\{framework_deployment_id}
        # @!attribute [rw] framework_reference
        #   @return [::Google::Cloud::CloudSecurityCompliance::V1::FrameworkReference]
        #     Optional. The reference to the Framework that this deployment is for.
        #     Example: {
        #       framework:
        #       "organizations/\\{org}/locations/\\{location}/frameworks/\\{framework}",
        #       major_revision_id: 1
        #     }
        # @!attribute [rw] framework_display_name
        #   @return [::String]
        #     Optional. The display name of the Framework that this FrameworkDeployment
        #     is for.
        class FrameworkDeploymentReference
          include ::Google::Protobuf::MessageExts
          extend ::Google::Protobuf::MessageExts::ClassMethods
        end

        # DeploymentState represents the state of the Deployment resource.
        module DeploymentState
          # Unspecified. Invalid state.
          DEPLOYMENT_STATE_UNSPECIFIED = 0

          # Validating the deployment.
          DEPLOYMENT_STATE_VALIDATING = 1

          # Deployment is in CREATING state.
          DEPLOYMENT_STATE_CREATING = 2

          # Deployment is in DELETING state.
          DEPLOYMENT_STATE_DELETING = 3

          # Deployment has failed. All the changes made by the deployment have been
          # successfully rolled back. A deployment in the FAILED state can be retried
          # or deleted.
          DEPLOYMENT_STATE_FAILED = 4

          # Deployment is successful and ready to use.
          DEPLOYMENT_STATE_READY = 5

          # Deployment is partially deployed. All the Cloud Controls were not deployed
          # successfully. Retrying the operation will resume from the first failed
          # step.
          DEPLOYMENT_STATE_PARTIALLY_DEPLOYED = 6

          # Deployment is partially deleted. All the Cloud Control Deployments were not
          # deleted successfully. Retrying the operation will resume from the first
          # failed step.
          DEPLOYMENT_STATE_PARTIALLY_DELETED = 7
        end
      end
    end
  end
end
