All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.google.cloud.gkebackup.v1.ExclusionWindow Maven / Gradle / Ivy

There is a newer version: 0.54.0
Show newest version
/*
 * Copyright 2024 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     https://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
// Generated by the protocol buffer compiler.  DO NOT EDIT!
// source: google/cloud/gkebackup/v1/backup_plan.proto

// Protobuf Java Version: 3.25.5
package com.google.cloud.gkebackup.v1;

/**
 *
 *
 * 
 * Defines a time window during which no backup should
 * happen. All time and date are in UTC.
 * 
* * Protobuf type {@code google.cloud.gkebackup.v1.ExclusionWindow} */ public final class ExclusionWindow extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:google.cloud.gkebackup.v1.ExclusionWindow) ExclusionWindowOrBuilder { private static final long serialVersionUID = 0L; // Use ExclusionWindow.newBuilder() to construct. private ExclusionWindow(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); } private ExclusionWindow() {} @java.lang.Override @SuppressWarnings({"unused"}) protected java.lang.Object newInstance(UnusedPrivateParameter unused) { return new ExclusionWindow(); } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.gkebackup.v1.BackupPlanProto .internal_static_google_cloud_gkebackup_v1_ExclusionWindow_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.cloud.gkebackup.v1.BackupPlanProto .internal_static_google_cloud_gkebackup_v1_ExclusionWindow_fieldAccessorTable .ensureFieldAccessorsInitialized( com.google.cloud.gkebackup.v1.ExclusionWindow.class, com.google.cloud.gkebackup.v1.ExclusionWindow.Builder.class); } public interface DayOfWeekListOrBuilder extends // @@protoc_insertion_point(interface_extends:google.cloud.gkebackup.v1.ExclusionWindow.DayOfWeekList) com.google.protobuf.MessageOrBuilder { /** * * *
     * Optional. A list of days of week.
     * 
* * * repeated .google.type.DayOfWeek days_of_week = 1 [(.google.api.field_behavior) = OPTIONAL]; * * * @return A list containing the daysOfWeek. */ java.util.List getDaysOfWeekList(); /** * * *
     * Optional. A list of days of week.
     * 
* * * repeated .google.type.DayOfWeek days_of_week = 1 [(.google.api.field_behavior) = OPTIONAL]; * * * @return The count of daysOfWeek. */ int getDaysOfWeekCount(); /** * * *
     * Optional. A list of days of week.
     * 
* * * repeated .google.type.DayOfWeek days_of_week = 1 [(.google.api.field_behavior) = OPTIONAL]; * * * @param index The index of the element to return. * @return The daysOfWeek at the given index. */ com.google.type.DayOfWeek getDaysOfWeek(int index); /** * * *
     * Optional. A list of days of week.
     * 
* * * repeated .google.type.DayOfWeek days_of_week = 1 [(.google.api.field_behavior) = OPTIONAL]; * * * @return A list containing the enum numeric values on the wire for daysOfWeek. */ java.util.List getDaysOfWeekValueList(); /** * * *
     * Optional. A list of days of week.
     * 
* * * repeated .google.type.DayOfWeek days_of_week = 1 [(.google.api.field_behavior) = OPTIONAL]; * * * @param index The index of the value to return. * @return The enum numeric value on the wire of daysOfWeek at the given index. */ int getDaysOfWeekValue(int index); } /** * * *
   * Holds repeated DaysOfWeek values as a container.
   * 
* * Protobuf type {@code google.cloud.gkebackup.v1.ExclusionWindow.DayOfWeekList} */ public static final class DayOfWeekList extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:google.cloud.gkebackup.v1.ExclusionWindow.DayOfWeekList) DayOfWeekListOrBuilder { private static final long serialVersionUID = 0L; // Use DayOfWeekList.newBuilder() to construct. private DayOfWeekList(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); } private DayOfWeekList() { daysOfWeek_ = java.util.Collections.emptyList(); } @java.lang.Override @SuppressWarnings({"unused"}) protected java.lang.Object newInstance(UnusedPrivateParameter unused) { return new DayOfWeekList(); } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.gkebackup.v1.BackupPlanProto .internal_static_google_cloud_gkebackup_v1_ExclusionWindow_DayOfWeekList_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.cloud.gkebackup.v1.BackupPlanProto .internal_static_google_cloud_gkebackup_v1_ExclusionWindow_DayOfWeekList_fieldAccessorTable .ensureFieldAccessorsInitialized( com.google.cloud.gkebackup.v1.ExclusionWindow.DayOfWeekList.class, com.google.cloud.gkebackup.v1.ExclusionWindow.DayOfWeekList.Builder.class); } public static final int DAYS_OF_WEEK_FIELD_NUMBER = 1; @SuppressWarnings("serial") private java.util.List daysOfWeek_; private static final com.google.protobuf.Internal.ListAdapter.Converter< java.lang.Integer, com.google.type.DayOfWeek> daysOfWeek_converter_ = new com.google.protobuf.Internal.ListAdapter.Converter< java.lang.Integer, com.google.type.DayOfWeek>() { public com.google.type.DayOfWeek convert(java.lang.Integer from) { com.google.type.DayOfWeek result = com.google.type.DayOfWeek.forNumber(from); return result == null ? com.google.type.DayOfWeek.UNRECOGNIZED : result; } }; /** * * *
     * Optional. A list of days of week.
     * 
* * * repeated .google.type.DayOfWeek days_of_week = 1 [(.google.api.field_behavior) = OPTIONAL]; * * * @return A list containing the daysOfWeek. */ @java.lang.Override public java.util.List getDaysOfWeekList() { return new com.google.protobuf.Internal.ListAdapter< java.lang.Integer, com.google.type.DayOfWeek>(daysOfWeek_, daysOfWeek_converter_); } /** * * *
     * Optional. A list of days of week.
     * 
* * * repeated .google.type.DayOfWeek days_of_week = 1 [(.google.api.field_behavior) = OPTIONAL]; * * * @return The count of daysOfWeek. */ @java.lang.Override public int getDaysOfWeekCount() { return daysOfWeek_.size(); } /** * * *
     * Optional. A list of days of week.
     * 
* * * repeated .google.type.DayOfWeek days_of_week = 1 [(.google.api.field_behavior) = OPTIONAL]; * * * @param index The index of the element to return. * @return The daysOfWeek at the given index. */ @java.lang.Override public com.google.type.DayOfWeek getDaysOfWeek(int index) { return daysOfWeek_converter_.convert(daysOfWeek_.get(index)); } /** * * *
     * Optional. A list of days of week.
     * 
* * * repeated .google.type.DayOfWeek days_of_week = 1 [(.google.api.field_behavior) = OPTIONAL]; * * * @return A list containing the enum numeric values on the wire for daysOfWeek. */ @java.lang.Override public java.util.List getDaysOfWeekValueList() { return daysOfWeek_; } /** * * *
     * Optional. A list of days of week.
     * 
* * * repeated .google.type.DayOfWeek days_of_week = 1 [(.google.api.field_behavior) = OPTIONAL]; * * * @param index The index of the value to return. * @return The enum numeric value on the wire of daysOfWeek at the given index. */ @java.lang.Override public int getDaysOfWeekValue(int index) { return daysOfWeek_.get(index); } private int daysOfWeekMemoizedSerializedSize; private byte memoizedIsInitialized = -1; @java.lang.Override public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; if (isInitialized == 1) return true; if (isInitialized == 0) return false; memoizedIsInitialized = 1; return true; } @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { getSerializedSize(); if (getDaysOfWeekList().size() > 0) { output.writeUInt32NoTag(10); output.writeUInt32NoTag(daysOfWeekMemoizedSerializedSize); } for (int i = 0; i < daysOfWeek_.size(); i++) { output.writeEnumNoTag(daysOfWeek_.get(i)); } getUnknownFields().writeTo(output); } @java.lang.Override public int getSerializedSize() { int size = memoizedSize; if (size != -1) return size; size = 0; { int dataSize = 0; for (int i = 0; i < daysOfWeek_.size(); i++) { dataSize += com.google.protobuf.CodedOutputStream.computeEnumSizeNoTag(daysOfWeek_.get(i)); } size += dataSize; if (!getDaysOfWeekList().isEmpty()) { size += 1; size += com.google.protobuf.CodedOutputStream.computeUInt32SizeNoTag(dataSize); } daysOfWeekMemoizedSerializedSize = dataSize; } size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @java.lang.Override public boolean equals(final java.lang.Object obj) { if (obj == this) { return true; } if (!(obj instanceof com.google.cloud.gkebackup.v1.ExclusionWindow.DayOfWeekList)) { return super.equals(obj); } com.google.cloud.gkebackup.v1.ExclusionWindow.DayOfWeekList other = (com.google.cloud.gkebackup.v1.ExclusionWindow.DayOfWeekList) obj; if (!daysOfWeek_.equals(other.daysOfWeek_)) return false; if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @java.lang.Override public int hashCode() { if (memoizedHashCode != 0) { return memoizedHashCode; } int hash = 41; hash = (19 * hash) + getDescriptor().hashCode(); if (getDaysOfWeekCount() > 0) { hash = (37 * hash) + DAYS_OF_WEEK_FIELD_NUMBER; hash = (53 * hash) + daysOfWeek_.hashCode(); } hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } public static com.google.cloud.gkebackup.v1.ExclusionWindow.DayOfWeekList parseFrom( java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.google.cloud.gkebackup.v1.ExclusionWindow.DayOfWeekList parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static com.google.cloud.gkebackup.v1.ExclusionWindow.DayOfWeekList parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.google.cloud.gkebackup.v1.ExclusionWindow.DayOfWeekList parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static com.google.cloud.gkebackup.v1.ExclusionWindow.DayOfWeekList parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.google.cloud.gkebackup.v1.ExclusionWindow.DayOfWeekList parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static com.google.cloud.gkebackup.v1.ExclusionWindow.DayOfWeekList parseFrom( java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); } public static com.google.cloud.gkebackup.v1.ExclusionWindow.DayOfWeekList parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseWithIOException( PARSER, input, extensionRegistry); } public static com.google.cloud.gkebackup.v1.ExclusionWindow.DayOfWeekList parseDelimitedFrom( java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); } public static com.google.cloud.gkebackup.v1.ExclusionWindow.DayOfWeekList parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( PARSER, input, extensionRegistry); } public static com.google.cloud.gkebackup.v1.ExclusionWindow.DayOfWeekList parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); } public static com.google.cloud.gkebackup.v1.ExclusionWindow.DayOfWeekList parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseWithIOException( PARSER, input, extensionRegistry); } @java.lang.Override public Builder newBuilderForType() { return newBuilder(); } public static Builder newBuilder() { return DEFAULT_INSTANCE.toBuilder(); } public static Builder newBuilder( com.google.cloud.gkebackup.v1.ExclusionWindow.DayOfWeekList prototype) { return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); } @java.lang.Override public Builder toBuilder() { return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); } @java.lang.Override protected Builder newBuilderForType( com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } /** * * *
     * Holds repeated DaysOfWeek values as a container.
     * 
* * Protobuf type {@code google.cloud.gkebackup.v1.ExclusionWindow.DayOfWeekList} */ public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:google.cloud.gkebackup.v1.ExclusionWindow.DayOfWeekList) com.google.cloud.gkebackup.v1.ExclusionWindow.DayOfWeekListOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.gkebackup.v1.BackupPlanProto .internal_static_google_cloud_gkebackup_v1_ExclusionWindow_DayOfWeekList_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.cloud.gkebackup.v1.BackupPlanProto .internal_static_google_cloud_gkebackup_v1_ExclusionWindow_DayOfWeekList_fieldAccessorTable .ensureFieldAccessorsInitialized( com.google.cloud.gkebackup.v1.ExclusionWindow.DayOfWeekList.class, com.google.cloud.gkebackup.v1.ExclusionWindow.DayOfWeekList.Builder.class); } // Construct using com.google.cloud.gkebackup.v1.ExclusionWindow.DayOfWeekList.newBuilder() private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); } @java.lang.Override public Builder clear() { super.clear(); bitField0_ = 0; daysOfWeek_ = java.util.Collections.emptyList(); bitField0_ = (bitField0_ & ~0x00000001); return this; } @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return com.google.cloud.gkebackup.v1.BackupPlanProto .internal_static_google_cloud_gkebackup_v1_ExclusionWindow_DayOfWeekList_descriptor; } @java.lang.Override public com.google.cloud.gkebackup.v1.ExclusionWindow.DayOfWeekList getDefaultInstanceForType() { return com.google.cloud.gkebackup.v1.ExclusionWindow.DayOfWeekList.getDefaultInstance(); } @java.lang.Override public com.google.cloud.gkebackup.v1.ExclusionWindow.DayOfWeekList build() { com.google.cloud.gkebackup.v1.ExclusionWindow.DayOfWeekList result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } @java.lang.Override public com.google.cloud.gkebackup.v1.ExclusionWindow.DayOfWeekList buildPartial() { com.google.cloud.gkebackup.v1.ExclusionWindow.DayOfWeekList result = new com.google.cloud.gkebackup.v1.ExclusionWindow.DayOfWeekList(this); buildPartialRepeatedFields(result); if (bitField0_ != 0) { buildPartial0(result); } onBuilt(); return result; } private void buildPartialRepeatedFields( com.google.cloud.gkebackup.v1.ExclusionWindow.DayOfWeekList result) { if (((bitField0_ & 0x00000001) != 0)) { daysOfWeek_ = java.util.Collections.unmodifiableList(daysOfWeek_); bitField0_ = (bitField0_ & ~0x00000001); } result.daysOfWeek_ = daysOfWeek_; } private void buildPartial0( com.google.cloud.gkebackup.v1.ExclusionWindow.DayOfWeekList result) { int from_bitField0_ = bitField0_; } @java.lang.Override public Builder clone() { return super.clone(); } @java.lang.Override public Builder setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { return super.setField(field, value); } @java.lang.Override public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { return super.clearField(field); } @java.lang.Override public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { return super.clearOneof(oneof); } @java.lang.Override public Builder setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { return super.setRepeatedField(field, index, value); } @java.lang.Override public Builder addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { return super.addRepeatedField(field, value); } @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof com.google.cloud.gkebackup.v1.ExclusionWindow.DayOfWeekList) { return mergeFrom((com.google.cloud.gkebackup.v1.ExclusionWindow.DayOfWeekList) other); } else { super.mergeFrom(other); return this; } } public Builder mergeFrom(com.google.cloud.gkebackup.v1.ExclusionWindow.DayOfWeekList other) { if (other == com.google.cloud.gkebackup.v1.ExclusionWindow.DayOfWeekList.getDefaultInstance()) return this; if (!other.daysOfWeek_.isEmpty()) { if (daysOfWeek_.isEmpty()) { daysOfWeek_ = other.daysOfWeek_; bitField0_ = (bitField0_ & ~0x00000001); } else { ensureDaysOfWeekIsMutable(); daysOfWeek_.addAll(other.daysOfWeek_); } onChanged(); } this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @java.lang.Override public final boolean isInitialized() { return true; } @java.lang.Override public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { if (extensionRegistry == null) { throw new java.lang.NullPointerException(); } try { boolean done = false; while (!done) { int tag = input.readTag(); switch (tag) { case 0: done = true; break; case 8: { int tmpRaw = input.readEnum(); ensureDaysOfWeekIsMutable(); daysOfWeek_.add(tmpRaw); break; } // case 8 case 10: { int length = input.readRawVarint32(); int oldLimit = input.pushLimit(length); while (input.getBytesUntilLimit() > 0) { int tmpRaw = input.readEnum(); ensureDaysOfWeekIsMutable(); daysOfWeek_.add(tmpRaw); } input.popLimit(oldLimit); break; } // case 10 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { done = true; // was an endgroup tag } break; } // default: } // switch (tag) } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { throw e.unwrapIOException(); } finally { onChanged(); } // finally return this; } private int bitField0_; private java.util.List daysOfWeek_ = java.util.Collections.emptyList(); private void ensureDaysOfWeekIsMutable() { if (!((bitField0_ & 0x00000001) != 0)) { daysOfWeek_ = new java.util.ArrayList(daysOfWeek_); bitField0_ |= 0x00000001; } } /** * * *
       * Optional. A list of days of week.
       * 
