Class Evaluation.Builder

  • All Implemented Interfaces:
    EvaluationOrBuilder, com.google.protobuf.Message.Builder, com.google.protobuf.MessageLite.Builder, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, Cloneable
    Enclosing class:
    Evaluation

    public static final class Evaluation.Builder
    extends com.google.protobuf.GeneratedMessageV3.Builder<Evaluation.Builder>
    implements EvaluationOrBuilder
     Describes an evaluation between a machine learning model's predictions and
     ground truth labels. Created when an [EvaluationJob][google.cloud.datalabeling.v1beta1.EvaluationJob] runs successfully.
     
    Protobuf type google.cloud.datalabeling.v1beta1.Evaluation
    • Method Detail

      • 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.Builder<Evaluation.Builder>
      • clear

        public Evaluation.Builder clear()
        Specified by:
        clear in interface com.google.protobuf.Message.Builder
        Specified by:
        clear in interface com.google.protobuf.MessageLite.Builder
        Overrides:
        clear in class com.google.protobuf.GeneratedMessageV3.Builder<Evaluation.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<Evaluation.Builder>
      • getDefaultInstanceForType

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

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

        public Evaluation buildPartial()
        Specified by:
        buildPartial in interface com.google.protobuf.Message.Builder
        Specified by:
        buildPartial in interface com.google.protobuf.MessageLite.Builder
      • clone

        public Evaluation.Builder clone()
        Specified by:
        clone in interface com.google.protobuf.Message.Builder
        Specified by:
        clone in interface com.google.protobuf.MessageLite.Builder
        Overrides:
        clone in class com.google.protobuf.GeneratedMessageV3.Builder<Evaluation.Builder>
      • setField

        public Evaluation.Builder setField​(com.google.protobuf.Descriptors.FieldDescriptor field,
                                           Object value)
        Specified by:
        setField in interface com.google.protobuf.Message.Builder
        Overrides:
        setField in class com.google.protobuf.GeneratedMessageV3.Builder<Evaluation.Builder>
      • clearField

        public Evaluation.Builder clearField​(com.google.protobuf.Descriptors.FieldDescriptor field)
        Specified by:
        clearField in interface com.google.protobuf.Message.Builder
        Overrides:
        clearField in class com.google.protobuf.GeneratedMessageV3.Builder<Evaluation.Builder>
      • clearOneof

        public Evaluation.Builder clearOneof​(com.google.protobuf.Descriptors.OneofDescriptor oneof)
        Specified by:
        clearOneof in interface com.google.protobuf.Message.Builder
        Overrides:
        clearOneof in class com.google.protobuf.GeneratedMessageV3.Builder<Evaluation.Builder>
      • setRepeatedField

        public Evaluation.Builder setRepeatedField​(com.google.protobuf.Descriptors.FieldDescriptor field,
                                                   int index,
                                                   Object value)
        Specified by:
        setRepeatedField in interface com.google.protobuf.Message.Builder
        Overrides:
        setRepeatedField in class com.google.protobuf.GeneratedMessageV3.Builder<Evaluation.Builder>
      • addRepeatedField

        public Evaluation.Builder addRepeatedField​(com.google.protobuf.Descriptors.FieldDescriptor field,
                                                   Object value)
        Specified by:
        addRepeatedField in interface com.google.protobuf.Message.Builder
        Overrides:
        addRepeatedField in class com.google.protobuf.GeneratedMessageV3.Builder<Evaluation.Builder>
      • mergeFrom

        public Evaluation.Builder mergeFrom​(com.google.protobuf.Message other)
        Specified by:
        mergeFrom in interface com.google.protobuf.Message.Builder
        Overrides:
        mergeFrom in class com.google.protobuf.AbstractMessage.Builder<Evaluation.Builder>
      • isInitialized

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

        public Evaluation.Builder mergeFrom​(com.google.protobuf.CodedInputStream input,
                                            com.google.protobuf.ExtensionRegistryLite extensionRegistry)
                                     throws IOException
        Specified by:
        mergeFrom in interface com.google.protobuf.Message.Builder
        Specified by:
        mergeFrom in interface com.google.protobuf.MessageLite.Builder
        Overrides:
        mergeFrom in class com.google.protobuf.AbstractMessage.Builder<Evaluation.Builder>
        Throws:
        IOException
      • getName

        public String getName()
         Output only. Resource name of an evaluation. The name has the following
         format:
        
         "projects/<var>{project_id}</var>/datasets/<var>{dataset_id}</var>/evaluations/<var>{evaluation_id</var>}'
         
        string name = 1;
        Specified by:
        getName in interface EvaluationOrBuilder
        Returns:
        The name.
      • getNameBytes

        public com.google.protobuf.ByteString getNameBytes()
         Output only. Resource name of an evaluation. The name has the following
         format:
        
         "projects/<var>{project_id}</var>/datasets/<var>{dataset_id}</var>/evaluations/<var>{evaluation_id</var>}'
         
        string name = 1;
        Specified by:
        getNameBytes in interface EvaluationOrBuilder
        Returns:
        The bytes for name.
      • setName

        public Evaluation.Builder setName​(String value)
         Output only. Resource name of an evaluation. The name has the following
         format:
        
         "projects/<var>{project_id}</var>/datasets/<var>{dataset_id}</var>/evaluations/<var>{evaluation_id</var>}'
         
        string name = 1;
        Parameters:
        value - The name to set.
        Returns:
        This builder for chaining.
      • clearName

        public Evaluation.Builder clearName()
         Output only. Resource name of an evaluation. The name has the following
         format:
        
         "projects/<var>{project_id}</var>/datasets/<var>{dataset_id}</var>/evaluations/<var>{evaluation_id</var>}'
         
        string name = 1;
        Returns:
        This builder for chaining.
      • setNameBytes

        public Evaluation.Builder setNameBytes​(com.google.protobuf.ByteString value)
         Output only. Resource name of an evaluation. The name has the following
         format:
        
         "projects/<var>{project_id}</var>/datasets/<var>{dataset_id}</var>/evaluations/<var>{evaluation_id</var>}'
         
        string name = 1;
        Parameters:
        value - The bytes for name to set.
        Returns:
        This builder for chaining.
      • hasConfig

        public boolean hasConfig()
         Output only. Options used in the evaluation job that created this
         evaluation.
         
        .google.cloud.datalabeling.v1beta1.EvaluationConfig config = 2;
        Specified by:
        hasConfig in interface EvaluationOrBuilder
        Returns:
        Whether the config field is set.
      • getConfig

        public EvaluationConfig getConfig()
         Output only. Options used in the evaluation job that created this
         evaluation.
         
        .google.cloud.datalabeling.v1beta1.EvaluationConfig config = 2;
        Specified by:
        getConfig in interface EvaluationOrBuilder
        Returns:
        The config.
      • setConfig

        public Evaluation.Builder setConfig​(EvaluationConfig value)
         Output only. Options used in the evaluation job that created this
         evaluation.
         
        .google.cloud.datalabeling.v1beta1.EvaluationConfig config = 2;
      • setConfig

        public Evaluation.Builder setConfig​(EvaluationConfig.Builder builderForValue)
         Output only. Options used in the evaluation job that created this
         evaluation.
         
        .google.cloud.datalabeling.v1beta1.EvaluationConfig config = 2;
      • mergeConfig

        public Evaluation.Builder mergeConfig​(EvaluationConfig value)
         Output only. Options used in the evaluation job that created this
         evaluation.
         
        .google.cloud.datalabeling.v1beta1.EvaluationConfig config = 2;
      • clearConfig

        public Evaluation.Builder clearConfig()
         Output only. Options used in the evaluation job that created this
         evaluation.
         
        .google.cloud.datalabeling.v1beta1.EvaluationConfig config = 2;
      • getConfigBuilder

        public EvaluationConfig.Builder getConfigBuilder()
         Output only. Options used in the evaluation job that created this
         evaluation.
         
        .google.cloud.datalabeling.v1beta1.EvaluationConfig config = 2;
      • hasEvaluationJobRunTime

        public boolean hasEvaluationJobRunTime()
         Output only. Timestamp for when the evaluation job that created this
         evaluation ran.
         
        .google.protobuf.Timestamp evaluation_job_run_time = 3;
        Specified by:
        hasEvaluationJobRunTime in interface EvaluationOrBuilder
        Returns:
        Whether the evaluationJobRunTime field is set.
      • getEvaluationJobRunTime

        public com.google.protobuf.Timestamp getEvaluationJobRunTime()
         Output only. Timestamp for when the evaluation job that created this
         evaluation ran.
         
        .google.protobuf.Timestamp evaluation_job_run_time = 3;
        Specified by:
        getEvaluationJobRunTime in interface EvaluationOrBuilder
        Returns:
        The evaluationJobRunTime.
      • setEvaluationJobRunTime

        public Evaluation.Builder setEvaluationJobRunTime​(com.google.protobuf.Timestamp value)
         Output only. Timestamp for when the evaluation job that created this
         evaluation ran.
         
        .google.protobuf.Timestamp evaluation_job_run_time = 3;
      • setEvaluationJobRunTime

        public Evaluation.Builder setEvaluationJobRunTime​(com.google.protobuf.Timestamp.Builder builderForValue)
         Output only. Timestamp for when the evaluation job that created this
         evaluation ran.
         
        .google.protobuf.Timestamp evaluation_job_run_time = 3;
      • mergeEvaluationJobRunTime

        public Evaluation.Builder mergeEvaluationJobRunTime​(com.google.protobuf.Timestamp value)
         Output only. Timestamp for when the evaluation job that created this
         evaluation ran.
         
        .google.protobuf.Timestamp evaluation_job_run_time = 3;
      • clearEvaluationJobRunTime

        public Evaluation.Builder clearEvaluationJobRunTime()
         Output only. Timestamp for when the evaluation job that created this
         evaluation ran.
         
        .google.protobuf.Timestamp evaluation_job_run_time = 3;
      • getEvaluationJobRunTimeBuilder

        public com.google.protobuf.Timestamp.Builder getEvaluationJobRunTimeBuilder()
         Output only. Timestamp for when the evaluation job that created this
         evaluation ran.
         
        .google.protobuf.Timestamp evaluation_job_run_time = 3;
      • getEvaluationJobRunTimeOrBuilder

        public com.google.protobuf.TimestampOrBuilder getEvaluationJobRunTimeOrBuilder()
         Output only. Timestamp for when the evaluation job that created this
         evaluation ran.
         
        .google.protobuf.Timestamp evaluation_job_run_time = 3;
        Specified by:
        getEvaluationJobRunTimeOrBuilder in interface EvaluationOrBuilder
      • hasCreateTime

        public boolean hasCreateTime()
         Output only. Timestamp for when this evaluation was created.
         
        .google.protobuf.Timestamp create_time = 4;
        Specified by:
        hasCreateTime in interface EvaluationOrBuilder
        Returns:
        Whether the createTime field is set.
      • getCreateTime

        public com.google.protobuf.Timestamp getCreateTime()
         Output only. Timestamp for when this evaluation was created.
         
        .google.protobuf.Timestamp create_time = 4;
        Specified by:
        getCreateTime in interface EvaluationOrBuilder
        Returns:
        The createTime.
      • setCreateTime

        public Evaluation.Builder setCreateTime​(com.google.protobuf.Timestamp value)
         Output only. Timestamp for when this evaluation was created.
         
        .google.protobuf.Timestamp create_time = 4;
      • setCreateTime

        public Evaluation.Builder setCreateTime​(com.google.protobuf.Timestamp.Builder builderForValue)
         Output only. Timestamp for when this evaluation was created.
         
        .google.protobuf.Timestamp create_time = 4;
      • mergeCreateTime

        public Evaluation.Builder mergeCreateTime​(com.google.protobuf.Timestamp value)
         Output only. Timestamp for when this evaluation was created.
         
        .google.protobuf.Timestamp create_time = 4;
      • clearCreateTime

        public Evaluation.Builder clearCreateTime()
         Output only. Timestamp for when this evaluation was created.
         
        .google.protobuf.Timestamp create_time = 4;
      • getCreateTimeBuilder

        public com.google.protobuf.Timestamp.Builder getCreateTimeBuilder()
         Output only. Timestamp for when this evaluation was created.
         
        .google.protobuf.Timestamp create_time = 4;
      • getCreateTimeOrBuilder

        public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder()
         Output only. Timestamp for when this evaluation was created.
         
        .google.protobuf.Timestamp create_time = 4;
        Specified by:
        getCreateTimeOrBuilder in interface EvaluationOrBuilder
      • hasEvaluationMetrics

        public boolean hasEvaluationMetrics()
         Output only. Metrics comparing predictions to ground truth labels.
         
        .google.cloud.datalabeling.v1beta1.EvaluationMetrics evaluation_metrics = 5;
        Specified by:
        hasEvaluationMetrics in interface EvaluationOrBuilder
        Returns:
        Whether the evaluationMetrics field is set.
      • getEvaluationMetrics

        public EvaluationMetrics getEvaluationMetrics()
         Output only. Metrics comparing predictions to ground truth labels.
         
        .google.cloud.datalabeling.v1beta1.EvaluationMetrics evaluation_metrics = 5;
        Specified by:
        getEvaluationMetrics in interface EvaluationOrBuilder
        Returns:
        The evaluationMetrics.
      • setEvaluationMetrics

        public Evaluation.Builder setEvaluationMetrics​(EvaluationMetrics value)
         Output only. Metrics comparing predictions to ground truth labels.
         
        .google.cloud.datalabeling.v1beta1.EvaluationMetrics evaluation_metrics = 5;
      • setEvaluationMetrics

        public Evaluation.Builder setEvaluationMetrics​(EvaluationMetrics.Builder builderForValue)
         Output only. Metrics comparing predictions to ground truth labels.
         
        .google.cloud.datalabeling.v1beta1.EvaluationMetrics evaluation_metrics = 5;
      • mergeEvaluationMetrics

        public Evaluation.Builder mergeEvaluationMetrics​(EvaluationMetrics value)
         Output only. Metrics comparing predictions to ground truth labels.
         
        .google.cloud.datalabeling.v1beta1.EvaluationMetrics evaluation_metrics = 5;
      • clearEvaluationMetrics

        public Evaluation.Builder clearEvaluationMetrics()
         Output only. Metrics comparing predictions to ground truth labels.
         
        .google.cloud.datalabeling.v1beta1.EvaluationMetrics evaluation_metrics = 5;
      • getEvaluationMetricsBuilder

        public EvaluationMetrics.Builder getEvaluationMetricsBuilder()
         Output only. Metrics comparing predictions to ground truth labels.
         
        .google.cloud.datalabeling.v1beta1.EvaluationMetrics evaluation_metrics = 5;
      • getAnnotationTypeValue

        public int getAnnotationTypeValue()
         Output only. Type of task that the model version being evaluated performs,
         as defined in the
        
         [evaluationJobConfig.inputConfig.annotationType][google.cloud.datalabeling.v1beta1.EvaluationJobConfig.input_config]
         field of the evaluation job that created this evaluation.
         
        .google.cloud.datalabeling.v1beta1.AnnotationType annotation_type = 6;
        Specified by:
        getAnnotationTypeValue in interface EvaluationOrBuilder
        Returns:
        The enum numeric value on the wire for annotationType.
      • setAnnotationTypeValue

        public Evaluation.Builder setAnnotationTypeValue​(int value)
         Output only. Type of task that the model version being evaluated performs,
         as defined in the
        
         [evaluationJobConfig.inputConfig.annotationType][google.cloud.datalabeling.v1beta1.EvaluationJobConfig.input_config]
         field of the evaluation job that created this evaluation.
         
        .google.cloud.datalabeling.v1beta1.AnnotationType annotation_type = 6;
        Parameters:
        value - The enum numeric value on the wire for annotationType to set.
        Returns:
        This builder for chaining.
      • getAnnotationType

        public AnnotationType getAnnotationType()
         Output only. Type of task that the model version being evaluated performs,
         as defined in the
        
         [evaluationJobConfig.inputConfig.annotationType][google.cloud.datalabeling.v1beta1.EvaluationJobConfig.input_config]
         field of the evaluation job that created this evaluation.
         
        .google.cloud.datalabeling.v1beta1.AnnotationType annotation_type = 6;
        Specified by:
        getAnnotationType in interface EvaluationOrBuilder
        Returns:
        The annotationType.
      • setAnnotationType

        public Evaluation.Builder setAnnotationType​(AnnotationType value)
         Output only. Type of task that the model version being evaluated performs,
         as defined in the
        
         [evaluationJobConfig.inputConfig.annotationType][google.cloud.datalabeling.v1beta1.EvaluationJobConfig.input_config]
         field of the evaluation job that created this evaluation.
         
        .google.cloud.datalabeling.v1beta1.AnnotationType annotation_type = 6;
        Parameters:
        value - The annotationType to set.
        Returns:
        This builder for chaining.
      • clearAnnotationType

        public Evaluation.Builder clearAnnotationType()
         Output only. Type of task that the model version being evaluated performs,
         as defined in the
        
         [evaluationJobConfig.inputConfig.annotationType][google.cloud.datalabeling.v1beta1.EvaluationJobConfig.input_config]
         field of the evaluation job that created this evaluation.
         
        .google.cloud.datalabeling.v1beta1.AnnotationType annotation_type = 6;
        Returns:
        This builder for chaining.
      • getEvaluatedItemCount

        public long getEvaluatedItemCount()
         Output only. The number of items in the ground truth dataset that were used
         for this evaluation. Only populated when the evaulation is for certain
         AnnotationTypes.
         
        int64 evaluated_item_count = 7;
        Specified by:
        getEvaluatedItemCount in interface EvaluationOrBuilder
        Returns:
        The evaluatedItemCount.
      • setEvaluatedItemCount

        public Evaluation.Builder setEvaluatedItemCount​(long value)
         Output only. The number of items in the ground truth dataset that were used
         for this evaluation. Only populated when the evaulation is for certain
         AnnotationTypes.
         
        int64 evaluated_item_count = 7;
        Parameters:
        value - The evaluatedItemCount to set.
        Returns:
        This builder for chaining.
      • clearEvaluatedItemCount

        public Evaluation.Builder clearEvaluatedItemCount()
         Output only. The number of items in the ground truth dataset that were used
         for this evaluation. Only populated when the evaulation is for certain
         AnnotationTypes.
         
        int64 evaluated_item_count = 7;
        Returns:
        This builder for chaining.
      • setUnknownFields

        public final Evaluation.Builder setUnknownFields​(com.google.protobuf.UnknownFieldSet unknownFields)
        Specified by:
        setUnknownFields in interface com.google.protobuf.Message.Builder
        Overrides:
        setUnknownFields in class com.google.protobuf.GeneratedMessageV3.Builder<Evaluation.Builder>
      • mergeUnknownFields

        public final Evaluation.Builder mergeUnknownFields​(com.google.protobuf.UnknownFieldSet unknownFields)
        Specified by:
        mergeUnknownFields in interface com.google.protobuf.Message.Builder
        Overrides:
        mergeUnknownFields in class com.google.protobuf.GeneratedMessageV3.Builder<Evaluation.Builder>