# frozen_string_literal: true # 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 # # https://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. # Auto-generated by gapic-generator-ruby. DO NOT EDIT! module Google module Cloud module DiscoveryEngine module V1 # Request message for # {::Google::Cloud::DiscoveryEngine::V1::DocumentService::Client#get_document DocumentService.GetDocument} # method. # @!attribute [rw] name # @return [::String] # Required. Full resource name of # {::Google::Cloud::DiscoveryEngine::V1::Document Document}, such as # `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}/documents/{document}`. # # If the caller does not have permission to access the # {::Google::Cloud::DiscoveryEngine::V1::Document Document}, regardless of whether # or not it exists, a `PERMISSION_DENIED` error is returned. # # If the requested {::Google::Cloud::DiscoveryEngine::V1::Document Document} does # not exist, a `NOT_FOUND` error is returned. class GetDocumentRequest include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Request message for # {::Google::Cloud::DiscoveryEngine::V1::DocumentService::Client#list_documents DocumentService.ListDocuments} # method. # @!attribute [rw] parent # @return [::String] # Required. The parent branch resource name, such as # `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}`. # Use `default_branch` as the branch ID, to list documents under the default # branch. # # If the caller does not have permission to list # {::Google::Cloud::DiscoveryEngine::V1::Document Document}s under this branch, # regardless of whether or not this branch exists, a `PERMISSION_DENIED` # error is returned. # @!attribute [rw] page_size # @return [::Integer] # Maximum number of {::Google::Cloud::DiscoveryEngine::V1::Document Document}s to # return. If unspecified, defaults to 100. The maximum allowed value is 1000. # Values above 1000 will be coerced to 1000. # # If this field is negative, an `INVALID_ARGUMENT` error is returned. # @!attribute [rw] page_token # @return [::String] # A page token # {::Google::Cloud::DiscoveryEngine::V1::ListDocumentsResponse#next_page_token ListDocumentsResponse.next_page_token}, # received from a previous # {::Google::Cloud::DiscoveryEngine::V1::DocumentService::Client#list_documents DocumentService.ListDocuments} # call. Provide this to retrieve the subsequent page. # # When paginating, all other parameters provided to # {::Google::Cloud::DiscoveryEngine::V1::DocumentService::Client#list_documents DocumentService.ListDocuments} # must match the call that provided the page token. Otherwise, an # `INVALID_ARGUMENT` error is returned. class ListDocumentsRequest include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Response message for # {::Google::Cloud::DiscoveryEngine::V1::DocumentService::Client#list_documents DocumentService.ListDocuments} # method. # @!attribute [rw] documents # @return [::Array<::Google::Cloud::DiscoveryEngine::V1::Document>] # The {::Google::Cloud::DiscoveryEngine::V1::Document Document}s. # @!attribute [rw] next_page_token # @return [::String] # A token that can be sent as # {::Google::Cloud::DiscoveryEngine::V1::ListDocumentsRequest#page_token ListDocumentsRequest.page_token} # to retrieve the next page. If this field is omitted, there are no # subsequent pages. class ListDocumentsResponse include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Request message for # {::Google::Cloud::DiscoveryEngine::V1::DocumentService::Client#create_document DocumentService.CreateDocument} # method. # @!attribute [rw] parent # @return [::String] # Required. The parent resource name, such as # `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}`. # @!attribute [rw] document # @return [::Google::Cloud::DiscoveryEngine::V1::Document] # Required. The {::Google::Cloud::DiscoveryEngine::V1::Document Document} to # create. # @!attribute [rw] document_id # @return [::String] # Required. The ID to use for the # {::Google::Cloud::DiscoveryEngine::V1::Document Document}, which will become the # final component of the # {::Google::Cloud::DiscoveryEngine::V1::Document#name Document.name}. # # If the caller does not have permission to create the # {::Google::Cloud::DiscoveryEngine::V1::Document Document}, regardless of whether # or not it exists, a `PERMISSION_DENIED` error is returned. # # This field must be unique among all # {::Google::Cloud::DiscoveryEngine::V1::Document Document}s with the same # {::Google::Cloud::DiscoveryEngine::V1::CreateDocumentRequest#parent parent}. # Otherwise, an `ALREADY_EXISTS` error is returned. # # This field must conform to [RFC-1034](https://tools.ietf.org/html/rfc1034) # standard with a length limit of 63 characters. Otherwise, an # `INVALID_ARGUMENT` error is returned. class CreateDocumentRequest include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Request message for # {::Google::Cloud::DiscoveryEngine::V1::DocumentService::Client#update_document DocumentService.UpdateDocument} # method. # @!attribute [rw] document # @return [::Google::Cloud::DiscoveryEngine::V1::Document] # Required. The document to update/create. # # If the caller does not have permission to update the # {::Google::Cloud::DiscoveryEngine::V1::Document Document}, regardless of whether # or not it exists, a `PERMISSION_DENIED` error is returned. # # If the {::Google::Cloud::DiscoveryEngine::V1::Document Document} to update does # not exist and # {::Google::Cloud::DiscoveryEngine::V1::UpdateDocumentRequest#allow_missing allow_missing} # is not set, a `NOT_FOUND` error is returned. # @!attribute [rw] allow_missing # @return [::Boolean] # If set to true, and the # {::Google::Cloud::DiscoveryEngine::V1::Document Document} is not found, a new # {::Google::Cloud::DiscoveryEngine::V1::Document Document} will be created. class UpdateDocumentRequest include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Request message for # {::Google::Cloud::DiscoveryEngine::V1::DocumentService::Client#delete_document DocumentService.DeleteDocument} # method. # @!attribute [rw] name # @return [::String] # Required. Full resource name of # {::Google::Cloud::DiscoveryEngine::V1::Document Document}, such as # `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}/documents/{document}`. # # If the caller does not have permission to delete the # {::Google::Cloud::DiscoveryEngine::V1::Document Document}, regardless of whether # or not it exists, a `PERMISSION_DENIED` error is returned. # # If the {::Google::Cloud::DiscoveryEngine::V1::Document Document} to delete does # not exist, a `NOT_FOUND` error is returned. class DeleteDocumentRequest include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end end end end end