# Generated by the protocol buffer compiler.  DO NOT EDIT!
# Source: google/cloud/alloydb/v1alpha/service.proto for package 'Google.Cloud.AlloyDB.V1alpha'
# Original file comments:
# Copyright 2023 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/alloydb/v1alpha/service_pb'

module Google
  module Cloud
    module AlloyDB
      module V1alpha
        module AlloyDBAdmin
          # Service describing handlers for resources
          class Service

            include ::GRPC::GenericService

            self.marshal_class_method = :encode
            self.unmarshal_class_method = :decode
            self.service_name = 'google.cloud.alloydb.v1alpha.AlloyDBAdmin'

            # Lists Clusters in a given project and location.
            rpc :ListClusters, ::Google::Cloud::AlloyDB::V1alpha::ListClustersRequest, ::Google::Cloud::AlloyDB::V1alpha::ListClustersResponse
            # Gets details of a single Cluster.
            rpc :GetCluster, ::Google::Cloud::AlloyDB::V1alpha::GetClusterRequest, ::Google::Cloud::AlloyDB::V1alpha::Cluster
            # Creates a new Cluster in a given project and location.
            rpc :CreateCluster, ::Google::Cloud::AlloyDB::V1alpha::CreateClusterRequest, ::Google::Longrunning::Operation
            # Updates the parameters of a single Cluster.
            rpc :UpdateCluster, ::Google::Cloud::AlloyDB::V1alpha::UpdateClusterRequest, ::Google::Longrunning::Operation
            # Exports data from the cluster.
            # Imperative only.
            rpc :ExportCluster, ::Google::Cloud::AlloyDB::V1alpha::ExportClusterRequest, ::Google::Longrunning::Operation
            # Imports data to the cluster.
            # Imperative only.
            rpc :ImportCluster, ::Google::Cloud::AlloyDB::V1alpha::ImportClusterRequest, ::Google::Longrunning::Operation
            # Upgrades a single Cluster.
            # Imperative only.
            rpc :UpgradeCluster, ::Google::Cloud::AlloyDB::V1alpha::UpgradeClusterRequest, ::Google::Longrunning::Operation
            # Deletes a single Cluster.
            rpc :DeleteCluster, ::Google::Cloud::AlloyDB::V1alpha::DeleteClusterRequest, ::Google::Longrunning::Operation
            # Promotes a SECONDARY cluster. This turns down replication
            # from the PRIMARY cluster and promotes a secondary cluster
            # into its own standalone cluster.
            # Imperative only.
            rpc :PromoteCluster, ::Google::Cloud::AlloyDB::V1alpha::PromoteClusterRequest, ::Google::Longrunning::Operation
            # Switches the roles of PRIMARY and SECONDARY clusters without any data loss.
            # This promotes the SECONDARY cluster to PRIMARY and sets up the original
            # PRIMARY cluster to replicate from this newly promoted cluster.
            rpc :SwitchoverCluster, ::Google::Cloud::AlloyDB::V1alpha::SwitchoverClusterRequest, ::Google::Longrunning::Operation
            # Creates a new Cluster in a given project and location, with a volume
            # restored from the provided source, either a backup ID or a point-in-time
            # and a source cluster.
            rpc :RestoreCluster, ::Google::Cloud::AlloyDB::V1alpha::RestoreClusterRequest, ::Google::Longrunning::Operation
            # Creates a cluster of type SECONDARY in the given location using
            # the primary cluster as the source.
            rpc :CreateSecondaryCluster, ::Google::Cloud::AlloyDB::V1alpha::CreateSecondaryClusterRequest, ::Google::Longrunning::Operation
            # Lists Instances in a given project and location.
            rpc :ListInstances, ::Google::Cloud::AlloyDB::V1alpha::ListInstancesRequest, ::Google::Cloud::AlloyDB::V1alpha::ListInstancesResponse
            # Gets details of a single Instance.
            rpc :GetInstance, ::Google::Cloud::AlloyDB::V1alpha::GetInstanceRequest, ::Google::Cloud::AlloyDB::V1alpha::Instance
            # Creates a new Instance in a given project and location.
            rpc :CreateInstance, ::Google::Cloud::AlloyDB::V1alpha::CreateInstanceRequest, ::Google::Longrunning::Operation
            # Creates a new SECONDARY Instance in a given project and location.
            rpc :CreateSecondaryInstance, ::Google::Cloud::AlloyDB::V1alpha::CreateSecondaryInstanceRequest, ::Google::Longrunning::Operation
            # Creates new instances under the given project, location and cluster.
            # There can be only one primary instance in a cluster. If the primary
            # instance exists in the cluster as well as this request, then API will
            # throw an error.
            # The primary instance should exist before any read pool instance is
            # created. If the primary instance is a part of the request payload, then
            # the API will take care of creating instances in the correct order.
            # This method is here to support Google-internal use cases, and is not meant
            # for external customers to consume. Please do not start relying on it; its
            # behavior is subject to change without notice.
            rpc :BatchCreateInstances, ::Google::Cloud::AlloyDB::V1alpha::BatchCreateInstancesRequest, ::Google::Longrunning::Operation
            # Updates the parameters of a single Instance.
            rpc :UpdateInstance, ::Google::Cloud::AlloyDB::V1alpha::UpdateInstanceRequest, ::Google::Longrunning::Operation
            # Deletes a single Instance.
            rpc :DeleteInstance, ::Google::Cloud::AlloyDB::V1alpha::DeleteInstanceRequest, ::Google::Longrunning::Operation
            # Forces a Failover for a highly available instance.
            # Failover promotes the HA standby instance as the new primary.
            # Imperative only.
            rpc :FailoverInstance, ::Google::Cloud::AlloyDB::V1alpha::FailoverInstanceRequest, ::Google::Longrunning::Operation
            # Injects fault in an instance.
            # Imperative only.
            rpc :InjectFault, ::Google::Cloud::AlloyDB::V1alpha::InjectFaultRequest, ::Google::Longrunning::Operation
            # Restart an Instance in a cluster.
            # Imperative only.
            rpc :RestartInstance, ::Google::Cloud::AlloyDB::V1alpha::RestartInstanceRequest, ::Google::Longrunning::Operation
            # Executes a SQL statement in a database inside an AlloyDB instance.
            rpc :ExecuteSql, ::Google::Cloud::AlloyDB::V1alpha::ExecuteSqlRequest, ::Google::Cloud::AlloyDB::V1alpha::ExecuteSqlResponse
            # Lists Backups in a given project and location.
            rpc :ListBackups, ::Google::Cloud::AlloyDB::V1alpha::ListBackupsRequest, ::Google::Cloud::AlloyDB::V1alpha::ListBackupsResponse
            # Gets details of a single Backup.
            rpc :GetBackup, ::Google::Cloud::AlloyDB::V1alpha::GetBackupRequest, ::Google::Cloud::AlloyDB::V1alpha::Backup
            # Creates a new Backup in a given project and location.
            rpc :CreateBackup, ::Google::Cloud::AlloyDB::V1alpha::CreateBackupRequest, ::Google::Longrunning::Operation
            # Updates the parameters of a single Backup.
            rpc :UpdateBackup, ::Google::Cloud::AlloyDB::V1alpha::UpdateBackupRequest, ::Google::Longrunning::Operation
            # Deletes a single Backup.
            rpc :DeleteBackup, ::Google::Cloud::AlloyDB::V1alpha::DeleteBackupRequest, ::Google::Longrunning::Operation
            # Lists SupportedDatabaseFlags for a given project and location.
            rpc :ListSupportedDatabaseFlags, ::Google::Cloud::AlloyDB::V1alpha::ListSupportedDatabaseFlagsRequest, ::Google::Cloud::AlloyDB::V1alpha::ListSupportedDatabaseFlagsResponse
            # Generate a client certificate signed by a Cluster CA.
            # The sole purpose of this endpoint is to support AlloyDB connectors and the
            # Auth Proxy client. The endpoint's behavior is subject to change without
            # notice, so do not rely on its behavior remaining constant. Future changes
            # will not break AlloyDB connectors or the Auth Proxy client.
            rpc :GenerateClientCertificate, ::Google::Cloud::AlloyDB::V1alpha::GenerateClientCertificateRequest, ::Google::Cloud::AlloyDB::V1alpha::GenerateClientCertificateResponse
            # Get instance metadata used for a connection.
            rpc :GetConnectionInfo, ::Google::Cloud::AlloyDB::V1alpha::GetConnectionInfoRequest, ::Google::Cloud::AlloyDB::V1alpha::ConnectionInfo
            # Lists Users in a given project and location.
            rpc :ListUsers, ::Google::Cloud::AlloyDB::V1alpha::ListUsersRequest, ::Google::Cloud::AlloyDB::V1alpha::ListUsersResponse
            # Gets details of a single User.
            rpc :GetUser, ::Google::Cloud::AlloyDB::V1alpha::GetUserRequest, ::Google::Cloud::AlloyDB::V1alpha::User
            # Creates a new User in a given project, location, and cluster.
            rpc :CreateUser, ::Google::Cloud::AlloyDB::V1alpha::CreateUserRequest, ::Google::Cloud::AlloyDB::V1alpha::User
            # Updates the parameters of a single User.
            rpc :UpdateUser, ::Google::Cloud::AlloyDB::V1alpha::UpdateUserRequest, ::Google::Cloud::AlloyDB::V1alpha::User
            # Deletes a single User.
            rpc :DeleteUser, ::Google::Cloud::AlloyDB::V1alpha::DeleteUserRequest, ::Google::Protobuf::Empty
            # Lists Databases in a given project and location.
            rpc :ListDatabases, ::Google::Cloud::AlloyDB::V1alpha::ListDatabasesRequest, ::Google::Cloud::AlloyDB::V1alpha::ListDatabasesResponse
            # Creates a new Database in a given project, location, and cluster.
            rpc :CreateDatabase, ::Google::Cloud::AlloyDB::V1alpha::CreateDatabaseRequest, ::Google::Cloud::AlloyDB::V1alpha::Database
          end

          Stub = Service.rpc_stub_class
        end
      end
    end
  end
end
