"""Generated message classes for developerknowledge version v1alpha.

The Developer Knowledge API provides access to Google's developer knowledge.
"""
# NOTE: This file is autogenerated and should not be edited by hand.

from apitools.base.protorpclite import messages as _messages
from apitools.base.py import encoding
from apitools.base.py import extra_types


package = 'developerknowledge'


class Answer(_messages.Message):
  r"""An answer to a query.

  Fields:
    answerText: Contains the text of the answer.
    citations: Output only. Contains citations for the answer.
    references: Output only. Contains references for the answer.
  """

  answerText = _messages.StringField(1)
  citations = _messages.MessageField('AnswerCitation', 2, repeated=True)
  references = _messages.MessageField('AnswerReference', 3, repeated=True)


class AnswerCitation(_messages.Message):
  r"""Citation info for a segment.

  Fields:
    endIndex: Output only. Indicates the end of the segment, measured in bytes
      (UTF-8 unicode), exclusive. If there are multi-byte characters, such as
      non-ASCII characters, the index measurement is longer than the string
      length.
    sources: Output only. Contains citation sources for the attributed
      segment.
    startIndex: Output only. Indicates the start of the segment, measured in
      bytes (UTF-8 unicode), inclusive. If there are multi-byte characters,
      such as non-ASCII characters, the index measurement is longer than the
      string length.
  """

  endIndex = _messages.IntegerField(1, variant=_messages.Variant.INT32)
  sources = _messages.MessageField('CitationSource', 2, repeated=True)
  startIndex = _messages.IntegerField(3, variant=_messages.Variant.INT32)


class AnswerQueryRequest(_messages.Message):
  r"""Request message for DeveloperKnowledge.AnswerQuery.

  Fields:
    filter: Optional. Applies a strict filter to the search results used to
      ground the answer. The expression supports a subset of the syntax
      described at https://google.aip.dev/160. Supported fields for filtering:
      * `content_length_bytes` (INTEGER): The length of the `Document.content`
      field in bytes. * `data_source` (STRING): The source of the document,
      e.g. `docs.cloud.google.com`. See
      https://developers.google.com/knowledge/reference/corpus-reference for
      the complete list of data sources in the corpus. * `update_time`
      (TIMESTAMP): The timestamp of when the document was last meaningfully
      updated. A meaningful update is one that changes document's markdown
      content or metadata. * `uri` (STRING): The document URI, e.g.
      `https://docs.cloud.google.com/bigquery/docs/tables`. INTEGER fields
      support `=`, `<`, `<=`, `>`, and `>=` operators. STRING fields support
      `=` (equals) and `!=` (not equals) operators for **exact match** on the
      whole string. Partial match, prefix match, and regexp match are not
      supported. TIMESTAMP fields support `=`, `<`, `<=`, `>`, and `>=`
      operators. Timestamps must be in RFC-3339 format, e.g.,
      `"2025-01-01T00:00:00Z"`. You can combine expressions using `AND`, `OR`,
      and `NOT` (or `-`) logical operators. `OR` has higher precedence than
      `AND`. Use parentheses for explicit precedence grouping. Examples: *
      Filter by `Document.content_length_bytes`: `content_length_bytes <
      50000` * `data_source = "docs.cloud.google.com" OR data_source =
      "firebase.google.com"` * `data_source != "firebase.google.com"` *
      `update_time < "2024-01-01T00:00:00Z"` * `update_time >=
      "2025-01-22T00:00:00Z" AND (data_source = "developer.chrome.com" OR
      data_source = "web.dev")` * `uri =
      "https://docs.cloud.google.com/release-notes"` The `filter` string must
      not exceed 500 characters; values longer than 500 characters will result
      in an `INVALID_ARGUMENT` error.
    query: Required. The query to answer.
  """

  filter = _messages.StringField(1)
  query = _messages.StringField(2)


class AnswerQueryResponse(_messages.Message):
  r"""Response message for DeveloperKnowledge.AnswerQuery.

  Fields:
    answer: The answer to the query.
  """

  answer = _messages.MessageField('Answer', 1)


class AnswerReference(_messages.Message):
  r"""Represents a reference to a source.

  Fields:
    documentReference: Output only. The reference document.
  """

  documentReference = _messages.MessageField('DocumentReference', 1)


