# Generated by the protocol buffer compiler.  DO NOT EDIT!
# Source: google/cloud/dialogflow/cx/v3/version.proto for package 'Google.Cloud.Dialogflow.CX.V3'
# Original file comments:
# Copyright 2021 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/dialogflow/cx/v3/version_pb'

module Google
  module Cloud
    module Dialogflow
      module CX
        module V3
          module Versions
            # Service for managing [Versions][google.cloud.dialogflow.cx.v3.Version].
            class Service

              include ::GRPC::GenericService

              self.marshal_class_method = :encode
              self.unmarshal_class_method = :decode
              self.service_name = 'google.cloud.dialogflow.cx.v3.Versions'

              # Returns the list of all versions in the specified
              # [Flow][google.cloud.dialogflow.cx.v3.Flow].
              rpc :ListVersions, ::Google::Cloud::Dialogflow::CX::V3::ListVersionsRequest, ::Google::Cloud::Dialogflow::CX::V3::ListVersionsResponse
              # Retrieves the specified [Version][google.cloud.dialogflow.cx.v3.Version].
              rpc :GetVersion, ::Google::Cloud::Dialogflow::CX::V3::GetVersionRequest, ::Google::Cloud::Dialogflow::CX::V3::Version
              # Creates a [Version][google.cloud.dialogflow.cx.v3.Version] in the specified
              # [Flow][google.cloud.dialogflow.cx.v3.Flow].
              #
              # This method is a [long-running
              # operation](https://cloud.google.com/dialogflow/cx/docs/how/long-running-operation).
              # The returned `Operation` type has the following method-specific fields:
              #
              # - `metadata`:
              # [CreateVersionOperationMetadata][google.cloud.dialogflow.cx.v3.CreateVersionOperationMetadata]
              # - `response`: [Version][google.cloud.dialogflow.cx.v3.Version]
              rpc :CreateVersion, ::Google::Cloud::Dialogflow::CX::V3::CreateVersionRequest, ::Google::Longrunning::Operation
              # Updates the specified [Version][google.cloud.dialogflow.cx.v3.Version].
              rpc :UpdateVersion, ::Google::Cloud::Dialogflow::CX::V3::UpdateVersionRequest, ::Google::Cloud::Dialogflow::CX::V3::Version
              # Deletes the specified [Version][google.cloud.dialogflow.cx.v3.Version].
              rpc :DeleteVersion, ::Google::Cloud::Dialogflow::CX::V3::DeleteVersionRequest, ::Google::Protobuf::Empty
              # Loads resources in the specified version to the draft flow.
              #
              # This method is a [long-running
              # operation](https://cloud.google.com/dialogflow/cx/docs/how/long-running-operation).
              # The returned `Operation` type has the following method-specific fields:
              #
              # - `metadata`: An empty [Struct
              #   message](https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#struct)
              # - `response`: An [Empty
              #   message](https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#empty)
              rpc :LoadVersion, ::Google::Cloud::Dialogflow::CX::V3::LoadVersionRequest, ::Google::Longrunning::Operation
              # Compares the specified base version with target version.
              rpc :CompareVersions, ::Google::Cloud::Dialogflow::CX::V3::CompareVersionsRequest, ::Google::Cloud::Dialogflow::CX::V3::CompareVersionsResponse
            end

            Stub = Service.rpc_stub_class
          end
        end
      end
    end
  end
end
