# Generated by the protocol buffer compiler.  DO NOT EDIT!
# Source: google/api/apikeys/v2/apikeys.proto for package 'Google.Cloud.ApiKeys.V2'
# 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/apikeys/v2/apikeys_pb'

module Google
  module Cloud
    module ApiKeys
      module V2
        module ApiKeys
          # Manages the API keys associated with projects.
          class Service

            include ::GRPC::GenericService

            self.marshal_class_method = :encode
            self.unmarshal_class_method = :decode
            self.service_name = 'google.api.apikeys.v2.ApiKeys'

            # Creates a new API key.
            #
            # NOTE: Key is a global resource; hence the only supported value for
            # location is `global`.
            rpc :CreateKey, ::Google::Cloud::ApiKeys::V2::CreateKeyRequest, ::Google::Longrunning::Operation
            # Lists the API keys owned by a project. The key string of the API key
            # isn't included in the response.
            #
            # NOTE: Key is a global resource; hence the only supported value for
            # location is `global`.
            rpc :ListKeys, ::Google::Cloud::ApiKeys::V2::ListKeysRequest, ::Google::Cloud::ApiKeys::V2::ListKeysResponse
            # Gets the metadata for an API key. The key string of the API key
            # isn't included in the response.
            #
            # NOTE: Key is a global resource; hence the only supported value for
            # location is `global`.
            rpc :GetKey, ::Google::Cloud::ApiKeys::V2::GetKeyRequest, ::Google::Cloud::ApiKeys::V2::Key
            # Get the key string for an API key.
            #
            # NOTE: Key is a global resource; hence the only supported value for
            # location is `global`.
            rpc :GetKeyString, ::Google::Cloud::ApiKeys::V2::GetKeyStringRequest, ::Google::Cloud::ApiKeys::V2::GetKeyStringResponse
            # Patches the modifiable fields of an API key.
            # The key string of the API key isn't included in the response.
            #
            # NOTE: Key is a global resource; hence the only supported value for
            # location is `global`.
            rpc :UpdateKey, ::Google::Cloud::ApiKeys::V2::UpdateKeyRequest, ::Google::Longrunning::Operation
            # Deletes an API key. Deleted key can be retrieved within 30 days of
            # deletion. Afterward, key will be purged from the project.
            #
            # NOTE: Key is a global resource; hence the only supported value for
            # location is `global`.
            rpc :DeleteKey, ::Google::Cloud::ApiKeys::V2::DeleteKeyRequest, ::Google::Longrunning::Operation
            # Undeletes an API key which was deleted within 30 days.
            #
            # NOTE: Key is a global resource; hence the only supported value for
            # location is `global`.
            rpc :UndeleteKey, ::Google::Cloud::ApiKeys::V2::UndeleteKeyRequest, ::Google::Longrunning::Operation
            # Find the parent project and resource name of the API
            # key that matches the key string in the request. If the API key has been
            # purged, resource name will not be set.
            # The service account must have the `apikeys.keys.lookup` permission
            # on the parent project.
            rpc :LookupKey, ::Google::Cloud::ApiKeys::V2::LookupKeyRequest, ::Google::Cloud::ApiKeys::V2::LookupKeyResponse
          end

          Stub = Service.rpc_stub_class
        end
      end
    end
  end
end
