# Generated by the protocol buffer compiler.  DO NOT EDIT!
# Source: google/api/servicemanagement/v1/servicemanager.proto for package 'Google.Cloud.ServiceManagement.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/api/servicemanagement/v1/servicemanager_pb'

module Google
  module Cloud
    module ServiceManagement
      module V1
        module ServiceManager
          # [Google Service Management
          # API](https://cloud.google.com/service-infrastructure/docs/overview)
          class Service

            include ::GRPC::GenericService

            self.marshal_class_method = :encode
            self.unmarshal_class_method = :decode
            self.service_name = 'google.api.servicemanagement.v1.ServiceManager'

            # Lists managed services.
            #
            # Returns all public services. For authenticated users, also returns all
            # services the calling user has "servicemanagement.services.get" permission
            # for.
            rpc :ListServices, ::Google::Cloud::ServiceManagement::V1::ListServicesRequest, ::Google::Cloud::ServiceManagement::V1::ListServicesResponse
            # Gets a managed service. Authentication is required unless the service is
            # public.
            rpc :GetService, ::Google::Cloud::ServiceManagement::V1::GetServiceRequest, ::Google::Cloud::ServiceManagement::V1::ManagedService
            # Creates a new managed service.
            #
            # A managed service is immutable, and is subject to mandatory 30-day
            # data retention. You cannot move a service or recreate it within 30 days
            # after deletion.
            #
            # One producer project can own no more than 500 services. For security and
            # reliability purposes, a production service should be hosted in a
            # dedicated producer project.
            #
            # Operation<response: ManagedService>
            rpc :CreateService, ::Google::Cloud::ServiceManagement::V1::CreateServiceRequest, ::Google::Longrunning::Operation
            # Deletes a managed service. This method will change the service to the
            # `Soft-Delete` state for 30 days. Within this period, service producers may
            # call
            # [UndeleteService][google.api.servicemanagement.v1.ServiceManager.UndeleteService]
            # to restore the service. After 30 days, the service will be permanently
            # deleted.
            #
            # Operation<response: google.protobuf.Empty>
            rpc :DeleteService, ::Google::Cloud::ServiceManagement::V1::DeleteServiceRequest, ::Google::Longrunning::Operation
            # Revives a previously deleted managed service. The method restores the
            # service using the configuration at the time the service was deleted.
            # The target service must exist and must have been deleted within the
            # last 30 days.
            #
            # Operation<response: UndeleteServiceResponse>
            rpc :UndeleteService, ::Google::Cloud::ServiceManagement::V1::UndeleteServiceRequest, ::Google::Longrunning::Operation
            # Lists the history of the service configuration for a managed service,
            # from the newest to the oldest.
            rpc :ListServiceConfigs, ::Google::Cloud::ServiceManagement::V1::ListServiceConfigsRequest, ::Google::Cloud::ServiceManagement::V1::ListServiceConfigsResponse
            # Gets a service configuration (version) for a managed service.
            rpc :GetServiceConfig, ::Google::Cloud::ServiceManagement::V1::GetServiceConfigRequest, ::Google::Api::Service
            # Creates a new service configuration (version) for a managed service.
            # This method only stores the service configuration. To roll out the service
            # configuration to backend systems please call
            # [CreateServiceRollout][google.api.servicemanagement.v1.ServiceManager.CreateServiceRollout].
            #
            # Only the 100 most recent service configurations and ones referenced by
            # existing rollouts are kept for each service. The rest will be deleted
            # eventually.
            rpc :CreateServiceConfig, ::Google::Cloud::ServiceManagement::V1::CreateServiceConfigRequest, ::Google::Api::Service
            # Creates a new service configuration (version) for a managed service based
            # on
            # user-supplied configuration source files (for example: OpenAPI
            # Specification). This method stores the source configurations as well as the
            # generated service configuration. To rollout the service configuration to
            # other services,
            # please call
            # [CreateServiceRollout][google.api.servicemanagement.v1.ServiceManager.CreateServiceRollout].
            #
            # Only the 100 most recent configuration sources and ones referenced by
            # existing service configurtions are kept for each service. The rest will be
            # deleted eventually.
            #
            # Operation<response: SubmitConfigSourceResponse>
            rpc :SubmitConfigSource, ::Google::Cloud::ServiceManagement::V1::SubmitConfigSourceRequest, ::Google::Longrunning::Operation
            # Lists the history of the service configuration rollouts for a managed
            # service, from the newest to the oldest.
            rpc :ListServiceRollouts, ::Google::Cloud::ServiceManagement::V1::ListServiceRolloutsRequest, ::Google::Cloud::ServiceManagement::V1::ListServiceRolloutsResponse
            # Gets a service configuration
            # [rollout][google.api.servicemanagement.v1.Rollout].
            rpc :GetServiceRollout, ::Google::Cloud::ServiceManagement::V1::GetServiceRolloutRequest, ::Google::Cloud::ServiceManagement::V1::Rollout
            # Creates a new service configuration rollout. Based on rollout, the
            # Google Service Management will roll out the service configurations to
            # different backend services. For example, the logging configuration will be
            # pushed to Google Cloud Logging.
            #
            # Please note that any previous pending and running Rollouts and associated
            # Operations will be automatically cancelled so that the latest Rollout will
            # not be blocked by previous Rollouts.
            #
            # Only the 100 most recent (in any state) and the last 10 successful (if not
            # already part of the set of 100 most recent) rollouts are kept for each
            # service. The rest will be deleted eventually.
            #
            # Operation<response: Rollout>
            rpc :CreateServiceRollout, ::Google::Cloud::ServiceManagement::V1::CreateServiceRolloutRequest, ::Google::Longrunning::Operation
            # Generates and returns a report (errors, warnings and changes from
            # existing configurations) associated with
            # GenerateConfigReportRequest.new_value
            #
            # If GenerateConfigReportRequest.old_value is specified,
            # GenerateConfigReportRequest will contain a single ChangeReport based on the
            # comparison between GenerateConfigReportRequest.new_value and
            # GenerateConfigReportRequest.old_value.
            # If GenerateConfigReportRequest.old_value is not specified, this method
            # will compare GenerateConfigReportRequest.new_value with the last pushed
            # service configuration.
            rpc :GenerateConfigReport, ::Google::Cloud::ServiceManagement::V1::GenerateConfigReportRequest, ::Google::Cloud::ServiceManagement::V1::GenerateConfigReportResponse
          end

          Stub = Service.rpc_stub_class
        end
      end
    end
  end
end