class ApiReference(_messages.Message):
  r"""An ApiReference represents a symbol in an API, such as a class or
  method.

  Fields:
    dataSource: Output only. Specifies the data source of the reference data.
      Example data source: `maven.org`
    description: Output only. Provides a description of the reference data.
    name: Identifier. Contains the resource name of the reference data.
      Format: `apiReferences/{uri_without_scheme}` Example:
      `apiReferences/maven.org/com.google.jukebox.v1/methods/GetArtist`
    title: Output only. Provides the title of the reference data.
    updateTime: Output only. Represents the timestamp when the reference data
      or its metadata was last updated.
    uri: Output only. Provides the URI of the reference data, such as
      `maven.org/com.google.jukebox.v1/methods/GetArtist`.
    yamlContent: The reference data represented as a DocFX YAML string.
  """

  dataSource = _messages.StringField(1)
  description = _messages.StringField(2)
  name = _messages.StringField(3)
  title = _messages.StringField(4)
  updateTime = _messages.StringField(5)
  uri = _messages.StringField(6)
  yamlContent = _messages.MessageField('TypedString', 7)


class BatchGetDocumentsResponse(_messages.Message):
  r"""Response message for DeveloperKnowledge.BatchGetDocuments.

  Fields:
    documents: Contains the documents requested.
  """

  documents = _messages.MessageField('Document', 1, repeated=True)


class CitationSource(_messages.Message):
  r"""Citation source.

  Fields:
    referenceIndex: Output only. Contains the index of the
      Answer.AnswerReference in the `references` repeated field.
  """

  referenceIndex = _messages.IntegerField(1, variant=_messages.Variant.INT32)


class DeveloperknowledgeApiReferencesGetRequest(_messages.Message):
  r"""A DeveloperknowledgeApiReferencesGetRequest object.

  Fields:
    name: Required. Specifies the name of the reference data to retrieve.
      Format: `apiReferences/{uri_without_scheme}` Example:
      `apiReferences/maven.org/com.google.jukebox.v1/methods/GetArtist`
  """

  name = _messages.StringField(1, required=True)


class DeveloperknowledgeDocumentsBatchGetRequest(_messages.Message):
  r"""A DeveloperknowledgeDocumentsBatchGetRequest object.

  Enums:
    ViewValueValuesEnum: Optional. Specifies the DocumentView of the document.
      If unspecified, DeveloperKnowledge.BatchGetDocuments defaults to
      `DOCUMENT_VIEW_CONTENT`.

  Fields:
    names: Required. Specifies the names of the documents to retrieve. A
      maximum of 20 documents can be retrieved in a batch. The documents are
      returned in the same order as the `names` in the request. Format:
      `documents/{uri_without_scheme}` Example:
      `documents/docs.cloud.google.com/storage/docs/creating-buckets` Each
      name must not exceed 500 characters; values longer than 500 characters
      will result in an `INVALID_ARGUMENT` error.
    view: Optional. Specifies the DocumentView of the document. If
      unspecified, DeveloperKnowledge.BatchGetDocuments defaults to
      `DOCUMENT_VIEW_CONTENT`.
  """

  class ViewValueValuesEnum(_messages.Enum):
    r"""Optional. Specifies the DocumentView of the document. If unspecified,
    DeveloperKnowledge.BatchGetDocuments defaults to `DOCUMENT_VIEW_CONTENT`.

    Values:
      DOCUMENT_VIEW_UNSPECIFIED: The default / unset value. See each API
        method for its default value if DocumentView is not specified.
      DOCUMENT_VIEW_BASIC: Includes only the basic metadata fields: - `name` -
        `uri` - `data_source` - `title` - `description` - `update_time` -
        `view` - `content_length_bytes` This is the default of view for
        DeveloperKnowledge.SearchDocumentChunks.
      DOCUMENT_VIEW_FULL: Includes all Document fields.
      DOCUMENT_VIEW_CONTENT: Includes the `DOCUMENT_VIEW_BASIC` fields and the
        `content` field. This is the default of view for
        DeveloperKnowledge.GetDocument and
        DeveloperKnowledge.BatchGetDocuments.
    """
    DOCUMENT_VIEW_UNSPECIFIED = 0
    DOCUMENT_VIEW_BASIC = 1
    DOCUMENT_VIEW_FULL = 2
    DOCUMENT_VIEW_CONTENT = 3

  names = _messages.StringField(1, repeated=True)
  view = _messages.EnumField('ViewValueValuesEnum', 2)


