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 product
         
        string id = 1;
        Parameters:
        value - The bytes for id to set.
        Returns:
        This builder for chaining.
      • getMetadataCount

        public int getMetadataCount()
        Description copied from interface: PredictResponse.PredictionResultOrBuilder
         Additional product metadata / annotations.
        
         Possible values:
        
         * `product`: JSON representation of the product. Is set if
           `returnProduct` is set to true in `PredictRequest.params`.
         * `score`: Prediction score in double value. Is set if
           `returnScore` is set to true in `PredictRequest.params`.
         
        map<string, .google.protobuf.Value> metadata = 2;
        Specified by:
        getMetadataCount in interface PredictResponse.PredictionResultOrBuilder
      • containsMetadata

        public boolean containsMetadata​(String key)
         Additional product metadata / annotations.
        
         Possible values:
        
         * `product`: JSON representation of the product. Is set if
           `returnProduct` is set to true in `PredictRequest.params`.
         * `score`: Prediction score in double value. Is set if
           `returnScore` is set to true in `PredictRequest.params`.
         
        map<string, .google.protobuf.Value> metadata = 2;
        Specified by:
        containsMetadata in interface PredictResponse.PredictionResultOrBuilder
      • getMetadataMap

        public Map<String,​com.google.protobuf.Value> getMetadataMap()
         Additional product metadata / annotations.
        
         Possible values:
        
         * `product`: JSON representation of the product. Is set if
           `returnProduct` is set to true in `PredictRequest.params`.
         * `score`: Prediction score in double value. Is set if
           `returnScore` is set to true in `PredictRequest.params`.
         
        map<string, .google.protobuf.Value> metadata = 2;
        Specified by:
        getMetadataMap in interface PredictResponse.PredictionResultOrBuilder
      • getMetadataOrDefault

        public com.google.protobuf.Value getMetadataOrDefault​(String key,
                                                              com.google.protobuf.Value defaultValue)
         Additional product metadata / annotations.
        
         Possible values:
        
         * `product`: JSON representation of the product. Is set if
           `returnProduct` is set to true in `PredictRequest.params`.
         * `score`: Prediction score in double value. Is set if
           `returnScore` is set to true in `PredictRequest.params`.
         
        map<string, .google.protobuf.Value> metadata = 2;
        Specified by:
        getMetadataOrDefault in interface PredictResponse.PredictionResultOrBuilder
      • getMetadataOrThrow

        public com.google.protobuf.Value getMetadataOrThrow​(String key)
         Additional product metadata / annotations.
        
         Possible values:
        
         * `product`: JSON representation of the product. Is set if
           `returnProduct` is set to true in `PredictRequest.params`.
         * `score`: Prediction score in double value. Is set if
           `returnScore` is set to true in `PredictRequest.params`.
         
        map<string, .google.protobuf.Value> metadata = 2;
        Specified by:
        getMetadataOrThrow in interface PredictResponse.PredictionResultOrBuilder
      • removeMetadata

        public PredictResponse.PredictionResult.Builder removeMetadata​(String key)
         Additional product metadata / annotations.
        
         Possible values:
        
         * `product`: JSON representation of the product. Is set if
           `returnProduct` is set to true in `PredictRequest.params`.
         * `score`: Prediction score in double value. Is set if
           `returnScore` is set to true in `PredictRequest.params`.
         
        map<string, .google.protobuf.Value> metadata = 2;
      • getMutableMetadata

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

        public PredictResponse.PredictionResult.Builder putMetadata​(String key,
                                                                    com.google.protobuf.Value value)
         Additional product metadata / annotations.
        
         Possible values:
        
         * `product`: JSON representation of the product. Is set if
           `returnProduct` is set to true in `PredictRequest.params`.
         * `score`: Prediction score in double value. Is set if
           `returnScore` is set to true in `PredictRequest.params`.
         
        map<string, .google.protobuf.Value> metadata = 2;
      • putAllMetadata

        public PredictResponse.PredictionResult.Builder putAllMetadata​(Map<String,​com.google.protobuf.Value> values)
         Additional product metadata / annotations.
        
         Possible values:
        
         * `product`: JSON representation of the product. Is set if
           `returnProduct` is set to true in `PredictRequest.params`.
         * `score`: Prediction score in double value. Is set if
           `returnScore` is set to true in `PredictRequest.params`.
         
        map<string, .google.protobuf.Value> metadata = 2;