# Generated by the protocol buffer compiler.  DO NOT EDIT!
# Source: google/cloud/policysimulator/v1/orgpolicy.proto for package 'Google.Cloud.PolicySimulator.V1'
# Original file comments:
# 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
#
#     http://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.
#

require 'grpc'
require 'google/cloud/policysimulator/v1/orgpolicy_pb'

module Google
  module Cloud
    module PolicySimulator
      module V1
        module OrgPolicyViolationsPreviewService
          # Violations Preview API service for OrgPolicy.
          #
          # An
          # [OrgPolicyViolationsPreview][google.cloud.policysimulator.v1.OrgPolicyViolationsPreview]
          # is a preview of the violations that will exist as soon as a proposed
          # OrgPolicy change is submitted. To create an
          # [OrgPolicyViolationsPreview][google.cloud.policysimulator.v1.OrgPolicyViolationsPreview],
          # the API user specifies the changes they wish to make and requests the
          # generation of a preview via [GenerateViolationsPreview][]. the OrgPolicy
          # Simulator service then scans the API user's currently existing resources to
          # determine these resources violate the newly set OrgPolicy.
          class Service

            include ::GRPC::GenericService

            self.marshal_class_method = :encode
            self.unmarshal_class_method = :decode
            self.service_name = 'google.cloud.policysimulator.v1.OrgPolicyViolationsPreviewService'

            # ListOrgPolicyViolationsPreviews lists each
            # [OrgPolicyViolationsPreview][google.cloud.policysimulator.v1.OrgPolicyViolationsPreview]
            # in an organization. Each
            # [OrgPolicyViolationsPreview][google.cloud.policysimulator.v1.OrgPolicyViolationsPreview]
            # is available for at least 7 days.
            rpc :ListOrgPolicyViolationsPreviews, ::Google::Cloud::PolicySimulator::V1::ListOrgPolicyViolationsPreviewsRequest, ::Google::Cloud::PolicySimulator::V1::ListOrgPolicyViolationsPreviewsResponse
            # GetOrgPolicyViolationsPreview gets the specified
            # [OrgPolicyViolationsPreview][google.cloud.policysimulator.v1.OrgPolicyViolationsPreview].
            # Each
            # [OrgPolicyViolationsPreview][google.cloud.policysimulator.v1.OrgPolicyViolationsPreview]
            # is available for at least 7 days.
            rpc :GetOrgPolicyViolationsPreview, ::Google::Cloud::PolicySimulator::V1::GetOrgPolicyViolationsPreviewRequest, ::Google::Cloud::PolicySimulator::V1::OrgPolicyViolationsPreview
            # CreateOrgPolicyViolationsPreview creates an
            # [OrgPolicyViolationsPreview][google.cloud.policysimulator.v1.OrgPolicyViolationsPreview]
            # for the proposed changes in the provided
            # [OrgPolicyViolationsPreview.OrgPolicyOverlay][]. The changes to OrgPolicy
            # are specified by this `OrgPolicyOverlay`. The resources to scan are
            # inferred from these specified changes.
            rpc :CreateOrgPolicyViolationsPreview, ::Google::Cloud::PolicySimulator::V1::CreateOrgPolicyViolationsPreviewRequest, ::Google::Longrunning::Operation
            # ListOrgPolicyViolations lists the [OrgPolicyViolations][] that are present
            # in an
            # [OrgPolicyViolationsPreview][google.cloud.policysimulator.v1.OrgPolicyViolationsPreview].
            rpc :ListOrgPolicyViolations, ::Google::Cloud::PolicySimulator::V1::ListOrgPolicyViolationsRequest, ::Google::Cloud::PolicySimulator::V1::ListOrgPolicyViolationsResponse
          end

          Stub = Service.rpc_stub_class
        end
      end
    end
  end
end
