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

module Google
  module Cloud
    module AlloyDB
      module V1
        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.v1.AlloyDBAdmin'

            # Lists Clusters in a given project and location.
            rpc :ListClusters, ::Google::Cloud::AlloyDB::V1::ListClustersRequest, ::Google::Cloud::AlloyDB::V1::ListClustersResponse
            # Gets details of a single Cluster.
            rpc :GetCluster, ::Google::Cloud::AlloyDB::V1::GetClusterRequest, ::Google::Cloud::AlloyDB::V1::Cluster
            # Creates a new Cluster in a given project and location.
            rpc :CreateCluster, ::Google::Cloud::AlloyDB::V1::CreateClusterRequest, ::Google::Longrunning::Operation
            # Updates the parameters of a single Cluster.
            rpc :UpdateCluster, ::Google::Cloud::AlloyDB::V1::UpdateClusterRequest, ::Google::Longrunning::Operation
            # Exports data from the cluster.
            # Imperative only.
            rpc :ExportCluster, ::Google::Cloud::AlloyDB::V1::ExportClusterRequest, ::Google::Longrunning::Operation
            # Imports data to the cluster.
            # Imperative only.
            rpc :ImportCluster, ::Google::Cloud::AlloyDB::V1::ImportClusterRequest, ::Google::Longrunning::Operation
            # Upgrades a single Cluster.
            # Imperative only.
            rpc :UpgradeCluster, ::Google::Cloud::AlloyDB::V1::UpgradeClusterRequest, ::Google::Longrunning::Operation
            # Deletes a single Cluster.
            rpc :DeleteCluster, ::Google::Cloud::AlloyDB::V1::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::V1::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::V1::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::V1::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::V1::CreateSecondaryClusterRequest, ::Google::Longrunning::Operation
            # Lists Instances in a given project and location.
            rpc :ListInstances, ::Google::Cloud::AlloyDB::V1::ListInstancesRequest, ::Google::Cloud::AlloyDB::V1::ListInstancesResponse
            # Gets details of a single Instance.
            rpc :GetInstance, ::Google::Cloud::AlloyDB::V1::GetInstanceRequest, ::Google::Cloud::AlloyDB::V1::Instance
            # Creates a new Instance in a given project and location.
            rpc :CreateInstance, ::Google::Cloud::AlloyDB::V1::CreateInstanceRequest, ::Google::Longrunning::Operation
            # Creates a new SECONDARY Instance in a given project and location.
            rpc :CreateSecondaryInstance, ::Google::Cloud::AlloyDB::V1::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::V1::BatchCreateInstancesRequest, ::Google::Longrunning::Operation
            # Updates the parameters of a single Instance.
            rpc :UpdateInstance, ::Google::Cloud::AlloyDB::V1::UpdateInstanceRequest, ::Google::Longrunning::Operation
            # Deletes a single Instance.
            rpc :DeleteInstance, ::Google::Cloud::AlloyDB::V1::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::V1::FailoverInstanceRequest, ::Google::Longrunning::Operation
            # Injects fault in an instance.
            # Imperative only.
            rpc :InjectFault, ::Google::Cloud::AlloyDB::V1::InjectFaultRequest, ::Google::Longrunning::Operation
            # Restart an Instance in a cluster.
            # Imperative only.
            rpc :RestartInstance, ::Google::Cloud::AlloyDB::V1::RestartInstanceRequest, ::Google::Longrunning::Operation
            # Executes a SQL statement in a database inside an AlloyDB instance.
            rpc :ExecuteSql, ::Google::Cloud::AlloyDB::V1::ExecuteSqlRequest, ::Google::Cloud::AlloyDB::V1::ExecuteSqlResponse
            # Lists Backups in a given project and location.
            rpc :ListBackups, ::Google::Cloud::AlloyDB::V1::ListBackupsRequest, ::Google::Cloud::AlloyDB::V1::ListBackupsResponse
            # Gets details of a single Backup.
            rpc :GetBackup, ::Google::Cloud::AlloyDB::V1::GetBackupRequest, ::Google::Cloud::AlloyDB::V1::Backup
            # Creates a new Backup in a given project and location.
            rpc :CreateBackup, ::Google::Cloud::AlloyDB::V1::CreateBackupRequest, ::Google::Longrunning::Operation
            # Updates the parameters of a single Backup.
            rpc :UpdateBackup, ::Google::Cloud::AlloyDB::V1::UpdateBackupRequest, ::Google::Longrunning::Operation
            # Deletes a single Backup.
            rpc :DeleteBackup, ::Google::Cloud::AlloyDB::V1::DeleteBackupRequest, ::Google::Longrunning::Operation
            # Lists SupportedDatabaseFlags for a given project and location.
            rpc :ListSupportedDatabaseFlags, ::Google::Cloud::AlloyDB::V1::ListSupportedDatabaseFlagsRequest, ::Google::Cloud::AlloyDB::V1::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::V1::GenerateClientCertificateRequest, ::Google::Cloud::AlloyDB::V1::GenerateClientCertificateResponse
            # Get instance metadata used for a connection.
            rpc :GetConnectionInfo, ::Google::Cloud::AlloyDB::V1::GetConnectionInfoRequest, ::Google::Cloud::AlloyDB::V1::ConnectionInfo
            # Lists Users in a given project and location.
            rpc :ListUsers, ::Google::Cloud::AlloyDB::V1::ListUsersRequest, ::Google::Cloud::AlloyDB::V1::ListUsersResponse
            # Gets details of a single User.
            rpc :GetUser, ::Google::Cloud::AlloyDB::V1::GetUserRequest, ::Google::Cloud::AlloyDB::V1::User
            # Creates a new User in a given project, location, and cluster.
            rpc :CreateUser, ::Google::Cloud::AlloyDB::V1::CreateUserRequest, ::Google::Cloud::AlloyDB::V1::User
            # Updates the parameters of a single User.
            rpc :UpdateUser, ::Google::Cloud::AlloyDB::V1::UpdateUserRequest, ::Google::Cloud::AlloyDB::V1::User
            # Deletes a single User.
            rpc :DeleteUser, ::Google::Cloud::AlloyDB::V1::DeleteUserRequest, ::Google::Protobuf::Empty
            # Lists Databases in a given project and location.
            rpc :ListDatabases, ::Google::Cloud::AlloyDB::V1::ListDatabasesRequest, ::Google::Cloud::AlloyDB::V1::ListDatabasesResponse
          end

          Stub = Service.rpc_stub_class
        end
      end
    end
  end
end
