Class PredictResponse.PredictionResult.Builder

    • Method Detail

      • getDescriptor

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

        protected com.google.protobuf.MapField internalGetMapField​(int number)
        Overrides:
        internalGetMapField in class com.google.protobuf.GeneratedMessageV3.Builder<PredictResponse.PredictionResult.Builder>
      • internalGetMutableMapField

        protected com.google.protobuf.MapField internalGetMutableMapField​(int number)
        Overrides:
        internalGetMutableMapField in class com.google.protobuf.GeneratedMessageV3.Builder<PredictResponse.PredictionResult.Builder>
      • internalGetFieldAccessorTable

        protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
        Specified by:
        internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessageV3.Builder<PredictResponse.PredictionResult.Builder>
      • getDescriptorForType

        public com.google.protobuf.Descriptors.Descriptor getDescriptorForType()
        Specified by:
        getDescriptorForType in interface com.google.protobuf.Message.Builder
        Specified by:
        getDescriptorForType in interface com.google.protobuf.MessageOrBuilder
        Overrides:
        getDescriptorForType in class com.google.protobuf.GeneratedMessageV3.Builder<PredictResponse.PredictionResult.Builder>
      • getDefaultInstanceForType

        public PredictResponse.PredictionResult getDefaultInstanceForType()
        Specified by:
        getDefaultInstanceForType in interface com.google.protobuf.MessageLiteOrBuilder
        Specified by:
        getDefaultInstanceForType in interface com.google.protobuf.MessageOrBuilder
      • build

        public PredictResponse.PredictionResult build()
        Specified by:
        build in interface com.google.protobuf.Message.Builder
        Specified by:
        build in interface com.google.protobuf.MessageLite.Builder
      • buildPartial

        public PredictResponse.PredictionResult buildPartial()
        Specified by:
        buildPartial in interface com.google.protobuf.Message.Builder
        Specified by:
        buildPartial in interface com.google.protobuf.MessageLite.Builder
      • isInitialized

        public final boolean isInitialized()
        Specified by:
        isInitialized in interface com.google.protobuf.MessageLiteOrBuilder
        Overrides:
        isInitialized in class com.google.protobuf.GeneratedMessageV3.Builder<PredictResponse.PredictionResult.Builder>
      • setIdBytes

        public PredictResponse.PredictionResult.Builder setIdBytes​(com.google.protobuf.ByteString value)
         ID of the recommended catalog item
         
        string id = 1;
        Parameters:
        value - The bytes for id to set.
        Returns:
        This builder for chaining.
      • getItemMetadataCount

        public int getItemMetadataCount()
        Description copied from interface: PredictResponse.PredictionResultOrBuilder
         Additional item metadata / annotations.
        
         Possible values:
        
         * `catalogItem`: JSON representation of the catalogItem. Will be set if
           `returnCatalogItem` is set to true in `PredictRequest.params`.
         * `score`: Prediction score in double value. Will be set if
           `returnItemScore` is set to true in `PredictRequest.params`.
         
        map<string, .google.protobuf.Value> item_metadata = 2;
        Specified by:
        getItemMetadataCount in interface PredictResponse.PredictionResultOrBuilder
      • containsItemMetadata

        public boolean containsItemMetadata​(String key)
         Additional item metadata / annotations.
        
         Possible values:
        
         * `catalogItem`: JSON representation of the catalogItem. Will be set if
           `returnCatalogItem` is set to true in `PredictRequest.params`.
         * `score`: Prediction score in double value. Will be set if
           `returnItemScore` is set to true in `PredictRequest.params`.
         
        map<string, .google.protobuf.Value> item_metadata = 2;
        Specified by:
        containsItemMetadata in interface PredictResponse.PredictionResultOrBuilder
      • getItemMetadataMap

        public Map<String,​com.google.protobuf.Value> getItemMetadataMap()
         Additional item metadata / annotations.
        
         Possible values:
        
         * `catalogItem`: JSON representation of the catalogItem. Will be set if
           `returnCatalogItem` is set to true in `PredictRequest.params`.
         * `score`: Prediction score in double value. Will be set if
           `returnItemScore` is set to true in `PredictRequest.params`.
         
        map<string, .google.protobuf.Value> item_metadata = 2;
        Specified by:
        getItemMetadataMap in interface PredictResponse.PredictionResultOrBuilder
      • getItemMetadataOrDefault

        public com.google.protobuf.Value getItemMetadataOrDefault​(String key,
                                                                  com.google.protobuf.Value defaultValue)
         Additional item metadata / annotations.
        
         Possible values:
        
         * `catalogItem`: JSON representation of the catalogItem. Will be set if
           `returnCatalogItem` is set to true in `PredictRequest.params`.
         * `score`: Prediction score in double value. Will be set if
           `returnItemScore` is set to true in `PredictRequest.params`.
         
        map<string, .google.protobuf.Value> item_metadata = 2;
        Specified by:
        getItemMetadataOrDefault in interface PredictResponse.PredictionResultOrBuilder
      • getItemMetadataOrThrow

        public com.google.protobuf.Value getItemMetadataOrThrow​(String key)
         Additional item metadata / annotations.
        
         Possible values:
        
         * `catalogItem`: JSON representation of the catalogItem. Will be set if
           `returnCatalogItem` is set to true in `PredictRequest.params`.
         * `score`: Prediction score in double value. Will be set if
           `returnItemScore` is set to true in `PredictRequest.params`.
         
        map<string, .google.protobuf.Value> item_metadata = 2;
        Specified by:
        getItemMetadataOrThrow in interface PredictResponse.PredictionResultOrBuilder
      • removeItemMetadata

        public PredictResponse.PredictionResult.Builder removeItemMetadata​(String key)
         Additional item metadata / annotations.
        
         Possible values:
        
         * `catalogItem`: JSON representation of the catalogItem. Will be set if
           `returnCatalogItem` is set to true in `PredictRequest.params`.
         * `score`: Prediction score in double value. Will be set if
           `returnItemScore` is set to true in `PredictRequest.params`.
         
        map<string, .google.protobuf.Value> item_metadata = 2;
      • getMutableItemMetadata

        @Deprecated
        public Map<String,​com.google.protobuf.Value> getMutableItemMetadata()
        Deprecated.
        Use alternate mutation accessors instead.
      • putItemMetadata

        public PredictResponse.PredictionResult.Builder putItemMetadata​(String key,
                                                                        com.google.protobuf.Value value)
         Additional item metadata / annotations.
        
         Possible values:
        
         * `catalogItem`: JSON representation of the catalogItem. Will be set if
           `returnCatalogItem` is set to true in `PredictRequest.params`.
         * `score`: Prediction score in double value. Will be set if
           `returnItemScore` is set to true in `PredictRequest.params`.
         
        map<string, .google.protobuf.Value> item_metadata = 2;
      • putAllItemMetadata

        public PredictResponse.PredictionResult.Builder putAllItemMetadata​(Map<String,​com.google.protobuf.Value> values)
         Additional item metadata / annotations.
        
         Possible values:
        
         * `catalogItem`: JSON representation of the catalogItem. Will be set if
           `returnCatalogItem` is set to true in `PredictRequest.params`.
         * `score`: Prediction score in double value. Will be set if
           `returnItemScore` is set to true in `PredictRequest.params`.
         
        map<string, .google.protobuf.Value> item_metadata = 2;