com.google.cloud.gkebackup.v1.RpoConfig Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of proto-google-cloud-gke-backup-v1 Show documentation
Show all versions of proto-google-cloud-gke-backup-v1 Show documentation
Proto library for google-cloud-gke-backup
/*
* 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.4
package com.google.cloud.gkebackup.v1;
/**
*
*
*
* Defines RPO scheduling configuration for automatically creating
* Backups via this BackupPlan.
*
*
* Protobuf type {@code google.cloud.gkebackup.v1.RpoConfig}
*/
public final class RpoConfig extends com.google.protobuf.GeneratedMessageV3
implements
// @@protoc_insertion_point(message_implements:google.cloud.gkebackup.v1.RpoConfig)
RpoConfigOrBuilder {
private static final long serialVersionUID = 0L;
// Use RpoConfig.newBuilder() to construct.
private RpoConfig(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private RpoConfig() {
exclusionWindows_ = java.util.Collections.emptyList();
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(UnusedPrivateParameter unused) {
return new RpoConfig();
}
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
return com.google.cloud.gkebackup.v1.BackupPlanProto
.internal_static_google_cloud_gkebackup_v1_RpoConfig_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.google.cloud.gkebackup.v1.BackupPlanProto
.internal_static_google_cloud_gkebackup_v1_RpoConfig_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.google.cloud.gkebackup.v1.RpoConfig.class,
com.google.cloud.gkebackup.v1.RpoConfig.Builder.class);
}
public static final int TARGET_RPO_MINUTES_FIELD_NUMBER = 1;
private int targetRpoMinutes_ = 0;
/**
*
*
*
* Required. Defines the target RPO for the BackupPlan in minutes, which means
* the target maximum data loss in time that is acceptable for this
* BackupPlan. This must be at least 60, i.e., 1 hour, and at most 86400,
* i.e., 60 days.
*
*
* int32 target_rpo_minutes = 1 [(.google.api.field_behavior) = REQUIRED];
*
* @return The targetRpoMinutes.
*/
@java.lang.Override
public int getTargetRpoMinutes() {
return targetRpoMinutes_;
}
public static final int EXCLUSION_WINDOWS_FIELD_NUMBER = 2;
@SuppressWarnings("serial")
private java.util.List exclusionWindows_;
/**
*
*
*
* Optional. User specified time windows during which backup can NOT happen
* for this BackupPlan - backups should start and finish outside of any given
* exclusion window. Note: backup jobs will be scheduled to start and
* finish outside the duration of the window as much as possible, but
* running jobs will not get canceled when it runs into the window.
* All the time and date values in exclusion_windows entry in the API are in
* UTC.
* We only allow <=1 recurrence (daily or weekly) exclusion window for a
* BackupPlan while no restriction on number of single occurrence
* windows.
*
*
*
* repeated .google.cloud.gkebackup.v1.ExclusionWindow exclusion_windows = 2 [(.google.api.field_behavior) = OPTIONAL];
*
*/
@java.lang.Override
public java.util.List getExclusionWindowsList() {
return exclusionWindows_;
}
/**
*
*
*
* Optional. User specified time windows during which backup can NOT happen
* for this BackupPlan - backups should start and finish outside of any given
* exclusion window. Note: backup jobs will be scheduled to start and
* finish outside the duration of the window as much as possible, but
* running jobs will not get canceled when it runs into the window.
* All the time and date values in exclusion_windows entry in the API are in
* UTC.
* We only allow <=1 recurrence (daily or weekly) exclusion window for a
* BackupPlan while no restriction on number of single occurrence
* windows.
*
*
*
* repeated .google.cloud.gkebackup.v1.ExclusionWindow exclusion_windows = 2 [(.google.api.field_behavior) = OPTIONAL];
*
*/
@java.lang.Override
public java.util.List extends com.google.cloud.gkebackup.v1.ExclusionWindowOrBuilder>
getExclusionWindowsOrBuilderList() {
return exclusionWindows_;
}
/**
*
*
*
* Optional. User specified time windows during which backup can NOT happen
* for this BackupPlan - backups should start and finish outside of any given
* exclusion window. Note: backup jobs will be scheduled to start and
* finish outside the duration of the window as much as possible, but
* running jobs will not get canceled when it runs into the window.
* All the time and date values in exclusion_windows entry in the API are in
* UTC.
* We only allow <=1 recurrence (daily or weekly) exclusion window for a
* BackupPlan while no restriction on number of single occurrence
* windows.
*
*
*
* repeated .google.cloud.gkebackup.v1.ExclusionWindow exclusion_windows = 2 [(.google.api.field_behavior) = OPTIONAL];
*
*/
@java.lang.Override
public int getExclusionWindowsCount() {
return exclusionWindows_.size();
}
/**
*
*
*
* Optional. User specified time windows during which backup can NOT happen
* for this BackupPlan - backups should start and finish outside of any given
* exclusion window. Note: backup jobs will be scheduled to start and
* finish outside the duration of the window as much as possible, but
* running jobs will not get canceled when it runs into the window.
* All the time and date values in exclusion_windows entry in the API are in
* UTC.
* We only allow <=1 recurrence (daily or weekly) exclusion window for a
* BackupPlan while no restriction on number of single occurrence
* windows.
*
*
*
* repeated .google.cloud.gkebackup.v1.ExclusionWindow exclusion_windows = 2 [(.google.api.field_behavior) = OPTIONAL];
*
*/
@java.lang.Override
public com.google.cloud.gkebackup.v1.ExclusionWindow getExclusionWindows(int index) {
return exclusionWindows_.get(index);
}
/**
*
*
*
* Optional. User specified time windows during which backup can NOT happen
* for this BackupPlan - backups should start and finish outside of any given
* exclusion window. Note: backup jobs will be scheduled to start and
* finish outside the duration of the window as much as possible, but
* running jobs will not get canceled when it runs into the window.
* All the time and date values in exclusion_windows entry in the API are in
* UTC.
* We only allow <=1 recurrence (daily or weekly) exclusion window for a
* BackupPlan while no restriction on number of single occurrence
* windows.
*
*
*
* repeated .google.cloud.gkebackup.v1.ExclusionWindow exclusion_windows = 2 [(.google.api.field_behavior) = OPTIONAL];
*
*/
@java.lang.Override
public com.google.cloud.gkebackup.v1.ExclusionWindowOrBuilder getExclusionWindowsOrBuilder(
int index) {
return exclusionWindows_.get(index);
}
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 (targetRpoMinutes_ != 0) {
output.writeInt32(1, targetRpoMinutes_);
}
for (int i = 0; i < exclusionWindows_.size(); i++) {
output.writeMessage(2, exclusionWindows_.get(i));
}
getUnknownFields().writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (targetRpoMinutes_ != 0) {
size += com.google.protobuf.CodedOutputStream.computeInt32Size(1, targetRpoMinutes_);
}
for (int i = 0; i < exclusionWindows_.size(); i++) {
size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, exclusionWindows_.get(i));
}
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.RpoConfig)) {
return super.equals(obj);
}
com.google.cloud.gkebackup.v1.RpoConfig other = (com.google.cloud.gkebackup.v1.RpoConfig) obj;
if (getTargetRpoMinutes() != other.getTargetRpoMinutes()) return false;
if (!getExclusionWindowsList().equals(other.getExclusionWindowsList())) 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();
hash = (37 * hash) + TARGET_RPO_MINUTES_FIELD_NUMBER;
hash = (53 * hash) + getTargetRpoMinutes();
if (getExclusionWindowsCount() > 0) {
hash = (37 * hash) + EXCLUSION_WINDOWS_FIELD_NUMBER;
hash = (53 * hash) + getExclusionWindowsList().hashCode();
}
hash = (29 * hash) + getUnknownFields().hashCode();
memoizedHashCode = hash;
return hash;
}
public static com.google.cloud.gkebackup.v1.RpoConfig parseFrom(java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.cloud.gkebackup.v1.RpoConfig 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.RpoConfig parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.cloud.gkebackup.v1.RpoConfig 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.RpoConfig parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.cloud.gkebackup.v1.RpoConfig 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.RpoConfig parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
}
public static com.google.cloud.gkebackup.v1.RpoConfig 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.RpoConfig parseDelimitedFrom(
java.io.InputStream input) throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input);
}
public static com.google.cloud.gkebackup.v1.RpoConfig 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.RpoConfig 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.RpoConfig 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.RpoConfig 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 RPO scheduling configuration for automatically creating
* Backups via this BackupPlan.
*
*
* Protobuf type {@code google.cloud.gkebackup.v1.RpoConfig}
*/
public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder
implements
// @@protoc_insertion_point(builder_implements:google.cloud.gkebackup.v1.RpoConfig)
com.google.cloud.gkebackup.v1.RpoConfigOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
return com.google.cloud.gkebackup.v1.BackupPlanProto
.internal_static_google_cloud_gkebackup_v1_RpoConfig_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.google.cloud.gkebackup.v1.BackupPlanProto
.internal_static_google_cloud_gkebackup_v1_RpoConfig_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.google.cloud.gkebackup.v1.RpoConfig.class,
com.google.cloud.gkebackup.v1.RpoConfig.Builder.class);
}
// Construct using com.google.cloud.gkebackup.v1.RpoConfig.newBuilder()
private Builder() {}
private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
}
@java.lang.Override
public Builder clear() {
super.clear();
bitField0_ = 0;
targetRpoMinutes_ = 0;
if (exclusionWindowsBuilder_ == null) {
exclusionWindows_ = java.util.Collections.emptyList();
} else {
exclusionWindows_ = null;
exclusionWindowsBuilder_.clear();
}
bitField0_ = (bitField0_ & ~0x00000002);
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_RpoConfig_descriptor;
}
@java.lang.Override
public com.google.cloud.gkebackup.v1.RpoConfig getDefaultInstanceForType() {
return com.google.cloud.gkebackup.v1.RpoConfig.getDefaultInstance();
}
@java.lang.Override
public com.google.cloud.gkebackup.v1.RpoConfig build() {
com.google.cloud.gkebackup.v1.RpoConfig result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public com.google.cloud.gkebackup.v1.RpoConfig buildPartial() {
com.google.cloud.gkebackup.v1.RpoConfig result =
new com.google.cloud.gkebackup.v1.RpoConfig(this);
buildPartialRepeatedFields(result);
if (bitField0_ != 0) {
buildPartial0(result);
}
onBuilt();
return result;
}
private void buildPartialRepeatedFields(com.google.cloud.gkebackup.v1.RpoConfig result) {
if (exclusionWindowsBuilder_ == null) {
if (((bitField0_ & 0x00000002) != 0)) {
exclusionWindows_ = java.util.Collections.unmodifiableList(exclusionWindows_);
bitField0_ = (bitField0_ & ~0x00000002);
}
result.exclusionWindows_ = exclusionWindows_;
} else {
result.exclusionWindows_ = exclusionWindowsBuilder_.build();
}
}
private void buildPartial0(com.google.cloud.gkebackup.v1.RpoConfig result) {
int from_bitField0_ = bitField0_;
if (((from_bitField0_ & 0x00000001) != 0)) {
result.targetRpoMinutes_ = targetRpoMinutes_;
}
}
@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.RpoConfig) {
return mergeFrom((com.google.cloud.gkebackup.v1.RpoConfig) other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(com.google.cloud.gkebackup.v1.RpoConfig other) {
if (other == com.google.cloud.gkebackup.v1.RpoConfig.getDefaultInstance()) return this;
if (other.getTargetRpoMinutes() != 0) {
setTargetRpoMinutes(other.getTargetRpoMinutes());
}
if (exclusionWindowsBuilder_ == null) {
if (!other.exclusionWindows_.isEmpty()) {
if (exclusionWindows_.isEmpty()) {
exclusionWindows_ = other.exclusionWindows_;
bitField0_ = (bitField0_ & ~0x00000002);
} else {
ensureExclusionWindowsIsMutable();
exclusionWindows_.addAll(other.exclusionWindows_);
}
onChanged();
}
} else {
if (!other.exclusionWindows_.isEmpty()) {
if (exclusionWindowsBuilder_.isEmpty()) {
exclusionWindowsBuilder_.dispose();
exclusionWindowsBuilder_ = null;
exclusionWindows_ = other.exclusionWindows_;
bitField0_ = (bitField0_ & ~0x00000002);
exclusionWindowsBuilder_ =
com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders
? getExclusionWindowsFieldBuilder()
: null;
} else {
exclusionWindowsBuilder_.addAllMessages(other.exclusionWindows_);
}
}
}
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:
{
targetRpoMinutes_ = input.readInt32();
bitField0_ |= 0x00000001;
break;
} // case 8
case 18:
{
com.google.cloud.gkebackup.v1.ExclusionWindow m =
input.readMessage(
com.google.cloud.gkebackup.v1.ExclusionWindow.parser(), extensionRegistry);
if (exclusionWindowsBuilder_ == null) {
ensureExclusionWindowsIsMutable();
exclusionWindows_.add(m);
} else {
exclusionWindowsBuilder_.addMessage(m);
}
break;
} // case 18
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 int targetRpoMinutes_;
/**
*
*
*
* Required. Defines the target RPO for the BackupPlan in minutes, which means
* the target maximum data loss in time that is acceptable for this
* BackupPlan. This must be at least 60, i.e., 1 hour, and at most 86400,
* i.e., 60 days.
*
*
* int32 target_rpo_minutes = 1 [(.google.api.field_behavior) = REQUIRED];
*
* @return The targetRpoMinutes.
*/
@java.lang.Override
public int getTargetRpoMinutes() {
return targetRpoMinutes_;
}
/**
*
*
*
* Required. Defines the target RPO for the BackupPlan in minutes, which means
* the target maximum data loss in time that is acceptable for this
* BackupPlan. This must be at least 60, i.e., 1 hour, and at most 86400,
* i.e., 60 days.
*
*
* int32 target_rpo_minutes = 1 [(.google.api.field_behavior) = REQUIRED];
*
* @param value The targetRpoMinutes to set.
* @return This builder for chaining.
*/
public Builder setTargetRpoMinutes(int value) {
targetRpoMinutes_ = value;
bitField0_ |= 0x00000001;
onChanged();
return this;
}
/**
*
*
*
* Required. Defines the target RPO for the BackupPlan in minutes, which means
* the target maximum data loss in time that is acceptable for this
* BackupPlan. This must be at least 60, i.e., 1 hour, and at most 86400,
* i.e., 60 days.
*
*
* int32 target_rpo_minutes = 1 [(.google.api.field_behavior) = REQUIRED];
*
* @return This builder for chaining.
*/
public Builder clearTargetRpoMinutes() {
bitField0_ = (bitField0_ & ~0x00000001);
targetRpoMinutes_ = 0;
onChanged();
return this;
}
private java.util.List exclusionWindows_ =
java.util.Collections.emptyList();
private void ensureExclusionWindowsIsMutable() {
if (!((bitField0_ & 0x00000002) != 0)) {
exclusionWindows_ =
new java.util.ArrayList(
exclusionWindows_);
bitField0_ |= 0x00000002;
}
}
private com.google.protobuf.RepeatedFieldBuilderV3<
com.google.cloud.gkebackup.v1.ExclusionWindow,
com.google.cloud.gkebackup.v1.ExclusionWindow.Builder,
com.google.cloud.gkebackup.v1.ExclusionWindowOrBuilder>
exclusionWindowsBuilder_;
/**
*
*
*
* Optional. User specified time windows during which backup can NOT happen
* for this BackupPlan - backups should start and finish outside of any given
* exclusion window. Note: backup jobs will be scheduled to start and
* finish outside the duration of the window as much as possible, but
* running jobs will not get canceled when it runs into the window.
* All the time and date values in exclusion_windows entry in the API are in
* UTC.
* We only allow <=1 recurrence (daily or weekly) exclusion window for a
* BackupPlan while no restriction on number of single occurrence
* windows.
*
*
*
* repeated .google.cloud.gkebackup.v1.ExclusionWindow exclusion_windows = 2 [(.google.api.field_behavior) = OPTIONAL];
*
*/
public java.util.List getExclusionWindowsList() {
if (exclusionWindowsBuilder_ == null) {
return java.util.Collections.unmodifiableList(exclusionWindows_);
} else {
return exclusionWindowsBuilder_.getMessageList();
}
}
/**
*
*
*
* Optional. User specified time windows during which backup can NOT happen
* for this BackupPlan - backups should start and finish outside of any given
* exclusion window. Note: backup jobs will be scheduled to start and
* finish outside the duration of the window as much as possible, but
* running jobs will not get canceled when it runs into the window.
* All the time and date values in exclusion_windows entry in the API are in
* UTC.
* We only allow <=1 recurrence (daily or weekly) exclusion window for a
* BackupPlan while no restriction on number of single occurrence
* windows.
*
*
*
* repeated .google.cloud.gkebackup.v1.ExclusionWindow exclusion_windows = 2 [(.google.api.field_behavior) = OPTIONAL];
*
*/
public int getExclusionWindowsCount() {
if (exclusionWindowsBuilder_ == null) {
return exclusionWindows_.size();
} else {
return exclusionWindowsBuilder_.getCount();
}
}
/**
*
*
*
* Optional. User specified time windows during which backup can NOT happen
* for this BackupPlan - backups should start and finish outside of any given
* exclusion window. Note: backup jobs will be scheduled to start and
* finish outside the duration of the window as much as possible, but
* running jobs will not get canceled when it runs into the window.
* All the time and date values in exclusion_windows entry in the API are in
* UTC.
* We only allow <=1 recurrence (daily or weekly) exclusion window for a
* BackupPlan while no restriction on number of single occurrence
* windows.
*
*
*
* repeated .google.cloud.gkebackup.v1.ExclusionWindow exclusion_windows = 2 [(.google.api.field_behavior) = OPTIONAL];
*
*/
public com.google.cloud.gkebackup.v1.ExclusionWindow getExclusionWindows(int index) {
if (exclusionWindowsBuilder_ == null) {
return exclusionWindows_.get(index);
} else {
return exclusionWindowsBuilder_.getMessage(index);
}
}
/**
*
*
*
* Optional. User specified time windows during which backup can NOT happen
* for this BackupPlan - backups should start and finish outside of any given
* exclusion window. Note: backup jobs will be scheduled to start and
* finish outside the duration of the window as much as possible, but
* running jobs will not get canceled when it runs into the window.
* All the time and date values in exclusion_windows entry in the API are in
* UTC.
* We only allow <=1 recurrence (daily or weekly) exclusion window for a
* BackupPlan while no restriction on number of single occurrence
* windows.
*
*
*
* repeated .google.cloud.gkebackup.v1.ExclusionWindow exclusion_windows = 2 [(.google.api.field_behavior) = OPTIONAL];
*
*/
public Builder setExclusionWindows(
int index, com.google.cloud.gkebackup.v1.ExclusionWindow value) {
if (exclusionWindowsBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureExclusionWindowsIsMutable();
exclusionWindows_.set(index, value);
onChanged();
} else {
exclusionWindowsBuilder_.setMessage(index, value);
}
return this;
}
/**
*
*
*
* Optional. User specified time windows during which backup can NOT happen
* for this BackupPlan - backups should start and finish outside of any given
* exclusion window. Note: backup jobs will be scheduled to start and
* finish outside the duration of the window as much as possible, but
* running jobs will not get canceled when it runs into the window.
* All the time and date values in exclusion_windows entry in the API are in
* UTC.
* We only allow <=1 recurrence (daily or weekly) exclusion window for a
* BackupPlan while no restriction on number of single occurrence
* windows.
*
*
*
* repeated .google.cloud.gkebackup.v1.ExclusionWindow exclusion_windows = 2 [(.google.api.field_behavior) = OPTIONAL];
*
*/
public Builder setExclusionWindows(
int index, com.google.cloud.gkebackup.v1.ExclusionWindow.Builder builderForValue) {
if (exclusionWindowsBuilder_ == null) {
ensureExclusionWindowsIsMutable();
exclusionWindows_.set(index, builderForValue.build());
onChanged();
} else {
exclusionWindowsBuilder_.setMessage(index, builderForValue.build());
}
return this;
}
/**
*
*
*
* Optional. User specified time windows during which backup can NOT happen
* for this BackupPlan - backups should start and finish outside of any given
* exclusion window. Note: backup jobs will be scheduled to start and
* finish outside the duration of the window as much as possible, but
* running jobs will not get canceled when it runs into the window.
* All the time and date values in exclusion_windows entry in the API are in
* UTC.
* We only allow <=1 recurrence (daily or weekly) exclusion window for a
* BackupPlan while no restriction on number of single occurrence
* windows.
*
*
*
* repeated .google.cloud.gkebackup.v1.ExclusionWindow exclusion_windows = 2 [(.google.api.field_behavior) = OPTIONAL];
*
*/
public Builder addExclusionWindows(com.google.cloud.gkebackup.v1.ExclusionWindow value) {
if (exclusionWindowsBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureExclusionWindowsIsMutable();
exclusionWindows_.add(value);
onChanged();
} else {
exclusionWindowsBuilder_.addMessage(value);
}
return this;
}
/**
*
*
*
* Optional. User specified time windows during which backup can NOT happen
* for this BackupPlan - backups should start and finish outside of any given
* exclusion window. Note: backup jobs will be scheduled to start and
* finish outside the duration of the window as much as possible, but
* running jobs will not get canceled when it runs into the window.
* All the time and date values in exclusion_windows entry in the API are in
* UTC.
* We only allow <=1 recurrence (daily or weekly) exclusion window for a
* BackupPlan while no restriction on number of single occurrence
* windows.
*
*
*
* repeated .google.cloud.gkebackup.v1.ExclusionWindow exclusion_windows = 2 [(.google.api.field_behavior) = OPTIONAL];
*
*/
public Builder addExclusionWindows(
int index, com.google.cloud.gkebackup.v1.ExclusionWindow value) {
if (exclusionWindowsBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureExclusionWindowsIsMutable();
exclusionWindows_.add(index, value);
onChanged();
} else {
exclusionWindowsBuilder_.addMessage(index, value);
}
return this;
}
/**
*
*
*
* Optional. User specified time windows during which backup can NOT happen
* for this BackupPlan - backups should start and finish outside of any given
* exclusion window. Note: backup jobs will be scheduled to start and
* finish outside the duration of the window as much as possible, but
* running jobs will not get canceled when it runs into the window.
* All the time and date values in exclusion_windows entry in the API are in
* UTC.
* We only allow <=1 recurrence (daily or weekly) exclusion window for a
* BackupPlan while no restriction on number of single occurrence
* windows.
*
*
*
* repeated .google.cloud.gkebackup.v1.ExclusionWindow exclusion_windows = 2 [(.google.api.field_behavior) = OPTIONAL];
*
*/
public Builder addExclusionWindows(
com.google.cloud.gkebackup.v1.ExclusionWindow.Builder builderForValue) {
if (exclusionWindowsBuilder_ == null) {
ensureExclusionWindowsIsMutable();
exclusionWindows_.add(builderForValue.build());
onChanged();
} else {
exclusionWindowsBuilder_.addMessage(builderForValue.build());
}
return this;
}
/**
*
*
*
* Optional. User specified time windows during which backup can NOT happen
* for this BackupPlan - backups should start and finish outside of any given
* exclusion window. Note: backup jobs will be scheduled to start and
* finish outside the duration of the window as much as possible, but
* running jobs will not get canceled when it runs into the window.
* All the time and date values in exclusion_windows entry in the API are in
* UTC.
* We only allow <=1 recurrence (daily or weekly) exclusion window for a
* BackupPlan while no restriction on number of single occurrence
* windows.
*
*
*
* repeated .google.cloud.gkebackup.v1.ExclusionWindow exclusion_windows = 2 [(.google.api.field_behavior) = OPTIONAL];
*
*/
public Builder addExclusionWindows(
int index, com.google.cloud.gkebackup.v1.ExclusionWindow.Builder builderForValue) {
if (exclusionWindowsBuilder_ == null) {
ensureExclusionWindowsIsMutable();
exclusionWindows_.add(index, builderForValue.build());
onChanged();
} else {
exclusionWindowsBuilder_.addMessage(index, builderForValue.build());
}
return this;
}
/**
*
*
*
* Optional. User specified time windows during which backup can NOT happen
* for this BackupPlan - backups should start and finish outside of any given
* exclusion window. Note: backup jobs will be scheduled to start and
* finish outside the duration of the window as much as possible, but
* running jobs will not get canceled when it runs into the window.
* All the time and date values in exclusion_windows entry in the API are in
* UTC.
* We only allow <=1 recurrence (daily or weekly) exclusion window for a
* BackupPlan while no restriction on number of single occurrence
* windows.
*
*
*
* repeated .google.cloud.gkebackup.v1.ExclusionWindow exclusion_windows = 2 [(.google.api.field_behavior) = OPTIONAL];
*
*/
public Builder addAllExclusionWindows(
java.lang.Iterable extends com.google.cloud.gkebackup.v1.ExclusionWindow> values) {
if (exclusionWindowsBuilder_ == null) {
ensureExclusionWindowsIsMutable();
com.google.protobuf.AbstractMessageLite.Builder.addAll(values, exclusionWindows_);
onChanged();
} else {
exclusionWindowsBuilder_.addAllMessages(values);
}
return this;
}
/**
*
*
*
* Optional. User specified time windows during which backup can NOT happen
* for this BackupPlan - backups should start and finish outside of any given
* exclusion window. Note: backup jobs will be scheduled to start and
* finish outside the duration of the window as much as possible, but
* running jobs will not get canceled when it runs into the window.
* All the time and date values in exclusion_windows entry in the API are in
* UTC.
* We only allow <=1 recurrence (daily or weekly) exclusion window for a
* BackupPlan while no restriction on number of single occurrence
* windows.
*
*
*
* repeated .google.cloud.gkebackup.v1.ExclusionWindow exclusion_windows = 2 [(.google.api.field_behavior) = OPTIONAL];
*
*/
public Builder clearExclusionWindows() {
if (exclusionWindowsBuilder_ == null) {
exclusionWindows_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000002);
onChanged();
} else {
exclusionWindowsBuilder_.clear();
}
return this;
}
/**
*
*
*
* Optional. User specified time windows during which backup can NOT happen
* for this BackupPlan - backups should start and finish outside of any given
* exclusion window. Note: backup jobs will be scheduled to start and
* finish outside the duration of the window as much as possible, but
* running jobs will not get canceled when it runs into the window.
* All the time and date values in exclusion_windows entry in the API are in
* UTC.
* We only allow <=1 recurrence (daily or weekly) exclusion window for a
* BackupPlan while no restriction on number of single occurrence
* windows.
*
*
*
* repeated .google.cloud.gkebackup.v1.ExclusionWindow exclusion_windows = 2 [(.google.api.field_behavior) = OPTIONAL];
*
*/
public Builder removeExclusionWindows(int index) {
if (exclusionWindowsBuilder_ == null) {
ensureExclusionWindowsIsMutable();
exclusionWindows_.remove(index);
onChanged();
} else {
exclusionWindowsBuilder_.remove(index);
}
return this;
}
/**
*
*
*
* Optional. User specified time windows during which backup can NOT happen
* for this BackupPlan - backups should start and finish outside of any given
* exclusion window. Note: backup jobs will be scheduled to start and
* finish outside the duration of the window as much as possible, but
* running jobs will not get canceled when it runs into the window.
* All the time and date values in exclusion_windows entry in the API are in
* UTC.
* We only allow <=1 recurrence (daily or weekly) exclusion window for a
* BackupPlan while no restriction on number of single occurrence
* windows.
*
*
*
* repeated .google.cloud.gkebackup.v1.ExclusionWindow exclusion_windows = 2 [(.google.api.field_behavior) = OPTIONAL];
*
*/
public com.google.cloud.gkebackup.v1.ExclusionWindow.Builder getExclusionWindowsBuilder(
int index) {
return getExclusionWindowsFieldBuilder().getBuilder(index);
}
/**
*
*
*
* Optional. User specified time windows during which backup can NOT happen
* for this BackupPlan - backups should start and finish outside of any given
* exclusion window. Note: backup jobs will be scheduled to start and
* finish outside the duration of the window as much as possible, but
* running jobs will not get canceled when it runs into the window.
* All the time and date values in exclusion_windows entry in the API are in
* UTC.
* We only allow <=1 recurrence (daily or weekly) exclusion window for a
* BackupPlan while no restriction on number of single occurrence
* windows.
*
*
*
* repeated .google.cloud.gkebackup.v1.ExclusionWindow exclusion_windows = 2 [(.google.api.field_behavior) = OPTIONAL];
*
*/
public com.google.cloud.gkebackup.v1.ExclusionWindowOrBuilder getExclusionWindowsOrBuilder(
int index) {
if (exclusionWindowsBuilder_ == null) {
return exclusionWindows_.get(index);
} else {
return exclusionWindowsBuilder_.getMessageOrBuilder(index);
}
}
/**
*
*
*
* Optional. User specified time windows during which backup can NOT happen
* for this BackupPlan - backups should start and finish outside of any given
* exclusion window. Note: backup jobs will be scheduled to start and
* finish outside the duration of the window as much as possible, but
* running jobs will not get canceled when it runs into the window.
* All the time and date values in exclusion_windows entry in the API are in
* UTC.
* We only allow <=1 recurrence (daily or weekly) exclusion window for a
* BackupPlan while no restriction on number of single occurrence
* windows.
*
*
*
* repeated .google.cloud.gkebackup.v1.ExclusionWindow exclusion_windows = 2 [(.google.api.field_behavior) = OPTIONAL];
*
*/
public java.util.List extends com.google.cloud.gkebackup.v1.ExclusionWindowOrBuilder>
getExclusionWindowsOrBuilderList() {
if (exclusionWindowsBuilder_ != null) {
return exclusionWindowsBuilder_.getMessageOrBuilderList();
} else {
return java.util.Collections.unmodifiableList(exclusionWindows_);
}
}
/**
*
*
*
* Optional. User specified time windows during which backup can NOT happen
* for this BackupPlan - backups should start and finish outside of any given
* exclusion window. Note: backup jobs will be scheduled to start and
* finish outside the duration of the window as much as possible, but
* running jobs will not get canceled when it runs into the window.
* All the time and date values in exclusion_windows entry in the API are in
* UTC.
* We only allow <=1 recurrence (daily or weekly) exclusion window for a
* BackupPlan while no restriction on number of single occurrence
* windows.
*
*
*
* repeated .google.cloud.gkebackup.v1.ExclusionWindow exclusion_windows = 2 [(.google.api.field_behavior) = OPTIONAL];
*
*/
public com.google.cloud.gkebackup.v1.ExclusionWindow.Builder addExclusionWindowsBuilder() {
return getExclusionWindowsFieldBuilder()
.addBuilder(com.google.cloud.gkebackup.v1.ExclusionWindow.getDefaultInstance());
}
/**
*
*
*
* Optional. User specified time windows during which backup can NOT happen
* for this BackupPlan - backups should start and finish outside of any given
* exclusion window. Note: backup jobs will be scheduled to start and
* finish outside the duration of the window as much as possible, but
* running jobs will not get canceled when it runs into the window.
* All the time and date values in exclusion_windows entry in the API are in
* UTC.
* We only allow <=1 recurrence (daily or weekly) exclusion window for a
* BackupPlan while no restriction on number of single occurrence
* windows.
*
*
*
* repeated .google.cloud.gkebackup.v1.ExclusionWindow exclusion_windows = 2 [(.google.api.field_behavior) = OPTIONAL];
*
*/
public com.google.cloud.gkebackup.v1.ExclusionWindow.Builder addExclusionWindowsBuilder(
int index) {
return getExclusionWindowsFieldBuilder()
.addBuilder(index, com.google.cloud.gkebackup.v1.ExclusionWindow.getDefaultInstance());
}
/**
*
*
*
* Optional. User specified time windows during which backup can NOT happen
* for this BackupPlan - backups should start and finish outside of any given
* exclusion window. Note: backup jobs will be scheduled to start and
* finish outside the duration of the window as much as possible, but
* running jobs will not get canceled when it runs into the window.
* All the time and date values in exclusion_windows entry in the API are in
* UTC.
* We only allow <=1 recurrence (daily or weekly) exclusion window for a
* BackupPlan while no restriction on number of single occurrence
* windows.
*
*
*
* repeated .google.cloud.gkebackup.v1.ExclusionWindow exclusion_windows = 2 [(.google.api.field_behavior) = OPTIONAL];
*
*/
public java.util.List
getExclusionWindowsBuilderList() {
return getExclusionWindowsFieldBuilder().getBuilderList();
}
private com.google.protobuf.RepeatedFieldBuilderV3<
com.google.cloud.gkebackup.v1.ExclusionWindow,
com.google.cloud.gkebackup.v1.ExclusionWindow.Builder,
com.google.cloud.gkebackup.v1.ExclusionWindowOrBuilder>
getExclusionWindowsFieldBuilder() {
if (exclusionWindowsBuilder_ == null) {
exclusionWindowsBuilder_ =
new com.google.protobuf.RepeatedFieldBuilderV3<
com.google.cloud.gkebackup.v1.ExclusionWindow,
com.google.cloud.gkebackup.v1.ExclusionWindow.Builder,
com.google.cloud.gkebackup.v1.ExclusionWindowOrBuilder>(
exclusionWindows_,
((bitField0_ & 0x00000002) != 0),
getParentForChildren(),
isClean());
exclusionWindows_ = null;
}
return exclusionWindowsBuilder_;
}
@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.RpoConfig)
}
// @@protoc_insertion_point(class_scope:google.cloud.gkebackup.v1.RpoConfig)
private static final com.google.cloud.gkebackup.v1.RpoConfig DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new com.google.cloud.gkebackup.v1.RpoConfig();
}
public static com.google.cloud.gkebackup.v1.RpoConfig getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser PARSER =
new com.google.protobuf.AbstractParser() {
@java.lang.Override
public RpoConfig 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.RpoConfig getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}