Class CalendarSpec.Builder

  • All Implemented Interfaces:
    com.google.protobuf.Message.Builder, com.google.protobuf.MessageLite.Builder, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, CalendarSpecOrBuilder, java.lang.Cloneable
    Enclosing class:
    CalendarSpec

    public static final class CalendarSpec.Builder
    extends com.google.protobuf.GeneratedMessageV3.Builder<CalendarSpec.Builder>
    implements CalendarSpecOrBuilder
     CalendarSpec describes an event specification relative to the calendar,
     similar to a traditional cron specification, but with labeled fields. Each
     field can be one of:
       *: matches always
       x: matches when the field equals x
       x/y : matches when the field equals x+n*y where n is an integer
       x-z: matches when the field is between x and z inclusive
       w,x,y,...: matches when the field is one of the listed values
     Each x, y, z, ... is either a decimal integer, or a month or day of week name
     or abbreviation (in the appropriate fields).
     A timestamp matches if all fields match.
     Note that fields have different default values, for convenience.
     Note that the special case that some cron implementations have for treating
     day_of_month and day_of_week as "or" instead of "and" when both are set is
     not implemented.
     day_of_week can accept 0 or 7 as Sunday
     CalendarSpec gets compiled into StructuredCalendarSpec, which is what will be
     returned if you describe the schedule.
     
    Protobuf type temporal.api.schedule.v1.CalendarSpec
    • 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<CalendarSpec.Builder>
      • clear

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

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

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

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

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

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

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

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

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

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

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

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

        public CalendarSpec.Builder mergeFrom​(com.google.protobuf.CodedInputStream input,
                                              com.google.protobuf.ExtensionRegistryLite extensionRegistry)
                                       throws java.io.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<CalendarSpec.Builder>
        Throws:
        java.io.IOException
      • getSecond

        public java.lang.String getSecond()
         Expression to match seconds. Default: 0
         
        string second = 1;
        Specified by:
        getSecond in interface CalendarSpecOrBuilder
        Returns:
        The second.
      • getSecondBytes

        public com.google.protobuf.ByteString getSecondBytes()
         Expression to match seconds. Default: 0
         
        string second = 1;
        Specified by:
        getSecondBytes in interface CalendarSpecOrBuilder
        Returns:
        The bytes for second.
      • setSecond

        public CalendarSpec.Builder setSecond​(java.lang.String value)
         Expression to match seconds. Default: 0
         
        string second = 1;
        Parameters:
        value - The second to set.
        Returns:
        This builder for chaining.
      • clearSecond

        public CalendarSpec.Builder clearSecond()
         Expression to match seconds. Default: 0
         
        string second = 1;
        Returns:
        This builder for chaining.
      • setSecondBytes

        public CalendarSpec.Builder setSecondBytes​(com.google.protobuf.ByteString value)
         Expression to match seconds. Default: 0
         
        string second = 1;
        Parameters:
        value - The bytes for second to set.
        Returns:
        This builder for chaining.
      • getMinute

        public java.lang.String getMinute()
         Expression to match minutes. Default: 0
         
        string minute = 2;
        Specified by:
        getMinute in interface CalendarSpecOrBuilder
        Returns:
        The minute.
      • getMinuteBytes

        public com.google.protobuf.ByteString getMinuteBytes()
         Expression to match minutes. Default: 0
         
        string minute = 2;
        Specified by:
        getMinuteBytes in interface CalendarSpecOrBuilder
        Returns:
        The bytes for minute.
      • setMinute

        public CalendarSpec.Builder setMinute​(java.lang.String value)
         Expression to match minutes. Default: 0
         
        string minute = 2;
        Parameters:
        value - The minute to set.
        Returns:
        This builder for chaining.
      • clearMinute

        public CalendarSpec.Builder clearMinute()
         Expression to match minutes. Default: 0
         
        string minute = 2;
        Returns:
        This builder for chaining.
      • setMinuteBytes

        public CalendarSpec.Builder setMinuteBytes​(com.google.protobuf.ByteString value)
         Expression to match minutes. Default: 0
         
        string minute = 2;
        Parameters:
        value - The bytes for minute to set.
        Returns:
        This builder for chaining.
      • getHour

        public java.lang.String getHour()
         Expression to match hours. Default: 0
         
        string hour = 3;
        Specified by:
        getHour in interface CalendarSpecOrBuilder
        Returns:
        The hour.
      • getHourBytes

        public com.google.protobuf.ByteString getHourBytes()
         Expression to match hours. Default: 0
         
        string hour = 3;
        Specified by:
        getHourBytes in interface CalendarSpecOrBuilder
        Returns:
        The bytes for hour.
      • setHour

        public CalendarSpec.Builder setHour​(java.lang.String value)
         Expression to match hours. Default: 0
         
        string hour = 3;
        Parameters:
        value - The hour to set.
        Returns:
        This builder for chaining.
      • clearHour

        public CalendarSpec.Builder clearHour()
         Expression to match hours. Default: 0
         
        string hour = 3;
        Returns:
        This builder for chaining.
      • setHourBytes

        public CalendarSpec.Builder setHourBytes​(com.google.protobuf.ByteString value)
         Expression to match hours. Default: 0
         
        string hour = 3;
        Parameters:
        value - The bytes for hour to set.
        Returns:
        This builder for chaining.
      • getDayOfMonth

        public java.lang.String getDayOfMonth()
         Expression to match days of the month. Default: *
         (-- api-linter: core::0140::prepositions=disabled
             aip.dev/not-precedent: standard name of field --)
         
        string day_of_month = 4;
        Specified by:
        getDayOfMonth in interface CalendarSpecOrBuilder
        Returns:
        The dayOfMonth.
      • getDayOfMonthBytes

        public com.google.protobuf.ByteString getDayOfMonthBytes()
         Expression to match days of the month. Default: *
         (-- api-linter: core::0140::prepositions=disabled
             aip.dev/not-precedent: standard name of field --)
         
        string day_of_month = 4;
        Specified by:
        getDayOfMonthBytes in interface CalendarSpecOrBuilder
        Returns:
        The bytes for dayOfMonth.
      • setDayOfMonth

        public CalendarSpec.Builder setDayOfMonth​(java.lang.String value)
         Expression to match days of the month. Default: *
         (-- api-linter: core::0140::prepositions=disabled
             aip.dev/not-precedent: standard name of field --)
         
        string day_of_month = 4;
        Parameters:
        value - The dayOfMonth to set.
        Returns:
        This builder for chaining.
      • clearDayOfMonth

        public CalendarSpec.Builder clearDayOfMonth()
         Expression to match days of the month. Default: *
         (-- api-linter: core::0140::prepositions=disabled
             aip.dev/not-precedent: standard name of field --)
         
        string day_of_month = 4;
        Returns:
        This builder for chaining.
      • setDayOfMonthBytes

        public CalendarSpec.Builder setDayOfMonthBytes​(com.google.protobuf.ByteString value)
         Expression to match days of the month. Default: *
         (-- api-linter: core::0140::prepositions=disabled
             aip.dev/not-precedent: standard name of field --)
         
        string day_of_month = 4;
        Parameters:
        value - The bytes for dayOfMonth to set.
        Returns:
        This builder for chaining.
      • getMonth

        public java.lang.String getMonth()
         Expression to match months. Default: *
         
        string month = 5;
        Specified by:
        getMonth in interface CalendarSpecOrBuilder
        Returns:
        The month.
      • getMonthBytes

        public com.google.protobuf.ByteString getMonthBytes()
         Expression to match months. Default: *
         
        string month = 5;
        Specified by:
        getMonthBytes in interface CalendarSpecOrBuilder
        Returns:
        The bytes for month.
      • setMonth

        public CalendarSpec.Builder setMonth​(java.lang.String value)
         Expression to match months. Default: *
         
        string month = 5;
        Parameters:
        value - The month to set.
        Returns:
        This builder for chaining.
      • clearMonth

        public CalendarSpec.Builder clearMonth()
         Expression to match months. Default: *
         
        string month = 5;
        Returns:
        This builder for chaining.
      • setMonthBytes

        public CalendarSpec.Builder setMonthBytes​(com.google.protobuf.ByteString value)
         Expression to match months. Default: *
         
        string month = 5;
        Parameters:
        value - The bytes for month to set.
        Returns:
        This builder for chaining.
      • getYear

        public java.lang.String getYear()
         Expression to match years. Default: *
         
        string year = 6;
        Specified by:
        getYear in interface CalendarSpecOrBuilder
        Returns:
        The year.
      • getYearBytes

        public com.google.protobuf.ByteString getYearBytes()
         Expression to match years. Default: *
         
        string year = 6;
        Specified by:
        getYearBytes in interface CalendarSpecOrBuilder
        Returns:
        The bytes for year.
      • setYear

        public CalendarSpec.Builder setYear​(java.lang.String value)
         Expression to match years. Default: *
         
        string year = 6;
        Parameters:
        value - The year to set.
        Returns:
        This builder for chaining.
      • clearYear

        public CalendarSpec.Builder clearYear()
         Expression to match years. Default: *
         
        string year = 6;
        Returns:
        This builder for chaining.
      • setYearBytes

        public CalendarSpec.Builder setYearBytes​(com.google.protobuf.ByteString value)
         Expression to match years. Default: *
         
        string year = 6;
        Parameters:
        value - The bytes for year to set.
        Returns:
        This builder for chaining.
      • getDayOfWeek

        public java.lang.String getDayOfWeek()
         Expression to match days of the week. Default: *
         
        string day_of_week = 7;
        Specified by:
        getDayOfWeek in interface CalendarSpecOrBuilder
        Returns:
        The dayOfWeek.
      • getDayOfWeekBytes

        public com.google.protobuf.ByteString getDayOfWeekBytes()
         Expression to match days of the week. Default: *
         
        string day_of_week = 7;
        Specified by:
        getDayOfWeekBytes in interface CalendarSpecOrBuilder
        Returns:
        The bytes for dayOfWeek.
      • setDayOfWeek

        public CalendarSpec.Builder setDayOfWeek​(java.lang.String value)
         Expression to match days of the week. Default: *
         
        string day_of_week = 7;
        Parameters:
        value - The dayOfWeek to set.
        Returns:
        This builder for chaining.
      • clearDayOfWeek

        public CalendarSpec.Builder clearDayOfWeek()
         Expression to match days of the week. Default: *
         
        string day_of_week = 7;
        Returns:
        This builder for chaining.
      • setDayOfWeekBytes

        public CalendarSpec.Builder setDayOfWeekBytes​(com.google.protobuf.ByteString value)
         Expression to match days of the week. Default: *
         
        string day_of_week = 7;
        Parameters:
        value - The bytes for dayOfWeek to set.
        Returns:
        This builder for chaining.
      • getComment

        public java.lang.String getComment()
         Free-form comment describing the intention of this spec.
         
        string comment = 8;
        Specified by:
        getComment in interface CalendarSpecOrBuilder
        Returns:
        The comment.
      • getCommentBytes

        public com.google.protobuf.ByteString getCommentBytes()
         Free-form comment describing the intention of this spec.
         
        string comment = 8;
        Specified by:
        getCommentBytes in interface CalendarSpecOrBuilder
        Returns:
        The bytes for comment.
      • setComment

        public CalendarSpec.Builder setComment​(java.lang.String value)
         Free-form comment describing the intention of this spec.
         
        string comment = 8;
        Parameters:
        value - The comment to set.
        Returns:
        This builder for chaining.
      • clearComment

        public CalendarSpec.Builder clearComment()
         Free-form comment describing the intention of this spec.
         
        string comment = 8;
        Returns:
        This builder for chaining.
      • setCommentBytes

        public CalendarSpec.Builder setCommentBytes​(com.google.protobuf.ByteString value)
         Free-form comment describing the intention of this spec.
         
        string comment = 8;
        Parameters:
        value - The bytes for comment to set.
        Returns:
        This builder for chaining.
      • setUnknownFields

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

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