Class DiagnosisKey.Builder

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

    public static final class DiagnosisKey.Builder
    extends com.google.protobuf.GeneratedMessageV3.Builder<DiagnosisKey.Builder>
    implements DiagnosisKeyOrBuilder
    Protobuf type app.coronawarn.server.common.protocols.external.exposurenotification.DiagnosisKey
    • 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<DiagnosisKey.Builder>
      • clear

        public DiagnosisKey.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<DiagnosisKey.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<DiagnosisKey.Builder>
      • getDefaultInstanceForType

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

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

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

        public DiagnosisKey.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<DiagnosisKey.Builder>
      • setField

        public DiagnosisKey.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<DiagnosisKey.Builder>
      • clearField

        public DiagnosisKey.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<DiagnosisKey.Builder>
      • clearOneof

        public DiagnosisKey.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<DiagnosisKey.Builder>
      • setRepeatedField

        public DiagnosisKey.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<DiagnosisKey.Builder>
      • addRepeatedField

        public DiagnosisKey.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<DiagnosisKey.Builder>
      • mergeFrom

        public DiagnosisKey.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<DiagnosisKey.Builder>
      • isInitialized

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

        public DiagnosisKey.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<DiagnosisKey.Builder>
        Throws:
        IOException
      • getKeyData

        public com.google.protobuf.ByteString getKeyData()
         key
         
        bytes keyData = 1;
        Specified by:
        getKeyData in interface DiagnosisKeyOrBuilder
        Returns:
        The keyData.
      • setKeyData

        public DiagnosisKey.Builder setKeyData​(com.google.protobuf.ByteString value)
         key
         
        bytes keyData = 1;
        Parameters:
        value - The keyData to set.
        Returns:
        This builder for chaining.
      • clearKeyData

        public DiagnosisKey.Builder clearKeyData()
         key
         
        bytes keyData = 1;
        Returns:
        This builder for chaining.
      • setRollingStartIntervalNumber

        public DiagnosisKey.Builder setRollingStartIntervalNumber​(int value)
        uint32 rollingStartIntervalNumber = 2;
        Parameters:
        value - The rollingStartIntervalNumber to set.
        Returns:
        This builder for chaining.
      • clearRollingStartIntervalNumber

        public DiagnosisKey.Builder clearRollingStartIntervalNumber()
        uint32 rollingStartIntervalNumber = 2;
        Returns:
        This builder for chaining.
      • getRollingPeriod

        public int getRollingPeriod()
         number of 10-minute windows between key-rolling
         
        uint32 rollingPeriod = 3;
        Specified by:
        getRollingPeriod in interface DiagnosisKeyOrBuilder
        Returns:
        The rollingPeriod.
      • setRollingPeriod

        public DiagnosisKey.Builder setRollingPeriod​(int value)
         number of 10-minute windows between key-rolling
         
        uint32 rollingPeriod = 3;
        Parameters:
        value - The rollingPeriod to set.
        Returns:
        This builder for chaining.
      • clearRollingPeriod

        public DiagnosisKey.Builder clearRollingPeriod()
         number of 10-minute windows between key-rolling
         
        uint32 rollingPeriod = 3;
        Returns:
        This builder for chaining.
      • getTransmissionRiskLevel

        public int getTransmissionRiskLevel()
         risk of transmission
         
        int32 transmissionRiskLevel = 4;
        Specified by:
        getTransmissionRiskLevel in interface DiagnosisKeyOrBuilder
        Returns:
        The transmissionRiskLevel.
      • setTransmissionRiskLevel

        public DiagnosisKey.Builder setTransmissionRiskLevel​(int value)
         risk of transmission
         
        int32 transmissionRiskLevel = 4;
        Parameters:
        value - The transmissionRiskLevel to set.
        Returns:
        This builder for chaining.
      • clearTransmissionRiskLevel

        public DiagnosisKey.Builder clearTransmissionRiskLevel()
         risk of transmission
         
        int32 transmissionRiskLevel = 4;
        Returns:
        This builder for chaining.
      • getVisitedCountriesList

        public com.google.protobuf.ProtocolStringList getVisitedCountriesList()
        repeated string visitedCountries = 5;
        Specified by:
        getVisitedCountriesList in interface DiagnosisKeyOrBuilder
        Returns:
        A list containing the visitedCountries.
      • getVisitedCountries

        public String getVisitedCountries​(int index)
        repeated string visitedCountries = 5;
        Specified by:
        getVisitedCountries in interface DiagnosisKeyOrBuilder
        Parameters:
        index - The index of the element to return.
        Returns:
        The visitedCountries at the given index.
      • getVisitedCountriesBytes

        public com.google.protobuf.ByteString getVisitedCountriesBytes​(int index)
        repeated string visitedCountries = 5;
        Specified by:
        getVisitedCountriesBytes in interface DiagnosisKeyOrBuilder
        Parameters:
        index - The index of the value to return.
        Returns:
        The bytes of the visitedCountries at the given index.
      • setVisitedCountries

        public DiagnosisKey.Builder setVisitedCountries​(int index,
                                                        String value)
        repeated string visitedCountries = 5;
        Parameters:
        index - The index to set the value at.
        value - The visitedCountries to set.
        Returns:
        This builder for chaining.
      • addVisitedCountries

        public DiagnosisKey.Builder addVisitedCountries​(String value)
        repeated string visitedCountries = 5;
        Parameters:
        value - The visitedCountries to add.
        Returns:
        This builder for chaining.
      • addAllVisitedCountries

        public DiagnosisKey.Builder addAllVisitedCountries​(Iterable<String> values)
        repeated string visitedCountries = 5;
        Parameters:
        values - The visitedCountries to add.
        Returns:
        This builder for chaining.
      • clearVisitedCountries

        public DiagnosisKey.Builder clearVisitedCountries()
        repeated string visitedCountries = 5;
        Returns:
        This builder for chaining.
      • addVisitedCountriesBytes

        public DiagnosisKey.Builder addVisitedCountriesBytes​(com.google.protobuf.ByteString value)
        repeated string visitedCountries = 5;
        Parameters:
        value - The bytes of the visitedCountries to add.
        Returns:
        This builder for chaining.
      • getOriginBytes

        public com.google.protobuf.ByteString getOriginBytes()
         country of origin
         
        string origin = 6;
        Specified by:
        getOriginBytes in interface DiagnosisKeyOrBuilder
        Returns:
        The bytes for origin.
      • setOrigin

        public DiagnosisKey.Builder setOrigin​(String value)
         country of origin
         
        string origin = 6;
        Parameters:
        value - The origin to set.
        Returns:
        This builder for chaining.
      • clearOrigin

        public DiagnosisKey.Builder clearOrigin()
         country of origin
         
        string origin = 6;
        Returns:
        This builder for chaining.
      • setOriginBytes

        public DiagnosisKey.Builder setOriginBytes​(com.google.protobuf.ByteString value)
         country of origin
         
        string origin = 6;
        Parameters:
        value - The bytes for origin to set.
        Returns:
        This builder for chaining.
      • getReportTypeValue

        public int getReportTypeValue()
         set by backend
         
        .app.coronawarn.server.common.protocols.external.exposurenotification.ReportType reportType = 7;
        Specified by:
        getReportTypeValue in interface DiagnosisKeyOrBuilder
        Returns:
        The enum numeric value on the wire for reportType.
      • setReportTypeValue

        public DiagnosisKey.Builder setReportTypeValue​(int value)
         set by backend
         
        .app.coronawarn.server.common.protocols.external.exposurenotification.ReportType reportType = 7;
        Parameters:
        value - The enum numeric value on the wire for reportType to set.
        Returns:
        This builder for chaining.
      • getReportType

        public ReportType getReportType()
         set by backend
         
        .app.coronawarn.server.common.protocols.external.exposurenotification.ReportType reportType = 7;
        Specified by:
        getReportType in interface DiagnosisKeyOrBuilder
        Returns:
        The reportType.
      • setReportType

        public DiagnosisKey.Builder setReportType​(ReportType value)
         set by backend
         
        .app.coronawarn.server.common.protocols.external.exposurenotification.ReportType reportType = 7;
        Parameters:
        value - The reportType to set.
        Returns:
        This builder for chaining.
      • clearReportType

        public DiagnosisKey.Builder clearReportType()
         set by backend
         
        .app.coronawarn.server.common.protocols.external.exposurenotification.ReportType reportType = 7;
        Returns:
        This builder for chaining.
      • getDaysSinceOnsetOfSymptoms

        public int getDaysSinceOnsetOfSymptoms()
         Number of days elapsed between symptom onset and the TEK being used.
         E.g. 2 means TEK is 2 days after onset of symptoms.
         
        sint32 days_since_onset_of_symptoms = 8;
        Specified by:
        getDaysSinceOnsetOfSymptoms in interface DiagnosisKeyOrBuilder
        Returns:
        The daysSinceOnsetOfSymptoms.
      • setDaysSinceOnsetOfSymptoms

        public DiagnosisKey.Builder setDaysSinceOnsetOfSymptoms​(int value)
         Number of days elapsed between symptom onset and the TEK being used.
         E.g. 2 means TEK is 2 days after onset of symptoms.
         
        sint32 days_since_onset_of_symptoms = 8;
        Parameters:
        value - The daysSinceOnsetOfSymptoms to set.
        Returns:
        This builder for chaining.
      • clearDaysSinceOnsetOfSymptoms

        public DiagnosisKey.Builder clearDaysSinceOnsetOfSymptoms()
         Number of days elapsed between symptom onset and the TEK being used.
         E.g. 2 means TEK is 2 days after onset of symptoms.
         
        sint32 days_since_onset_of_symptoms = 8;
        Returns:
        This builder for chaining.
      • setUnknownFields

        public final DiagnosisKey.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<DiagnosisKey.Builder>
      • mergeUnknownFields

        public final DiagnosisKey.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<DiagnosisKey.Builder>