* * * repeated .google.type.DayOfWeek days_of_week = 1 [(.google.api.field_behavior) = OPTIONAL]; * * * @return A list containing the daysOfWeek. */ public java.util.List getDaysOfWeekList() { return new com.google.protobuf.Internal.ListAdapter< java.lang.Integer, com.google.type.DayOfWeek>(daysOfWeek_, daysOfWeek_converter_); } /** * * *
       * Optional. A list of days of week.
       * 
* * * repeated .google.type.DayOfWeek days_of_week = 1 [(.google.api.field_behavior) = OPTIONAL]; * * * @return The count of daysOfWeek. */ public int getDaysOfWeekCount() { return daysOfWeek_.size(); } /** * * *
       * Optional. A list of days of week.
       * 
* * * repeated .google.type.DayOfWeek days_of_week = 1 [(.google.api.field_behavior) = OPTIONAL]; * * * @param index The index of the element to return. * @return The daysOfWeek at the given index. */ public com.google.type.DayOfWeek getDaysOfWeek(int index) { return daysOfWeek_converter_.convert(daysOfWeek_.get(index)); } /** * * *
       * Optional. A list of days of week.
       * 
* * * repeated .google.type.DayOfWeek days_of_week = 1 [(.google.api.field_behavior) = OPTIONAL]; * * * @param index The index to set the value at. * @param value The daysOfWeek to set. * @return This builder for chaining. */ public Builder setDaysOfWeek(int index, com.google.type.DayOfWeek value) { if (value == null) { throw new NullPointerException(); } ensureDaysOfWeekIsMutable(); daysOfWeek_.set(index, value.getNumber()); onChanged(); return this; } /** * * *
       * Optional. A list of days of week.
       * 
* * * repeated .google.type.DayOfWeek days_of_week = 1 [(.google.api.field_behavior) = OPTIONAL]; * * * @param value The daysOfWeek to add. * @return This builder for chaining. */ public Builder addDaysOfWeek(com.google.type.DayOfWeek value) { if (value == null) { throw new NullPointerException(); } ensureDaysOfWeekIsMutable(); daysOfWeek_.add(value.getNumber()); onChanged(); return this; } /** * * *
       * Optional. A list of days of week.
       * 
* * * repeated .google.type.DayOfWeek days_of_week = 1 [(.google.api.field_behavior) = OPTIONAL]; * * * @param values The daysOfWeek to add. * @return This builder for chaining. */ public Builder addAllDaysOfWeek( java.lang.Iterable values) { ensureDaysOfWeekIsMutable(); for (com.google.type.DayOfWeek value : values) { daysOfWeek_.add(value.getNumber()); } onChanged(); return this; } /** * * *
       * Optional. A list of days of week.
       * 
* * * repeated .google.type.DayOfWeek days_of_week = 1 [(.google.api.field_behavior) = OPTIONAL]; * * * @return This builder for chaining. */ public Builder clearDaysOfWeek() { daysOfWeek_ = java.util.Collections.emptyList(); bitField0_ = (bitField0_ & ~0x00000001); onChanged(); return this; } /** * * *
       * Optional. A list of days of week.
       * 
* * * repeated .google.type.DayOfWeek days_of_week = 1 [(.google.api.field_behavior) = OPTIONAL]; * * * @return A list containing the enum numeric values on the wire for daysOfWeek. */ public java.util.List getDaysOfWeekValueList() { return java.util.Collections.unmodifiableList(daysOfWeek_); } /** * * *
       * Optional. A list of days of week.
       * 
* * * repeated .google.type.DayOfWeek days_of_week = 1 [(.google.api.field_behavior) = OPTIONAL]; * * * @param index The index of the value to return. * @return The enum numeric value on the wire of daysOfWeek at the given index. */ public int getDaysOfWeekValue(int index) { return daysOfWeek_.get(index); } /** * * *
       * Optional. A list of days of week.
       * 
* * * repeated .google.type.DayOfWeek days_of_week = 1 [(.google.api.field_behavior) = OPTIONAL]; * * * @param index The index to set the value at. * @param value The enum numeric value on the wire for daysOfWeek to set. * @return This builder for chaining. */ public Builder setDaysOfWeekValue(int index, int value) { ensureDaysOfWeekIsMutable(); daysOfWeek_.set(index, value); onChanged(); return this; } /** * * *
       * Optional. A list of days of week.
       * 
* * * repeated .google.type.DayOfWeek days_of_week = 1 [(.google.api.field_behavior) = OPTIONAL]; * * * @param value The enum numeric value on the wire for daysOfWeek to add. * @return This builder for chaining. */ public Builder addDaysOfWeekValue(int value) { ensureDaysOfWeekIsMutable(); daysOfWeek_.add(value); onChanged(); return this; } /** * * *
       * Optional. A list of days of week.
       * 
* * * repeated .google.type.DayOfWeek days_of_week = 1 [(.google.api.field_behavior) = OPTIONAL]; * * * @param values The enum numeric values on the wire for daysOfWeek to add. * @return This builder for chaining. */ public Builder addAllDaysOfWeekValue(java.lang.Iterable values) { ensureDaysOfWeekIsMutable(); for (int value : values) { daysOfWeek_.add(value); } onChanged(); return this; } @java.lang.Override public final Builder setUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { return super.setUnknownFields(unknownFields); } @java.lang.Override public final Builder mergeUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { return super.mergeUnknownFields(unknownFields); } // @@protoc_insertion_point(builder_scope:google.cloud.gkebackup.v1.ExclusionWindow.DayOfWeekList) } // @@protoc_insertion_point(class_scope:google.cloud.gkebackup.v1.ExclusionWindow.DayOfWeekList) private static final com.google.cloud.gkebackup.v1.ExclusionWindow.DayOfWeekList DEFAULT_INSTANCE; static { DEFAULT_INSTANCE = new com.google.cloud.gkebackup.v1.ExclusionWindow.DayOfWeekList(); } public static com.google.cloud.gkebackup.v1.ExclusionWindow.DayOfWeekList getDefaultInstance() { return DEFAULT_INSTANCE; } private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { @java.lang.Override public DayOfWeekList parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { Builder builder = newBuilder(); try { builder.mergeFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { throw e.setUnfinishedMessage(builder.buildPartial()); } catch (com.google.protobuf.UninitializedMessageException e) { throw e.asInvalidProtocolBufferException() .setUnfinishedMessage(builder.buildPartial()); } catch (java.io.IOException e) { throw new com.google.protobuf.InvalidProtocolBufferException(e) .setUnfinishedMessage(builder.buildPartial()); } return builder.buildPartial(); } }; public static com.google.protobuf.Parser parser() { return PARSER; } @java.lang.Override public com.google.protobuf.Parser getParserForType() { return PARSER; } @java.lang.Override public com.google.cloud.gkebackup.v1.ExclusionWindow.DayOfWeekList getDefaultInstanceForType() { return DEFAULT_INSTANCE; } } private int bitField0_; private int recurrenceCase_ = 0; @SuppressWarnings("serial") private java.lang.Object recurrence_; public enum RecurrenceCase implements com.google.protobuf.Internal.EnumLite, com.google.protobuf.AbstractMessage.InternalOneOfEnum { SINGLE_OCCURRENCE_DATE(3), DAILY(4), DAYS_OF_WEEK(5), RECURRENCE_NOT_SET(0); private final int value; private RecurrenceCase(int value) { this.value = value; } /** * @param value The number of the enum to look for. * @return The enum associated with the given number. * @deprecated Use {@link #forNumber(int)} instead. */ @java.lang.Deprecated public static RecurrenceCase valueOf(int value) { return forNumber(value); } public static RecurrenceCase forNumber(int value) { switch (value) { case 3: return SINGLE_OCCURRENCE_DATE; case 4: return DAILY; case 5: return DAYS_OF_WEEK; case 0: return RECURRENCE_NOT_SET; default: return null; } } public int getNumber() { return this.value; } }; public RecurrenceCase getRecurrenceCase() { return RecurrenceCase.forNumber(recurrenceCase_); } public static final int START_TIME_FIELD_NUMBER = 1; private com.google.type.TimeOfDay startTime_; /** * * *
   * Required. Specifies the start time of the window using time of the day in
   * UTC.
   * 