class DeveloperknowledgeDocumentsGetRequest(_messages.Message):
  r"""A DeveloperknowledgeDocumentsGetRequest object.

  Enums:
    ViewValueValuesEnum: Optional. Specifies the DocumentView of the document.
      If unspecified, DeveloperKnowledge.GetDocument defaults to
      `DOCUMENT_VIEW_CONTENT`.

  Fields:
    name: Required. Specifies the name of the document to retrieve. Format:
      `documents/{uri_without_scheme}` Example:
      `documents/docs.cloud.google.com/storage/docs/creating-buckets` The name
      must not exceed 500 characters; values longer than 500 characters will
      result in an `INVALID_ARGUMENT` error.
    view: Optional. Specifies the DocumentView of the document. If
      unspecified, DeveloperKnowledge.GetDocument defaults to
      `DOCUMENT_VIEW_CONTENT`.
  """

  class ViewValueValuesEnum(_messages.Enum):
    r"""Optional. Specifies the DocumentView of the document. If unspecified,
    DeveloperKnowledge.GetDocument defaults to `DOCUMENT_VIEW_CONTENT`.

    Values:
      DOCUMENT_VIEW_UNSPECIFIED: The default / unset value. See each API
        method for its default value if DocumentView is not specified.
      DOCUMENT_VIEW_BASIC: Includes only the basic metadata fields: - `name` -
        `uri` - `data_source` - `title` - `description` - `update_time` -
        `view` - `content_length_bytes` This is the default of view for
        DeveloperKnowledge.SearchDocumentChunks.
      DOCUMENT_VIEW_FULL: Includes all Document fields.
      DOCUMENT_VIEW_CONTENT: Includes the `DOCUMENT_VIEW_BASIC` fields and the
        `content` field. This is the default of view for
        DeveloperKnowledge.GetDocument and
        DeveloperKnowledge.BatchGetDocuments.
    """
    DOCUMENT_VIEW_UNSPECIFIED = 0
    DOCUMENT_VIEW_BASIC = 1
    DOCUMENT_VIEW_FULL = 2
    DOCUMENT_VIEW_CONTENT = 3

  name = _messages.StringField(1, required=True)
  view = _messages.EnumField('ViewValueValuesEnum', 2)


class DeveloperknowledgeDocumentsSearchDocumentChunksRequest(_messages.Message):
  r"""A DeveloperknowledgeDocumentsSearchDocumentChunksRequest object.

  Fields:
    filter: Optional. Applies a strict filter to the search results. The
      expression supports a subset of the syntax described at
      https://google.aip.dev/160. While `SearchDocumentChunks` returns
      DocumentChunks, the filter is applied to `DocumentChunk.document`
      fields. Supported fields for filtering: * `content_length_bytes`
      (INTEGER): The length of the `Document.content` field in bytes. *
      `data_source` (STRING): The source of the document, e.g.
      `docs.cloud.google.com`. See
      https://developers.google.com/knowledge/reference/corpus-reference for
      the complete list of data sources in the corpus. * `update_time`
      (TIMESTAMP): The timestamp of when the document was last meaningfully
      updated. A meaningful update is one that changes document's markdown
      content or metadata. * `uri` (STRING): The document URI, e.g.
      `https://docs.cloud.google.com/bigquery/docs/tables`. INTEGER fields
      support `=`, `<`, `<=`, `>`, and `>=` operators. STRING fields support
      `=` (equals) and `!=` (not equals) operators for **exact match** on the
      whole string. Partial match, prefix match, and regexp match are not
      supported. TIMESTAMP fields support `=`, `<`, `<=`, `>`, and `>=`
      operators. Timestamps must be in RFC-3339 format, e.g.,
      `"2025-01-01T00:00:00Z"`. Note: Field names must be in `snake_case`
      (e.g., `data_source`). Values on the right-hand side of filtering
      expressions must be string literals enclosed in double quotes (e.g.,
      `"docs.cloud.google.com"`). You can combine expressions using `AND`,
      `OR`, and `NOT` (or `-`) logical operators. `OR` has higher precedence
      than `AND`. Use parentheses for explicit precedence grouping. Examples:
      * Filter by `Document.content_length_bytes`: `content_length_bytes <
      50000` * `data_source = "docs.cloud.google.com" OR data_source =
      "firebase.google.com"` * `data_source != "firebase.google.com"` *
      `update_time < "2024-01-01T00:00:00Z"` * `update_time >=
      "2025-01-22T00:00:00Z" AND (data_source = "developer.chrome.com" OR
      data_source = "web.dev")` * `uri =
      "https://docs.cloud.google.com/release-notes"` The `filter` string must
      not exceed 500 characters; values longer than 500 characters will result
      in an `INVALID_ARGUMENT` error.
    pageSize: Optional. Specifies the maximum number of results to return. The
      service may return fewer than this value. If unspecified, at most 5
      results will be returned. The maximum value is 100; values above 100
      will be coerced to 100.
    pageToken: Optional. Contains a page token, received from a previous
      `SearchDocumentChunks` call. Provide this to retrieve the subsequent
      page.
    query: Required. Provides the raw query string provided by the user, such
      as "How to create a Cloud Storage bucket?". The query must not exceed
      500 characters; values longer than 500 characters will result in an
      `INVALID_ARGUMENT` error.
  """

  filter = _messages.StringField(1)
  pageSize = _messages.IntegerField(2, variant=_messages.Variant.INT32)
  pageToken = _messages.StringField(3)
  query = _messages.StringField(4)


