Class SearchRequest.ContentSearchSpec.SnippetSpec

    • Field Detail

      • MAX_SNIPPET_COUNT_FIELD_NUMBER

        public static final int MAX_SNIPPET_COUNT_FIELD_NUMBER
        See Also:
        Constant Field Values
      • REFERENCE_ONLY_FIELD_NUMBER

        public static final int REFERENCE_ONLY_FIELD_NUMBER
        See Also:
        Constant Field Values
      • RETURN_SNIPPET_FIELD_NUMBER

        public static final int RETURN_SNIPPET_FIELD_NUMBER
        See Also:
        Constant Field Values
    • Method Detail

      • newInstance

        protected Object newInstance​(com.google.protobuf.GeneratedMessageV3.UnusedPrivateParameter unused)
        Overrides:
        newInstance in class com.google.protobuf.GeneratedMessageV3
      • getDescriptor

        public static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
      • internalGetFieldAccessorTable

        protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
        Specified by:
        internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessageV3
      • getMaxSnippetCount

        @Deprecated
        public int getMaxSnippetCount()
        Deprecated.
        google.cloud.discoveryengine.v1.SearchRequest.ContentSearchSpec.SnippetSpec.max_snippet_count is deprecated. See google/cloud/discoveryengine/v1/search_service.proto;l=304
         [DEPRECATED] This field is deprecated. To control snippet return, use
         `return_snippet` field. For backwards compatibility, we will return
         snippet if max_snippet_count > 0.
         
        int32 max_snippet_count = 1 [deprecated = true];
        Specified by:
        getMaxSnippetCount in interface SearchRequest.ContentSearchSpec.SnippetSpecOrBuilder
        Returns:
        The maxSnippetCount.
      • getReferenceOnly

        @Deprecated
        public boolean getReferenceOnly()
        Deprecated.
        google.cloud.discoveryengine.v1.SearchRequest.ContentSearchSpec.SnippetSpec.reference_only is deprecated. See google/cloud/discoveryengine/v1/search_service.proto;l=308
         [DEPRECATED] This field is deprecated and will have no affect on the
         snippet.
         
        bool reference_only = 2 [deprecated = true];
        Specified by:
        getReferenceOnly in interface SearchRequest.ContentSearchSpec.SnippetSpecOrBuilder
        Returns:
        The referenceOnly.
      • getReturnSnippet

        public boolean getReturnSnippet()
         If `true`, then return snippet. If no snippet can be generated, we
         return "No snippet is available for this page." A `snippet_status` with
         `SUCCESS` or `NO_SNIPPET_AVAILABLE` will also be returned.
         
        bool return_snippet = 3;
        Specified by:
        getReturnSnippet in interface SearchRequest.ContentSearchSpec.SnippetSpecOrBuilder
        Returns:
        The returnSnippet.
      • isInitialized

        public final boolean isInitialized()
        Specified by:
        isInitialized in interface com.google.protobuf.MessageLiteOrBuilder
        Overrides:
        isInitialized in class com.google.protobuf.GeneratedMessageV3
      • writeTo

        public void writeTo​(com.google.protobuf.CodedOutputStream output)
                     throws IOException
        Specified by:
        writeTo in interface com.google.protobuf.MessageLite
        Overrides:
        writeTo in class com.google.protobuf.GeneratedMessageV3
        Throws:
        IOException
      • getSerializedSize

        public int getSerializedSize()
        Specified by:
        getSerializedSize in interface com.google.protobuf.MessageLite
        Overrides:
        getSerializedSize in class com.google.protobuf.GeneratedMessageV3
      • equals

        public boolean equals​(Object obj)
        Specified by:
        equals in interface com.google.protobuf.Message
        Overrides:
        equals in class com.google.protobuf.AbstractMessage
      • hashCode

        public int hashCode()
        Specified by:
        hashCode in interface com.google.protobuf.Message
        Overrides:
        hashCode in class com.google.protobuf.AbstractMessage
      • parseFrom

        public static SearchRequest.ContentSearchSpec.SnippetSpec parseFrom​(ByteBuffer data,
                                                                            com.google.protobuf.ExtensionRegistryLite extensionRegistry)
                                                                     throws com.google.protobuf.InvalidProtocolBufferException
        Throws:
        com.google.protobuf.InvalidProtocolBufferException
      • parseFrom

        public static SearchRequest.ContentSearchSpec.SnippetSpec parseFrom​(com.google.protobuf.ByteString data)
                                                                     throws com.google.protobuf.InvalidProtocolBufferException
        Throws:
        com.google.protobuf.InvalidProtocolBufferException
      • parseFrom

        public static SearchRequest.ContentSearchSpec.SnippetSpec parseFrom​(com.google.protobuf.ByteString data,
                                                                            com.google.protobuf.ExtensionRegistryLite extensionRegistry)
                                                                     throws com.google.protobuf.InvalidProtocolBufferException
        Throws:
        com.google.protobuf.InvalidProtocolBufferException
      • parseFrom

        public static SearchRequest.ContentSearchSpec.SnippetSpec parseFrom​(byte[] data)
                                                                     throws com.google.protobuf.InvalidProtocolBufferException
        Throws:
        com.google.protobuf.InvalidProtocolBufferException
      • parseFrom

        public static SearchRequest.ContentSearchSpec.SnippetSpec parseFrom​(byte[] data,
                                                                            com.google.protobuf.ExtensionRegistryLite extensionRegistry)
                                                                     throws com.google.protobuf.InvalidProtocolBufferException
        Throws:
        com.google.protobuf.InvalidProtocolBufferException
      • getParserForType

        public com.google.protobuf.Parser<SearchRequest.ContentSearchSpec.SnippetSpec> getParserForType()
        Specified by:
        getParserForType in interface com.google.protobuf.Message
        Specified by:
        getParserForType in interface com.google.protobuf.MessageLite
        Overrides:
        getParserForType in class com.google.protobuf.GeneratedMessageV3
      • getDefaultInstanceForType

        public SearchRequest.ContentSearchSpec.SnippetSpec getDefaultInstanceForType()
        Specified by:
        getDefaultInstanceForType in interface com.google.protobuf.MessageLiteOrBuilder
        Specified by:
        getDefaultInstanceForType in interface com.google.protobuf.MessageOrBuilder