* * .google.type.TimeOfDay start_time = 1 [(.google.api.field_behavior) = REQUIRED]; * * @return Whether the startTime field is set. */ @java.lang.Override public boolean hasStartTime() { return ((bitField0_ & 0x00000001) != 0); } /** * * *
   * Required. Specifies the start time of the window using time of the day in
   * UTC.
   * 
* * .google.type.TimeOfDay start_time = 1 [(.google.api.field_behavior) = REQUIRED]; * * @return The startTime. */ @java.lang.Override public com.google.type.TimeOfDay getStartTime() { return startTime_ == null ? com.google.type.TimeOfDay.getDefaultInstance() : startTime_; } /** * * *
   * Required. Specifies the start time of the window using time of the day in
   * UTC.
   * 
* * .google.type.TimeOfDay start_time = 1 [(.google.api.field_behavior) = REQUIRED]; */ @java.lang.Override public com.google.type.TimeOfDayOrBuilder getStartTimeOrBuilder() { return startTime_ == null ? com.google.type.TimeOfDay.getDefaultInstance() : startTime_; } public static final int DURATION_FIELD_NUMBER = 2; private com.google.protobuf.Duration duration_; /** * * *
   * Required. Specifies duration of the window.
   * Duration must be >= 5 minutes and < (target RPO - 20 minutes).
   * Additional restrictions based on the recurrence type to allow some time for
   * backup to happen:
   * - single_occurrence_date:  no restriction, but UI may warn about this when
   * duration >= target RPO
   * - daily window: duration < 24 hours
   * - weekly window:
   *   - days of week includes all seven days of a week: duration < 24 hours
   *   - all other weekly window: duration < 168 hours (i.e., 24 * 7 hours)
   * 
* * .google.protobuf.Duration duration = 2 [(.google.api.field_behavior) = REQUIRED]; * * @return Whether the duration field is set. */ @java.lang.Override public boolean hasDuration() { return ((bitField0_ & 0x00000002) != 0); } /** * * *
   * Required. Specifies duration of the window.
   * Duration must be >= 5 minutes and < (target RPO - 20 minutes).
   * Additional restrictions based on the recurrence type to allow some time for
   * backup to happen:
   * - single_occurrence_date:  no restriction, but UI may warn about this when
   * duration >= target RPO
   * - daily window: duration < 24 hours
   * - weekly window:
   *   - days of week includes all seven days of a week: duration < 24 hours
   *   - all other weekly window: duration < 168 hours (i.e., 24 * 7 hours)
   * 
* * .google.protobuf.Duration duration = 2 [(.google.api.field_behavior) = REQUIRED]; * * @return The duration. */ @java.lang.Override public com.google.protobuf.Duration getDuration() { return duration_ == null ? com.google.protobuf.Duration.getDefaultInstance() : duration_; } /** * * *
   * Required. Specifies duration of the window.
   * Duration must be >= 5 minutes and < (target RPO - 20 minutes).
   * Additional restrictions based on the recurrence type to allow some time for
   * backup to happen:
   * - single_occurrence_date:  no restriction, but UI may warn about this when
   * duration >= target RPO
   * - daily window: duration < 24 hours
   * - weekly window:
   *   - days of week includes all seven days of a week: duration < 24 hours
   *   - all other weekly window: duration < 168 hours (i.e., 24 * 7 hours)
   * 
* * .google.protobuf.Duration duration = 2 [(.google.api.field_behavior) = REQUIRED]; */ @java.lang.Override public com.google.protobuf.DurationOrBuilder getDurationOrBuilder() { return duration_ == null ? com.google.protobuf.Duration.getDefaultInstance() : duration_; } public static final int SINGLE_OCCURRENCE_DATE_FIELD_NUMBER = 3; /** * * *
   * No recurrence. The exclusion window occurs only once and on this
   * date in UTC.
   * 
* * .google.type.Date single_occurrence_date = 3; * * @return Whether the singleOccurrenceDate field is set. */ @java.lang.Override public boolean hasSingleOccurrenceDate() { return recurrenceCase_ == 3; } /** * * *
   * No recurrence. The exclusion window occurs only once and on this
   * date in UTC.
   * 
* * .google.type.Date single_occurrence_date = 3; * * @return The singleOccurrenceDate. */ @java.lang.Override public com.google.type.Date getSingleOccurrenceDate() { if (recurrenceCase_ == 3) { return (com.google.type.Date) recurrence_; } return com.google.type.Date.getDefaultInstance(); } /** * * *
   * No recurrence. The exclusion window occurs only once and on this
   * date in UTC.
   * 
* * .google.type.Date single_occurrence_date = 3; */ @java.lang.Override public com.google.type.DateOrBuilder getSingleOccurrenceDateOrBuilder() { if (recurrenceCase_ == 3) { return (com.google.type.Date) recurrence_; } return com.google.type.Date.getDefaultInstance(); } public static final int DAILY_FIELD_NUMBER = 4; /** * * *
   * The exclusion window occurs every day if set to "True".
   * Specifying this field to "False" is an error.
   * 
* * bool daily = 4; * * @return Whether the daily field is set. */ @java.lang.Override public boolean hasDaily() { return recurrenceCase_ == 4; } /** * * *
   * The exclusion window occurs every day if set to "True".
   * Specifying this field to "False" is an error.
   * 
* * bool daily = 4; * * @return The daily. */ @java.lang.Override public boolean getDaily() { if (recurrenceCase_ == 4) { return (java.lang.Boolean) recurrence_; } return false; } public static final int DAYS_OF_WEEK_FIELD_NUMBER = 5; /** * * *
   * The exclusion window occurs on these days of each week in UTC.
   * 
* * .google.cloud.gkebackup.v1.ExclusionWindow.DayOfWeekList days_of_week = 5; * * @return Whether the daysOfWeek field is set. */ @java.lang.Override public boolean hasDaysOfWeek() { return recurrenceCase_ == 5; } /** * * *
   * The exclusion window occurs on these days of each week in UTC.
   * 
* * .google.cloud.gkebackup.v1.ExclusionWindow.DayOfWeekList days_of_week = 5; * * @return The daysOfWeek. */ @java.lang.Override public com.google.cloud.gkebackup.v1.ExclusionWindow.DayOfWeekList getDaysOfWeek() { if (recurrenceCase_ == 5) { return (com.google.cloud.gkebackup.v1.ExclusionWindow.DayOfWeekList) recurrence_; } return com.google.cloud.gkebackup.v1.ExclusionWindow.DayOfWeekList.getDefaultInstance(); } /** * * *
   * The exclusion window occurs on these days of each week in UTC.
   * 
* * .google.cloud.gkebackup.v1.ExclusionWindow.DayOfWeekList days_of_week = 5; */ @java.lang.Override public com.google.cloud.gkebackup.v1.ExclusionWindow.DayOfWeekListOrBuilder getDaysOfWeekOrBuilder() { if (recurrenceCase_ == 5) { return (com.google.cloud.gkebackup.v1.ExclusionWindow.DayOfWeekList) recurrence_; } return com.google.cloud.gkebackup.v1.ExclusionWindow.DayOfWeekList.getDefaultInstance(); } private byte memoizedIsInitialized = -1; @java.lang.Override public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; if (isInitialized == 1) return true; if (isInitialized == 0) return false; memoizedIsInitialized = 1; return true; } @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { if (((bitField0_ & 0x00000001) != 0)) { output.writeMessage(1, getStartTime()); } if (((bitField0_ & 0x00000002) != 0)) { output.writeMessage(2, getDuration()); } if (recurrenceCase_ == 3) { output.writeMessage(3, (com.google.type.Date) recurrence_); } if (recurrenceCase_ == 4) { output.writeBool(4, (boolean) ((java.lang.Boolean) recurrence_)); } if (recurrenceCase_ == 5) { output.writeMessage( 5, (com.google.cloud.gkebackup.v1.ExclusionWindow.DayOfWeekList) recurrence_); } getUnknownFields().writeTo(output); } @java.lang.Override public int getSerializedSize() { int size = memoizedSize; if (size != -1) return size; size = 0; if (((bitField0_ & 0x00000001) != 0)) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getStartTime()); } if (((bitField0_ & 0x00000002) != 0)) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getDuration()); } if (recurrenceCase_ == 3) { size += com.google.protobuf.CodedOutputStream.computeMessageSize( 3, (com.google.type.Date) recurrence_); } if (recurrenceCase_ == 4) { size += com.google.protobuf.CodedOutputStream.computeBoolSize( 4, (boolean) ((java.lang.Boolean) recurrence_)); } if (recurrenceCase_ == 5) { size += com.google.protobuf.CodedOutputStream.computeMessageSize( 5, (com.google.cloud.gkebackup.v1.ExclusionWindow.DayOfWeekList) recurrence_); } size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @java.lang.Override public boolean equals(final java.lang.Object obj) { if (obj == this) { return true; } if (!(obj instanceof com.google.cloud.gkebackup.v1.ExclusionWindow)) { return super.equals(obj); } com.google.cloud.gkebackup.v1.ExclusionWindow other = (com.google.cloud.gkebackup.v1.ExclusionWindow) obj; if (hasStartTime() != other.hasStartTime()) return false; if (hasStartTime()) { if (!getStartTime().equals(other.getStartTime())) return false; } if (hasDuration() != other.hasDuration()) return false; if (hasDuration()) { if (!getDuration().equals(other.getDuration())) return false; } if (!getRecurrenceCase().equals(other.getRecurrenceCase())) return false; switch (recurrenceCase_) { case 3: if (!getSingleOccurrenceDate().equals(other.getSingleOccurrenceDate())) return false; break; case 4: if (getDaily() != other.getDaily()) return false; break; case 5: if (!getDaysOfWeek().equals(other.getDaysOfWeek())) return false; break; case 0: default: } if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @java.lang.Override public int hashCode() { if (memoizedHashCode != 0) { return memoizedHashCode; } int hash = 41; hash = (19 * hash) + getDescriptor().hashCode(); if (hasStartTime()) { hash = (37 * hash) + START_TIME_FIELD_NUMBER; hash = (53 * hash) + getStartTime().hashCode(); } if (hasDuration()) { hash = (37 * hash) + DURATION_FIELD_NUMBER; hash = (53 * hash) + getDuration().hashCode(); } switch (recurrenceCase_) { case 3: hash = (37 * hash) + SINGLE_OCCURRENCE_DATE_FIELD_NUMBER; hash = (53 * hash) + getSingleOccurrenceDate().hashCode(); break; case 4: hash = (37 * hash) + DAILY_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getDaily()); break; case 5: hash = (37 * hash) + DAYS_OF_WEEK_FIELD_NUMBER; hash = (53 * hash) + getDaysOfWeek().hashCode(); break; case 0: default: } hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } public static com.google.cloud.gkebackup.v1.ExclusionWindow parseFrom(java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.google.cloud.gkebackup.v1.ExclusionWindow parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static com.google.cloud.gkebackup.v1.ExclusionWindow parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.google.cloud.gkebackup.v1.ExclusionWindow parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static com.google.cloud.gkebackup.v1.ExclusionWindow parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.google.cloud.gkebackup.v1.ExclusionWindow parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static com.google.cloud.gkebackup.v1.ExclusionWindow parseFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); } public static com.google.cloud.gkebackup.v1.ExclusionWindow parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseWithIOException( PARSER, input, extensionRegistry); } public static com.google.cloud.gkebackup.v1.ExclusionWindow parseDelimitedFrom( java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); } public static com.google.cloud.gkebackup.v1.ExclusionWindow parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( PARSER, input, extensionRegistry); } public static com.google.cloud.gkebackup.v1.ExclusionWindow parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); } public static com.google.cloud.gkebackup.v1.ExclusionWindow parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseWithIOException( PARSER, input, extensionRegistry); } @java.lang.Override public Builder newBuilderForType() { return newBuilder(); } public static Builder newBuilder() { return DEFAULT_INSTANCE.toBuilder(); } public static Builder newBuilder(com.google.cloud.gkebackup.v1.ExclusionWindow prototype) { return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); } @java.lang.Override public Builder toBuilder() { return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); } @java.lang.Override protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } /** * * *
   * Defines a time window during which no backup should
   * happen. All time and date are in UTC.
   * 
* * Protobuf type {@code google.cloud.gkebackup.v1.ExclusionWindow} */ public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:google.cloud.gkebackup.v1.ExclusionWindow) com.google.cloud.gkebackup.v1.ExclusionWindowOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.gkebackup.v1.BackupPlanProto .internal_static_google_cloud_gkebackup_v1_ExclusionWindow_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.cloud.gkebackup.v1.BackupPlanProto .internal_static_google_cloud_gkebackup_v1_ExclusionWindow_fieldAccessorTable .ensureFieldAccessorsInitialized( com.google.cloud.gkebackup.v1.ExclusionWindow.class, com.google.cloud.gkebackup.v1.ExclusionWindow.Builder.class); } // Construct using com.google.cloud.gkebackup.v1.ExclusionWindow.newBuilder() private Builder() { maybeForceBuilderInitialization(); } private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } private void maybeForceBuilderInitialization() { if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { getStartTimeFieldBuilder(); getDurationFieldBuilder(); } } @java.lang.Override public Builder clear() { super.clear(); bitField0_ = 0; startTime_ = null; if (startTimeBuilder_ != null) { startTimeBuilder_.dispose(); startTimeBuilder_ = null; } duration_ = null; if (durationBuilder_ != null) { durationBuilder_.dispose(); durationBuilder_ = null; } if (singleOccurrenceDateBuilder_ != null) { singleOccurrenceDateBuilder_.clear(); } if (daysOfWeekBuilder_ != null) { daysOfWeekBuilder_.clear(); } recurrenceCase_ = 0; recurrence_ = null; return this; } @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return com.google.cloud.gkebackup.v1.BackupPlanProto .internal_static_google_cloud_gkebackup_v1_ExclusionWindow_descriptor; } @java.lang.Override public com.google.cloud.gkebackup.v1.ExclusionWindow getDefaultInstanceForType() { return com.google.cloud.gkebackup.v1.ExclusionWindow.getDefaultInstance(); } @java.lang.Override public com.google.cloud.gkebackup.v1.ExclusionWindow build() { com.google.cloud.gkebackup.v1.ExclusionWindow result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } @java.lang.Override public com.google.cloud.gkebackup.v1.ExclusionWindow buildPartial() { com.google.cloud.gkebackup.v1.ExclusionWindow result = new com.google.cloud.gkebackup.v1.ExclusionWindow(this); if (bitField0_ != 0) { buildPartial0(result); } buildPartialOneofs(result); onBuilt(); return result; } private void buildPartial0(com.google.cloud.gkebackup.v1.ExclusionWindow result) { int from_bitField0_ = bitField0_; int to_bitField0_ = 0; if (((from_bitField0_ & 0x00000001) != 0)) { result.startTime_ = startTimeBuilder_ == null ? startTime_ : startTimeBuilder_.build(); to_bitField0_ |= 0x00000001; } if (((from_bitField0_ & 0x00000002) != 0)) { result.duration_ = durationBuilder_ == null ? duration_ : durationBuilder_.build(); to_bitField0_ |= 0x00000002; } result.bitField0_ |= to_bitField0_; } private void buildPartialOneofs(com.google.cloud.gkebackup.v1.ExclusionWindow result) { result.recurrenceCase_ = recurrenceCase_; result.recurrence_ = this.recurrence_; if (recurrenceCase_ == 3 && singleOccurrenceDateBuilder_ != null) { result.recurrence_ = singleOccurrenceDateBuilder_.build(); } if (recurrenceCase_ == 5 && daysOfWeekBuilder_ != null) { result.recurrence_ = daysOfWeekBuilder_.build(); } } @java.lang.Override public Builder clone() { return super.clone(); } @java.lang.Override public Builder setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { return super.setField(field, value); } @java.lang.Override public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { return super.clearField(field); } @java.lang.Override public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { return super.clearOneof(oneof); } @java.lang.Override public Builder setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { return super.setRepeatedField(field, index, value); } @java.lang.Override public Builder addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { return super.addRepeatedField(field, value); } @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof com.google.cloud.gkebackup.v1.ExclusionWindow) { return mergeFrom((com.google.cloud.gkebackup.v1.ExclusionWindow) other); } else { super.mergeFrom(other); return this; } } public Builder mergeFrom(com.google.cloud.gkebackup.v1.ExclusionWindow other) { if (other == com.google.cloud.gkebackup.v1.ExclusionWindow.getDefaultInstance()) return this; if (other.hasStartTime()) { mergeStartTime(other.getStartTime()); } if (other.hasDuration()) { mergeDuration(other.getDuration()); } switch (other.getRecurrenceCase()) { case SINGLE_OCCURRENCE_DATE: { mergeSingleOccurrenceDate(other.getSingleOccurrenceDate()); break; } case DAILY: { setDaily(other.getDaily()); break; } case DAYS_OF_WEEK: { mergeDaysOfWeek(other.getDaysOfWeek()); break; } case RECURRENCE_NOT_SET: { break; } } this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @java.lang.Override public final boolean isInitialized() { return true; } @java.lang.Override public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { if (extensionRegistry == null) { throw new java.lang.NullPointerException(); } try { boolean done = false; while (!done) { int tag = input.readTag(); switch (tag) { case 0: done = true; break; case 10: { input.readMessage(getStartTimeFieldBuilder().getBuilder(), extensionRegistry); bitField0_ |= 0x00000001; break; } // case 10 case 18: { input.readMessage(getDurationFieldBuilder().getBuilder(), extensionRegistry); bitField0_ |= 0x00000002; break; } // case 18 case 26: { input.readMessage( getSingleOccurrenceDateFieldBuilder().getBuilder(), extensionRegistry); recurrenceCase_ = 3; break; } // case 26 case 32: { recurrence_ = input.readBool(); recurrenceCase_ = 4; break; } // case 32 case 42: { input.readMessage(getDaysOfWeekFieldBuilder().getBuilder(), extensionRegistry); recurrenceCase_ = 5; break; } // case 42 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { done = true; // was an endgroup tag } break; } // default: } // switch (tag) } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { throw e.unwrapIOException(); } finally { onChanged(); } // finally return this; } private int recurrenceCase_ = 0; private java.lang.Object recurrence_; public RecurrenceCase getRecurrenceCase() { return RecurrenceCase.forNumber(recurrenceCase_); } public Builder clearRecurrence() { recurrenceCase_ = 0; recurrence_ = null; onChanged(); return this; } private int bitField0_; private com.google.type.TimeOfDay startTime_; private com.google.protobuf.SingleFieldBuilderV3< com.google.type.TimeOfDay, com.google.type.TimeOfDay.Builder, com.google.type.TimeOfDayOrBuilder> startTimeBuilder_; /** * * *
     * Required. Specifies the start time of the window using time of the day in
     * UTC.
     * 