class DeveloperknowledgeLookupRequest(_messages.Message):
  r"""A DeveloperknowledgeLookupRequest object.

  Enums:
    DocumentReadOptionsViewValueValuesEnum: Optional. Specifies the
      DocumentView to use when retrieving Document resources, if applicable.

  Fields:
    documentReadOptions_view: Optional. Specifies the DocumentView to use when
      retrieving Document resources, if applicable.
    names: Required. Specifies the names of the resources to retrieve. A
      maximum of 20 resources can be retrieved in a batch. The documents are
      returned in the same order as the `names` in the request. Format:
      `documents/{uri_without_scheme}` or `apiReferences/{uri_without_scheme}`
      Example: `documents/docs.cloud.google.com/storage/docs/creating-buckets`
      or `apiReferences/maven.org/com.google.jukebox.v1/methods/GetArtist`
      Each name must not exceed 500 characters; values longer than 500
      characters will result in an `INVALID_ARGUMENT` error.
  """

  class DocumentReadOptionsViewValueValuesEnum(_messages.Enum):
    r"""Optional. Specifies the DocumentView to use when retrieving Document
    resources, if applicable.

    Values:
      DOCUMENT_VIEW_UNSPECIFIED: The default / unset value. See each API
        method for its default value if DocumentView is not specified.
      DOCUMENT_VIEW_BASIC: Includes only the basic metadata fields: - `name` -
        `uri` - `data_source` - `title` - `description` - `update_time` -
        `view` - `content_length_bytes` This is the default of view for
        DeveloperKnowledge.SearchDocumentChunks.
      DOCUMENT_VIEW_FULL: Includes all Document fields.
      DOCUMENT_VIEW_CONTENT: Includes the `DOCUMENT_VIEW_BASIC` fields and the
        `content` field. This is the default of view for
        DeveloperKnowledge.GetDocument and
        DeveloperKnowledge.BatchGetDocuments.
    """
    DOCUMENT_VIEW_UNSPECIFIED = 0
    DOCUMENT_VIEW_BASIC = 1
    DOCUMENT_VIEW_FULL = 2
    DOCUMENT_VIEW_CONTENT = 3

  documentReadOptions_view = _messages.EnumField('DocumentReadOptionsViewValueValuesEnum', 1)
  names = _messages.StringField(2, repeated=True)


class DeveloperknowledgeSearchRequest(_messages.Message):
  r"""A DeveloperknowledgeSearchRequest object.

  Fields:
    filter: Optional. Applies a strict filter to the search results. The
      expression supports a subset of the syntax described at
      https://google.aip.dev/160. While `Search` returns SearchResults, the
      filter is applied to `DocumentChunk.document` fields contained in the
      results. Supported fields for filtering: * `data_source` (STRING): The
      source of the document, e.g. `docs.cloud.google.com`. See
      https://developers.google.com/knowledge/reference/corpus-reference for
      the complete list of data sources in the corpus. * `resource_type`
      (RESOURCE_TYPE): The type of the resource, e.g.
      `RESOURCE_TYPE_DOCUMENT`. See https://developers.google.com/knowledge/re
      ference/rest/v1alpha/ResourceType for the possible types. *
      `update_time` (TIMESTAMP): The timestamp of when the document was last
      meaningfully updated. A meaningful update is one that changes document's
      markdown content or metadata. * `uri` (STRING): The document URI, e.g.
      `https://docs.cloud.google.com/bigquery/docs/tables`. STRING fields
      support `=` (equals) and `!=` (not equals) operators for **exact match**
      on the whole string. Partial match, prefix match, and regexp match are
      not supported. TIMESTAMP fields support `=`, `<`, `<=`, `>`, and `>=`
      operators. Timestamps must be in RFC-3339 format, e.g.,
      `"2025-01-01T00:00:00Z"`. You can combine expressions using `AND`, `OR`,
      and `NOT` (or `-`) logical operators. `OR` has higher precedence than
      `AND`. Use parentheses for explicit precedence grouping. Examples: *
      `data_source = "docs.cloud.google.com" OR data_source =
      "firebase.google.com"` * `data_source != "firebase.google.com"` *
      `resource_type = "RESOURCE_TYPE_DOCUMENT"` * `resource_type !=
      "RESOURCE_TYPE_DOCUMENT"` * `update_time < "2024-01-01T00:00:00Z"` *
      `update_time >= "2025-01-22T00:00:00Z" AND (data_source =
      "developer.chrome.com" OR data_source = "web.dev")` * `uri =
      "https://docs.cloud.google.com/release-notes"` The `filter` string must
      not exceed 500 characters; values longer than 500 characters will result
      in an `INVALID_ARGUMENT` error.
    pageSize: Optional. Specifies the maximum number of results to return. The
      service may return fewer than this value. If unspecified, at most 20
      results will be returned. The maximum value is 100; values above 100
      will be coerced to 100.
    pageToken: Optional. Contains a page token, received from a previous
      `Search` call. Provide this to retrieve the subsequent page.
    query: Required. Provides the raw query string provided by the user, such
      as "How to create a Cloud Storage bucket?". The query must not exceed
      500 characters; values longer than 500 characters will result in an
      `INVALID_ARGUMENT` error.
  """

  filter = _messages.StringField(1)
  pageSize = _messages.IntegerField(2, variant=_messages.Variant.INT32)
  pageToken = _messages.StringField(3)
  query = _messages.StringField(4)


class Document(_messages.Message):
  r"""A Document represents a page of documentation in the Developer Knowledge
  corpus, like the page at
  https://docs.cloud.google.com/storage/docs/creating-buckets.

  Enums:
    ViewValueValuesEnum: Output only. Specifies the DocumentView of the
      document.

  Fields:
    content: Output only. Contains the full content of the document in
      Markdown format.
    contentLengthBytes: Output only. The length of the `content` field in
      bytes.
    dataSource: Output only. Specifies the data source of the document.
      Example data source: `firebase.google.com`
    description: Output only. Provides a description of the document.
    name: Identifier. Contains the resource name of the document. Format:
      `documents/{uri_without_scheme}` Example:
      `documents/docs.cloud.google.com/storage/docs/creating-buckets`
    title: Output only. Provides the title of the document.
    updateTime: Output only. Represents the timestamp when the content or
      metadata of the document was last updated.
    uri: Output only. Provides the URI of the content, such as
      `docs.cloud.google.com/storage/docs/creating-buckets`.
    view: Output only. Specifies the DocumentView of the document.
  """

  class ViewValueValuesEnum(_messages.Enum):
    r"""Output only. Specifies the DocumentView of the document.

    Values:
      DOCUMENT_VIEW_UNSPECIFIED: The default / unset value. See each API
        method for its default value if DocumentView is not specified.
      DOCUMENT_VIEW_BASIC: Includes only the basic metadata fields: - `name` -
        `uri` - `data_source` - `title` - `description` - `update_time` -
        `view` - `content_length_bytes` This is the default of view for
        DeveloperKnowledge.SearchDocumentChunks.
      DOCUMENT_VIEW_FULL: Includes all Document fields.
      DOCUMENT_VIEW_CONTENT: Includes the `DOCUMENT_VIEW_BASIC` fields and the
        `content` field. This is the default of view for
        DeveloperKnowledge.GetDocument and
        DeveloperKnowledge.BatchGetDocuments.
    """
    DOCUMENT_VIEW_UNSPECIFIED = 0
    DOCUMENT_VIEW_BASIC = 1
    DOCUMENT_VIEW_FULL = 2
    DOCUMENT_VIEW_CONTENT = 3

  content = _messages.StringField(1)
  contentLengthBytes = _messages.IntegerField(2, variant=_messages.Variant.INT32)
  dataSource = _messages.StringField(3)
  description = _messages.StringField(4)
  name = _messages.StringField(5)
  title = _messages.StringField(6)
  updateTime = _messages.StringField(7)
  uri = _messages.StringField(8)
  view = _messages.EnumField('ViewValueValuesEnum', 9)


class DocumentChunk(_messages.Message):
  r"""A DocumentChunk represents a piece of content from a Document in the
  DeveloperKnowledge corpus. To fetch the entire document content, pass the
  `parent` to DeveloperKnowledge.GetDocument or
  DeveloperKnowledge.BatchGetDocuments.

  Fields:
    content: Output only. Contains the content of the document chunk.
    document: Output only. Represents metadata about the Document this chunk
      is from. The DocumentView of this Document message will be set to
      `DOCUMENT_VIEW_BASIC`. It is included here for convenience so that
      clients do not need to call DeveloperKnowledge.GetDocument or
      DeveloperKnowledge.BatchGetDocuments if they only need the metadata
      fields. Otherwise, clients should use DeveloperKnowledge.GetDocument or
      DeveloperKnowledge.BatchGetDocuments to fetch the full document content.
    id: Output only. Specifies the ID of this chunk within the document. The
      chunk ID is unique within a document, but not globally unique across
      documents. The chunk ID is not stable and may change over time.
    parent: Output only. Contains the resource name of the document this chunk
      is from. Format: `documents/{uri_without_scheme}` Example:
      `documents/docs.cloud.google.com/storage/docs/creating-buckets`
    relevanceScore: Output only. Represents the relevance score of the chunk
      to the search query. Higher score indicates higher chunk relevance. The
      score is in range [0.0, 1.0].
  """

  content = _messages.StringField(1)
  document = _messages.MessageField('Document', 2)
  id = _messages.StringField(3)
  parent = _messages.StringField(4)
  relevanceScore = _messages.FloatField(5)


class DocumentReference(_messages.Message):
  r"""Represents a reference to a document.

  Fields:
    documentChunk: Output only. Contains the document chunk. The
      `document_chunk.id` field is not set and will be empty.
  """

  documentChunk = _messages.MessageField('DocumentChunk', 1)


class LookupResponse(_messages.Message):
  r"""Response message for DeveloperKnowledge.Lookup.

  Fields:
    results: Contains the lookup results for the given names. Each
      LookupResult corresponds to the same index in the LookupRequest.names
      field and contains either the requested resource or a google.rpc.Status
      error.
  """

  results = _messages.MessageField('LookupResult', 1, repeated=True)


class LookupResult(_messages.Message):
  r"""A LookupResult represents a developer knowledge resource returned by
  DeveloperKnowledge.Lookup.

  Enums:
    ResourceTypeValueValuesEnum: Specifies the type of resource contained in
      this lookup result, e.g. RESOURCE_TYPE_DOCUMENT.

  Fields:
    apiReference: The API reference data contained in this lookup result.
    document: The document contained in this lookup result.
    error: The error that occurred while retrieving the resource, if any.
    name: Contains the resource name returned in this lookup result. This
      corresponds to one of the resources requested in LookupRequest.names.
    resourceType: Specifies the type of resource contained in this lookup
      result, e.g. RESOURCE_TYPE_DOCUMENT.
  """

  class ResourceTypeValueValuesEnum(_messages.Enum):
    r"""Specifies the type of resource contained in this lookup result, e.g.
    RESOURCE_TYPE_DOCUMENT.

    Values:
      RESOURCE_TYPE_UNSPECIFIED: An unspecified resource type.
      RESOURCE_TYPE_DOCUMENT: The Document resource type. A Document
        represents a page of documentation in the Developer Knowledge corpus,
        like the page at https://docs.cloud.google.com/storage/docs/creating-
        buckets.
      RESOURCE_TYPE_API_REFERENCE: The ApiReference resource type. An
        ApiReference represents a symbol in an API or library, like a class or
        method.
    """
    RESOURCE_TYPE_UNSPECIFIED = 0
    RESOURCE_TYPE_DOCUMENT = 1
    RESOURCE_TYPE_API_REFERENCE = 2

  apiReference = _messages.MessageField('ApiReference', 1)
  document = _messages.MessageField('Document', 2)
  error = _messages.MessageField('Status', 3)
  name = _messages.StringField(4)
  resourceType = _messages.EnumField('ResourceTypeValueValuesEnum', 5)


class SearchDocumentChunksResponse(_messages.Message):
  r"""Response message for DeveloperKnowledge.SearchDocumentChunks.

  Fields:
    nextPageToken: Provides a token that can be sent as `page_token` to
      retrieve the next page. If this field is omitted, there are no
      subsequent pages.
    results: Contains the search results for the given query. Each
      DocumentChunk in this list contains a snippet of content relevant to the
      search query. Use the DocumentChunk.parent field of each result with
      DeveloperKnowledge.GetDocument or DeveloperKnowledge.BatchGetDocuments
      to retrieve the full document content.
  """

  nextPageToken = _messages.StringField(1)
  results = _messages.MessageField('DocumentChunk', 2, repeated=True)


class SearchResponse(_messages.Message):
  r"""Response message for DeveloperKnowledge.Search.

  Fields:
    nextPageToken: Provides a token that can be sent as `page_token` to
      retrieve the next page. If this field is omitted, there are no
      subsequent pages.
    results: Contains the search results for the given query. Each
      SearchResult in this list contains a resource relevant to the search
      query. For results that contain a DocumentChunk, use the
      DocumentChunk.parent field of each result with
      DeveloperKnowledge.GetDocument or DeveloperKnowledge.BatchGetDocuments
      to retrieve the full document content.
  """

  nextPageToken = _messages.StringField(1)
  results = _messages.MessageField('SearchResult', 2, repeated=True)


class SearchResult(_messages.Message):
  r"""A SearchResult represents a developer knowledge resource returned by
  DeveloperKnowledge.Search.

  Enums:
    ResourceTypeValueValuesEnum: Specifies the type of resource contained in
      this search result, e.g. RESOURCE_TYPE_DOCUMENT.

  Fields:
    apiReference: The API reference data contained in this search result.
    documentChunk: The document chunk contained in this search result. Use the
      DocumentChunk.parent field with DeveloperKnowledge.GetDocument or
      DeveloperKnowledge.BatchGetDocuments to retrieve the full document
      content.
    relevanceScore: Represents the relevance score of the result to the search
      query. Higher score indicates higher result relevance. The score is in
      range [0.0, 1.0].
    resourceType: Specifies the type of resource contained in this search
      result, e.g. RESOURCE_TYPE_DOCUMENT.
  """

  class ResourceTypeValueValuesEnum(_messages.Enum):
    r"""Specifies the type of resource contained in this search result, e.g.
    RESOURCE_TYPE_DOCUMENT.

    Values:
      RESOURCE_TYPE_UNSPECIFIED: An unspecified resource type.
      RESOURCE_TYPE_DOCUMENT: The Document resource type. A Document
        represents a page of documentation in the Developer Knowledge corpus,
        like the page at https://docs.cloud.google.com/storage/docs/creating-
        buckets.
      RESOURCE_TYPE_API_REFERENCE: The ApiReference resource type. An
        ApiReference represents a symbol in an API or library, like a class or
        method.
    """
    RESOURCE_TYPE_UNSPECIFIED = 0
    RESOURCE_TYPE_DOCUMENT = 1
    RESOURCE_TYPE_API_REFERENCE = 2

  apiReference = _messages.MessageField('ApiReference', 1)
  documentChunk = _messages.MessageField('DocumentChunk', 2)
  relevanceScore = _messages.FloatField(3)
  resourceType = _messages.EnumField('ResourceTypeValueValuesEnum', 4)


class StandardQueryParameters(_messages.Message):
  r"""Query parameters accepted by all methods.

  Enums:
    FXgafvValueValuesEnum: V1 error format.
    AltValueValuesEnum: Data format for response.

  Fields:
    f__xgafv: V1 error format.
    access_token: OAuth access token.
    alt: Data format for response.
    callback: JSONP
    fields: Selector specifying which fields to include in a partial response.
    key: API key. Your API key identifies your project and provides you with
      API access, quota, and reports. Required unless you provide an OAuth 2.0
      token.
    oauth_token: OAuth 2.0 token for the current user.
    prettyPrint: Returns response with indentations and line breaks.
    quotaUser: Available to use for quota purposes for server-side
      applications. Can be any arbitrary string assigned to a user, but should
      not exceed 40 characters.
    trace: A tracing token of the form "token:<tokenid>" to include in api
      requests.
    uploadType: Legacy upload protocol for media (e.g. "media", "multipart").
    upload_protocol: Upload protocol for media (e.g. "raw", "multipart").
  """

  class AltValueValuesEnum(_messages.Enum):
    r"""Data format for response.

    Values:
      json: Responses with Content-Type of application/json
      media: Media download with context-dependent Content-Type
      proto: Responses with Content-Type of application/x-protobuf
    """
    json = 0
    media = 1
    proto = 2

  class FXgafvValueValuesEnum(_messages.Enum):
    r"""V1 error format.

    Values:
      _1: v1 error format
      _2: v2 error format
    """
    _1 = 0
    _2 = 1

  f__xgafv = _messages.EnumField('FXgafvValueValuesEnum', 1)
  access_token = _messages.StringField(2)
  alt = _messages.EnumField('AltValueValuesEnum', 3, default='json')
  callback = _messages.StringField(4)
  fields = _messages.StringField(5)
  key = _messages.StringField(6)
  oauth_token = _messages.StringField(7)
  prettyPrint = _messages.BooleanField(8, default=True)
  quotaUser = _messages.StringField(9)
  trace = _messages.StringField(10)
  uploadType = _messages.StringField(11)
  upload_protocol = _messages.StringField(12)


class Status(_messages.Message):
  r"""The `Status` type defines a logical error model that is suitable for
  different programming environments, including REST APIs and RPC APIs. It is
  used by [gRPC](https://github.com/grpc). Each `Status` message contains
  three pieces of data: error code, error message, and error details. You can
  find out more about this error model and how to work with it in the [API
  Design Guide](https://cloud.google.com/apis/design/errors).

  Messages:
    DetailsValueListEntry: A DetailsValueListEntry object.

  Fields:
    code: The status code, which should be an enum value of google.rpc.Code.
    details: A list of messages that carry the error details. There is a
      common set of message types for APIs to use.
    message: A developer-facing error message, which should be in English. Any
      user-facing error message should be localized and sent in the
      google.rpc.Status.details field, or localized by the client.
  """

  @encoding.MapUnrecognizedFields('additionalProperties')
  class DetailsValueListEntry(_messages.Message):
    r"""A DetailsValueListEntry object.

    Messages:
      AdditionalProperty: An additional property for a DetailsValueListEntry
        object.

    Fields:
      additionalProperties: Properties of the object. Contains field @type
        with type URL.
    """

    class AdditionalProperty(_messages.Message):
      r"""An additional property for a DetailsValueListEntry object.

      Fields:
        key: Name of the additional property.
        value: A extra_types.JsonValue attribute.
      """

      key = _messages.StringField(1)
      value = _messages.MessageField('extra_types.JsonValue', 2)

    additionalProperties = _messages.MessageField('AdditionalProperty', 1, repeated=True)

  code = _messages.IntegerField(1, variant=_messages.Variant.INT32)
  details = _messages.MessageField('DetailsValueListEntry', 2, repeated=True)
  message = _messages.StringField(3)


class TypedString(_messages.Message):
  r"""A TypedString represents a string value with a MIME type and length in
  bytes.

  Fields:
    mimeType: Specifies the MIME type of the data represented by the string.
    value: The string value.
    valueLengthBytes: The length of the `value` field in bytes.
  """

  mimeType = _messages.StringField(1)
  value = _messages.StringField(2)
  valueLengthBytes = _messages.IntegerField(3, variant=_messages.Variant.INT32)


encoding.AddCustomJsonFieldMapping(
    StandardQueryParameters, 'f__xgafv', '$.xgafv')
encoding.AddCustomJsonEnumMapping(
    StandardQueryParameters.FXgafvValueValuesEnum, '_1', '1')
encoding.AddCustomJsonEnumMapping(
    StandardQueryParameters.FXgafvValueValuesEnum, '_2', '2')
encoding.AddCustomJsonFieldMapping(
    DeveloperknowledgeLookupRequest, 'documentReadOptions_view', 'documentReadOptions.view')