* * .google.type.TimeOfDay start_time = 1 [(.google.api.field_behavior) = REQUIRED]; * * @return Whether the startTime field is set. */ public boolean hasStartTime() { return ((bitField0_ & 0x00000001) != 0); } /** * * *
     * Required. Specifies the start time of the window using time of the day in
     * UTC.
     * 
* * .google.type.TimeOfDay start_time = 1 [(.google.api.field_behavior) = REQUIRED]; * * @return The startTime. */ public com.google.type.TimeOfDay getStartTime() { if (startTimeBuilder_ == null) { return startTime_ == null ? com.google.type.TimeOfDay.getDefaultInstance() : startTime_; } else { return startTimeBuilder_.getMessage(); } } /** * * *
     * Required. Specifies the start time of the window using time of the day in
     * UTC.
     * 
* * .google.type.TimeOfDay start_time = 1 [(.google.api.field_behavior) = REQUIRED]; */ public Builder setStartTime(com.google.type.TimeOfDay value) { if (startTimeBuilder_ == null) { if (value == null) { throw new NullPointerException(); } startTime_ = value; } else { startTimeBuilder_.setMessage(value); } bitField0_ |= 0x00000001; onChanged(); return this; } /** * * *
     * Required. Specifies the start time of the window using time of the day in
     * UTC.
     * 
* * .google.type.TimeOfDay start_time = 1 [(.google.api.field_behavior) = REQUIRED]; */ public Builder setStartTime(com.google.type.TimeOfDay.Builder builderForValue) { if (startTimeBuilder_ == null) { startTime_ = builderForValue.build(); } else { startTimeBuilder_.setMessage(builderForValue.build()); } bitField0_ |= 0x00000001; onChanged(); return this; } /** * * *
     * Required. Specifies the start time of the window using time of the day in
     * UTC.
     * 
* * .google.type.TimeOfDay start_time = 1 [(.google.api.field_behavior) = REQUIRED]; */ public Builder mergeStartTime(com.google.type.TimeOfDay value) { if (startTimeBuilder_ == null) { if (((bitField0_ & 0x00000001) != 0) && startTime_ != null && startTime_ != com.google.type.TimeOfDay.getDefaultInstance()) { getStartTimeBuilder().mergeFrom(value); } else { startTime_ = value; } } else { startTimeBuilder_.mergeFrom(value); } if (startTime_ != null) { bitField0_ |= 0x00000001; onChanged(); } return this; } /** * * *
     * Required. Specifies the start time of the window using time of the day in
     * UTC.
     * 
* * .google.type.TimeOfDay start_time = 1 [(.google.api.field_behavior) = REQUIRED]; */ public Builder clearStartTime() { bitField0_ = (bitField0_ & ~0x00000001); startTime_ = null; if (startTimeBuilder_ != null) { startTimeBuilder_.dispose(); startTimeBuilder_ = null; } onChanged(); return this; } /** * * *
     * Required. Specifies the start time of the window using time of the day in
     * UTC.
     * 
* * .google.type.TimeOfDay start_time = 1 [(.google.api.field_behavior) = REQUIRED]; */ public com.google.type.TimeOfDay.Builder getStartTimeBuilder() { bitField0_ |= 0x00000001; onChanged(); return getStartTimeFieldBuilder().getBuilder(); } /** * * *
     * Required. Specifies the start time of the window using time of the day in
     * UTC.
     * 
* * .google.type.TimeOfDay start_time = 1 [(.google.api.field_behavior) = REQUIRED]; */ public com.google.type.TimeOfDayOrBuilder getStartTimeOrBuilder() { if (startTimeBuilder_ != null) { return startTimeBuilder_.getMessageOrBuilder(); } else { return startTime_ == null ? com.google.type.TimeOfDay.getDefaultInstance() : startTime_; } } /** * * *
     * Required. Specifies the start time of the window using time of the day in
     * UTC.
     * 
* * .google.type.TimeOfDay start_time = 1 [(.google.api.field_behavior) = REQUIRED]; */ private com.google.protobuf.SingleFieldBuilderV3< com.google.type.TimeOfDay, com.google.type.TimeOfDay.Builder, com.google.type.TimeOfDayOrBuilder> getStartTimeFieldBuilder() { if (startTimeBuilder_ == null) { startTimeBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< com.google.type.TimeOfDay, com.google.type.TimeOfDay.Builder, com.google.type.TimeOfDayOrBuilder>( getStartTime(), getParentForChildren(), isClean()); startTime_ = null; } return startTimeBuilder_; } private com.google.protobuf.Duration duration_; private com.google.protobuf.SingleFieldBuilderV3< com.google.protobuf.Duration, com.google.protobuf.Duration.Builder, com.google.protobuf.DurationOrBuilder> durationBuilder_; /** * * *
     * Required. Specifies duration of the window.
     * Duration must be >= 5 minutes and < (target RPO - 20 minutes).
     * Additional restrictions based on the recurrence type to allow some time for
     * backup to happen:
     * - single_occurrence_date:  no restriction, but UI may warn about this when
     * duration >= target RPO
     * - daily window: duration < 24 hours
     * - weekly window:
     *   - days of week includes all seven days of a week: duration < 24 hours
     *   - all other weekly window: duration < 168 hours (i.e., 24 * 7 hours)
     * 
* * .google.protobuf.Duration duration = 2 [(.google.api.field_behavior) = REQUIRED]; * * * @return Whether the duration field is set. */ public boolean hasDuration() { return ((bitField0_ & 0x00000002) != 0); } /** * * *
     * Required. Specifies duration of the window.
     * Duration must be >= 5 minutes and < (target RPO - 20 minutes).
     * Additional restrictions based on the recurrence type to allow some time for
     * backup to happen:
     * - single_occurrence_date:  no restriction, but UI may warn about this when
     * duration >= target RPO
     * - daily window: duration < 24 hours
     * - weekly window:
     *   - days of week includes all seven days of a week: duration < 24 hours
     *   - all other weekly window: duration < 168 hours (i.e., 24 * 7 hours)
     * 
* * .google.protobuf.Duration duration = 2 [(.google.api.field_behavior) = REQUIRED]; * * * @return The duration. */ public com.google.protobuf.Duration getDuration() { if (durationBuilder_ == null) { return duration_ == null ? com.google.protobuf.Duration.getDefaultInstance() : duration_; } else { return durationBuilder_.getMessage(); } } /** * * *
     * Required. Specifies duration of the window.
     * Duration must be >= 5 minutes and < (target RPO - 20 minutes).
     * Additional restrictions based on the recurrence type to allow some time for
     * backup to happen:
     * - single_occurrence_date:  no restriction, but UI may warn about this when
     * duration >= target RPO
     * - daily window: duration < 24 hours
     * - weekly window:
     *   - days of week includes all seven days of a week: duration < 24 hours
     *   - all other weekly window: duration < 168 hours (i.e., 24 * 7 hours)
     * 
* * .google.protobuf.Duration duration = 2 [(.google.api.field_behavior) = REQUIRED]; * */ public Builder setDuration(com.google.protobuf.Duration value) { if (durationBuilder_ == null) { if (value == null) { throw new NullPointerException(); } duration_ = value; } else { durationBuilder_.setMessage(value); } bitField0_ |= 0x00000002; onChanged(); return this; } /** * * *
     * Required. Specifies duration of the window.
     * Duration must be >= 5 minutes and < (target RPO - 20 minutes).
     * Additional restrictions based on the recurrence type to allow some time for
     * backup to happen:
     * - single_occurrence_date:  no restriction, but UI may warn about this when
     * duration >= target RPO
     * - daily window: duration < 24 hours
     * - weekly window:
     *   - days of week includes all seven days of a week: duration < 24 hours
     *   - all other weekly window: duration < 168 hours (i.e., 24 * 7 hours)
     * 
* * .google.protobuf.Duration duration = 2 [(.google.api.field_behavior) = REQUIRED]; * */ public Builder setDuration(com.google.protobuf.Duration.Builder builderForValue) { if (durationBuilder_ == null) { duration_ = builderForValue.build(); } else { durationBuilder_.setMessage(builderForValue.build()); } bitField0_ |= 0x00000002; onChanged(); return this; } /** * * *
     * Required. Specifies duration of the window.
     * Duration must be >= 5 minutes and < (target RPO - 20 minutes).
     * Additional restrictions based on the recurrence type to allow some time for
     * backup to happen:
     * - single_occurrence_date:  no restriction, but UI may warn about this when
     * duration >= target RPO
     * - daily window: duration < 24 hours
     * - weekly window:
     *   - days of week includes all seven days of a week: duration < 24 hours
     *   - all other weekly window: duration < 168 hours (i.e., 24 * 7 hours)
     * 
* * .google.protobuf.Duration duration = 2 [(.google.api.field_behavior) = REQUIRED]; * */ public Builder mergeDuration(com.google.protobuf.Duration value) { if (durationBuilder_ == null) { if (((bitField0_ & 0x00000002) != 0) && duration_ != null && duration_ != com.google.protobuf.Duration.getDefaultInstance()) { getDurationBuilder().mergeFrom(value); } else { duration_ = value; } } else { durationBuilder_.mergeFrom(value); } if (duration_ != null) { bitField0_ |= 0x00000002; onChanged(); } return this; } /** * * *
     * Required. Specifies duration of the window.
     * Duration must be >= 5 minutes and < (target RPO - 20 minutes).
     * Additional restrictions based on the recurrence type to allow some time for
     * backup to happen:
     * - single_occurrence_date:  no restriction, but UI may warn about this when
     * duration >= target RPO
     * - daily window: duration < 24 hours
     * - weekly window:
     *   - days of week includes all seven days of a week: duration < 24 hours
     *   - all other weekly window: duration < 168 hours (i.e., 24 * 7 hours)
     * 
* * .google.protobuf.Duration duration = 2 [(.google.api.field_behavior) = REQUIRED]; * */ public Builder clearDuration() { bitField0_ = (bitField0_ & ~0x00000002); duration_ = null; if (durationBuilder_ != null) { durationBuilder_.dispose(); durationBuilder_ = null; } onChanged(); return this; } /** * * *
     * Required. Specifies duration of the window.
     * Duration must be >= 5 minutes and < (target RPO - 20 minutes).
     * Additional restrictions based on the recurrence type to allow some time for
     * backup to happen:
     * - single_occurrence_date:  no restriction, but UI may warn about this when
     * duration >= target RPO
     * - daily window: duration < 24 hours
     * - weekly window:
     *   - days of week includes all seven days of a week: duration < 24 hours
     *   - all other weekly window: duration < 168 hours (i.e., 24 * 7 hours)
     * 
* * .google.protobuf.Duration duration = 2 [(.google.api.field_behavior) = REQUIRED]; * */ public com.google.protobuf.Duration.Builder getDurationBuilder() { bitField0_ |= 0x00000002; onChanged(); return getDurationFieldBuilder().getBuilder(); } /** * * *
     * Required. Specifies duration of the window.
     * Duration must be >= 5 minutes and < (target RPO - 20 minutes).
     * Additional restrictions based on the recurrence type to allow some time for
     * backup to happen:
     * - single_occurrence_date:  no restriction, but UI may warn about this when
     * duration >= target RPO
     * - daily window: duration < 24 hours
     * - weekly window:
     *   - days of week includes all seven days of a week: duration < 24 hours
     *   - all other weekly window: duration < 168 hours (i.e., 24 * 7 hours)
     * 
* * .google.protobuf.Duration duration = 2 [(.google.api.field_behavior) = REQUIRED]; * */ public com.google.protobuf.DurationOrBuilder getDurationOrBuilder() { if (durationBuilder_ != null) { return durationBuilder_.getMessageOrBuilder(); } else { return duration_ == null ? com.google.protobuf.Duration.getDefaultInstance() : duration_; } } /** * * *
     * Required. Specifies duration of the window.
     * Duration must be >= 5 minutes and < (target RPO - 20 minutes).
     * Additional restrictions based on the recurrence type to allow some time for
     * backup to happen:
     * - single_occurrence_date:  no restriction, but UI may warn about this when
     * duration >= target RPO
     * - daily window: duration < 24 hours
     * - weekly window:
     *   - days of week includes all seven days of a week: duration < 24 hours
     *   - all other weekly window: duration < 168 hours (i.e., 24 * 7 hours)
     * 
* * .google.protobuf.Duration duration = 2 [(.google.api.field_behavior) = REQUIRED]; * */ private com.google.protobuf.SingleFieldBuilderV3< com.google.protobuf.Duration, com.google.protobuf.Duration.Builder, com.google.protobuf.DurationOrBuilder> getDurationFieldBuilder() { if (durationBuilder_ == null) { durationBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< com.google.protobuf.Duration, com.google.protobuf.Duration.Builder, com.google.protobuf.DurationOrBuilder>( getDuration(), getParentForChildren(), isClean()); duration_ = null; } return durationBuilder_; } private com.google.protobuf.SingleFieldBuilderV3< com.google.type.Date, com.google.type.Date.Builder, com.google.type.DateOrBuilder> singleOccurrenceDateBuilder_; /** * * *
     * No recurrence. The exclusion window occurs only once and on this
     * date in UTC.
     * 
* * .google.type.Date single_occurrence_date = 3; * * @return Whether the singleOccurrenceDate field is set. */ @java.lang.Override public boolean hasSingleOccurrenceDate() { return recurrenceCase_ == 3; } /** * * *
     * No recurrence. The exclusion window occurs only once and on this
     * date in UTC.
     * 
* * .google.type.Date single_occurrence_date = 3; * * @return The singleOccurrenceDate. */ @java.lang.Override public com.google.type.Date getSingleOccurrenceDate() { if (singleOccurrenceDateBuilder_ == null) { if (recurrenceCase_ == 3) { return (com.google.type.Date) recurrence_; } return com.google.type.Date.getDefaultInstance(); } else { if (recurrenceCase_ == 3) { return singleOccurrenceDateBuilder_.getMessage(); } return com.google.type.Date.getDefaultInstance(); } } /** * * *
     * No recurrence. The exclusion window occurs only once and on this
     * date in UTC.
     * 
* * .google.type.Date single_occurrence_date = 3; */ public Builder setSingleOccurrenceDate(com.google.type.Date value) { if (singleOccurrenceDateBuilder_ == null) { if (value == null) { throw new NullPointerException(); } recurrence_ = value; onChanged(); } else { singleOccurrenceDateBuilder_.setMessage(value); } recurrenceCase_ = 3; return this; } /** * * *
     * No recurrence. The exclusion window occurs only once and on this
     * date in UTC.
     * 
* * .google.type.Date single_occurrence_date = 3; */ public Builder setSingleOccurrenceDate(com.google.type.Date.Builder builderForValue) { if (singleOccurrenceDateBuilder_ == null) { recurrence_ = builderForValue.build(); onChanged(); } else { singleOccurrenceDateBuilder_.setMessage(builderForValue.build()); } recurrenceCase_ = 3; return this; } /** * * *
     * No recurrence. The exclusion window occurs only once and on this
     * date in UTC.
     * 
* * .google.type.Date single_occurrence_date = 3; */ public Builder mergeSingleOccurrenceDate(com.google.type.Date value) { if (singleOccurrenceDateBuilder_ == null) { if (recurrenceCase_ == 3 && recurrence_ != com.google.type.Date.getDefaultInstance()) { recurrence_ = com.google.type.Date.newBuilder((com.google.type.Date) recurrence_) .mergeFrom(value) .buildPartial(); } else { recurrence_ = value; } onChanged(); } else { if (recurrenceCase_ == 3) { singleOccurrenceDateBuilder_.mergeFrom(value); } else { singleOccurrenceDateBuilder_.setMessage(value); } } recurrenceCase_ = 3; return this; } /** * * *
     * No recurrence. The exclusion window occurs only once and on this
     * date in UTC.
     * 
* * .google.type.Date single_occurrence_date = 3; */ public Builder clearSingleOccurrenceDate() { if (singleOccurrenceDateBuilder_ == null) { if (recurrenceCase_ == 3) { recurrenceCase_ = 0; recurrence_ = null; onChanged(); } } else { if (recurrenceCase_ == 3) { recurrenceCase_ = 0; recurrence_ = null; } singleOccurrenceDateBuilder_.clear(); } return this; } /** * * *
     * No recurrence. The exclusion window occurs only once and on this
     * date in UTC.
     * 
* * .google.type.Date single_occurrence_date = 3; */ public com.google.type.Date.Builder getSingleOccurrenceDateBuilder() { return getSingleOccurrenceDateFieldBuilder().getBuilder(); } /** * * *
     * No recurrence. The exclusion window occurs only once and on this
     * date in UTC.
     * 
* * .google.type.Date single_occurrence_date = 3; */ @java.lang.Override public com.google.type.DateOrBuilder getSingleOccurrenceDateOrBuilder() { if ((recurrenceCase_ == 3) && (singleOccurrenceDateBuilder_ != null)) { return singleOccurrenceDateBuilder_.getMessageOrBuilder(); } else { if (recurrenceCase_ == 3) { return (com.google.type.Date) recurrence_; } return com.google.type.Date.getDefaultInstance(); } } /** * * *
     * No recurrence. The exclusion window occurs only once and on this
     * date in UTC.
     * 
* * .google.type.Date single_occurrence_date = 3; */ private com.google.protobuf.SingleFieldBuilderV3< com.google.type.Date, com.google.type.Date.Builder, com.google.type.DateOrBuilder> getSingleOccurrenceDateFieldBuilder() { if (singleOccurrenceDateBuilder_ == null) { if (!(recurrenceCase_ == 3)) { recurrence_ = com.google.type.Date.getDefaultInstance(); } singleOccurrenceDateBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< com.google.type.Date, com.google.type.Date.Builder, com.google.type.DateOrBuilder>( (com.google.type.Date) recurrence_, getParentForChildren(), isClean()); recurrence_ = null; } recurrenceCase_ = 3; onChanged(); return singleOccurrenceDateBuilder_; } /** * * *
     * The exclusion window occurs every day if set to "True".
     * Specifying this field to "False" is an error.
     * 
* * bool daily = 4; * * @return Whether the daily field is set. */ public boolean hasDaily() { return recurrenceCase_ == 4; } /** * * *
     * The exclusion window occurs every day if set to "True".
     * Specifying this field to "False" is an error.
     * 
* * bool daily = 4; * * @return The daily. */ public boolean getDaily() { if (recurrenceCase_ == 4) { return (java.lang.Boolean) recurrence_; } return false; } /** * * *
     * The exclusion window occurs every day if set to "True".
     * Specifying this field to "False" is an error.
     * 
* * bool daily = 4; * * @param value The daily to set. * @return This builder for chaining. */ public Builder setDaily(boolean value) { recurrenceCase_ = 4; recurrence_ = value; onChanged(); return this; } /** * * *
     * The exclusion window occurs every day if set to "True".
     * Specifying this field to "False" is an error.
     * 
* * bool daily = 4; * * @return This builder for chaining. */ public Builder clearDaily() { if (recurrenceCase_ == 4) { recurrenceCase_ = 0; recurrence_ = null; onChanged(); } return this; } private com.google.protobuf.SingleFieldBuilderV3< com.google.cloud.gkebackup.v1.ExclusionWindow.DayOfWeekList, com.google.cloud.gkebackup.v1.ExclusionWindow.DayOfWeekList.Builder, com.google.cloud.gkebackup.v1.ExclusionWindow.DayOfWeekListOrBuilder> daysOfWeekBuilder_; /** * * *
     * The exclusion window occurs on these days of each week in UTC.
     * 
* * .google.cloud.gkebackup.v1.ExclusionWindow.DayOfWeekList days_of_week = 5; * * @return Whether the daysOfWeek field is set. */ @java.lang.Override public boolean hasDaysOfWeek() { return recurrenceCase_ == 5; } /** * * *
     * The exclusion window occurs on these days of each week in UTC.
     * 
* * .google.cloud.gkebackup.v1.ExclusionWindow.DayOfWeekList days_of_week = 5; * * @return The daysOfWeek. */ @java.lang.Override public com.google.cloud.gkebackup.v1.ExclusionWindow.DayOfWeekList getDaysOfWeek() { if (daysOfWeekBuilder_ == null) { if (recurrenceCase_ == 5) { return (com.google.cloud.gkebackup.v1.ExclusionWindow.DayOfWeekList) recurrence_; } return com.google.cloud.gkebackup.v1.ExclusionWindow.DayOfWeekList.getDefaultInstance(); } else { if (recurrenceCase_ == 5) { return daysOfWeekBuilder_.getMessage(); } return com.google.cloud.gkebackup.v1.ExclusionWindow.DayOfWeekList.getDefaultInstance(); } } /** * * *
     * The exclusion window occurs on these days of each week in UTC.
     * 
* * .google.cloud.gkebackup.v1.ExclusionWindow.DayOfWeekList days_of_week = 5; */ public Builder setDaysOfWeek( com.google.cloud.gkebackup.v1.ExclusionWindow.DayOfWeekList value) { if (daysOfWeekBuilder_ == null) { if (value == null) { throw new NullPointerException(); } recurrence_ = value; onChanged(); } else { daysOfWeekBuilder_.setMessage(value); } recurrenceCase_ = 5; return this; } /** * * *
     * The exclusion window occurs on these days of each week in UTC.
     * 
* * .google.cloud.gkebackup.v1.ExclusionWindow.DayOfWeekList days_of_week = 5; */ public Builder setDaysOfWeek( com.google.cloud.gkebackup.v1.ExclusionWindow.DayOfWeekList.Builder builderForValue) { if (daysOfWeekBuilder_ == null) { recurrence_ = builderForValue.build(); onChanged(); } else { daysOfWeekBuilder_.setMessage(builderForValue.build()); } recurrenceCase_ = 5; return this; } /** * * *
     * The exclusion window occurs on these days of each week in UTC.
     * 
* * .google.cloud.gkebackup.v1.ExclusionWindow.DayOfWeekList days_of_week = 5; */ public Builder mergeDaysOfWeek( com.google.cloud.gkebackup.v1.ExclusionWindow.DayOfWeekList value) { if (daysOfWeekBuilder_ == null) { if (recurrenceCase_ == 5 && recurrence_ != com.google.cloud.gkebackup.v1.ExclusionWindow.DayOfWeekList .getDefaultInstance()) { recurrence_ = com.google.cloud.gkebackup.v1.ExclusionWindow.DayOfWeekList.newBuilder( (com.google.cloud.gkebackup.v1.ExclusionWindow.DayOfWeekList) recurrence_) .mergeFrom(value) .buildPartial(); } else { recurrence_ = value; } onChanged(); } else { if (recurrenceCase_ == 5) { daysOfWeekBuilder_.mergeFrom(value); } else { daysOfWeekBuilder_.setMessage(value); } } recurrenceCase_ = 5; return this; } /** * * *
     * The exclusion window occurs on these days of each week in UTC.
     * 
* * .google.cloud.gkebackup.v1.ExclusionWindow.DayOfWeekList days_of_week = 5; */ public Builder clearDaysOfWeek() { if (daysOfWeekBuilder_ == null) { if (recurrenceCase_ == 5) { recurrenceCase_ = 0; recurrence_ = null; onChanged(); } } else { if (recurrenceCase_ == 5) { recurrenceCase_ = 0; recurrence_ = null; } daysOfWeekBuilder_.clear(); } return this; } /** * * *
     * The exclusion window occurs on these days of each week in UTC.
     * 
* * .google.cloud.gkebackup.v1.ExclusionWindow.DayOfWeekList days_of_week = 5; */ public com.google.cloud.gkebackup.v1.ExclusionWindow.DayOfWeekList.Builder getDaysOfWeekBuilder() { return getDaysOfWeekFieldBuilder().getBuilder(); } /** * * *
     * The exclusion window occurs on these days of each week in UTC.
     * 
* * .google.cloud.gkebackup.v1.ExclusionWindow.DayOfWeekList days_of_week = 5; */ @java.lang.Override public com.google.cloud.gkebackup.v1.ExclusionWindow.DayOfWeekListOrBuilder getDaysOfWeekOrBuilder() { if ((recurrenceCase_ == 5) && (daysOfWeekBuilder_ != null)) { return daysOfWeekBuilder_.getMessageOrBuilder(); } else { if (recurrenceCase_ == 5) { return (com.google.cloud.gkebackup.v1.ExclusionWindow.DayOfWeekList) recurrence_; } return com.google.cloud.gkebackup.v1.ExclusionWindow.DayOfWeekList.getDefaultInstance(); } } /** * * *
     * The exclusion window occurs on these days of each week in UTC.
     * 
* * .google.cloud.gkebackup.v1.ExclusionWindow.DayOfWeekList days_of_week = 5; */ private com.google.protobuf.SingleFieldBuilderV3< com.google.cloud.gkebackup.v1.ExclusionWindow.DayOfWeekList, com.google.cloud.gkebackup.v1.ExclusionWindow.DayOfWeekList.Builder, com.google.cloud.gkebackup.v1.ExclusionWindow.DayOfWeekListOrBuilder> getDaysOfWeekFieldBuilder() { if (daysOfWeekBuilder_ == null) { if (!(recurrenceCase_ == 5)) { recurrence_ = com.google.cloud.gkebackup.v1.ExclusionWindow.DayOfWeekList.getDefaultInstance(); } daysOfWeekBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< com.google.cloud.gkebackup.v1.ExclusionWindow.DayOfWeekList, com.google.cloud.gkebackup.v1.ExclusionWindow.DayOfWeekList.Builder, com.google.cloud.gkebackup.v1.ExclusionWindow.DayOfWeekListOrBuilder>( (com.google.cloud.gkebackup.v1.ExclusionWindow.DayOfWeekList) recurrence_, getParentForChildren(), isClean()); recurrence_ = null; } recurrenceCase_ = 5; onChanged(); return daysOfWeekBuilder_; } @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { return super.setUnknownFields(unknownFields); } @java.lang.Override public final Builder mergeUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { return super.mergeUnknownFields(unknownFields); } // @@protoc_insertion_point(builder_scope:google.cloud.gkebackup.v1.ExclusionWindow) } // @@protoc_insertion_point(class_scope:google.cloud.gkebackup.v1.ExclusionWindow) private static final com.google.cloud.gkebackup.v1.ExclusionWindow DEFAULT_INSTANCE; static { DEFAULT_INSTANCE = new com.google.cloud.gkebackup.v1.ExclusionWindow(); } public static com.google.cloud.gkebackup.v1.ExclusionWindow getDefaultInstance() { return DEFAULT_INSTANCE; } private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { @java.lang.Override public ExclusionWindow parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { Builder builder = newBuilder(); try { builder.mergeFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { throw e.setUnfinishedMessage(builder.buildPartial()); } catch (com.google.protobuf.UninitializedMessageException e) { throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); } catch (java.io.IOException e) { throw new com.google.protobuf.InvalidProtocolBufferException(e) .setUnfinishedMessage(builder.buildPartial()); } return builder.buildPartial(); } }; public static com.google.protobuf.Parser parser() { return PARSER; } @java.lang.Override public com.google.protobuf.Parser getParserForType() { return PARSER; } @java.lang.Override public com.google.cloud.gkebackup.v1.ExclusionWindow getDefaultInstanceForType() { return DEFAULT_INSTANCE; } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy