com.google.cloud.gkebackup.v1.RestoreConfig 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/restore.proto
// Protobuf Java Version: 3.25.4
package com.google.cloud.gkebackup.v1;
/**
*
*
*
* Configuration of a restore.
*
*
* Protobuf type {@code google.cloud.gkebackup.v1.RestoreConfig}
*/
public final class RestoreConfig extends com.google.protobuf.GeneratedMessageV3
implements
// @@protoc_insertion_point(message_implements:google.cloud.gkebackup.v1.RestoreConfig)
RestoreConfigOrBuilder {
private static final long serialVersionUID = 0L;
// Use RestoreConfig.newBuilder() to construct.
private RestoreConfig(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private RestoreConfig() {
volumeDataRestorePolicy_ = 0;
clusterResourceConflictPolicy_ = 0;
namespacedResourceRestoreMode_ = 0;
substitutionRules_ = java.util.Collections.emptyList();
transformationRules_ = java.util.Collections.emptyList();
volumeDataRestorePolicyBindings_ = java.util.Collections.emptyList();
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(UnusedPrivateParameter unused) {
return new RestoreConfig();
}
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
return com.google.cloud.gkebackup.v1.RestoreProto
.internal_static_google_cloud_gkebackup_v1_RestoreConfig_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.google.cloud.gkebackup.v1.RestoreProto
.internal_static_google_cloud_gkebackup_v1_RestoreConfig_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.google.cloud.gkebackup.v1.RestoreConfig.class,
com.google.cloud.gkebackup.v1.RestoreConfig.Builder.class);
}
/**
*
*
*
* Defines how volume data should be restored.
*
*
* Protobuf enum {@code google.cloud.gkebackup.v1.RestoreConfig.VolumeDataRestorePolicy}
*/
public enum VolumeDataRestorePolicy implements com.google.protobuf.ProtocolMessageEnum {
/**
*
*
*
* Unspecified (illegal).
*
*
* VOLUME_DATA_RESTORE_POLICY_UNSPECIFIED = 0;
*/
VOLUME_DATA_RESTORE_POLICY_UNSPECIFIED(0),
/**
*
*
*
* For each PVC to be restored, create a new underlying volume and PV
* from the corresponding VolumeBackup contained within the Backup.
*
*
* RESTORE_VOLUME_DATA_FROM_BACKUP = 1;
*/
RESTORE_VOLUME_DATA_FROM_BACKUP(1),
/**
*
*
*
* For each PVC to be restored, attempt to reuse the original PV contained
* in the Backup (with its original underlying volume). This option
* is likely only usable when restoring a workload to its original cluster.
*
*
* REUSE_VOLUME_HANDLE_FROM_BACKUP = 2;
*/
REUSE_VOLUME_HANDLE_FROM_BACKUP(2),
/**
*
*
*
* For each PVC to be restored, create PVC without any particular
* action to restore data. In this case, the normal Kubernetes provisioning
* logic would kick in, and this would likely result in either dynamically
* provisioning blank PVs or binding to statically provisioned PVs.
*
*
* NO_VOLUME_DATA_RESTORATION = 3;
*/
NO_VOLUME_DATA_RESTORATION(3),
UNRECOGNIZED(-1),
;
/**
*
*
*
* Unspecified (illegal).
*
*
* VOLUME_DATA_RESTORE_POLICY_UNSPECIFIED = 0;
*/
public static final int VOLUME_DATA_RESTORE_POLICY_UNSPECIFIED_VALUE = 0;
/**
*
*
*
* For each PVC to be restored, create a new underlying volume and PV
* from the corresponding VolumeBackup contained within the Backup.
*
*
* RESTORE_VOLUME_DATA_FROM_BACKUP = 1;
*/
public static final int RESTORE_VOLUME_DATA_FROM_BACKUP_VALUE = 1;
/**
*
*
*
* For each PVC to be restored, attempt to reuse the original PV contained
* in the Backup (with its original underlying volume). This option
* is likely only usable when restoring a workload to its original cluster.
*
*
* REUSE_VOLUME_HANDLE_FROM_BACKUP = 2;
*/
public static final int REUSE_VOLUME_HANDLE_FROM_BACKUP_VALUE = 2;
/**
*
*
*
* For each PVC to be restored, create PVC without any particular
* action to restore data. In this case, the normal Kubernetes provisioning
* logic would kick in, and this would likely result in either dynamically
* provisioning blank PVs or binding to statically provisioned PVs.
*
*
* NO_VOLUME_DATA_RESTORATION = 3;
*/
public static final int NO_VOLUME_DATA_RESTORATION_VALUE = 3;
public final int getNumber() {
if (this == UNRECOGNIZED) {
throw new java.lang.IllegalArgumentException(
"Can't get the number of an unknown enum value.");
}
return value;
}
/**
* @param value The numeric wire value of the corresponding enum entry.
* @return The enum associated with the given numeric wire value.
* @deprecated Use {@link #forNumber(int)} instead.
*/
@java.lang.Deprecated
public static VolumeDataRestorePolicy valueOf(int value) {
return forNumber(value);
}
/**
* @param value The numeric wire value of the corresponding enum entry.
* @return The enum associated with the given numeric wire value.
*/
public static VolumeDataRestorePolicy forNumber(int value) {
switch (value) {
case 0:
return VOLUME_DATA_RESTORE_POLICY_UNSPECIFIED;
case 1:
return RESTORE_VOLUME_DATA_FROM_BACKUP;
case 2:
return REUSE_VOLUME_HANDLE_FROM_BACKUP;
case 3:
return NO_VOLUME_DATA_RESTORATION;
default:
return null;
}
}
public static com.google.protobuf.Internal.EnumLiteMap
internalGetValueMap() {
return internalValueMap;
}
private static final com.google.protobuf.Internal.EnumLiteMap
internalValueMap =
new com.google.protobuf.Internal.EnumLiteMap() {
public VolumeDataRestorePolicy findValueByNumber(int number) {
return VolumeDataRestorePolicy.forNumber(number);
}
};
public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() {
if (this == UNRECOGNIZED) {
throw new java.lang.IllegalStateException(
"Can't get the descriptor of an unrecognized enum value.");
}
return getDescriptor().getValues().get(ordinal());
}
public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() {
return getDescriptor();
}
public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() {
return com.google.cloud.gkebackup.v1.RestoreConfig.getDescriptor().getEnumTypes().get(0);
}
private static final VolumeDataRestorePolicy[] VALUES = values();
public static VolumeDataRestorePolicy valueOf(
com.google.protobuf.Descriptors.EnumValueDescriptor desc) {
if (desc.getType() != getDescriptor()) {
throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type.");
}
if (desc.getIndex() == -1) {
return UNRECOGNIZED;
}
return VALUES[desc.getIndex()];
}
private final int value;
private VolumeDataRestorePolicy(int value) {
this.value = value;
}
// @@protoc_insertion_point(enum_scope:google.cloud.gkebackup.v1.RestoreConfig.VolumeDataRestorePolicy)
}
/**
*
*
*
* Defines the behavior for handling the situation where cluster-scoped
* resources being restored already exist in the target cluster.
*
*
* Protobuf enum {@code google.cloud.gkebackup.v1.RestoreConfig.ClusterResourceConflictPolicy}
*/
public enum ClusterResourceConflictPolicy implements com.google.protobuf.ProtocolMessageEnum {
/**
*
*
*
* Unspecified. Only allowed if no cluster-scoped resources will be
* restored.
*
*
* CLUSTER_RESOURCE_CONFLICT_POLICY_UNSPECIFIED = 0;
*/
CLUSTER_RESOURCE_CONFLICT_POLICY_UNSPECIFIED(0),
/**
*
*
*
* Do not attempt to restore the conflicting resource.
*
*
* USE_EXISTING_VERSION = 1;
*/
USE_EXISTING_VERSION(1),
/**
*
*
*
* Delete the existing version before re-creating it from the Backup.
* This is a dangerous option which could cause unintentional
* data loss if used inappropriately. For example, deleting a CRD will
* cause Kubernetes to delete all CRs of that type.
*
*
* USE_BACKUP_VERSION = 2;
*/
USE_BACKUP_VERSION(2),
UNRECOGNIZED(-1),
;
/**
*
*
*
* Unspecified. Only allowed if no cluster-scoped resources will be
* restored.
*
*
* CLUSTER_RESOURCE_CONFLICT_POLICY_UNSPECIFIED = 0;
*/
public static final int CLUSTER_RESOURCE_CONFLICT_POLICY_UNSPECIFIED_VALUE = 0;
/**
*
*
*
* Do not attempt to restore the conflicting resource.
*
*
* USE_EXISTING_VERSION = 1;
*/
public static final int USE_EXISTING_VERSION_VALUE = 1;
/**
*
*
*
* Delete the existing version before re-creating it from the Backup.
* This is a dangerous option which could cause unintentional
* data loss if used inappropriately. For example, deleting a CRD will
* cause Kubernetes to delete all CRs of that type.
*
*
* USE_BACKUP_VERSION = 2;
*/
public static final int USE_BACKUP_VERSION_VALUE = 2;
public final int getNumber() {
if (this == UNRECOGNIZED) {
throw new java.lang.IllegalArgumentException(
"Can't get the number of an unknown enum value.");
}
return value;
}
/**
* @param value The numeric wire value of the corresponding enum entry.
* @return The enum associated with the given numeric wire value.
* @deprecated Use {@link #forNumber(int)} instead.
*/
@java.lang.Deprecated
public static ClusterResourceConflictPolicy valueOf(int value) {
return forNumber(value);
}
/**
* @param value The numeric wire value of the corresponding enum entry.
* @return The enum associated with the given numeric wire value.
*/
public static ClusterResourceConflictPolicy forNumber(int value) {
switch (value) {
case 0:
return CLUSTER_RESOURCE_CONFLICT_POLICY_UNSPECIFIED;
case 1:
return USE_EXISTING_VERSION;
case 2:
return USE_BACKUP_VERSION;
default:
return null;
}
}
public static com.google.protobuf.Internal.EnumLiteMap
internalGetValueMap() {
return internalValueMap;
}
private static final com.google.protobuf.Internal.EnumLiteMap
internalValueMap =
new com.google.protobuf.Internal.EnumLiteMap() {
public ClusterResourceConflictPolicy findValueByNumber(int number) {
return ClusterResourceConflictPolicy.forNumber(number);
}
};
public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() {
if (this == UNRECOGNIZED) {
throw new java.lang.IllegalStateException(
"Can't get the descriptor of an unrecognized enum value.");
}
return getDescriptor().getValues().get(ordinal());
}
public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() {
return getDescriptor();
}
public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() {
return com.google.cloud.gkebackup.v1.RestoreConfig.getDescriptor().getEnumTypes().get(1);
}
private static final ClusterResourceConflictPolicy[] VALUES = values();
public static ClusterResourceConflictPolicy valueOf(
com.google.protobuf.Descriptors.EnumValueDescriptor desc) {
if (desc.getType() != getDescriptor()) {
throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type.");
}
if (desc.getIndex() == -1) {
return UNRECOGNIZED;
}
return VALUES[desc.getIndex()];
}
private final int value;
private ClusterResourceConflictPolicy(int value) {
this.value = value;
}
// @@protoc_insertion_point(enum_scope:google.cloud.gkebackup.v1.RestoreConfig.ClusterResourceConflictPolicy)
}
/**
*
*
*
* Defines the behavior for handling the situation where sets of namespaced
* resources being restored already exist in the target cluster.
*
*
* Protobuf enum {@code google.cloud.gkebackup.v1.RestoreConfig.NamespacedResourceRestoreMode}
*/
public enum NamespacedResourceRestoreMode implements com.google.protobuf.ProtocolMessageEnum {
/**
*
*
*
* Unspecified (invalid).
*
*
* NAMESPACED_RESOURCE_RESTORE_MODE_UNSPECIFIED = 0;
*/
NAMESPACED_RESOURCE_RESTORE_MODE_UNSPECIFIED(0),
/**
*
*
*
* When conflicting top-level resources (either Namespaces or
* ProtectedApplications, depending upon the scope) are encountered, this
* will first trigger a delete of the conflicting resource AND ALL OF ITS
* REFERENCED RESOURCES (e.g., all resources in the Namespace or all
* resources referenced by the ProtectedApplication) before restoring the
* resources from the Backup. This mode should only be used when you are
* intending to revert some portion of a cluster to an earlier state.
*
*
* DELETE_AND_RESTORE = 1;
*/
DELETE_AND_RESTORE(1),
/**
*
*
*
* If conflicting top-level resources (either Namespaces or
* ProtectedApplications, depending upon the scope) are encountered at the
* beginning of a restore process, the Restore will fail. If a conflict
* occurs during the restore process itself (e.g., because an out of band
* process creates conflicting resources), a conflict will be reported.
*
*
* FAIL_ON_CONFLICT = 2;
*/
FAIL_ON_CONFLICT(2),
/**
*
*
*
* This mode merges the backup and the target cluster and skips the
* conflicting resources. If a single resource to restore exists in the
* cluster before restoration, the resource will be skipped, otherwise it
* will be restored.
*
*
* MERGE_SKIP_ON_CONFLICT = 3;
*/
MERGE_SKIP_ON_CONFLICT(3),
/**
*
*
*
* This mode merges the backup and the target cluster and skips the
* conflicting resources except volume data. If a PVC to restore already
* exists, this mode will restore/reconnect the volume without overwriting
* the PVC. It is similar to MERGE_SKIP_ON_CONFLICT except that it will
* apply the volume data policy for the conflicting PVCs:
* - RESTORE_VOLUME_DATA_FROM_BACKUP: restore data only and respect the
* reclaim policy of the original PV;
* - REUSE_VOLUME_HANDLE_FROM_BACKUP: reconnect and respect the reclaim
* policy of the original PV;
* - NO_VOLUME_DATA_RESTORATION: new provision and respect the reclaim
* policy of the original PV.
* Note that this mode could cause data loss as the original PV can be
* retained or deleted depending on its reclaim policy.
*
*
* MERGE_REPLACE_VOLUME_ON_CONFLICT = 4;
*/
MERGE_REPLACE_VOLUME_ON_CONFLICT(4),
/**
*
*
*
* This mode merges the backup and the target cluster and replaces the
* conflicting resources with the ones in the backup. If a single resource
* to restore exists in the cluster before restoration, the resource will be
* replaced with the one from the backup. To replace an existing resource,
* the first attempt is to update the resource to match the one from the
* backup; if the update fails, the second attempt is to delete the resource
* and restore it from the backup.
* Note that this mode could cause data loss as it replaces the existing
* resources in the target cluster, and the original PV can be retained or
* deleted depending on its reclaim policy.
*
*
* MERGE_REPLACE_ON_CONFLICT = 5;
*/
MERGE_REPLACE_ON_CONFLICT(5),
UNRECOGNIZED(-1),
;
/**
*
*
*
* Unspecified (invalid).
*
*
* NAMESPACED_RESOURCE_RESTORE_MODE_UNSPECIFIED = 0;
*/
public static final int NAMESPACED_RESOURCE_RESTORE_MODE_UNSPECIFIED_VALUE = 0;
/**
*
*
*
* When conflicting top-level resources (either Namespaces or
* ProtectedApplications, depending upon the scope) are encountered, this
* will first trigger a delete of the conflicting resource AND ALL OF ITS
* REFERENCED RESOURCES (e.g., all resources in the Namespace or all
* resources referenced by the ProtectedApplication) before restoring the
* resources from the Backup. This mode should only be used when you are
* intending to revert some portion of a cluster to an earlier state.
*
*
* DELETE_AND_RESTORE = 1;
*/
public static final int DELETE_AND_RESTORE_VALUE = 1;
/**
*
*
*
* If conflicting top-level resources (either Namespaces or
* ProtectedApplications, depending upon the scope) are encountered at the
* beginning of a restore process, the Restore will fail. If a conflict
* occurs during the restore process itself (e.g., because an out of band
* process creates conflicting resources), a conflict will be reported.
*
*
* FAIL_ON_CONFLICT = 2;
*/
public static final int FAIL_ON_CONFLICT_VALUE = 2;
/**
*
*
*
* This mode merges the backup and the target cluster and skips the
* conflicting resources. If a single resource to restore exists in the
* cluster before restoration, the resource will be skipped, otherwise it
* will be restored.
*
*
* MERGE_SKIP_ON_CONFLICT = 3;
*/
public static final int MERGE_SKIP_ON_CONFLICT_VALUE = 3;
/**
*
*
*
* This mode merges the backup and the target cluster and skips the
* conflicting resources except volume data. If a PVC to restore already
* exists, this mode will restore/reconnect the volume without overwriting
* the PVC. It is similar to MERGE_SKIP_ON_CONFLICT except that it will
* apply the volume data policy for the conflicting PVCs:
* - RESTORE_VOLUME_DATA_FROM_BACKUP: restore data only and respect the
* reclaim policy of the original PV;
* - REUSE_VOLUME_HANDLE_FROM_BACKUP: reconnect and respect the reclaim
* policy of the original PV;
* - NO_VOLUME_DATA_RESTORATION: new provision and respect the reclaim
* policy of the original PV.
* Note that this mode could cause data loss as the original PV can be
* retained or deleted depending on its reclaim policy.
*
*
* MERGE_REPLACE_VOLUME_ON_CONFLICT = 4;
*/
public static final int MERGE_REPLACE_VOLUME_ON_CONFLICT_VALUE = 4;
/**
*
*
*
* This mode merges the backup and the target cluster and replaces the
* conflicting resources with the ones in the backup. If a single resource
* to restore exists in the cluster before restoration, the resource will be
* replaced with the one from the backup. To replace an existing resource,
* the first attempt is to update the resource to match the one from the
* backup; if the update fails, the second attempt is to delete the resource
* and restore it from the backup.
* Note that this mode could cause data loss as it replaces the existing
* resources in the target cluster, and the original PV can be retained or
* deleted depending on its reclaim policy.
*
*
* MERGE_REPLACE_ON_CONFLICT = 5;
*/
public static final int MERGE_REPLACE_ON_CONFLICT_VALUE = 5;
public final int getNumber() {
if (this == UNRECOGNIZED) {
throw new java.lang.IllegalArgumentException(
"Can't get the number of an unknown enum value.");
}
return value;
}
/**
* @param value The numeric wire value of the corresponding enum entry.
* @return The enum associated with the given numeric wire value.
* @deprecated Use {@link #forNumber(int)} instead.
*/
@java.lang.Deprecated
public static NamespacedResourceRestoreMode valueOf(int value) {
return forNumber(value);
}
/**
* @param value The numeric wire value of the corresponding enum entry.
* @return The enum associated with the given numeric wire value.
*/
public static NamespacedResourceRestoreMode forNumber(int value) {
switch (value) {
case 0:
return NAMESPACED_RESOURCE_RESTORE_MODE_UNSPECIFIED;
case 1:
return DELETE_AND_RESTORE;
case 2:
return FAIL_ON_CONFLICT;
case 3:
return MERGE_SKIP_ON_CONFLICT;
case 4:
return MERGE_REPLACE_VOLUME_ON_CONFLICT;
case 5:
return MERGE_REPLACE_ON_CONFLICT;
default:
return null;
}
}
public static com.google.protobuf.Internal.EnumLiteMap
internalGetValueMap() {
return internalValueMap;
}
private static final com.google.protobuf.Internal.EnumLiteMap
internalValueMap =
new com.google.protobuf.Internal.EnumLiteMap() {
public NamespacedResourceRestoreMode findValueByNumber(int number) {
return NamespacedResourceRestoreMode.forNumber(number);
}
};
public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() {
if (this == UNRECOGNIZED) {
throw new java.lang.IllegalStateException(
"Can't get the descriptor of an unrecognized enum value.");
}
return getDescriptor().getValues().get(ordinal());
}
public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() {
return getDescriptor();
}
public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() {
return com.google.cloud.gkebackup.v1.RestoreConfig.getDescriptor().getEnumTypes().get(2);
}
private static final NamespacedResourceRestoreMode[] VALUES = values();
public static NamespacedResourceRestoreMode valueOf(
com.google.protobuf.Descriptors.EnumValueDescriptor desc) {
if (desc.getType() != getDescriptor()) {
throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type.");
}
if (desc.getIndex() == -1) {
return UNRECOGNIZED;
}
return VALUES[desc.getIndex()];
}
private final int value;
private NamespacedResourceRestoreMode(int value) {
this.value = value;
}
// @@protoc_insertion_point(enum_scope:google.cloud.gkebackup.v1.RestoreConfig.NamespacedResourceRestoreMode)
}
public interface GroupKindOrBuilder
extends
// @@protoc_insertion_point(interface_extends:google.cloud.gkebackup.v1.RestoreConfig.GroupKind)
com.google.protobuf.MessageOrBuilder {
/**
*
*
*
* Optional. API group string of a Kubernetes resource, e.g.
* "apiextensions.k8s.io", "storage.k8s.io", etc.
* Note: use empty string for core API group
*
*
* string resource_group = 1 [(.google.api.field_behavior) = OPTIONAL];
*
* @return The resourceGroup.
*/
java.lang.String getResourceGroup();
/**
*
*
*
* Optional. API group string of a Kubernetes resource, e.g.
* "apiextensions.k8s.io", "storage.k8s.io", etc.
* Note: use empty string for core API group
*
*
* string resource_group = 1 [(.google.api.field_behavior) = OPTIONAL];
*
* @return The bytes for resourceGroup.
*/
com.google.protobuf.ByteString getResourceGroupBytes();
/**
*
*
*
* Optional. Kind of a Kubernetes resource, must be in UpperCamelCase
* (PascalCase) and singular form. E.g. "CustomResourceDefinition",
* "StorageClass", etc.
*
*
* string resource_kind = 2 [(.google.api.field_behavior) = OPTIONAL];
*
* @return The resourceKind.
*/
java.lang.String getResourceKind();
/**
*
*
*
* Optional. Kind of a Kubernetes resource, must be in UpperCamelCase
* (PascalCase) and singular form. E.g. "CustomResourceDefinition",
* "StorageClass", etc.
*
*
* string resource_kind = 2 [(.google.api.field_behavior) = OPTIONAL];
*
* @return The bytes for resourceKind.
*/
com.google.protobuf.ByteString getResourceKindBytes();
}
/**
*
*
*
* This is a direct map to the Kubernetes GroupKind type
* [GroupKind](https://godoc.org/k8s.io/apimachinery/pkg/runtime/schema#GroupKind)
* and is used for identifying specific "types" of resources to restore.
*
*
* Protobuf type {@code google.cloud.gkebackup.v1.RestoreConfig.GroupKind}
*/
public static final class GroupKind extends com.google.protobuf.GeneratedMessageV3
implements
// @@protoc_insertion_point(message_implements:google.cloud.gkebackup.v1.RestoreConfig.GroupKind)
GroupKindOrBuilder {
private static final long serialVersionUID = 0L;
// Use GroupKind.newBuilder() to construct.
private GroupKind(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private GroupKind() {
resourceGroup_ = "";
resourceKind_ = "";
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(UnusedPrivateParameter unused) {
return new GroupKind();
}
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
return com.google.cloud.gkebackup.v1.RestoreProto
.internal_static_google_cloud_gkebackup_v1_RestoreConfig_GroupKind_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.google.cloud.gkebackup.v1.RestoreProto
.internal_static_google_cloud_gkebackup_v1_RestoreConfig_GroupKind_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.google.cloud.gkebackup.v1.RestoreConfig.GroupKind.class,
com.google.cloud.gkebackup.v1.RestoreConfig.GroupKind.Builder.class);
}
public static final int RESOURCE_GROUP_FIELD_NUMBER = 1;
@SuppressWarnings("serial")
private volatile java.lang.Object resourceGroup_ = "";
/**
*
*
*
* Optional. API group string of a Kubernetes resource, e.g.
* "apiextensions.k8s.io", "storage.k8s.io", etc.
* Note: use empty string for core API group
*
*
* string resource_group = 1 [(.google.api.field_behavior) = OPTIONAL];
*
* @return The resourceGroup.
*/
@java.lang.Override
public java.lang.String getResourceGroup() {
java.lang.Object ref = resourceGroup_;
if (ref instanceof java.lang.String) {
return (java.lang.String) ref;
} else {
com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
resourceGroup_ = s;
return s;
}
}
/**
*
*
*
* Optional. API group string of a Kubernetes resource, e.g.
* "apiextensions.k8s.io", "storage.k8s.io", etc.
* Note: use empty string for core API group
*
*
* string resource_group = 1 [(.google.api.field_behavior) = OPTIONAL];
*
* @return The bytes for resourceGroup.
*/
@java.lang.Override
public com.google.protobuf.ByteString getResourceGroupBytes() {
java.lang.Object ref = resourceGroup_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
resourceGroup_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int RESOURCE_KIND_FIELD_NUMBER = 2;
@SuppressWarnings("serial")
private volatile java.lang.Object resourceKind_ = "";
/**
*
*
*
* Optional. Kind of a Kubernetes resource, must be in UpperCamelCase
* (PascalCase) and singular form. E.g. "CustomResourceDefinition",
* "StorageClass", etc.
*
*
* string resource_kind = 2 [(.google.api.field_behavior) = OPTIONAL];
*
* @return The resourceKind.
*/
@java.lang.Override
public java.lang.String getResourceKind() {
java.lang.Object ref = resourceKind_;
if (ref instanceof java.lang.String) {
return (java.lang.String) ref;
} else {
com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
resourceKind_ = s;
return s;
}
}
/**
*
*
*
* Optional. Kind of a Kubernetes resource, must be in UpperCamelCase
* (PascalCase) and singular form. E.g. "CustomResourceDefinition",
* "StorageClass", etc.
*
*
* string resource_kind = 2 [(.google.api.field_behavior) = OPTIONAL];
*
* @return The bytes for resourceKind.
*/
@java.lang.Override
public com.google.protobuf.ByteString getResourceKindBytes() {
java.lang.Object ref = resourceKind_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
resourceKind_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
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 (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(resourceGroup_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 1, resourceGroup_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(resourceKind_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 2, resourceKind_);
}
getUnknownFields().writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(resourceGroup_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, resourceGroup_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(resourceKind_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, resourceKind_);
}
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.RestoreConfig.GroupKind)) {
return super.equals(obj);
}
com.google.cloud.gkebackup.v1.RestoreConfig.GroupKind other =
(com.google.cloud.gkebackup.v1.RestoreConfig.GroupKind) obj;
if (!getResourceGroup().equals(other.getResourceGroup())) return false;
if (!getResourceKind().equals(other.getResourceKind())) 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) + RESOURCE_GROUP_FIELD_NUMBER;
hash = (53 * hash) + getResourceGroup().hashCode();
hash = (37 * hash) + RESOURCE_KIND_FIELD_NUMBER;
hash = (53 * hash) + getResourceKind().hashCode();
hash = (29 * hash) + getUnknownFields().hashCode();
memoizedHashCode = hash;
return hash;
}
public static com.google.cloud.gkebackup.v1.RestoreConfig.GroupKind parseFrom(
java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.cloud.gkebackup.v1.RestoreConfig.GroupKind 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.RestoreConfig.GroupKind parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.cloud.gkebackup.v1.RestoreConfig.GroupKind 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.RestoreConfig.GroupKind parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.cloud.gkebackup.v1.RestoreConfig.GroupKind 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.RestoreConfig.GroupKind parseFrom(
java.io.InputStream input) throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
}
public static com.google.cloud.gkebackup.v1.RestoreConfig.GroupKind 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.RestoreConfig.GroupKind parseDelimitedFrom(
java.io.InputStream input) throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input);
}
public static com.google.cloud.gkebackup.v1.RestoreConfig.GroupKind 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.RestoreConfig.GroupKind 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.RestoreConfig.GroupKind 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.RestoreConfig.GroupKind 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;
}
/**
*
*
*
* This is a direct map to the Kubernetes GroupKind type
* [GroupKind](https://godoc.org/k8s.io/apimachinery/pkg/runtime/schema#GroupKind)
* and is used for identifying specific "types" of resources to restore.
*
*
* Protobuf type {@code google.cloud.gkebackup.v1.RestoreConfig.GroupKind}
*/
public static final class Builder
extends com.google.protobuf.GeneratedMessageV3.Builder
implements
// @@protoc_insertion_point(builder_implements:google.cloud.gkebackup.v1.RestoreConfig.GroupKind)
com.google.cloud.gkebackup.v1.RestoreConfig.GroupKindOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
return com.google.cloud.gkebackup.v1.RestoreProto
.internal_static_google_cloud_gkebackup_v1_RestoreConfig_GroupKind_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.google.cloud.gkebackup.v1.RestoreProto
.internal_static_google_cloud_gkebackup_v1_RestoreConfig_GroupKind_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.google.cloud.gkebackup.v1.RestoreConfig.GroupKind.class,
com.google.cloud.gkebackup.v1.RestoreConfig.GroupKind.Builder.class);
}
// Construct using com.google.cloud.gkebackup.v1.RestoreConfig.GroupKind.newBuilder()
private Builder() {}
private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
}
@java.lang.Override
public Builder clear() {
super.clear();
bitField0_ = 0;
resourceGroup_ = "";
resourceKind_ = "";
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() {
return com.google.cloud.gkebackup.v1.RestoreProto
.internal_static_google_cloud_gkebackup_v1_RestoreConfig_GroupKind_descriptor;
}
@java.lang.Override
public com.google.cloud.gkebackup.v1.RestoreConfig.GroupKind getDefaultInstanceForType() {
return com.google.cloud.gkebackup.v1.RestoreConfig.GroupKind.getDefaultInstance();
}
@java.lang.Override
public com.google.cloud.gkebackup.v1.RestoreConfig.GroupKind build() {
com.google.cloud.gkebackup.v1.RestoreConfig.GroupKind result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public com.google.cloud.gkebackup.v1.RestoreConfig.GroupKind buildPartial() {
com.google.cloud.gkebackup.v1.RestoreConfig.GroupKind result =
new com.google.cloud.gkebackup.v1.RestoreConfig.GroupKind(this);
if (bitField0_ != 0) {
buildPartial0(result);
}
onBuilt();
return result;
}
private void buildPartial0(com.google.cloud.gkebackup.v1.RestoreConfig.GroupKind result) {
int from_bitField0_ = bitField0_;
if (((from_bitField0_ & 0x00000001) != 0)) {
result.resourceGroup_ = resourceGroup_;
}
if (((from_bitField0_ & 0x00000002) != 0)) {
result.resourceKind_ = resourceKind_;
}
}
@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.RestoreConfig.GroupKind) {
return mergeFrom((com.google.cloud.gkebackup.v1.RestoreConfig.GroupKind) other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(com.google.cloud.gkebackup.v1.RestoreConfig.GroupKind other) {
if (other == com.google.cloud.gkebackup.v1.RestoreConfig.GroupKind.getDefaultInstance())
return this;
if (!other.getResourceGroup().isEmpty()) {
resourceGroup_ = other.resourceGroup_;
bitField0_ |= 0x00000001;
onChanged();
}
if (!other.getResourceKind().isEmpty()) {
resourceKind_ = other.resourceKind_;
bitField0_ |= 0x00000002;
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 10:
{
resourceGroup_ = input.readStringRequireUtf8();
bitField0_ |= 0x00000001;
break;
} // case 10
case 18:
{
resourceKind_ = input.readStringRequireUtf8();
bitField0_ |= 0x00000002;
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 java.lang.Object resourceGroup_ = "";
/**
*
*
*
* Optional. API group string of a Kubernetes resource, e.g.
* "apiextensions.k8s.io", "storage.k8s.io", etc.
* Note: use empty string for core API group
*
*
* string resource_group = 1 [(.google.api.field_behavior) = OPTIONAL];
*
* @return The resourceGroup.
*/
public java.lang.String getResourceGroup() {
java.lang.Object ref = resourceGroup_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
resourceGroup_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
*
*
* Optional. API group string of a Kubernetes resource, e.g.
* "apiextensions.k8s.io", "storage.k8s.io", etc.
* Note: use empty string for core API group
*
*
* string resource_group = 1 [(.google.api.field_behavior) = OPTIONAL];
*
* @return The bytes for resourceGroup.
*/
public com.google.protobuf.ByteString getResourceGroupBytes() {
java.lang.Object ref = resourceGroup_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
resourceGroup_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
*
*
* Optional. API group string of a Kubernetes resource, e.g.
* "apiextensions.k8s.io", "storage.k8s.io", etc.
* Note: use empty string for core API group
*
*
* string resource_group = 1 [(.google.api.field_behavior) = OPTIONAL];
*
* @param value The resourceGroup to set.
* @return This builder for chaining.
*/
public Builder setResourceGroup(java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
resourceGroup_ = value;
bitField0_ |= 0x00000001;
onChanged();
return this;
}
/**
*
*
*
* Optional. API group string of a Kubernetes resource, e.g.
* "apiextensions.k8s.io", "storage.k8s.io", etc.
* Note: use empty string for core API group
*
*
* string resource_group = 1 [(.google.api.field_behavior) = OPTIONAL];
*
* @return This builder for chaining.
*/
public Builder clearResourceGroup() {
resourceGroup_ = getDefaultInstance().getResourceGroup();
bitField0_ = (bitField0_ & ~0x00000001);
onChanged();
return this;
}
/**
*
*
*
* Optional. API group string of a Kubernetes resource, e.g.
* "apiextensions.k8s.io", "storage.k8s.io", etc.
* Note: use empty string for core API group
*
*
* string resource_group = 1 [(.google.api.field_behavior) = OPTIONAL];
*
* @param value The bytes for resourceGroup to set.
* @return This builder for chaining.
*/
public Builder setResourceGroupBytes(com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
resourceGroup_ = value;
bitField0_ |= 0x00000001;
onChanged();
return this;
}
private java.lang.Object resourceKind_ = "";
/**
*
*
*
* Optional. Kind of a Kubernetes resource, must be in UpperCamelCase
* (PascalCase) and singular form. E.g. "CustomResourceDefinition",
* "StorageClass", etc.
*
*
* string resource_kind = 2 [(.google.api.field_behavior) = OPTIONAL];
*
* @return The resourceKind.
*/
public java.lang.String getResourceKind() {
java.lang.Object ref = resourceKind_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
resourceKind_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
*
*
* Optional. Kind of a Kubernetes resource, must be in UpperCamelCase
* (PascalCase) and singular form. E.g. "CustomResourceDefinition",
* "StorageClass", etc.
*
*
* string resource_kind = 2 [(.google.api.field_behavior) = OPTIONAL];
*
* @return The bytes for resourceKind.
*/
public com.google.protobuf.ByteString getResourceKindBytes() {
java.lang.Object ref = resourceKind_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
resourceKind_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
*
*
* Optional. Kind of a Kubernetes resource, must be in UpperCamelCase
* (PascalCase) and singular form. E.g. "CustomResourceDefinition",
* "StorageClass", etc.
*
*
* string resource_kind = 2 [(.google.api.field_behavior) = OPTIONAL];
*
* @param value The resourceKind to set.
* @return This builder for chaining.
*/
public Builder setResourceKind(java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
resourceKind_ = value;
bitField0_ |= 0x00000002;
onChanged();
return this;
}
/**
*
*
*
* Optional. Kind of a Kubernetes resource, must be in UpperCamelCase
* (PascalCase) and singular form. E.g. "CustomResourceDefinition",
* "StorageClass", etc.
*
*
* string resource_kind = 2 [(.google.api.field_behavior) = OPTIONAL];
*
* @return This builder for chaining.
*/
public Builder clearResourceKind() {
resourceKind_ = getDefaultInstance().getResourceKind();
bitField0_ = (bitField0_ & ~0x00000002);
onChanged();
return this;
}
/**
*
*
*
* Optional. Kind of a Kubernetes resource, must be in UpperCamelCase
* (PascalCase) and singular form. E.g. "CustomResourceDefinition",
* "StorageClass", etc.
*
*
* string resource_kind = 2 [(.google.api.field_behavior) = OPTIONAL];
*
* @param value The bytes for resourceKind to set.
* @return This builder for chaining.
*/
public Builder setResourceKindBytes(com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
resourceKind_ = value;
bitField0_ |= 0x00000002;
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.RestoreConfig.GroupKind)
}
// @@protoc_insertion_point(class_scope:google.cloud.gkebackup.v1.RestoreConfig.GroupKind)
private static final com.google.cloud.gkebackup.v1.RestoreConfig.GroupKind DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new com.google.cloud.gkebackup.v1.RestoreConfig.GroupKind();
}
public static com.google.cloud.gkebackup.v1.RestoreConfig.GroupKind getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser PARSER =
new com.google.protobuf.AbstractParser() {
@java.lang.Override
public GroupKind 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.RestoreConfig.GroupKind getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
public interface ClusterResourceRestoreScopeOrBuilder
extends
// @@protoc_insertion_point(interface_extends:google.cloud.gkebackup.v1.RestoreConfig.ClusterResourceRestoreScope)
com.google.protobuf.MessageOrBuilder {
/**
*
*
*
* Optional. A list of cluster-scoped resource group kinds to restore from
* the backup. If specified, only the selected resources will be restored.
* Mutually exclusive to any other field in the message.
*
*
*
* repeated .google.cloud.gkebackup.v1.RestoreConfig.GroupKind selected_group_kinds = 1 [(.google.api.field_behavior) = OPTIONAL];
*
*/
java.util.List
getSelectedGroupKindsList();
/**
*
*
*
* Optional. A list of cluster-scoped resource group kinds to restore from
* the backup. If specified, only the selected resources will be restored.
* Mutually exclusive to any other field in the message.
*
*
*
* repeated .google.cloud.gkebackup.v1.RestoreConfig.GroupKind selected_group_kinds = 1 [(.google.api.field_behavior) = OPTIONAL];
*
*/
com.google.cloud.gkebackup.v1.RestoreConfig.GroupKind getSelectedGroupKinds(int index);
/**
*
*
*
* Optional. A list of cluster-scoped resource group kinds to restore from
* the backup. If specified, only the selected resources will be restored.
* Mutually exclusive to any other field in the message.
*
*
*
* repeated .google.cloud.gkebackup.v1.RestoreConfig.GroupKind selected_group_kinds = 1 [(.google.api.field_behavior) = OPTIONAL];
*
*/
int getSelectedGroupKindsCount();
/**
*
*
*
* Optional. A list of cluster-scoped resource group kinds to restore from
* the backup. If specified, only the selected resources will be restored.
* Mutually exclusive to any other field in the message.
*
*
*
* repeated .google.cloud.gkebackup.v1.RestoreConfig.GroupKind selected_group_kinds = 1 [(.google.api.field_behavior) = OPTIONAL];
*
*/
java.util.List extends com.google.cloud.gkebackup.v1.RestoreConfig.GroupKindOrBuilder>
getSelectedGroupKindsOrBuilderList();
/**
*
*
*
* Optional. A list of cluster-scoped resource group kinds to restore from
* the backup. If specified, only the selected resources will be restored.
* Mutually exclusive to any other field in the message.
*
*
*
* repeated .google.cloud.gkebackup.v1.RestoreConfig.GroupKind selected_group_kinds = 1 [(.google.api.field_behavior) = OPTIONAL];
*
*/
com.google.cloud.gkebackup.v1.RestoreConfig.GroupKindOrBuilder getSelectedGroupKindsOrBuilder(
int index);
/**
*
*
*
* Optional. A list of cluster-scoped resource group kinds to NOT restore
* from the backup. If specified, all valid cluster-scoped resources will be
* restored except for those specified in the list.
* Mutually exclusive to any other field in the message.
*
*
*
* repeated .google.cloud.gkebackup.v1.RestoreConfig.GroupKind excluded_group_kinds = 2 [(.google.api.field_behavior) = OPTIONAL];
*
*/
java.util.List
getExcludedGroupKindsList();
/**
*
*
*
* Optional. A list of cluster-scoped resource group kinds to NOT restore
* from the backup. If specified, all valid cluster-scoped resources will be
* restored except for those specified in the list.
* Mutually exclusive to any other field in the message.
*
*
*
* repeated .google.cloud.gkebackup.v1.RestoreConfig.GroupKind excluded_group_kinds = 2 [(.google.api.field_behavior) = OPTIONAL];
*
*/
com.google.cloud.gkebackup.v1.RestoreConfig.GroupKind getExcludedGroupKinds(int index);
/**
*
*
*
* Optional. A list of cluster-scoped resource group kinds to NOT restore
* from the backup. If specified, all valid cluster-scoped resources will be
* restored except for those specified in the list.
* Mutually exclusive to any other field in the message.
*
*
*
* repeated .google.cloud.gkebackup.v1.RestoreConfig.GroupKind excluded_group_kinds = 2 [(.google.api.field_behavior) = OPTIONAL];
*
*/
int getExcludedGroupKindsCount();
/**
*
*
*
* Optional. A list of cluster-scoped resource group kinds to NOT restore
* from the backup. If specified, all valid cluster-scoped resources will be
* restored except for those specified in the list.
* Mutually exclusive to any other field in the message.
*
*
*
* repeated .google.cloud.gkebackup.v1.RestoreConfig.GroupKind excluded_group_kinds = 2 [(.google.api.field_behavior) = OPTIONAL];
*
*/
java.util.List extends com.google.cloud.gkebackup.v1.RestoreConfig.GroupKindOrBuilder>
getExcludedGroupKindsOrBuilderList();
/**
*
*
*
* Optional. A list of cluster-scoped resource group kinds to NOT restore
* from the backup. If specified, all valid cluster-scoped resources will be
* restored except for those specified in the list.
* Mutually exclusive to any other field in the message.
*
*
*
* repeated .google.cloud.gkebackup.v1.RestoreConfig.GroupKind excluded_group_kinds = 2 [(.google.api.field_behavior) = OPTIONAL];
*
*/
com.google.cloud.gkebackup.v1.RestoreConfig.GroupKindOrBuilder getExcludedGroupKindsOrBuilder(
int index);
/**
*
*
*
* Optional. If True, all valid cluster-scoped resources will be restored.
* Mutually exclusive to any other field in the message.
*
*
* bool all_group_kinds = 3 [(.google.api.field_behavior) = OPTIONAL];
*
* @return The allGroupKinds.
*/
boolean getAllGroupKinds();
/**
*
*
*
* Optional. If True, no cluster-scoped resources will be restored.
* This has the same restore scope as if the message is not defined.
* Mutually exclusive to any other field in the message.
*
*
* bool no_group_kinds = 4 [(.google.api.field_behavior) = OPTIONAL];
*
* @return The noGroupKinds.
*/
boolean getNoGroupKinds();
}
/**
*
*
*
* Defines the scope of cluster-scoped resources to restore.
*
* Some group kinds are not reasonable choices for a restore, and will cause
* an error if selected here. Any scope selection that would restore
* "all valid" resources automatically excludes these group kinds.
* - gkebackup.gke.io/BackupJob
* - gkebackup.gke.io/RestoreJob
* - metrics.k8s.io/NodeMetrics
* - migration.k8s.io/StorageState
* - migration.k8s.io/StorageVersionMigration
* - Node
* - snapshot.storage.k8s.io/VolumeSnapshotContent
* - storage.k8s.io/CSINode
*
* Some group kinds are driven by restore configuration elsewhere,
* and will cause an error if selected here.
* - Namespace
* - PersistentVolume
*
*
* Protobuf type {@code google.cloud.gkebackup.v1.RestoreConfig.ClusterResourceRestoreScope}
*/
public static final class ClusterResourceRestoreScope
extends com.google.protobuf.GeneratedMessageV3
implements
// @@protoc_insertion_point(message_implements:google.cloud.gkebackup.v1.RestoreConfig.ClusterResourceRestoreScope)
ClusterResourceRestoreScopeOrBuilder {
private static final long serialVersionUID = 0L;
// Use ClusterResourceRestoreScope.newBuilder() to construct.
private ClusterResourceRestoreScope(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private ClusterResourceRestoreScope() {
selectedGroupKinds_ = java.util.Collections.emptyList();
excludedGroupKinds_ = java.util.Collections.emptyList();
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(UnusedPrivateParameter unused) {
return new ClusterResourceRestoreScope();
}
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
return com.google.cloud.gkebackup.v1.RestoreProto
.internal_static_google_cloud_gkebackup_v1_RestoreConfig_ClusterResourceRestoreScope_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.google.cloud.gkebackup.v1.RestoreProto
.internal_static_google_cloud_gkebackup_v1_RestoreConfig_ClusterResourceRestoreScope_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.google.cloud.gkebackup.v1.RestoreConfig.ClusterResourceRestoreScope.class,
com.google.cloud.gkebackup.v1.RestoreConfig.ClusterResourceRestoreScope.Builder
.class);
}
public static final int SELECTED_GROUP_KINDS_FIELD_NUMBER = 1;
@SuppressWarnings("serial")
private java.util.List
selectedGroupKinds_;
/**
*
*
*
* Optional. A list of cluster-scoped resource group kinds to restore from
* the backup. If specified, only the selected resources will be restored.
* Mutually exclusive to any other field in the message.
*
*
*
* repeated .google.cloud.gkebackup.v1.RestoreConfig.GroupKind selected_group_kinds = 1 [(.google.api.field_behavior) = OPTIONAL];
*
*/
@java.lang.Override
public java.util.List
getSelectedGroupKindsList() {
return selectedGroupKinds_;
}
/**
*
*
*
* Optional. A list of cluster-scoped resource group kinds to restore from
* the backup. If specified, only the selected resources will be restored.
* Mutually exclusive to any other field in the message.
*
*
*
* repeated .google.cloud.gkebackup.v1.RestoreConfig.GroupKind selected_group_kinds = 1 [(.google.api.field_behavior) = OPTIONAL];
*
*/
@java.lang.Override
public java.util.List extends com.google.cloud.gkebackup.v1.RestoreConfig.GroupKindOrBuilder>
getSelectedGroupKindsOrBuilderList() {
return selectedGroupKinds_;
}
/**
*
*
*
* Optional. A list of cluster-scoped resource group kinds to restore from
* the backup. If specified, only the selected resources will be restored.
* Mutually exclusive to any other field in the message.
*
*
*
* repeated .google.cloud.gkebackup.v1.RestoreConfig.GroupKind selected_group_kinds = 1 [(.google.api.field_behavior) = OPTIONAL];
*
*/
@java.lang.Override
public int getSelectedGroupKindsCount() {
return selectedGroupKinds_.size();
}
/**
*
*
*
* Optional. A list of cluster-scoped resource group kinds to restore from
* the backup. If specified, only the selected resources will be restored.
* Mutually exclusive to any other field in the message.
*
*
*
* repeated .google.cloud.gkebackup.v1.RestoreConfig.GroupKind selected_group_kinds = 1 [(.google.api.field_behavior) = OPTIONAL];
*
*/
@java.lang.Override
public com.google.cloud.gkebackup.v1.RestoreConfig.GroupKind getSelectedGroupKinds(int index) {
return selectedGroupKinds_.get(index);
}
/**
*
*
*
* Optional. A list of cluster-scoped resource group kinds to restore from
* the backup. If specified, only the selected resources will be restored.
* Mutually exclusive to any other field in the message.
*
*
*
* repeated .google.cloud.gkebackup.v1.RestoreConfig.GroupKind selected_group_kinds = 1 [(.google.api.field_behavior) = OPTIONAL];
*
*/
@java.lang.Override
public com.google.cloud.gkebackup.v1.RestoreConfig.GroupKindOrBuilder
getSelectedGroupKindsOrBuilder(int index) {
return selectedGroupKinds_.get(index);
}
public static final int EXCLUDED_GROUP_KINDS_FIELD_NUMBER = 2;
@SuppressWarnings("serial")
private java.util.List
excludedGroupKinds_;
/**
*
*
*
* Optional. A list of cluster-scoped resource group kinds to NOT restore
* from the backup. If specified, all valid cluster-scoped resources will be
* restored except for those specified in the list.
* Mutually exclusive to any other field in the message.
*
*
*
* repeated .google.cloud.gkebackup.v1.RestoreConfig.GroupKind excluded_group_kinds = 2 [(.google.api.field_behavior) = OPTIONAL];
*
*/
@java.lang.Override
public java.util.List
getExcludedGroupKindsList() {
return excludedGroupKinds_;
}
/**
*
*
*
* Optional. A list of cluster-scoped resource group kinds to NOT restore
* from the backup. If specified, all valid cluster-scoped resources will be
* restored except for those specified in the list.
* Mutually exclusive to any other field in the message.
*
*
*
* repeated .google.cloud.gkebackup.v1.RestoreConfig.GroupKind excluded_group_kinds = 2 [(.google.api.field_behavior) = OPTIONAL];
*
*/
@java.lang.Override
public java.util.List extends com.google.cloud.gkebackup.v1.RestoreConfig.GroupKindOrBuilder>
getExcludedGroupKindsOrBuilderList() {
return excludedGroupKinds_;
}
/**
*
*
*
* Optional. A list of cluster-scoped resource group kinds to NOT restore
* from the backup. If specified, all valid cluster-scoped resources will be
* restored except for those specified in the list.
* Mutually exclusive to any other field in the message.
*
*
*
* repeated .google.cloud.gkebackup.v1.RestoreConfig.GroupKind excluded_group_kinds = 2 [(.google.api.field_behavior) = OPTIONAL];
*
*/
@java.lang.Override
public int getExcludedGroupKindsCount() {
return excludedGroupKinds_.size();
}
/**
*
*
*
* Optional. A list of cluster-scoped resource group kinds to NOT restore
* from the backup. If specified, all valid cluster-scoped resources will be
* restored except for those specified in the list.
* Mutually exclusive to any other field in the message.
*
*
*
* repeated .google.cloud.gkebackup.v1.RestoreConfig.GroupKind excluded_group_kinds = 2 [(.google.api.field_behavior) = OPTIONAL];
*
*/
@java.lang.Override
public com.google.cloud.gkebackup.v1.RestoreConfig.GroupKind getExcludedGroupKinds(int index) {
return excludedGroupKinds_.get(index);
}
/**
*
*
*
* Optional. A list of cluster-scoped resource group kinds to NOT restore
* from the backup. If specified, all valid cluster-scoped resources will be
* restored except for those specified in the list.
* Mutually exclusive to any other field in the message.
*
*
*
* repeated .google.cloud.gkebackup.v1.RestoreConfig.GroupKind excluded_group_kinds = 2 [(.google.api.field_behavior) = OPTIONAL];
*
*/
@java.lang.Override
public com.google.cloud.gkebackup.v1.RestoreConfig.GroupKindOrBuilder
getExcludedGroupKindsOrBuilder(int index) {
return excludedGroupKinds_.get(index);
}
public static final int ALL_GROUP_KINDS_FIELD_NUMBER = 3;
private boolean allGroupKinds_ = false;
/**
*
*
*
* Optional. If True, all valid cluster-scoped resources will be restored.
* Mutually exclusive to any other field in the message.
*
*
* bool all_group_kinds = 3 [(.google.api.field_behavior) = OPTIONAL];
*
* @return The allGroupKinds.
*/
@java.lang.Override
public boolean getAllGroupKinds() {
return allGroupKinds_;
}
public static final int NO_GROUP_KINDS_FIELD_NUMBER = 4;
private boolean noGroupKinds_ = false;
/**
*
*
*
* Optional. If True, no cluster-scoped resources will be restored.
* This has the same restore scope as if the message is not defined.
* Mutually exclusive to any other field in the message.
*
*
* bool no_group_kinds = 4 [(.google.api.field_behavior) = OPTIONAL];
*
* @return The noGroupKinds.
*/
@java.lang.Override
public boolean getNoGroupKinds() {
return noGroupKinds_;
}
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 {
for (int i = 0; i < selectedGroupKinds_.size(); i++) {
output.writeMessage(1, selectedGroupKinds_.get(i));
}
for (int i = 0; i < excludedGroupKinds_.size(); i++) {
output.writeMessage(2, excludedGroupKinds_.get(i));
}
if (allGroupKinds_ != false) {
output.writeBool(3, allGroupKinds_);
}
if (noGroupKinds_ != false) {
output.writeBool(4, noGroupKinds_);
}
getUnknownFields().writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
for (int i = 0; i < selectedGroupKinds_.size(); i++) {
size +=
com.google.protobuf.CodedOutputStream.computeMessageSize(1, selectedGroupKinds_.get(i));
}
for (int i = 0; i < excludedGroupKinds_.size(); i++) {
size +=
com.google.protobuf.CodedOutputStream.computeMessageSize(2, excludedGroupKinds_.get(i));
}
if (allGroupKinds_ != false) {
size += com.google.protobuf.CodedOutputStream.computeBoolSize(3, allGroupKinds_);
}
if (noGroupKinds_ != false) {
size += com.google.protobuf.CodedOutputStream.computeBoolSize(4, noGroupKinds_);
}
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.RestoreConfig.ClusterResourceRestoreScope)) {
return super.equals(obj);
}
com.google.cloud.gkebackup.v1.RestoreConfig.ClusterResourceRestoreScope other =
(com.google.cloud.gkebackup.v1.RestoreConfig.ClusterResourceRestoreScope) obj;
if (!getSelectedGroupKindsList().equals(other.getSelectedGroupKindsList())) return false;
if (!getExcludedGroupKindsList().equals(other.getExcludedGroupKindsList())) return false;
if (getAllGroupKinds() != other.getAllGroupKinds()) return false;
if (getNoGroupKinds() != other.getNoGroupKinds()) 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 (getSelectedGroupKindsCount() > 0) {
hash = (37 * hash) + SELECTED_GROUP_KINDS_FIELD_NUMBER;
hash = (53 * hash) + getSelectedGroupKindsList().hashCode();
}
if (getExcludedGroupKindsCount() > 0) {
hash = (37 * hash) + EXCLUDED_GROUP_KINDS_FIELD_NUMBER;
hash = (53 * hash) + getExcludedGroupKindsList().hashCode();
}
hash = (37 * hash) + ALL_GROUP_KINDS_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getAllGroupKinds());
hash = (37 * hash) + NO_GROUP_KINDS_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getNoGroupKinds());
hash = (29 * hash) + getUnknownFields().hashCode();
memoizedHashCode = hash;
return hash;
}
public static com.google.cloud.gkebackup.v1.RestoreConfig.ClusterResourceRestoreScope parseFrom(
java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.cloud.gkebackup.v1.RestoreConfig.ClusterResourceRestoreScope 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.RestoreConfig.ClusterResourceRestoreScope parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.cloud.gkebackup.v1.RestoreConfig.ClusterResourceRestoreScope 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.RestoreConfig.ClusterResourceRestoreScope parseFrom(
byte[] data) throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.cloud.gkebackup.v1.RestoreConfig.ClusterResourceRestoreScope 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.RestoreConfig.ClusterResourceRestoreScope parseFrom(
java.io.InputStream input) throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
}
public static com.google.cloud.gkebackup.v1.RestoreConfig.ClusterResourceRestoreScope 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.RestoreConfig.ClusterResourceRestoreScope
parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input);
}
public static com.google.cloud.gkebackup.v1.RestoreConfig.ClusterResourceRestoreScope
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.RestoreConfig.ClusterResourceRestoreScope 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.RestoreConfig.ClusterResourceRestoreScope 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.RestoreConfig.ClusterResourceRestoreScope 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 the scope of cluster-scoped resources to restore.
*
* Some group kinds are not reasonable choices for a restore, and will cause
* an error if selected here. Any scope selection that would restore
* "all valid" resources automatically excludes these group kinds.
* - gkebackup.gke.io/BackupJob
* - gkebackup.gke.io/RestoreJob
* - metrics.k8s.io/NodeMetrics
* - migration.k8s.io/StorageState
* - migration.k8s.io/StorageVersionMigration
* - Node
* - snapshot.storage.k8s.io/VolumeSnapshotContent
* - storage.k8s.io/CSINode
*
* Some group kinds are driven by restore configuration elsewhere,
* and will cause an error if selected here.
* - Namespace
* - PersistentVolume
*
*
* Protobuf type {@code google.cloud.gkebackup.v1.RestoreConfig.ClusterResourceRestoreScope}
*/
public static final class Builder
extends com.google.protobuf.GeneratedMessageV3.Builder
implements
// @@protoc_insertion_point(builder_implements:google.cloud.gkebackup.v1.RestoreConfig.ClusterResourceRestoreScope)
com.google.cloud.gkebackup.v1.RestoreConfig.ClusterResourceRestoreScopeOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
return com.google.cloud.gkebackup.v1.RestoreProto
.internal_static_google_cloud_gkebackup_v1_RestoreConfig_ClusterResourceRestoreScope_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.google.cloud.gkebackup.v1.RestoreProto
.internal_static_google_cloud_gkebackup_v1_RestoreConfig_ClusterResourceRestoreScope_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.google.cloud.gkebackup.v1.RestoreConfig.ClusterResourceRestoreScope.class,
com.google.cloud.gkebackup.v1.RestoreConfig.ClusterResourceRestoreScope.Builder
.class);
}
// Construct using
// com.google.cloud.gkebackup.v1.RestoreConfig.ClusterResourceRestoreScope.newBuilder()
private Builder() {}
private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
}
@java.lang.Override
public Builder clear() {
super.clear();
bitField0_ = 0;
if (selectedGroupKindsBuilder_ == null) {
selectedGroupKinds_ = java.util.Collections.emptyList();
} else {
selectedGroupKinds_ = null;
selectedGroupKindsBuilder_.clear();
}
bitField0_ = (bitField0_ & ~0x00000001);
if (excludedGroupKindsBuilder_ == null) {
excludedGroupKinds_ = java.util.Collections.emptyList();
} else {
excludedGroupKinds_ = null;
excludedGroupKindsBuilder_.clear();
}
bitField0_ = (bitField0_ & ~0x00000002);
allGroupKinds_ = false;
noGroupKinds_ = false;
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() {
return com.google.cloud.gkebackup.v1.RestoreProto
.internal_static_google_cloud_gkebackup_v1_RestoreConfig_ClusterResourceRestoreScope_descriptor;
}
@java.lang.Override
public com.google.cloud.gkebackup.v1.RestoreConfig.ClusterResourceRestoreScope
getDefaultInstanceForType() {
return com.google.cloud.gkebackup.v1.RestoreConfig.ClusterResourceRestoreScope
.getDefaultInstance();
}
@java.lang.Override
public com.google.cloud.gkebackup.v1.RestoreConfig.ClusterResourceRestoreScope build() {
com.google.cloud.gkebackup.v1.RestoreConfig.ClusterResourceRestoreScope result =
buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public com.google.cloud.gkebackup.v1.RestoreConfig.ClusterResourceRestoreScope
buildPartial() {
com.google.cloud.gkebackup.v1.RestoreConfig.ClusterResourceRestoreScope result =
new com.google.cloud.gkebackup.v1.RestoreConfig.ClusterResourceRestoreScope(this);
buildPartialRepeatedFields(result);
if (bitField0_ != 0) {
buildPartial0(result);
}
onBuilt();
return result;
}
private void buildPartialRepeatedFields(
com.google.cloud.gkebackup.v1.RestoreConfig.ClusterResourceRestoreScope result) {
if (selectedGroupKindsBuilder_ == null) {
if (((bitField0_ & 0x00000001) != 0)) {
selectedGroupKinds_ = java.util.Collections.unmodifiableList(selectedGroupKinds_);
bitField0_ = (bitField0_ & ~0x00000001);
}
result.selectedGroupKinds_ = selectedGroupKinds_;
} else {
result.selectedGroupKinds_ = selectedGroupKindsBuilder_.build();
}
if (excludedGroupKindsBuilder_ == null) {
if (((bitField0_ & 0x00000002) != 0)) {
excludedGroupKinds_ = java.util.Collections.unmodifiableList(excludedGroupKinds_);
bitField0_ = (bitField0_ & ~0x00000002);
}
result.excludedGroupKinds_ = excludedGroupKinds_;
} else {
result.excludedGroupKinds_ = excludedGroupKindsBuilder_.build();
}
}
private void buildPartial0(
com.google.cloud.gkebackup.v1.RestoreConfig.ClusterResourceRestoreScope result) {
int from_bitField0_ = bitField0_;
if (((from_bitField0_ & 0x00000004) != 0)) {
result.allGroupKinds_ = allGroupKinds_;
}
if (((from_bitField0_ & 0x00000008) != 0)) {
result.noGroupKinds_ = noGroupKinds_;
}
}
@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.RestoreConfig.ClusterResourceRestoreScope) {
return mergeFrom(
(com.google.cloud.gkebackup.v1.RestoreConfig.ClusterResourceRestoreScope) other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(
com.google.cloud.gkebackup.v1.RestoreConfig.ClusterResourceRestoreScope other) {
if (other
== com.google.cloud.gkebackup.v1.RestoreConfig.ClusterResourceRestoreScope
.getDefaultInstance()) return this;
if (selectedGroupKindsBuilder_ == null) {
if (!other.selectedGroupKinds_.isEmpty()) {
if (selectedGroupKinds_.isEmpty()) {
selectedGroupKinds_ = other.selectedGroupKinds_;
bitField0_ = (bitField0_ & ~0x00000001);
} else {
ensureSelectedGroupKindsIsMutable();
selectedGroupKinds_.addAll(other.selectedGroupKinds_);
}
onChanged();
}
} else {
if (!other.selectedGroupKinds_.isEmpty()) {
if (selectedGroupKindsBuilder_.isEmpty()) {
selectedGroupKindsBuilder_.dispose();
selectedGroupKindsBuilder_ = null;
selectedGroupKinds_ = other.selectedGroupKinds_;
bitField0_ = (bitField0_ & ~0x00000001);
selectedGroupKindsBuilder_ =
com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders
? getSelectedGroupKindsFieldBuilder()
: null;
} else {
selectedGroupKindsBuilder_.addAllMessages(other.selectedGroupKinds_);
}
}
}
if (excludedGroupKindsBuilder_ == null) {
if (!other.excludedGroupKinds_.isEmpty()) {
if (excludedGroupKinds_.isEmpty()) {
excludedGroupKinds_ = other.excludedGroupKinds_;
bitField0_ = (bitField0_ & ~0x00000002);
} else {
ensureExcludedGroupKindsIsMutable();
excludedGroupKinds_.addAll(other.excludedGroupKinds_);
}
onChanged();
}
} else {
if (!other.excludedGroupKinds_.isEmpty()) {
if (excludedGroupKindsBuilder_.isEmpty()) {
excludedGroupKindsBuilder_.dispose();
excludedGroupKindsBuilder_ = null;
excludedGroupKinds_ = other.excludedGroupKinds_;
bitField0_ = (bitField0_ & ~0x00000002);
excludedGroupKindsBuilder_ =
com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders
? getExcludedGroupKindsFieldBuilder()
: null;
} else {
excludedGroupKindsBuilder_.addAllMessages(other.excludedGroupKinds_);
}
}
}
if (other.getAllGroupKinds() != false) {
setAllGroupKinds(other.getAllGroupKinds());
}
if (other.getNoGroupKinds() != false) {
setNoGroupKinds(other.getNoGroupKinds());
}
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:
{
com.google.cloud.gkebackup.v1.RestoreConfig.GroupKind m =
input.readMessage(
com.google.cloud.gkebackup.v1.RestoreConfig.GroupKind.parser(),
extensionRegistry);
if (selectedGroupKindsBuilder_ == null) {
ensureSelectedGroupKindsIsMutable();
selectedGroupKinds_.add(m);
} else {
selectedGroupKindsBuilder_.addMessage(m);
}
break;
} // case 10
case 18:
{
com.google.cloud.gkebackup.v1.RestoreConfig.GroupKind m =
input.readMessage(
com.google.cloud.gkebackup.v1.RestoreConfig.GroupKind.parser(),
extensionRegistry);
if (excludedGroupKindsBuilder_ == null) {
ensureExcludedGroupKindsIsMutable();
excludedGroupKinds_.add(m);
} else {
excludedGroupKindsBuilder_.addMessage(m);
}
break;
} // case 18
case 24:
{
allGroupKinds_ = input.readBool();
bitField0_ |= 0x00000004;
break;
} // case 24
case 32:
{
noGroupKinds_ = input.readBool();
bitField0_ |= 0x00000008;
break;
} // case 32
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
selectedGroupKinds_ = java.util.Collections.emptyList();
private void ensureSelectedGroupKindsIsMutable() {
if (!((bitField0_ & 0x00000001) != 0)) {
selectedGroupKinds_ =
new java.util.ArrayList(
selectedGroupKinds_);
bitField0_ |= 0x00000001;
}
}
private com.google.protobuf.RepeatedFieldBuilderV3<
com.google.cloud.gkebackup.v1.RestoreConfig.GroupKind,
com.google.cloud.gkebackup.v1.RestoreConfig.GroupKind.Builder,
com.google.cloud.gkebackup.v1.RestoreConfig.GroupKindOrBuilder>
selectedGroupKindsBuilder_;
/**
*
*
*
* Optional. A list of cluster-scoped resource group kinds to restore from
* the backup. If specified, only the selected resources will be restored.
* Mutually exclusive to any other field in the message.
*
*
*
* repeated .google.cloud.gkebackup.v1.RestoreConfig.GroupKind selected_group_kinds = 1 [(.google.api.field_behavior) = OPTIONAL];
*
*/
public java.util.List
getSelectedGroupKindsList() {
if (selectedGroupKindsBuilder_ == null) {
return java.util.Collections.unmodifiableList(selectedGroupKinds_);
} else {
return selectedGroupKindsBuilder_.getMessageList();
}
}
/**
*
*
*
* Optional. A list of cluster-scoped resource group kinds to restore from
* the backup. If specified, only the selected resources will be restored.
* Mutually exclusive to any other field in the message.
*
*
*
* repeated .google.cloud.gkebackup.v1.RestoreConfig.GroupKind selected_group_kinds = 1 [(.google.api.field_behavior) = OPTIONAL];
*
*/
public int getSelectedGroupKindsCount() {
if (selectedGroupKindsBuilder_ == null) {
return selectedGroupKinds_.size();
} else {
return selectedGroupKindsBuilder_.getCount();
}
}
/**
*
*
*
* Optional. A list of cluster-scoped resource group kinds to restore from
* the backup. If specified, only the selected resources will be restored.
* Mutually exclusive to any other field in the message.
*
*
*
* repeated .google.cloud.gkebackup.v1.RestoreConfig.GroupKind selected_group_kinds = 1 [(.google.api.field_behavior) = OPTIONAL];
*
*/
public com.google.cloud.gkebackup.v1.RestoreConfig.GroupKind getSelectedGroupKinds(
int index) {
if (selectedGroupKindsBuilder_ == null) {
return selectedGroupKinds_.get(index);
} else {
return selectedGroupKindsBuilder_.getMessage(index);
}
}
/**
*
*
*
* Optional. A list of cluster-scoped resource group kinds to restore from
* the backup. If specified, only the selected resources will be restored.
* Mutually exclusive to any other field in the message.
*
*
*
* repeated .google.cloud.gkebackup.v1.RestoreConfig.GroupKind selected_group_kinds = 1 [(.google.api.field_behavior) = OPTIONAL];
*
*/
public Builder setSelectedGroupKinds(
int index, com.google.cloud.gkebackup.v1.RestoreConfig.GroupKind value) {
if (selectedGroupKindsBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureSelectedGroupKindsIsMutable();
selectedGroupKinds_.set(index, value);
onChanged();
} else {
selectedGroupKindsBuilder_.setMessage(index, value);
}
return this;
}
/**
*
*
*
* Optional. A list of cluster-scoped resource group kinds to restore from
* the backup. If specified, only the selected resources will be restored.
* Mutually exclusive to any other field in the message.
*
*
*
* repeated .google.cloud.gkebackup.v1.RestoreConfig.GroupKind selected_group_kinds = 1 [(.google.api.field_behavior) = OPTIONAL];
*
*/
public Builder setSelectedGroupKinds(
int index,
com.google.cloud.gkebackup.v1.RestoreConfig.GroupKind.Builder builderForValue) {
if (selectedGroupKindsBuilder_ == null) {
ensureSelectedGroupKindsIsMutable();
selectedGroupKinds_.set(index, builderForValue.build());
onChanged();
} else {
selectedGroupKindsBuilder_.setMessage(index, builderForValue.build());
}
return this;
}
/**
*
*
*
* Optional. A list of cluster-scoped resource group kinds to restore from
* the backup. If specified, only the selected resources will be restored.
* Mutually exclusive to any other field in the message.
*
*
*
* repeated .google.cloud.gkebackup.v1.RestoreConfig.GroupKind selected_group_kinds = 1 [(.google.api.field_behavior) = OPTIONAL];
*
*/
public Builder addSelectedGroupKinds(
com.google.cloud.gkebackup.v1.RestoreConfig.GroupKind value) {
if (selectedGroupKindsBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureSelectedGroupKindsIsMutable();
selectedGroupKinds_.add(value);
onChanged();
} else {
selectedGroupKindsBuilder_.addMessage(value);
}
return this;
}
/**
*
*
*
* Optional. A list of cluster-scoped resource group kinds to restore from
* the backup. If specified, only the selected resources will be restored.
* Mutually exclusive to any other field in the message.
*
*
*
* repeated .google.cloud.gkebackup.v1.RestoreConfig.GroupKind selected_group_kinds = 1 [(.google.api.field_behavior) = OPTIONAL];
*
*/
public Builder addSelectedGroupKinds(
int index, com.google.cloud.gkebackup.v1.RestoreConfig.GroupKind value) {
if (selectedGroupKindsBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureSelectedGroupKindsIsMutable();
selectedGroupKinds_.add(index, value);
onChanged();
} else {
selectedGroupKindsBuilder_.addMessage(index, value);
}
return this;
}
/**
*
*
*
* Optional. A list of cluster-scoped resource group kinds to restore from
* the backup. If specified, only the selected resources will be restored.
* Mutually exclusive to any other field in the message.
*
*
*
* repeated .google.cloud.gkebackup.v1.RestoreConfig.GroupKind selected_group_kinds = 1 [(.google.api.field_behavior) = OPTIONAL];
*
*/
public Builder addSelectedGroupKinds(
com.google.cloud.gkebackup.v1.RestoreConfig.GroupKind.Builder builderForValue) {
if (selectedGroupKindsBuilder_ == null) {
ensureSelectedGroupKindsIsMutable();
selectedGroupKinds_.add(builderForValue.build());
onChanged();
} else {
selectedGroupKindsBuilder_.addMessage(builderForValue.build());
}
return this;
}
/**
*
*
*
* Optional. A list of cluster-scoped resource group kinds to restore from
* the backup. If specified, only the selected resources will be restored.
* Mutually exclusive to any other field in the message.
*
*
*
* repeated .google.cloud.gkebackup.v1.RestoreConfig.GroupKind selected_group_kinds = 1 [(.google.api.field_behavior) = OPTIONAL];
*
*/
public Builder addSelectedGroupKinds(
int index,
com.google.cloud.gkebackup.v1.RestoreConfig.GroupKind.Builder builderForValue) {
if (selectedGroupKindsBuilder_ == null) {
ensureSelectedGroupKindsIsMutable();
selectedGroupKinds_.add(index, builderForValue.build());
onChanged();
} else {
selectedGroupKindsBuilder_.addMessage(index, builderForValue.build());
}
return this;
}
/**
*
*
*
* Optional. A list of cluster-scoped resource group kinds to restore from
* the backup. If specified, only the selected resources will be restored.
* Mutually exclusive to any other field in the message.
*
*
*
* repeated .google.cloud.gkebackup.v1.RestoreConfig.GroupKind selected_group_kinds = 1 [(.google.api.field_behavior) = OPTIONAL];
*
*/
public Builder addAllSelectedGroupKinds(
java.lang.Iterable extends com.google.cloud.gkebackup.v1.RestoreConfig.GroupKind>
values) {
if (selectedGroupKindsBuilder_ == null) {
ensureSelectedGroupKindsIsMutable();
com.google.protobuf.AbstractMessageLite.Builder.addAll(values, selectedGroupKinds_);
onChanged();
} else {
selectedGroupKindsBuilder_.addAllMessages(values);
}
return this;
}
/**
*
*
*
* Optional. A list of cluster-scoped resource group kinds to restore from
* the backup. If specified, only the selected resources will be restored.
* Mutually exclusive to any other field in the message.
*
*
*
* repeated .google.cloud.gkebackup.v1.RestoreConfig.GroupKind selected_group_kinds = 1 [(.google.api.field_behavior) = OPTIONAL];
*
*/
public Builder clearSelectedGroupKinds() {
if (selectedGroupKindsBuilder_ == null) {
selectedGroupKinds_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000001);
onChanged();
} else {
selectedGroupKindsBuilder_.clear();
}
return this;
}
/**
*
*
*
* Optional. A list of cluster-scoped resource group kinds to restore from
* the backup. If specified, only the selected resources will be restored.
* Mutually exclusive to any other field in the message.
*
*
*
* repeated .google.cloud.gkebackup.v1.RestoreConfig.GroupKind selected_group_kinds = 1 [(.google.api.field_behavior) = OPTIONAL];
*
*/
public Builder removeSelectedGroupKinds(int index) {
if (selectedGroupKindsBuilder_ == null) {
ensureSelectedGroupKindsIsMutable();
selectedGroupKinds_.remove(index);
onChanged();
} else {
selectedGroupKindsBuilder_.remove(index);
}
return this;
}
/**
*
*
*
* Optional. A list of cluster-scoped resource group kinds to restore from
* the backup. If specified, only the selected resources will be restored.
* Mutually exclusive to any other field in the message.
*
*
*
* repeated .google.cloud.gkebackup.v1.RestoreConfig.GroupKind selected_group_kinds = 1 [(.google.api.field_behavior) = OPTIONAL];
*
*/
public com.google.cloud.gkebackup.v1.RestoreConfig.GroupKind.Builder
getSelectedGroupKindsBuilder(int index) {
return getSelectedGroupKindsFieldBuilder().getBuilder(index);
}
/**
*
*
*
* Optional. A list of cluster-scoped resource group kinds to restore from
* the backup. If specified, only the selected resources will be restored.
* Mutually exclusive to any other field in the message.
*
*
*
* repeated .google.cloud.gkebackup.v1.RestoreConfig.GroupKind selected_group_kinds = 1 [(.google.api.field_behavior) = OPTIONAL];
*
*/
public com.google.cloud.gkebackup.v1.RestoreConfig.GroupKindOrBuilder
getSelectedGroupKindsOrBuilder(int index) {
if (selectedGroupKindsBuilder_ == null) {
return selectedGroupKinds_.get(index);
} else {
return selectedGroupKindsBuilder_.getMessageOrBuilder(index);
}
}
/**
*
*
*
* Optional. A list of cluster-scoped resource group kinds to restore from
* the backup. If specified, only the selected resources will be restored.
* Mutually exclusive to any other field in the message.
*
*
*
* repeated .google.cloud.gkebackup.v1.RestoreConfig.GroupKind selected_group_kinds = 1 [(.google.api.field_behavior) = OPTIONAL];
*
*/
public java.util.List<
? extends com.google.cloud.gkebackup.v1.RestoreConfig.GroupKindOrBuilder>
getSelectedGroupKindsOrBuilderList() {
if (selectedGroupKindsBuilder_ != null) {
return selectedGroupKindsBuilder_.getMessageOrBuilderList();
} else {
return java.util.Collections.unmodifiableList(selectedGroupKinds_);
}
}
/**
*
*
*
* Optional. A list of cluster-scoped resource group kinds to restore from
* the backup. If specified, only the selected resources will be restored.
* Mutually exclusive to any other field in the message.
*
*
*
* repeated .google.cloud.gkebackup.v1.RestoreConfig.GroupKind selected_group_kinds = 1 [(.google.api.field_behavior) = OPTIONAL];
*
*/
public com.google.cloud.gkebackup.v1.RestoreConfig.GroupKind.Builder
addSelectedGroupKindsBuilder() {
return getSelectedGroupKindsFieldBuilder()
.addBuilder(com.google.cloud.gkebackup.v1.RestoreConfig.GroupKind.getDefaultInstance());
}
/**
*
*
*
* Optional. A list of cluster-scoped resource group kinds to restore from
* the backup. If specified, only the selected resources will be restored.
* Mutually exclusive to any other field in the message.
*
*
*
* repeated .google.cloud.gkebackup.v1.RestoreConfig.GroupKind selected_group_kinds = 1 [(.google.api.field_behavior) = OPTIONAL];
*
*/
public com.google.cloud.gkebackup.v1.RestoreConfig.GroupKind.Builder
addSelectedGroupKindsBuilder(int index) {
return getSelectedGroupKindsFieldBuilder()
.addBuilder(
index, com.google.cloud.gkebackup.v1.RestoreConfig.GroupKind.getDefaultInstance());
}
/**
*
*
*
* Optional. A list of cluster-scoped resource group kinds to restore from
* the backup. If specified, only the selected resources will be restored.
* Mutually exclusive to any other field in the message.
*
*
*
* repeated .google.cloud.gkebackup.v1.RestoreConfig.GroupKind selected_group_kinds = 1 [(.google.api.field_behavior) = OPTIONAL];
*
*/
public java.util.List
getSelectedGroupKindsBuilderList() {
return getSelectedGroupKindsFieldBuilder().getBuilderList();
}
private com.google.protobuf.RepeatedFieldBuilderV3<
com.google.cloud.gkebackup.v1.RestoreConfig.GroupKind,
com.google.cloud.gkebackup.v1.RestoreConfig.GroupKind.Builder,
com.google.cloud.gkebackup.v1.RestoreConfig.GroupKindOrBuilder>
getSelectedGroupKindsFieldBuilder() {
if (selectedGroupKindsBuilder_ == null) {
selectedGroupKindsBuilder_ =
new com.google.protobuf.RepeatedFieldBuilderV3<
com.google.cloud.gkebackup.v1.RestoreConfig.GroupKind,
com.google.cloud.gkebackup.v1.RestoreConfig.GroupKind.Builder,
com.google.cloud.gkebackup.v1.RestoreConfig.GroupKindOrBuilder>(
selectedGroupKinds_,
((bitField0_ & 0x00000001) != 0),
getParentForChildren(),
isClean());
selectedGroupKinds_ = null;
}
return selectedGroupKindsBuilder_;
}
private java.util.List
excludedGroupKinds_ = java.util.Collections.emptyList();
private void ensureExcludedGroupKindsIsMutable() {
if (!((bitField0_ & 0x00000002) != 0)) {
excludedGroupKinds_ =
new java.util.ArrayList(
excludedGroupKinds_);
bitField0_ |= 0x00000002;
}
}
private com.google.protobuf.RepeatedFieldBuilderV3<
com.google.cloud.gkebackup.v1.RestoreConfig.GroupKind,
com.google.cloud.gkebackup.v1.RestoreConfig.GroupKind.Builder,
com.google.cloud.gkebackup.v1.RestoreConfig.GroupKindOrBuilder>
excludedGroupKindsBuilder_;
/**
*
*
*
* Optional. A list of cluster-scoped resource group kinds to NOT restore
* from the backup. If specified, all valid cluster-scoped resources will be
* restored except for those specified in the list.
* Mutually exclusive to any other field in the message.
*
*
*
* repeated .google.cloud.gkebackup.v1.RestoreConfig.GroupKind excluded_group_kinds = 2 [(.google.api.field_behavior) = OPTIONAL];
*
*/
public java.util.List
getExcludedGroupKindsList() {
if (excludedGroupKindsBuilder_ == null) {
return java.util.Collections.unmodifiableList(excludedGroupKinds_);
} else {
return excludedGroupKindsBuilder_.getMessageList();
}
}
/**
*
*
*
* Optional. A list of cluster-scoped resource group kinds to NOT restore
* from the backup. If specified, all valid cluster-scoped resources will be
* restored except for those specified in the list.
* Mutually exclusive to any other field in the message.
*
*
*
* repeated .google.cloud.gkebackup.v1.RestoreConfig.GroupKind excluded_group_kinds = 2 [(.google.api.field_behavior) = OPTIONAL];
*
*/
public int getExcludedGroupKindsCount() {
if (excludedGroupKindsBuilder_ == null) {
return excludedGroupKinds_.size();
} else {
return excludedGroupKindsBuilder_.getCount();
}
}
/**
*
*
*
* Optional. A list of cluster-scoped resource group kinds to NOT restore
* from the backup. If specified, all valid cluster-scoped resources will be
* restored except for those specified in the list.
* Mutually exclusive to any other field in the message.
*
*
*
* repeated .google.cloud.gkebackup.v1.RestoreConfig.GroupKind excluded_group_kinds = 2 [(.google.api.field_behavior) = OPTIONAL];
*
*/
public com.google.cloud.gkebackup.v1.RestoreConfig.GroupKind getExcludedGroupKinds(
int index) {
if (excludedGroupKindsBuilder_ == null) {
return excludedGroupKinds_.get(index);
} else {
return excludedGroupKindsBuilder_.getMessage(index);
}
}
/**
*
*
*
* Optional. A list of cluster-scoped resource group kinds to NOT restore
* from the backup. If specified, all valid cluster-scoped resources will be
* restored except for those specified in the list.
* Mutually exclusive to any other field in the message.
*
*
*
* repeated .google.cloud.gkebackup.v1.RestoreConfig.GroupKind excluded_group_kinds = 2 [(.google.api.field_behavior) = OPTIONAL];
*
*/
public Builder setExcludedGroupKinds(
int index, com.google.cloud.gkebackup.v1.RestoreConfig.GroupKind value) {
if (excludedGroupKindsBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureExcludedGroupKindsIsMutable();
excludedGroupKinds_.set(index, value);
onChanged();
} else {
excludedGroupKindsBuilder_.setMessage(index, value);
}
return this;
}
/**
*
*
*
* Optional. A list of cluster-scoped resource group kinds to NOT restore
* from the backup. If specified, all valid cluster-scoped resources will be
* restored except for those specified in the list.
* Mutually exclusive to any other field in the message.
*
*
*
* repeated .google.cloud.gkebackup.v1.RestoreConfig.GroupKind excluded_group_kinds = 2 [(.google.api.field_behavior) = OPTIONAL];
*
*/
public Builder setExcludedGroupKinds(
int index,
com.google.cloud.gkebackup.v1.RestoreConfig.GroupKind.Builder builderForValue) {
if (excludedGroupKindsBuilder_ == null) {
ensureExcludedGroupKindsIsMutable();
excludedGroupKinds_.set(index, builderForValue.build());
onChanged();
} else {
excludedGroupKindsBuilder_.setMessage(index, builderForValue.build());
}
return this;
}
/**
*
*
*
* Optional. A list of cluster-scoped resource group kinds to NOT restore
* from the backup. If specified, all valid cluster-scoped resources will be
* restored except for those specified in the list.
* Mutually exclusive to any other field in the message.
*
*
*
* repeated .google.cloud.gkebackup.v1.RestoreConfig.GroupKind excluded_group_kinds = 2 [(.google.api.field_behavior) = OPTIONAL];
*
*/
public Builder addExcludedGroupKinds(
com.google.cloud.gkebackup.v1.RestoreConfig.GroupKind value) {
if (excludedGroupKindsBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureExcludedGroupKindsIsMutable();
excludedGroupKinds_.add(value);
onChanged();
} else {
excludedGroupKindsBuilder_.addMessage(value);
}
return this;
}
/**
*
*
*
* Optional. A list of cluster-scoped resource group kinds to NOT restore
* from the backup. If specified, all valid cluster-scoped resources will be
* restored except for those specified in the list.
* Mutually exclusive to any other field in the message.
*
*
*
* repeated .google.cloud.gkebackup.v1.RestoreConfig.GroupKind excluded_group_kinds = 2 [(.google.api.field_behavior) = OPTIONAL];
*
*/
public Builder addExcludedGroupKinds(
int index, com.google.cloud.gkebackup.v1.RestoreConfig.GroupKind value) {
if (excludedGroupKindsBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureExcludedGroupKindsIsMutable();
excludedGroupKinds_.add(index, value);
onChanged();
} else {
excludedGroupKindsBuilder_.addMessage(index, value);
}
return this;
}
/**
*
*
*
* Optional. A list of cluster-scoped resource group kinds to NOT restore
* from the backup. If specified, all valid cluster-scoped resources will be
* restored except for those specified in the list.
* Mutually exclusive to any other field in the message.
*
*
*
* repeated .google.cloud.gkebackup.v1.RestoreConfig.GroupKind excluded_group_kinds = 2 [(.google.api.field_behavior) = OPTIONAL];
*
*/
public Builder addExcludedGroupKinds(
com.google.cloud.gkebackup.v1.RestoreConfig.GroupKind.Builder builderForValue) {
if (excludedGroupKindsBuilder_ == null) {
ensureExcludedGroupKindsIsMutable();
excludedGroupKinds_.add(builderForValue.build());
onChanged();
} else {
excludedGroupKindsBuilder_.addMessage(builderForValue.build());
}
return this;
}
/**
*
*
*
* Optional. A list of cluster-scoped resource group kinds to NOT restore
* from the backup. If specified, all valid cluster-scoped resources will be
* restored except for those specified in the list.
* Mutually exclusive to any other field in the message.
*
*
*
* repeated .google.cloud.gkebackup.v1.RestoreConfig.GroupKind excluded_group_kinds = 2 [(.google.api.field_behavior) = OPTIONAL];
*
*/
public Builder addExcludedGroupKinds(
int index,
com.google.cloud.gkebackup.v1.RestoreConfig.GroupKind.Builder builderForValue) {
if (excludedGroupKindsBuilder_ == null) {
ensureExcludedGroupKindsIsMutable();
excludedGroupKinds_.add(index, builderForValue.build());
onChanged();
} else {
excludedGroupKindsBuilder_.addMessage(index, builderForValue.build());
}
return this;
}
/**
*
*
*
* Optional. A list of cluster-scoped resource group kinds to NOT restore
* from the backup. If specified, all valid cluster-scoped resources will be
* restored except for those specified in the list.
* Mutually exclusive to any other field in the message.
*
*
*
* repeated .google.cloud.gkebackup.v1.RestoreConfig.GroupKind excluded_group_kinds = 2 [(.google.api.field_behavior) = OPTIONAL];
*
*/
public Builder addAllExcludedGroupKinds(
java.lang.Iterable extends com.google.cloud.gkebackup.v1.RestoreConfig.GroupKind>
values) {
if (excludedGroupKindsBuilder_ == null) {
ensureExcludedGroupKindsIsMutable();
com.google.protobuf.AbstractMessageLite.Builder.addAll(values, excludedGroupKinds_);
onChanged();
} else {
excludedGroupKindsBuilder_.addAllMessages(values);
}
return this;
}
/**
*
*
*
* Optional. A list of cluster-scoped resource group kinds to NOT restore
* from the backup. If specified, all valid cluster-scoped resources will be
* restored except for those specified in the list.
* Mutually exclusive to any other field in the message.
*
*
*
* repeated .google.cloud.gkebackup.v1.RestoreConfig.GroupKind excluded_group_kinds = 2 [(.google.api.field_behavior) = OPTIONAL];
*
*/
public Builder clearExcludedGroupKinds() {
if (excludedGroupKindsBuilder_ == null) {
excludedGroupKinds_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000002);
onChanged();
} else {
excludedGroupKindsBuilder_.clear();
}
return this;
}
/**
*
*
*
* Optional. A list of cluster-scoped resource group kinds to NOT restore
* from the backup. If specified, all valid cluster-scoped resources will be
* restored except for those specified in the list.
* Mutually exclusive to any other field in the message.
*
*
*
* repeated .google.cloud.gkebackup.v1.RestoreConfig.GroupKind excluded_group_kinds = 2 [(.google.api.field_behavior) = OPTIONAL];
*
*/
public Builder removeExcludedGroupKinds(int index) {
if (excludedGroupKindsBuilder_ == null) {
ensureExcludedGroupKindsIsMutable();
excludedGroupKinds_.remove(index);
onChanged();
} else {
excludedGroupKindsBuilder_.remove(index);
}
return this;
}
/**
*
*
*
* Optional. A list of cluster-scoped resource group kinds to NOT restore
* from the backup. If specified, all valid cluster-scoped resources will be
* restored except for those specified in the list.
* Mutually exclusive to any other field in the message.
*
*
*
* repeated .google.cloud.gkebackup.v1.RestoreConfig.GroupKind excluded_group_kinds = 2 [(.google.api.field_behavior) = OPTIONAL];
*
*/
public com.google.cloud.gkebackup.v1.RestoreConfig.GroupKind.Builder
getExcludedGroupKindsBuilder(int index) {
return getExcludedGroupKindsFieldBuilder().getBuilder(index);
}
/**
*
*
*
* Optional. A list of cluster-scoped resource group kinds to NOT restore
* from the backup. If specified, all valid cluster-scoped resources will be
* restored except for those specified in the list.
* Mutually exclusive to any other field in the message.
*
*
*
* repeated .google.cloud.gkebackup.v1.RestoreConfig.GroupKind excluded_group_kinds = 2 [(.google.api.field_behavior) = OPTIONAL];
*
*/
public com.google.cloud.gkebackup.v1.RestoreConfig.GroupKindOrBuilder
getExcludedGroupKindsOrBuilder(int index) {
if (excludedGroupKindsBuilder_ == null) {
return excludedGroupKinds_.get(index);
} else {
return excludedGroupKindsBuilder_.getMessageOrBuilder(index);
}
}
/**
*
*
*
* Optional. A list of cluster-scoped resource group kinds to NOT restore
* from the backup. If specified, all valid cluster-scoped resources will be
* restored except for those specified in the list.
* Mutually exclusive to any other field in the message.
*
*
*
* repeated .google.cloud.gkebackup.v1.RestoreConfig.GroupKind excluded_group_kinds = 2 [(.google.api.field_behavior) = OPTIONAL];
*
*/
public java.util.List<
? extends com.google.cloud.gkebackup.v1.RestoreConfig.GroupKindOrBuilder>
getExcludedGroupKindsOrBuilderList() {
if (excludedGroupKindsBuilder_ != null) {
return excludedGroupKindsBuilder_.getMessageOrBuilderList();
} else {
return java.util.Collections.unmodifiableList(excludedGroupKinds_);
}
}
/**
*
*
*
* Optional. A list of cluster-scoped resource group kinds to NOT restore
* from the backup. If specified, all valid cluster-scoped resources will be
* restored except for those specified in the list.
* Mutually exclusive to any other field in the message.
*
*
*
* repeated .google.cloud.gkebackup.v1.RestoreConfig.GroupKind excluded_group_kinds = 2 [(.google.api.field_behavior) = OPTIONAL];
*
*/
public com.google.cloud.gkebackup.v1.RestoreConfig.GroupKind.Builder
addExcludedGroupKindsBuilder() {
return getExcludedGroupKindsFieldBuilder()
.addBuilder(com.google.cloud.gkebackup.v1.RestoreConfig.GroupKind.getDefaultInstance());
}
/**
*
*
*
* Optional. A list of cluster-scoped resource group kinds to NOT restore
* from the backup. If specified, all valid cluster-scoped resources will be
* restored except for those specified in the list.
* Mutually exclusive to any other field in the message.
*
*
*
* repeated .google.cloud.gkebackup.v1.RestoreConfig.GroupKind excluded_group_kinds = 2 [(.google.api.field_behavior) = OPTIONAL];
*
*/
public com.google.cloud.gkebackup.v1.RestoreConfig.GroupKind.Builder
addExcludedGroupKindsBuilder(int index) {
return getExcludedGroupKindsFieldBuilder()
.addBuilder(
index, com.google.cloud.gkebackup.v1.RestoreConfig.GroupKind.getDefaultInstance());
}
/**
*
*
*
* Optional. A list of cluster-scoped resource group kinds to NOT restore
* from the backup. If specified, all valid cluster-scoped resources will be
* restored except for those specified in the list.
* Mutually exclusive to any other field in the message.
*
*
*
* repeated .google.cloud.gkebackup.v1.RestoreConfig.GroupKind excluded_group_kinds = 2 [(.google.api.field_behavior) = OPTIONAL];
*
*/
public java.util.List
getExcludedGroupKindsBuilderList() {
return getExcludedGroupKindsFieldBuilder().getBuilderList();
}
private com.google.protobuf.RepeatedFieldBuilderV3<
com.google.cloud.gkebackup.v1.RestoreConfig.GroupKind,
com.google.cloud.gkebackup.v1.RestoreConfig.GroupKind.Builder,
com.google.cloud.gkebackup.v1.RestoreConfig.GroupKindOrBuilder>
getExcludedGroupKindsFieldBuilder() {
if (excludedGroupKindsBuilder_ == null) {
excludedGroupKindsBuilder_ =
new com.google.protobuf.RepeatedFieldBuilderV3<
com.google.cloud.gkebackup.v1.RestoreConfig.GroupKind,
com.google.cloud.gkebackup.v1.RestoreConfig.GroupKind.Builder,
com.google.cloud.gkebackup.v1.RestoreConfig.GroupKindOrBuilder>(
excludedGroupKinds_,
((bitField0_ & 0x00000002) != 0),
getParentForChildren(),
isClean());
excludedGroupKinds_ = null;
}
return excludedGroupKindsBuilder_;
}
private boolean allGroupKinds_;
/**
*
*
*
* Optional. If True, all valid cluster-scoped resources will be restored.
* Mutually exclusive to any other field in the message.
*
*
* bool all_group_kinds = 3 [(.google.api.field_behavior) = OPTIONAL];
*
* @return The allGroupKinds.
*/
@java.lang.Override
public boolean getAllGroupKinds() {
return allGroupKinds_;
}
/**
*
*
*
* Optional. If True, all valid cluster-scoped resources will be restored.
* Mutually exclusive to any other field in the message.
*
*
* bool all_group_kinds = 3 [(.google.api.field_behavior) = OPTIONAL];
*
* @param value The allGroupKinds to set.
* @return This builder for chaining.
*/
public Builder setAllGroupKinds(boolean value) {
allGroupKinds_ = value;
bitField0_ |= 0x00000004;
onChanged();
return this;
}
/**
*
*
*
* Optional. If True, all valid cluster-scoped resources will be restored.
* Mutually exclusive to any other field in the message.
*
*
* bool all_group_kinds = 3 [(.google.api.field_behavior) = OPTIONAL];
*
* @return This builder for chaining.
*/
public Builder clearAllGroupKinds() {
bitField0_ = (bitField0_ & ~0x00000004);
allGroupKinds_ = false;
onChanged();
return this;
}
private boolean noGroupKinds_;
/**
*
*
*
* Optional. If True, no cluster-scoped resources will be restored.
* This has the same restore scope as if the message is not defined.
* Mutually exclusive to any other field in the message.
*
*
* bool no_group_kinds = 4 [(.google.api.field_behavior) = OPTIONAL];
*
* @return The noGroupKinds.
*/
@java.lang.Override
public boolean getNoGroupKinds() {
return noGroupKinds_;
}
/**
*
*
*
* Optional. If True, no cluster-scoped resources will be restored.
* This has the same restore scope as if the message is not defined.
* Mutually exclusive to any other field in the message.
*
*
* bool no_group_kinds = 4 [(.google.api.field_behavior) = OPTIONAL];
*
* @param value The noGroupKinds to set.
* @return This builder for chaining.
*/
public Builder setNoGroupKinds(boolean value) {
noGroupKinds_ = value;
bitField0_ |= 0x00000008;
onChanged();
return this;
}
/**
*
*
*
* Optional. If True, no cluster-scoped resources will be restored.
* This has the same restore scope as if the message is not defined.
* Mutually exclusive to any other field in the message.
*
*
* bool no_group_kinds = 4 [(.google.api.field_behavior) = OPTIONAL];
*
* @return This builder for chaining.
*/
public Builder clearNoGroupKinds() {
bitField0_ = (bitField0_ & ~0x00000008);
noGroupKinds_ = false;
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.RestoreConfig.ClusterResourceRestoreScope)
}
// @@protoc_insertion_point(class_scope:google.cloud.gkebackup.v1.RestoreConfig.ClusterResourceRestoreScope)
private static final com.google.cloud.gkebackup.v1.RestoreConfig.ClusterResourceRestoreScope
DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE =
new com.google.cloud.gkebackup.v1.RestoreConfig.ClusterResourceRestoreScope();
}
public static com.google.cloud.gkebackup.v1.RestoreConfig.ClusterResourceRestoreScope
getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser PARSER =
new com.google.protobuf.AbstractParser() {
@java.lang.Override
public ClusterResourceRestoreScope 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.RestoreConfig.ClusterResourceRestoreScope
getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
public interface SubstitutionRuleOrBuilder
extends
// @@protoc_insertion_point(interface_extends:google.cloud.gkebackup.v1.RestoreConfig.SubstitutionRule)
com.google.protobuf.MessageOrBuilder {
/**
*
*
*
* Optional. (Filtering parameter) Any resource subject to substitution must
* be contained within one of the listed Kubernetes Namespace in the Backup.
* If this field is not provided, no namespace filtering will be performed
* (all resources in all Namespaces, including all cluster-scoped resources,
* will be candidates for substitution).
* To mix cluster-scoped and namespaced resources in the same rule, use an
* empty string ("") as one of the target namespaces.
*
*
* repeated string target_namespaces = 1 [(.google.api.field_behavior) = OPTIONAL];
*
* @return A list containing the targetNamespaces.
*/
java.util.List getTargetNamespacesList();
/**
*
*
*
* Optional. (Filtering parameter) Any resource subject to substitution must
* be contained within one of the listed Kubernetes Namespace in the Backup.
* If this field is not provided, no namespace filtering will be performed
* (all resources in all Namespaces, including all cluster-scoped resources,
* will be candidates for substitution).
* To mix cluster-scoped and namespaced resources in the same rule, use an
* empty string ("") as one of the target namespaces.
*
*
* repeated string target_namespaces = 1 [(.google.api.field_behavior) = OPTIONAL];
*
* @return The count of targetNamespaces.
*/
int getTargetNamespacesCount();
/**
*
*
*
* Optional. (Filtering parameter) Any resource subject to substitution must
* be contained within one of the listed Kubernetes Namespace in the Backup.
* If this field is not provided, no namespace filtering will be performed
* (all resources in all Namespaces, including all cluster-scoped resources,
* will be candidates for substitution).
* To mix cluster-scoped and namespaced resources in the same rule, use an
* empty string ("") as one of the target namespaces.
*
*
* repeated string target_namespaces = 1 [(.google.api.field_behavior) = OPTIONAL];
*
* @param index The index of the element to return.
* @return The targetNamespaces at the given index.
*/
java.lang.String getTargetNamespaces(int index);
/**
*
*
*
* Optional. (Filtering parameter) Any resource subject to substitution must
* be contained within one of the listed Kubernetes Namespace in the Backup.
* If this field is not provided, no namespace filtering will be performed
* (all resources in all Namespaces, including all cluster-scoped resources,
* will be candidates for substitution).
* To mix cluster-scoped and namespaced resources in the same rule, use an
* empty string ("") as one of the target namespaces.
*
*
* repeated string target_namespaces = 1 [(.google.api.field_behavior) = OPTIONAL];
*
* @param index The index of the value to return.
* @return The bytes of the targetNamespaces at the given index.
*/
com.google.protobuf.ByteString getTargetNamespacesBytes(int index);
/**
*
*
*
* Optional. (Filtering parameter) Any resource subject to substitution must
* belong to one of the listed "types". If this field is not provided, no
* type filtering will be performed (all resources of all types matching
* previous filtering parameters will be candidates for substitution).
*
*
*
* repeated .google.cloud.gkebackup.v1.RestoreConfig.GroupKind target_group_kinds = 2 [(.google.api.field_behavior) = OPTIONAL];
*
*/
java.util.List getTargetGroupKindsList();
/**
*
*
*
* Optional. (Filtering parameter) Any resource subject to substitution must
* belong to one of the listed "types". If this field is not provided, no
* type filtering will be performed (all resources of all types matching
* previous filtering parameters will be candidates for substitution).
*
*
*
* repeated .google.cloud.gkebackup.v1.RestoreConfig.GroupKind target_group_kinds = 2 [(.google.api.field_behavior) = OPTIONAL];
*
*/
com.google.cloud.gkebackup.v1.RestoreConfig.GroupKind getTargetGroupKinds(int index);
/**
*
*
*
* Optional. (Filtering parameter) Any resource subject to substitution must
* belong to one of the listed "types". If this field is not provided, no
* type filtering will be performed (all resources of all types matching
* previous filtering parameters will be candidates for substitution).
*
*
*
* repeated .google.cloud.gkebackup.v1.RestoreConfig.GroupKind target_group_kinds = 2 [(.google.api.field_behavior) = OPTIONAL];
*
*/
int getTargetGroupKindsCount();
/**
*
*
*
* Optional. (Filtering parameter) Any resource subject to substitution must
* belong to one of the listed "types". If this field is not provided, no
* type filtering will be performed (all resources of all types matching
* previous filtering parameters will be candidates for substitution).
*
*
*
* repeated .google.cloud.gkebackup.v1.RestoreConfig.GroupKind target_group_kinds = 2 [(.google.api.field_behavior) = OPTIONAL];
*
*/
java.util.List extends com.google.cloud.gkebackup.v1.RestoreConfig.GroupKindOrBuilder>
getTargetGroupKindsOrBuilderList();
/**
*
*
*
* Optional. (Filtering parameter) Any resource subject to substitution must
* belong to one of the listed "types". If this field is not provided, no
* type filtering will be performed (all resources of all types matching
* previous filtering parameters will be candidates for substitution).
*
*
*
* repeated .google.cloud.gkebackup.v1.RestoreConfig.GroupKind target_group_kinds = 2 [(.google.api.field_behavior) = OPTIONAL];
*
*/
com.google.cloud.gkebackup.v1.RestoreConfig.GroupKindOrBuilder getTargetGroupKindsOrBuilder(
int index);
/**
*
*
*
* Required. This is a [JSONPath]
* (https://kubernetes.io/docs/reference/kubectl/jsonpath/)
* expression that matches specific fields of candidate
* resources and it operates as both a filtering parameter (resources that
* are not matched with this expression will not be candidates for
* substitution) as well as a field identifier (identifies exactly which
* fields out of the candidate resources will be modified).
*
*
* string target_json_path = 3 [(.google.api.field_behavior) = REQUIRED];
*
* @return The targetJsonPath.
*/
java.lang.String getTargetJsonPath();
/**
*
*
*
* Required. This is a [JSONPath]
* (https://kubernetes.io/docs/reference/kubectl/jsonpath/)
* expression that matches specific fields of candidate
* resources and it operates as both a filtering parameter (resources that
* are not matched with this expression will not be candidates for
* substitution) as well as a field identifier (identifies exactly which
* fields out of the candidate resources will be modified).
*
*
* string target_json_path = 3 [(.google.api.field_behavior) = REQUIRED];
*
* @return The bytes for targetJsonPath.
*/
com.google.protobuf.ByteString getTargetJsonPathBytes();
/**
*
*
*
* Optional. (Filtering parameter) This is a [regular expression]
* (https://en.wikipedia.org/wiki/Regular_expression)
* that is compared against the fields matched by the target_json_path
* expression (and must also have passed the previous filters).
* Substitution will not be performed against fields whose
* value does not match this expression. If this field is NOT specified,
* then ALL fields matched by the target_json_path expression will undergo
* substitution. Note that an empty (e.g., "", rather than unspecified)
* value for this field will only match empty fields.
*
*
* string original_value_pattern = 4 [(.google.api.field_behavior) = OPTIONAL];
*
* @return The originalValuePattern.
*/
java.lang.String getOriginalValuePattern();
/**
*
*
*
* Optional. (Filtering parameter) This is a [regular expression]
* (https://en.wikipedia.org/wiki/Regular_expression)
* that is compared against the fields matched by the target_json_path
* expression (and must also have passed the previous filters).
* Substitution will not be performed against fields whose
* value does not match this expression. If this field is NOT specified,
* then ALL fields matched by the target_json_path expression will undergo
* substitution. Note that an empty (e.g., "", rather than unspecified)
* value for this field will only match empty fields.
*
*
* string original_value_pattern = 4 [(.google.api.field_behavior) = OPTIONAL];
*
* @return The bytes for originalValuePattern.
*/
com.google.protobuf.ByteString getOriginalValuePatternBytes();
/**
*
*
*
* Optional. This is the new value to set for any fields that pass the
* filtering and selection criteria. To remove a value from a Kubernetes
* resource, either leave this field unspecified, or set it to the empty
* string ("").
*
*
* string new_value = 5 [(.google.api.field_behavior) = OPTIONAL];
*
* @return The newValue.
*/
java.lang.String getNewValue();
/**
*
*
*
* Optional. This is the new value to set for any fields that pass the
* filtering and selection criteria. To remove a value from a Kubernetes
* resource, either leave this field unspecified, or set it to the empty
* string ("").
*
*
* string new_value = 5 [(.google.api.field_behavior) = OPTIONAL];
*
* @return The bytes for newValue.
*/
com.google.protobuf.ByteString getNewValueBytes();
}
/**
*
*
*
* A transformation rule to be applied against Kubernetes resources as they
* are selected for restoration from a Backup. A rule contains both filtering
* logic (which resources are subject to substitution) and substitution logic.
*
*
* Protobuf type {@code google.cloud.gkebackup.v1.RestoreConfig.SubstitutionRule}
*/
public static final class SubstitutionRule extends com.google.protobuf.GeneratedMessageV3
implements
// @@protoc_insertion_point(message_implements:google.cloud.gkebackup.v1.RestoreConfig.SubstitutionRule)
SubstitutionRuleOrBuilder {
private static final long serialVersionUID = 0L;
// Use SubstitutionRule.newBuilder() to construct.
private SubstitutionRule(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private SubstitutionRule() {
targetNamespaces_ = com.google.protobuf.LazyStringArrayList.emptyList();
targetGroupKinds_ = java.util.Collections.emptyList();
targetJsonPath_ = "";
originalValuePattern_ = "";
newValue_ = "";
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(UnusedPrivateParameter unused) {
return new SubstitutionRule();
}
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
return com.google.cloud.gkebackup.v1.RestoreProto
.internal_static_google_cloud_gkebackup_v1_RestoreConfig_SubstitutionRule_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.google.cloud.gkebackup.v1.RestoreProto
.internal_static_google_cloud_gkebackup_v1_RestoreConfig_SubstitutionRule_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.google.cloud.gkebackup.v1.RestoreConfig.SubstitutionRule.class,
com.google.cloud.gkebackup.v1.RestoreConfig.SubstitutionRule.Builder.class);
}
public static final int TARGET_NAMESPACES_FIELD_NUMBER = 1;
@SuppressWarnings("serial")
private com.google.protobuf.LazyStringArrayList targetNamespaces_ =
com.google.protobuf.LazyStringArrayList.emptyList();
/**
*
*
*
* Optional. (Filtering parameter) Any resource subject to substitution must
* be contained within one of the listed Kubernetes Namespace in the Backup.
* If this field is not provided, no namespace filtering will be performed
* (all resources in all Namespaces, including all cluster-scoped resources,
* will be candidates for substitution).
* To mix cluster-scoped and namespaced resources in the same rule, use an
* empty string ("") as one of the target namespaces.
*
*
* repeated string target_namespaces = 1 [(.google.api.field_behavior) = OPTIONAL];
*
* @return A list containing the targetNamespaces.
*/
public com.google.protobuf.ProtocolStringList getTargetNamespacesList() {
return targetNamespaces_;
}
/**
*
*
*
* Optional. (Filtering parameter) Any resource subject to substitution must
* be contained within one of the listed Kubernetes Namespace in the Backup.
* If this field is not provided, no namespace filtering will be performed
* (all resources in all Namespaces, including all cluster-scoped resources,
* will be candidates for substitution).
* To mix cluster-scoped and namespaced resources in the same rule, use an
* empty string ("") as one of the target namespaces.
*
*
* repeated string target_namespaces = 1 [(.google.api.field_behavior) = OPTIONAL];
*
* @return The count of targetNamespaces.
*/
public int getTargetNamespacesCount() {
return targetNamespaces_.size();
}
/**
*
*
*
* Optional. (Filtering parameter) Any resource subject to substitution must
* be contained within one of the listed Kubernetes Namespace in the Backup.
* If this field is not provided, no namespace filtering will be performed
* (all resources in all Namespaces, including all cluster-scoped resources,
* will be candidates for substitution).
* To mix cluster-scoped and namespaced resources in the same rule, use an
* empty string ("") as one of the target namespaces.
*
*
* repeated string target_namespaces = 1 [(.google.api.field_behavior) = OPTIONAL];
*
* @param index The index of the element to return.
* @return The targetNamespaces at the given index.
*/
public java.lang.String getTargetNamespaces(int index) {
return targetNamespaces_.get(index);
}
/**
*
*
*
* Optional. (Filtering parameter) Any resource subject to substitution must
* be contained within one of the listed Kubernetes Namespace in the Backup.
* If this field is not provided, no namespace filtering will be performed
* (all resources in all Namespaces, including all cluster-scoped resources,
* will be candidates for substitution).
* To mix cluster-scoped and namespaced resources in the same rule, use an
* empty string ("") as one of the target namespaces.
*
*
* repeated string target_namespaces = 1 [(.google.api.field_behavior) = OPTIONAL];
*
* @param index The index of the value to return.
* @return The bytes of the targetNamespaces at the given index.
*/
public com.google.protobuf.ByteString getTargetNamespacesBytes(int index) {
return targetNamespaces_.getByteString(index);
}
public static final int TARGET_GROUP_KINDS_FIELD_NUMBER = 2;
@SuppressWarnings("serial")
private java.util.List targetGroupKinds_;
/**
*
*
*
* Optional. (Filtering parameter) Any resource subject to substitution must
* belong to one of the listed "types". If this field is not provided, no
* type filtering will be performed (all resources of all types matching
* previous filtering parameters will be candidates for substitution).
*
*
*
* repeated .google.cloud.gkebackup.v1.RestoreConfig.GroupKind target_group_kinds = 2 [(.google.api.field_behavior) = OPTIONAL];
*
*/
@java.lang.Override
public java.util.List
getTargetGroupKindsList() {
return targetGroupKinds_;
}
/**
*
*
*
* Optional. (Filtering parameter) Any resource subject to substitution must
* belong to one of the listed "types". If this field is not provided, no
* type filtering will be performed (all resources of all types matching
* previous filtering parameters will be candidates for substitution).
*
*
*
* repeated .google.cloud.gkebackup.v1.RestoreConfig.GroupKind target_group_kinds = 2 [(.google.api.field_behavior) = OPTIONAL];
*
*/
@java.lang.Override
public java.util.List extends com.google.cloud.gkebackup.v1.RestoreConfig.GroupKindOrBuilder>
getTargetGroupKindsOrBuilderList() {
return targetGroupKinds_;
}
/**
*
*
*
* Optional. (Filtering parameter) Any resource subject to substitution must
* belong to one of the listed "types". If this field is not provided, no
* type filtering will be performed (all resources of all types matching
* previous filtering parameters will be candidates for substitution).
*
*
*
* repeated .google.cloud.gkebackup.v1.RestoreConfig.GroupKind target_group_kinds = 2 [(.google.api.field_behavior) = OPTIONAL];
*
*/
@java.lang.Override
public int getTargetGroupKindsCount() {
return targetGroupKinds_.size();
}
/**
*
*
*
* Optional. (Filtering parameter) Any resource subject to substitution must
* belong to one of the listed "types". If this field is not provided, no
* type filtering will be performed (all resources of all types matching
* previous filtering parameters will be candidates for substitution).
*
*
*
* repeated .google.cloud.gkebackup.v1.RestoreConfig.GroupKind target_group_kinds = 2 [(.google.api.field_behavior) = OPTIONAL];
*
*/
@java.lang.Override
public com.google.cloud.gkebackup.v1.RestoreConfig.GroupKind getTargetGroupKinds(int index) {
return targetGroupKinds_.get(index);
}
/**
*
*
*
* Optional. (Filtering parameter) Any resource subject to substitution must
* belong to one of the listed "types". If this field is not provided, no
* type filtering will be performed (all resources of all types matching
* previous filtering parameters will be candidates for substitution).
*
*
*
* repeated .google.cloud.gkebackup.v1.RestoreConfig.GroupKind target_group_kinds = 2 [(.google.api.field_behavior) = OPTIONAL];
*
*/
@java.lang.Override
public com.google.cloud.gkebackup.v1.RestoreConfig.GroupKindOrBuilder
getTargetGroupKindsOrBuilder(int index) {
return targetGroupKinds_.get(index);
}
public static final int TARGET_JSON_PATH_FIELD_NUMBER = 3;
@SuppressWarnings("serial")
private volatile java.lang.Object targetJsonPath_ = "";
/**
*
*
*
* Required. This is a [JSONPath]
* (https://kubernetes.io/docs/reference/kubectl/jsonpath/)
* expression that matches specific fields of candidate
* resources and it operates as both a filtering parameter (resources that
* are not matched with this expression will not be candidates for
* substitution) as well as a field identifier (identifies exactly which
* fields out of the candidate resources will be modified).
*
*
* string target_json_path = 3 [(.google.api.field_behavior) = REQUIRED];
*
* @return The targetJsonPath.
*/
@java.lang.Override
public java.lang.String getTargetJsonPath() {
java.lang.Object ref = targetJsonPath_;
if (ref instanceof java.lang.String) {
return (java.lang.String) ref;
} else {
com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
targetJsonPath_ = s;
return s;
}
}
/**
*
*
*
* Required. This is a [JSONPath]
* (https://kubernetes.io/docs/reference/kubectl/jsonpath/)
* expression that matches specific fields of candidate
* resources and it operates as both a filtering parameter (resources that
* are not matched with this expression will not be candidates for
* substitution) as well as a field identifier (identifies exactly which
* fields out of the candidate resources will be modified).
*
*
* string target_json_path = 3 [(.google.api.field_behavior) = REQUIRED];
*
* @return The bytes for targetJsonPath.
*/
@java.lang.Override
public com.google.protobuf.ByteString getTargetJsonPathBytes() {
java.lang.Object ref = targetJsonPath_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
targetJsonPath_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int ORIGINAL_VALUE_PATTERN_FIELD_NUMBER = 4;
@SuppressWarnings("serial")
private volatile java.lang.Object originalValuePattern_ = "";
/**
*
*
*
* Optional. (Filtering parameter) This is a [regular expression]
* (https://en.wikipedia.org/wiki/Regular_expression)
* that is compared against the fields matched by the target_json_path
* expression (and must also have passed the previous filters).
* Substitution will not be performed against fields whose
* value does not match this expression. If this field is NOT specified,
* then ALL fields matched by the target_json_path expression will undergo
* substitution. Note that an empty (e.g., "", rather than unspecified)
* value for this field will only match empty fields.
*
*
* string original_value_pattern = 4 [(.google.api.field_behavior) = OPTIONAL];
*
* @return The originalValuePattern.
*/
@java.lang.Override
public java.lang.String getOriginalValuePattern() {
java.lang.Object ref = originalValuePattern_;
if (ref instanceof java.lang.String) {
return (java.lang.String) ref;
} else {
com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
originalValuePattern_ = s;
return s;
}
}
/**
*
*
*
* Optional. (Filtering parameter) This is a [regular expression]
* (https://en.wikipedia.org/wiki/Regular_expression)
* that is compared against the fields matched by the target_json_path
* expression (and must also have passed the previous filters).
* Substitution will not be performed against fields whose
* value does not match this expression. If this field is NOT specified,
* then ALL fields matched by the target_json_path expression will undergo
* substitution. Note that an empty (e.g., "", rather than unspecified)
* value for this field will only match empty fields.
*
*
* string original_value_pattern = 4 [(.google.api.field_behavior) = OPTIONAL];
*
* @return The bytes for originalValuePattern.
*/
@java.lang.Override
public com.google.protobuf.ByteString getOriginalValuePatternBytes() {
java.lang.Object ref = originalValuePattern_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
originalValuePattern_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int NEW_VALUE_FIELD_NUMBER = 5;
@SuppressWarnings("serial")
private volatile java.lang.Object newValue_ = "";
/**
*
*
*
* Optional. This is the new value to set for any fields that pass the
* filtering and selection criteria. To remove a value from a Kubernetes
* resource, either leave this field unspecified, or set it to the empty
* string ("").
*
*
* string new_value = 5 [(.google.api.field_behavior) = OPTIONAL];
*
* @return The newValue.
*/
@java.lang.Override
public java.lang.String getNewValue() {
java.lang.Object ref = newValue_;
if (ref instanceof java.lang.String) {
return (java.lang.String) ref;
} else {
com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
newValue_ = s;
return s;
}
}
/**
*
*
*
* Optional. This is the new value to set for any fields that pass the
* filtering and selection criteria. To remove a value from a Kubernetes
* resource, either leave this field unspecified, or set it to the empty
* string ("").
*
*
* string new_value = 5 [(.google.api.field_behavior) = OPTIONAL];
*
* @return The bytes for newValue.
*/
@java.lang.Override
public com.google.protobuf.ByteString getNewValueBytes() {
java.lang.Object ref = newValue_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
newValue_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
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 {
for (int i = 0; i < targetNamespaces_.size(); i++) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 1, targetNamespaces_.getRaw(i));
}
for (int i = 0; i < targetGroupKinds_.size(); i++) {
output.writeMessage(2, targetGroupKinds_.get(i));
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(targetJsonPath_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 3, targetJsonPath_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(originalValuePattern_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 4, originalValuePattern_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(newValue_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 5, newValue_);
}
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 < targetNamespaces_.size(); i++) {
dataSize += computeStringSizeNoTag(targetNamespaces_.getRaw(i));
}
size += dataSize;
size += 1 * getTargetNamespacesList().size();
}
for (int i = 0; i < targetGroupKinds_.size(); i++) {
size +=
com.google.protobuf.CodedOutputStream.computeMessageSize(2, targetGroupKinds_.get(i));
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(targetJsonPath_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, targetJsonPath_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(originalValuePattern_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, originalValuePattern_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(newValue_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, newValue_);
}
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.RestoreConfig.SubstitutionRule)) {
return super.equals(obj);
}
com.google.cloud.gkebackup.v1.RestoreConfig.SubstitutionRule other =
(com.google.cloud.gkebackup.v1.RestoreConfig.SubstitutionRule) obj;
if (!getTargetNamespacesList().equals(other.getTargetNamespacesList())) return false;
if (!getTargetGroupKindsList().equals(other.getTargetGroupKindsList())) return false;
if (!getTargetJsonPath().equals(other.getTargetJsonPath())) return false;
if (!getOriginalValuePattern().equals(other.getOriginalValuePattern())) return false;
if (!getNewValue().equals(other.getNewValue())) 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 (getTargetNamespacesCount() > 0) {
hash = (37 * hash) + TARGET_NAMESPACES_FIELD_NUMBER;
hash = (53 * hash) + getTargetNamespacesList().hashCode();
}
if (getTargetGroupKindsCount() > 0) {
hash = (37 * hash) + TARGET_GROUP_KINDS_FIELD_NUMBER;
hash = (53 * hash) + getTargetGroupKindsList().hashCode();
}
hash = (37 * hash) + TARGET_JSON_PATH_FIELD_NUMBER;
hash = (53 * hash) + getTargetJsonPath().hashCode();
hash = (37 * hash) + ORIGINAL_VALUE_PATTERN_FIELD_NUMBER;
hash = (53 * hash) + getOriginalValuePattern().hashCode();
hash = (37 * hash) + NEW_VALUE_FIELD_NUMBER;
hash = (53 * hash) + getNewValue().hashCode();
hash = (29 * hash) + getUnknownFields().hashCode();
memoizedHashCode = hash;
return hash;
}
public static com.google.cloud.gkebackup.v1.RestoreConfig.SubstitutionRule parseFrom(
java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.cloud.gkebackup.v1.RestoreConfig.SubstitutionRule 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.RestoreConfig.SubstitutionRule parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.cloud.gkebackup.v1.RestoreConfig.SubstitutionRule 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.RestoreConfig.SubstitutionRule parseFrom(
byte[] data) throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.cloud.gkebackup.v1.RestoreConfig.SubstitutionRule 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.RestoreConfig.SubstitutionRule parseFrom(
java.io.InputStream input) throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
}
public static com.google.cloud.gkebackup.v1.RestoreConfig.SubstitutionRule 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.RestoreConfig.SubstitutionRule parseDelimitedFrom(
java.io.InputStream input) throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input);
}
public static com.google.cloud.gkebackup.v1.RestoreConfig.SubstitutionRule 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.RestoreConfig.SubstitutionRule 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.RestoreConfig.SubstitutionRule 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.RestoreConfig.SubstitutionRule 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;
}
/**
*
*
*
* A transformation rule to be applied against Kubernetes resources as they
* are selected for restoration from a Backup. A rule contains both filtering
* logic (which resources are subject to substitution) and substitution logic.
*
*
* Protobuf type {@code google.cloud.gkebackup.v1.RestoreConfig.SubstitutionRule}
*/
public static final class Builder
extends com.google.protobuf.GeneratedMessageV3.Builder
implements
// @@protoc_insertion_point(builder_implements:google.cloud.gkebackup.v1.RestoreConfig.SubstitutionRule)
com.google.cloud.gkebackup.v1.RestoreConfig.SubstitutionRuleOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
return com.google.cloud.gkebackup.v1.RestoreProto
.internal_static_google_cloud_gkebackup_v1_RestoreConfig_SubstitutionRule_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.google.cloud.gkebackup.v1.RestoreProto
.internal_static_google_cloud_gkebackup_v1_RestoreConfig_SubstitutionRule_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.google.cloud.gkebackup.v1.RestoreConfig.SubstitutionRule.class,
com.google.cloud.gkebackup.v1.RestoreConfig.SubstitutionRule.Builder.class);
}
// Construct using com.google.cloud.gkebackup.v1.RestoreConfig.SubstitutionRule.newBuilder()
private Builder() {}
private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
}
@java.lang.Override
public Builder clear() {
super.clear();
bitField0_ = 0;
targetNamespaces_ = com.google.protobuf.LazyStringArrayList.emptyList();
if (targetGroupKindsBuilder_ == null) {
targetGroupKinds_ = java.util.Collections.emptyList();
} else {
targetGroupKinds_ = null;
targetGroupKindsBuilder_.clear();
}
bitField0_ = (bitField0_ & ~0x00000002);
targetJsonPath_ = "";
originalValuePattern_ = "";
newValue_ = "";
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() {
return com.google.cloud.gkebackup.v1.RestoreProto
.internal_static_google_cloud_gkebackup_v1_RestoreConfig_SubstitutionRule_descriptor;
}
@java.lang.Override
public com.google.cloud.gkebackup.v1.RestoreConfig.SubstitutionRule
getDefaultInstanceForType() {
return com.google.cloud.gkebackup.v1.RestoreConfig.SubstitutionRule.getDefaultInstance();
}
@java.lang.Override
public com.google.cloud.gkebackup.v1.RestoreConfig.SubstitutionRule build() {
com.google.cloud.gkebackup.v1.RestoreConfig.SubstitutionRule result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public com.google.cloud.gkebackup.v1.RestoreConfig.SubstitutionRule buildPartial() {
com.google.cloud.gkebackup.v1.RestoreConfig.SubstitutionRule result =
new com.google.cloud.gkebackup.v1.RestoreConfig.SubstitutionRule(this);
buildPartialRepeatedFields(result);
if (bitField0_ != 0) {
buildPartial0(result);
}
onBuilt();
return result;
}
private void buildPartialRepeatedFields(
com.google.cloud.gkebackup.v1.RestoreConfig.SubstitutionRule result) {
if (targetGroupKindsBuilder_ == null) {
if (((bitField0_ & 0x00000002) != 0)) {
targetGroupKinds_ = java.util.Collections.unmodifiableList(targetGroupKinds_);
bitField0_ = (bitField0_ & ~0x00000002);
}
result.targetGroupKinds_ = targetGroupKinds_;
} else {
result.targetGroupKinds_ = targetGroupKindsBuilder_.build();
}
}
private void buildPartial0(
com.google.cloud.gkebackup.v1.RestoreConfig.SubstitutionRule result) {
int from_bitField0_ = bitField0_;
if (((from_bitField0_ & 0x00000001) != 0)) {
targetNamespaces_.makeImmutable();
result.targetNamespaces_ = targetNamespaces_;
}
if (((from_bitField0_ & 0x00000004) != 0)) {
result.targetJsonPath_ = targetJsonPath_;
}
if (((from_bitField0_ & 0x00000008) != 0)) {
result.originalValuePattern_ = originalValuePattern_;
}
if (((from_bitField0_ & 0x00000010) != 0)) {
result.newValue_ = newValue_;
}
}
@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.RestoreConfig.SubstitutionRule) {
return mergeFrom((com.google.cloud.gkebackup.v1.RestoreConfig.SubstitutionRule) other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(com.google.cloud.gkebackup.v1.RestoreConfig.SubstitutionRule other) {
if (other
== com.google.cloud.gkebackup.v1.RestoreConfig.SubstitutionRule.getDefaultInstance())
return this;
if (!other.targetNamespaces_.isEmpty()) {
if (targetNamespaces_.isEmpty()) {
targetNamespaces_ = other.targetNamespaces_;
bitField0_ |= 0x00000001;
} else {
ensureTargetNamespacesIsMutable();
targetNamespaces_.addAll(other.targetNamespaces_);
}
onChanged();
}
if (targetGroupKindsBuilder_ == null) {
if (!other.targetGroupKinds_.isEmpty()) {
if (targetGroupKinds_.isEmpty()) {
targetGroupKinds_ = other.targetGroupKinds_;
bitField0_ = (bitField0_ & ~0x00000002);
} else {
ensureTargetGroupKindsIsMutable();
targetGroupKinds_.addAll(other.targetGroupKinds_);
}
onChanged();
}
} else {
if (!other.targetGroupKinds_.isEmpty()) {
if (targetGroupKindsBuilder_.isEmpty()) {
targetGroupKindsBuilder_.dispose();
targetGroupKindsBuilder_ = null;
targetGroupKinds_ = other.targetGroupKinds_;
bitField0_ = (bitField0_ & ~0x00000002);
targetGroupKindsBuilder_ =
com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders
? getTargetGroupKindsFieldBuilder()
: null;
} else {
targetGroupKindsBuilder_.addAllMessages(other.targetGroupKinds_);
}
}
}
if (!other.getTargetJsonPath().isEmpty()) {
targetJsonPath_ = other.targetJsonPath_;
bitField0_ |= 0x00000004;
onChanged();
}
if (!other.getOriginalValuePattern().isEmpty()) {
originalValuePattern_ = other.originalValuePattern_;
bitField0_ |= 0x00000008;
onChanged();
}
if (!other.getNewValue().isEmpty()) {
newValue_ = other.newValue_;
bitField0_ |= 0x00000010;
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 10:
{
java.lang.String s = input.readStringRequireUtf8();
ensureTargetNamespacesIsMutable();
targetNamespaces_.add(s);
break;
} // case 10
case 18:
{
com.google.cloud.gkebackup.v1.RestoreConfig.GroupKind m =
input.readMessage(
com.google.cloud.gkebackup.v1.RestoreConfig.GroupKind.parser(),
extensionRegistry);
if (targetGroupKindsBuilder_ == null) {
ensureTargetGroupKindsIsMutable();
targetGroupKinds_.add(m);
} else {
targetGroupKindsBuilder_.addMessage(m);
}
break;
} // case 18
case 26:
{
targetJsonPath_ = input.readStringRequireUtf8();
bitField0_ |= 0x00000004;
break;
} // case 26
case 34:
{
originalValuePattern_ = input.readStringRequireUtf8();
bitField0_ |= 0x00000008;
break;
} // case 34
case 42:
{
newValue_ = input.readStringRequireUtf8();
bitField0_ |= 0x00000010;
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 bitField0_;
private com.google.protobuf.LazyStringArrayList targetNamespaces_ =
com.google.protobuf.LazyStringArrayList.emptyList();
private void ensureTargetNamespacesIsMutable() {
if (!targetNamespaces_.isModifiable()) {
targetNamespaces_ = new com.google.protobuf.LazyStringArrayList(targetNamespaces_);
}
bitField0_ |= 0x00000001;
}
/**
*
*
*
* Optional. (Filtering parameter) Any resource subject to substitution must
* be contained within one of the listed Kubernetes Namespace in the Backup.
* If this field is not provided, no namespace filtering will be performed
* (all resources in all Namespaces, including all cluster-scoped resources,
* will be candidates for substitution).
* To mix cluster-scoped and namespaced resources in the same rule, use an
* empty string ("") as one of the target namespaces.
*
*
* repeated string target_namespaces = 1 [(.google.api.field_behavior) = OPTIONAL];
*
*
* @return A list containing the targetNamespaces.
*/
public com.google.protobuf.ProtocolStringList getTargetNamespacesList() {
targetNamespaces_.makeImmutable();
return targetNamespaces_;
}
/**
*
*
*
* Optional. (Filtering parameter) Any resource subject to substitution must
* be contained within one of the listed Kubernetes Namespace in the Backup.
* If this field is not provided, no namespace filtering will be performed
* (all resources in all Namespaces, including all cluster-scoped resources,
* will be candidates for substitution).
* To mix cluster-scoped and namespaced resources in the same rule, use an
* empty string ("") as one of the target namespaces.
*
*
* repeated string target_namespaces = 1 [(.google.api.field_behavior) = OPTIONAL];
*
*
* @return The count of targetNamespaces.
*/
public int getTargetNamespacesCount() {
return targetNamespaces_.size();
}
/**
*
*
*
* Optional. (Filtering parameter) Any resource subject to substitution must
* be contained within one of the listed Kubernetes Namespace in the Backup.
* If this field is not provided, no namespace filtering will be performed
* (all resources in all Namespaces, including all cluster-scoped resources,
* will be candidates for substitution).
* To mix cluster-scoped and namespaced resources in the same rule, use an
* empty string ("") as one of the target namespaces.
*
*
* repeated string target_namespaces = 1 [(.google.api.field_behavior) = OPTIONAL];
*
*
* @param index The index of the element to return.
* @return The targetNamespaces at the given index.
*/
public java.lang.String getTargetNamespaces(int index) {
return targetNamespaces_.get(index);
}
/**
*
*
*
* Optional. (Filtering parameter) Any resource subject to substitution must
* be contained within one of the listed Kubernetes Namespace in the Backup.
* If this field is not provided, no namespace filtering will be performed
* (all resources in all Namespaces, including all cluster-scoped resources,
* will be candidates for substitution).
* To mix cluster-scoped and namespaced resources in the same rule, use an
* empty string ("") as one of the target namespaces.
*
*
* repeated string target_namespaces = 1 [(.google.api.field_behavior) = OPTIONAL];
*
*
* @param index The index of the value to return.
* @return The bytes of the targetNamespaces at the given index.
*/
public com.google.protobuf.ByteString getTargetNamespacesBytes(int index) {
return targetNamespaces_.getByteString(index);
}
/**
*
*
*
* Optional. (Filtering parameter) Any resource subject to substitution must
* be contained within one of the listed Kubernetes Namespace in the Backup.
* If this field is not provided, no namespace filtering will be performed
* (all resources in all Namespaces, including all cluster-scoped resources,
* will be candidates for substitution).
* To mix cluster-scoped and namespaced resources in the same rule, use an
* empty string ("") as one of the target namespaces.
*
*
* repeated string target_namespaces = 1 [(.google.api.field_behavior) = OPTIONAL];
*
*
* @param index The index to set the value at.
* @param value The targetNamespaces to set.
* @return This builder for chaining.
*/
public Builder setTargetNamespaces(int index, java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
ensureTargetNamespacesIsMutable();
targetNamespaces_.set(index, value);
bitField0_ |= 0x00000001;
onChanged();
return this;
}
/**
*
*
*
* Optional. (Filtering parameter) Any resource subject to substitution must
* be contained within one of the listed Kubernetes Namespace in the Backup.
* If this field is not provided, no namespace filtering will be performed
* (all resources in all Namespaces, including all cluster-scoped resources,
* will be candidates for substitution).
* To mix cluster-scoped and namespaced resources in the same rule, use an
* empty string ("") as one of the target namespaces.
*
*
* repeated string target_namespaces = 1 [(.google.api.field_behavior) = OPTIONAL];
*
*
* @param value The targetNamespaces to add.
* @return This builder for chaining.
*/
public Builder addTargetNamespaces(java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
ensureTargetNamespacesIsMutable();
targetNamespaces_.add(value);
bitField0_ |= 0x00000001;
onChanged();
return this;
}
/**
*
*
*
* Optional. (Filtering parameter) Any resource subject to substitution must
* be contained within one of the listed Kubernetes Namespace in the Backup.
* If this field is not provided, no namespace filtering will be performed
* (all resources in all Namespaces, including all cluster-scoped resources,
* will be candidates for substitution).
* To mix cluster-scoped and namespaced resources in the same rule, use an
* empty string ("") as one of the target namespaces.
*
*
* repeated string target_namespaces = 1 [(.google.api.field_behavior) = OPTIONAL];
*
*
* @param values The targetNamespaces to add.
* @return This builder for chaining.
*/
public Builder addAllTargetNamespaces(java.lang.Iterable values) {
ensureTargetNamespacesIsMutable();
com.google.protobuf.AbstractMessageLite.Builder.addAll(values, targetNamespaces_);
bitField0_ |= 0x00000001;
onChanged();
return this;
}
/**
*
*
*
* Optional. (Filtering parameter) Any resource subject to substitution must
* be contained within one of the listed Kubernetes Namespace in the Backup.
* If this field is not provided, no namespace filtering will be performed
* (all resources in all Namespaces, including all cluster-scoped resources,
* will be candidates for substitution).
* To mix cluster-scoped and namespaced resources in the same rule, use an
* empty string ("") as one of the target namespaces.
*
*
* repeated string target_namespaces = 1 [(.google.api.field_behavior) = OPTIONAL];
*
*
* @return This builder for chaining.
*/
public Builder clearTargetNamespaces() {
targetNamespaces_ = com.google.protobuf.LazyStringArrayList.emptyList();
bitField0_ = (bitField0_ & ~0x00000001);
;
onChanged();
return this;
}
/**
*
*
*
* Optional. (Filtering parameter) Any resource subject to substitution must
* be contained within one of the listed Kubernetes Namespace in the Backup.
* If this field is not provided, no namespace filtering will be performed
* (all resources in all Namespaces, including all cluster-scoped resources,
* will be candidates for substitution).
* To mix cluster-scoped and namespaced resources in the same rule, use an
* empty string ("") as one of the target namespaces.
*
*
* repeated string target_namespaces = 1 [(.google.api.field_behavior) = OPTIONAL];
*
*
* @param value The bytes of the targetNamespaces to add.
* @return This builder for chaining.
*/
public Builder addTargetNamespacesBytes(com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
ensureTargetNamespacesIsMutable();
targetNamespaces_.add(value);
bitField0_ |= 0x00000001;
onChanged();
return this;
}
private java.util.List
targetGroupKinds_ = java.util.Collections.emptyList();
private void ensureTargetGroupKindsIsMutable() {
if (!((bitField0_ & 0x00000002) != 0)) {
targetGroupKinds_ =
new java.util.ArrayList(
targetGroupKinds_);
bitField0_ |= 0x00000002;
}
}
private com.google.protobuf.RepeatedFieldBuilderV3<
com.google.cloud.gkebackup.v1.RestoreConfig.GroupKind,
com.google.cloud.gkebackup.v1.RestoreConfig.GroupKind.Builder,
com.google.cloud.gkebackup.v1.RestoreConfig.GroupKindOrBuilder>
targetGroupKindsBuilder_;
/**
*
*
*
* Optional. (Filtering parameter) Any resource subject to substitution must
* belong to one of the listed "types". If this field is not provided, no
* type filtering will be performed (all resources of all types matching
* previous filtering parameters will be candidates for substitution).
*
*
*
* repeated .google.cloud.gkebackup.v1.RestoreConfig.GroupKind target_group_kinds = 2 [(.google.api.field_behavior) = OPTIONAL];
*
*/
public java.util.List
getTargetGroupKindsList() {
if (targetGroupKindsBuilder_ == null) {
return java.util.Collections.unmodifiableList(targetGroupKinds_);
} else {
return targetGroupKindsBuilder_.getMessageList();
}
}
/**
*
*
*
* Optional. (Filtering parameter) Any resource subject to substitution must
* belong to one of the listed "types". If this field is not provided, no
* type filtering will be performed (all resources of all types matching
* previous filtering parameters will be candidates for substitution).
*
*
*
* repeated .google.cloud.gkebackup.v1.RestoreConfig.GroupKind target_group_kinds = 2 [(.google.api.field_behavior) = OPTIONAL];
*
*/
public int getTargetGroupKindsCount() {
if (targetGroupKindsBuilder_ == null) {
return targetGroupKinds_.size();
} else {
return targetGroupKindsBuilder_.getCount();
}
}
/**
*
*
*
* Optional. (Filtering parameter) Any resource subject to substitution must
* belong to one of the listed "types". If this field is not provided, no
* type filtering will be performed (all resources of all types matching
* previous filtering parameters will be candidates for substitution).
*
*
*
* repeated .google.cloud.gkebackup.v1.RestoreConfig.GroupKind target_group_kinds = 2 [(.google.api.field_behavior) = OPTIONAL];
*
*/
public com.google.cloud.gkebackup.v1.RestoreConfig.GroupKind getTargetGroupKinds(int index) {
if (targetGroupKindsBuilder_ == null) {
return targetGroupKinds_.get(index);
} else {
return targetGroupKindsBuilder_.getMessage(index);
}
}
/**
*
*
*
* Optional. (Filtering parameter) Any resource subject to substitution must
* belong to one of the listed "types". If this field is not provided, no
* type filtering will be performed (all resources of all types matching
* previous filtering parameters will be candidates for substitution).
*
*
*
* repeated .google.cloud.gkebackup.v1.RestoreConfig.GroupKind target_group_kinds = 2 [(.google.api.field_behavior) = OPTIONAL];
*
*/
public Builder setTargetGroupKinds(
int index, com.google.cloud.gkebackup.v1.RestoreConfig.GroupKind value) {
if (targetGroupKindsBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureTargetGroupKindsIsMutable();
targetGroupKinds_.set(index, value);
onChanged();
} else {
targetGroupKindsBuilder_.setMessage(index, value);
}
return this;
}
/**
*
*
*
* Optional. (Filtering parameter) Any resource subject to substitution must
* belong to one of the listed "types". If this field is not provided, no
* type filtering will be performed (all resources of all types matching
* previous filtering parameters will be candidates for substitution).
*
*
*
* repeated .google.cloud.gkebackup.v1.RestoreConfig.GroupKind target_group_kinds = 2 [(.google.api.field_behavior) = OPTIONAL];
*
*/
public Builder setTargetGroupKinds(
int index,
com.google.cloud.gkebackup.v1.RestoreConfig.GroupKind.Builder builderForValue) {
if (targetGroupKindsBuilder_ == null) {
ensureTargetGroupKindsIsMutable();
targetGroupKinds_.set(index, builderForValue.build());
onChanged();
} else {
targetGroupKindsBuilder_.setMessage(index, builderForValue.build());
}
return this;
}
/**
*
*
*
* Optional. (Filtering parameter) Any resource subject to substitution must
* belong to one of the listed "types". If this field is not provided, no
* type filtering will be performed (all resources of all types matching
* previous filtering parameters will be candidates for substitution).
*
*
*
* repeated .google.cloud.gkebackup.v1.RestoreConfig.GroupKind target_group_kinds = 2 [(.google.api.field_behavior) = OPTIONAL];
*
*/
public Builder addTargetGroupKinds(
com.google.cloud.gkebackup.v1.RestoreConfig.GroupKind value) {
if (targetGroupKindsBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureTargetGroupKindsIsMutable();
targetGroupKinds_.add(value);
onChanged();
} else {
targetGroupKindsBuilder_.addMessage(value);
}
return this;
}
/**
*
*
*
* Optional. (Filtering parameter) Any resource subject to substitution must
* belong to one of the listed "types". If this field is not provided, no
* type filtering will be performed (all resources of all types matching
* previous filtering parameters will be candidates for substitution).
*
*
*
* repeated .google.cloud.gkebackup.v1.RestoreConfig.GroupKind target_group_kinds = 2 [(.google.api.field_behavior) = OPTIONAL];
*
*/
public Builder addTargetGroupKinds(
int index, com.google.cloud.gkebackup.v1.RestoreConfig.GroupKind value) {
if (targetGroupKindsBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureTargetGroupKindsIsMutable();
targetGroupKinds_.add(index, value);
onChanged();
} else {
targetGroupKindsBuilder_.addMessage(index, value);
}
return this;
}
/**
*
*
*
* Optional. (Filtering parameter) Any resource subject to substitution must
* belong to one of the listed "types". If this field is not provided, no
* type filtering will be performed (all resources of all types matching
* previous filtering parameters will be candidates for substitution).
*
*
*
* repeated .google.cloud.gkebackup.v1.RestoreConfig.GroupKind target_group_kinds = 2 [(.google.api.field_behavior) = OPTIONAL];
*
*/
public Builder addTargetGroupKinds(
com.google.cloud.gkebackup.v1.RestoreConfig.GroupKind.Builder builderForValue) {
if (targetGroupKindsBuilder_ == null) {
ensureTargetGroupKindsIsMutable();
targetGroupKinds_.add(builderForValue.build());
onChanged();
} else {
targetGroupKindsBuilder_.addMessage(builderForValue.build());
}
return this;
}
/**
*
*
*
* Optional. (Filtering parameter) Any resource subject to substitution must
* belong to one of the listed "types". If this field is not provided, no
* type filtering will be performed (all resources of all types matching
* previous filtering parameters will be candidates for substitution).
*
*
*
* repeated .google.cloud.gkebackup.v1.RestoreConfig.GroupKind target_group_kinds = 2 [(.google.api.field_behavior) = OPTIONAL];
*
*/
public Builder addTargetGroupKinds(
int index,
com.google.cloud.gkebackup.v1.RestoreConfig.GroupKind.Builder builderForValue) {
if (targetGroupKindsBuilder_ == null) {
ensureTargetGroupKindsIsMutable();
targetGroupKinds_.add(index, builderForValue.build());
onChanged();
} else {
targetGroupKindsBuilder_.addMessage(index, builderForValue.build());
}
return this;
}
/**
*
*
*
* Optional. (Filtering parameter) Any resource subject to substitution must
* belong to one of the listed "types". If this field is not provided, no
* type filtering will be performed (all resources of all types matching
* previous filtering parameters will be candidates for substitution).
*
*
*
* repeated .google.cloud.gkebackup.v1.RestoreConfig.GroupKind target_group_kinds = 2 [(.google.api.field_behavior) = OPTIONAL];
*
*/
public Builder addAllTargetGroupKinds(
java.lang.Iterable extends com.google.cloud.gkebackup.v1.RestoreConfig.GroupKind>
values) {
if (targetGroupKindsBuilder_ == null) {
ensureTargetGroupKindsIsMutable();
com.google.protobuf.AbstractMessageLite.Builder.addAll(values, targetGroupKinds_);
onChanged();
} else {
targetGroupKindsBuilder_.addAllMessages(values);
}
return this;
}
/**
*
*
*
* Optional. (Filtering parameter) Any resource subject to substitution must
* belong to one of the listed "types". If this field is not provided, no
* type filtering will be performed (all resources of all types matching
* previous filtering parameters will be candidates for substitution).
*
*
*
* repeated .google.cloud.gkebackup.v1.RestoreConfig.GroupKind target_group_kinds = 2 [(.google.api.field_behavior) = OPTIONAL];
*
*/
public Builder clearTargetGroupKinds() {
if (targetGroupKindsBuilder_ == null) {
targetGroupKinds_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000002);
onChanged();
} else {
targetGroupKindsBuilder_.clear();
}
return this;
}
/**
*
*
*
* Optional. (Filtering parameter) Any resource subject to substitution must
* belong to one of the listed "types". If this field is not provided, no
* type filtering will be performed (all resources of all types matching
* previous filtering parameters will be candidates for substitution).
*
*
*
* repeated .google.cloud.gkebackup.v1.RestoreConfig.GroupKind target_group_kinds = 2 [(.google.api.field_behavior) = OPTIONAL];
*
*/
public Builder removeTargetGroupKinds(int index) {
if (targetGroupKindsBuilder_ == null) {
ensureTargetGroupKindsIsMutable();
targetGroupKinds_.remove(index);
onChanged();
} else {
targetGroupKindsBuilder_.remove(index);
}
return this;
}
/**
*
*
*
* Optional. (Filtering parameter) Any resource subject to substitution must
* belong to one of the listed "types". If this field is not provided, no
* type filtering will be performed (all resources of all types matching
* previous filtering parameters will be candidates for substitution).
*
*
*
* repeated .google.cloud.gkebackup.v1.RestoreConfig.GroupKind target_group_kinds = 2 [(.google.api.field_behavior) = OPTIONAL];
*
*/
public com.google.cloud.gkebackup.v1.RestoreConfig.GroupKind.Builder
getTargetGroupKindsBuilder(int index) {
return getTargetGroupKindsFieldBuilder().getBuilder(index);
}
/**
*
*
*
* Optional. (Filtering parameter) Any resource subject to substitution must
* belong to one of the listed "types". If this field is not provided, no
* type filtering will be performed (all resources of all types matching
* previous filtering parameters will be candidates for substitution).
*
*
*
* repeated .google.cloud.gkebackup.v1.RestoreConfig.GroupKind target_group_kinds = 2 [(.google.api.field_behavior) = OPTIONAL];
*
*/
public com.google.cloud.gkebackup.v1.RestoreConfig.GroupKindOrBuilder
getTargetGroupKindsOrBuilder(int index) {
if (targetGroupKindsBuilder_ == null) {
return targetGroupKinds_.get(index);
} else {
return targetGroupKindsBuilder_.getMessageOrBuilder(index);
}
}
/**
*
*
*
* Optional. (Filtering parameter) Any resource subject to substitution must
* belong to one of the listed "types". If this field is not provided, no
* type filtering will be performed (all resources of all types matching
* previous filtering parameters will be candidates for substitution).
*
*
*
* repeated .google.cloud.gkebackup.v1.RestoreConfig.GroupKind target_group_kinds = 2 [(.google.api.field_behavior) = OPTIONAL];
*
*/
public java.util.List<
? extends com.google.cloud.gkebackup.v1.RestoreConfig.GroupKindOrBuilder>
getTargetGroupKindsOrBuilderList() {
if (targetGroupKindsBuilder_ != null) {
return targetGroupKindsBuilder_.getMessageOrBuilderList();
} else {
return java.util.Collections.unmodifiableList(targetGroupKinds_);
}
}
/**
*
*
*
* Optional. (Filtering parameter) Any resource subject to substitution must
* belong to one of the listed "types". If this field is not provided, no
* type filtering will be performed (all resources of all types matching
* previous filtering parameters will be candidates for substitution).
*
*
*
* repeated .google.cloud.gkebackup.v1.RestoreConfig.GroupKind target_group_kinds = 2 [(.google.api.field_behavior) = OPTIONAL];
*
*/
public com.google.cloud.gkebackup.v1.RestoreConfig.GroupKind.Builder
addTargetGroupKindsBuilder() {
return getTargetGroupKindsFieldBuilder()
.addBuilder(com.google.cloud.gkebackup.v1.RestoreConfig.GroupKind.getDefaultInstance());
}
/**
*
*
*
* Optional. (Filtering parameter) Any resource subject to substitution must
* belong to one of the listed "types". If this field is not provided, no
* type filtering will be performed (all resources of all types matching
* previous filtering parameters will be candidates for substitution).
*
*
*
* repeated .google.cloud.gkebackup.v1.RestoreConfig.GroupKind target_group_kinds = 2 [(.google.api.field_behavior) = OPTIONAL];
*
*/
public com.google.cloud.gkebackup.v1.RestoreConfig.GroupKind.Builder
addTargetGroupKindsBuilder(int index) {
return getTargetGroupKindsFieldBuilder()
.addBuilder(
index, com.google.cloud.gkebackup.v1.RestoreConfig.GroupKind.getDefaultInstance());
}
/**
*
*
*
* Optional. (Filtering parameter) Any resource subject to substitution must
* belong to one of the listed "types". If this field is not provided, no
* type filtering will be performed (all resources of all types matching
* previous filtering parameters will be candidates for substitution).
*
*
*
* repeated .google.cloud.gkebackup.v1.RestoreConfig.GroupKind target_group_kinds = 2 [(.google.api.field_behavior) = OPTIONAL];
*
*/
public java.util.List
getTargetGroupKindsBuilderList() {
return getTargetGroupKindsFieldBuilder().getBuilderList();
}
private com.google.protobuf.RepeatedFieldBuilderV3<
com.google.cloud.gkebackup.v1.RestoreConfig.GroupKind,
com.google.cloud.gkebackup.v1.RestoreConfig.GroupKind.Builder,
com.google.cloud.gkebackup.v1.RestoreConfig.GroupKindOrBuilder>
getTargetGroupKindsFieldBuilder() {
if (targetGroupKindsBuilder_ == null) {
targetGroupKindsBuilder_ =
new com.google.protobuf.RepeatedFieldBuilderV3<
com.google.cloud.gkebackup.v1.RestoreConfig.GroupKind,
com.google.cloud.gkebackup.v1.RestoreConfig.GroupKind.Builder,
com.google.cloud.gkebackup.v1.RestoreConfig.GroupKindOrBuilder>(
targetGroupKinds_,
((bitField0_ & 0x00000002) != 0),
getParentForChildren(),
isClean());
targetGroupKinds_ = null;
}
return targetGroupKindsBuilder_;
}
private java.lang.Object targetJsonPath_ = "";
/**
*
*
*
* Required. This is a [JSONPath]
* (https://kubernetes.io/docs/reference/kubectl/jsonpath/)
* expression that matches specific fields of candidate
* resources and it operates as both a filtering parameter (resources that
* are not matched with this expression will not be candidates for
* substitution) as well as a field identifier (identifies exactly which
* fields out of the candidate resources will be modified).
*
*
* string target_json_path = 3 [(.google.api.field_behavior) = REQUIRED];
*
* @return The targetJsonPath.
*/
public java.lang.String getTargetJsonPath() {
java.lang.Object ref = targetJsonPath_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
targetJsonPath_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
*
*
* Required. This is a [JSONPath]
* (https://kubernetes.io/docs/reference/kubectl/jsonpath/)
* expression that matches specific fields of candidate
* resources and it operates as both a filtering parameter (resources that
* are not matched with this expression will not be candidates for
* substitution) as well as a field identifier (identifies exactly which
* fields out of the candidate resources will be modified).
*
*
* string target_json_path = 3 [(.google.api.field_behavior) = REQUIRED];
*
* @return The bytes for targetJsonPath.
*/
public com.google.protobuf.ByteString getTargetJsonPathBytes() {
java.lang.Object ref = targetJsonPath_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
targetJsonPath_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
*
*
* Required. This is a [JSONPath]
* (https://kubernetes.io/docs/reference/kubectl/jsonpath/)
* expression that matches specific fields of candidate
* resources and it operates as both a filtering parameter (resources that
* are not matched with this expression will not be candidates for
* substitution) as well as a field identifier (identifies exactly which
* fields out of the candidate resources will be modified).
*
*
* string target_json_path = 3 [(.google.api.field_behavior) = REQUIRED];
*
* @param value The targetJsonPath to set.
* @return This builder for chaining.
*/
public Builder setTargetJsonPath(java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
targetJsonPath_ = value;
bitField0_ |= 0x00000004;
onChanged();
return this;
}
/**
*
*
*
* Required. This is a [JSONPath]
* (https://kubernetes.io/docs/reference/kubectl/jsonpath/)
* expression that matches specific fields of candidate
* resources and it operates as both a filtering parameter (resources that
* are not matched with this expression will not be candidates for
* substitution) as well as a field identifier (identifies exactly which
* fields out of the candidate resources will be modified).
*
*
* string target_json_path = 3 [(.google.api.field_behavior) = REQUIRED];
*
* @return This builder for chaining.
*/
public Builder clearTargetJsonPath() {
targetJsonPath_ = getDefaultInstance().getTargetJsonPath();
bitField0_ = (bitField0_ & ~0x00000004);
onChanged();
return this;
}
/**
*
*
*
* Required. This is a [JSONPath]
* (https://kubernetes.io/docs/reference/kubectl/jsonpath/)
* expression that matches specific fields of candidate
* resources and it operates as both a filtering parameter (resources that
* are not matched with this expression will not be candidates for
* substitution) as well as a field identifier (identifies exactly which
* fields out of the candidate resources will be modified).
*
*
* string target_json_path = 3 [(.google.api.field_behavior) = REQUIRED];
*
* @param value The bytes for targetJsonPath to set.
* @return This builder for chaining.
*/
public Builder setTargetJsonPathBytes(com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
targetJsonPath_ = value;
bitField0_ |= 0x00000004;
onChanged();
return this;
}
private java.lang.Object originalValuePattern_ = "";
/**
*
*
*
* Optional. (Filtering parameter) This is a [regular expression]
* (https://en.wikipedia.org/wiki/Regular_expression)
* that is compared against the fields matched by the target_json_path
* expression (and must also have passed the previous filters).
* Substitution will not be performed against fields whose
* value does not match this expression. If this field is NOT specified,
* then ALL fields matched by the target_json_path expression will undergo
* substitution. Note that an empty (e.g., "", rather than unspecified)
* value for this field will only match empty fields.
*
*
* string original_value_pattern = 4 [(.google.api.field_behavior) = OPTIONAL];
*
* @return The originalValuePattern.
*/
public java.lang.String getOriginalValuePattern() {
java.lang.Object ref = originalValuePattern_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
originalValuePattern_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
*
*
* Optional. (Filtering parameter) This is a [regular expression]
* (https://en.wikipedia.org/wiki/Regular_expression)
* that is compared against the fields matched by the target_json_path
* expression (and must also have passed the previous filters).
* Substitution will not be performed against fields whose
* value does not match this expression. If this field is NOT specified,
* then ALL fields matched by the target_json_path expression will undergo
* substitution. Note that an empty (e.g., "", rather than unspecified)
* value for this field will only match empty fields.
*
*
* string original_value_pattern = 4 [(.google.api.field_behavior) = OPTIONAL];
*
* @return The bytes for originalValuePattern.
*/
public com.google.protobuf.ByteString getOriginalValuePatternBytes() {
java.lang.Object ref = originalValuePattern_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
originalValuePattern_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
*
*
* Optional. (Filtering parameter) This is a [regular expression]
* (https://en.wikipedia.org/wiki/Regular_expression)
* that is compared against the fields matched by the target_json_path
* expression (and must also have passed the previous filters).
* Substitution will not be performed against fields whose
* value does not match this expression. If this field is NOT specified,
* then ALL fields matched by the target_json_path expression will undergo
* substitution. Note that an empty (e.g., "", rather than unspecified)
* value for this field will only match empty fields.
*
*
* string original_value_pattern = 4 [(.google.api.field_behavior) = OPTIONAL];
*
* @param value The originalValuePattern to set.
* @return This builder for chaining.
*/
public Builder setOriginalValuePattern(java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
originalValuePattern_ = value;
bitField0_ |= 0x00000008;
onChanged();
return this;
}
/**
*
*
*
* Optional. (Filtering parameter) This is a [regular expression]
* (https://en.wikipedia.org/wiki/Regular_expression)
* that is compared against the fields matched by the target_json_path
* expression (and must also have passed the previous filters).
* Substitution will not be performed against fields whose
* value does not match this expression. If this field is NOT specified,
* then ALL fields matched by the target_json_path expression will undergo
* substitution. Note that an empty (e.g., "", rather than unspecified)
* value for this field will only match empty fields.
*
*
* string original_value_pattern = 4 [(.google.api.field_behavior) = OPTIONAL];
*
* @return This builder for chaining.
*/
public Builder clearOriginalValuePattern() {
originalValuePattern_ = getDefaultInstance().getOriginalValuePattern();
bitField0_ = (bitField0_ & ~0x00000008);
onChanged();
return this;
}
/**
*
*
*
* Optional. (Filtering parameter) This is a [regular expression]
* (https://en.wikipedia.org/wiki/Regular_expression)
* that is compared against the fields matched by the target_json_path
* expression (and must also have passed the previous filters).
* Substitution will not be performed against fields whose
* value does not match this expression. If this field is NOT specified,
* then ALL fields matched by the target_json_path expression will undergo
* substitution. Note that an empty (e.g., "", rather than unspecified)
* value for this field will only match empty fields.
*
*
* string original_value_pattern = 4 [(.google.api.field_behavior) = OPTIONAL];
*
* @param value The bytes for originalValuePattern to set.
* @return This builder for chaining.
*/
public Builder setOriginalValuePatternBytes(com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
originalValuePattern_ = value;
bitField0_ |= 0x00000008;
onChanged();
return this;
}
private java.lang.Object newValue_ = "";
/**
*
*
*
* Optional. This is the new value to set for any fields that pass the
* filtering and selection criteria. To remove a value from a Kubernetes
* resource, either leave this field unspecified, or set it to the empty
* string ("").
*
*
* string new_value = 5 [(.google.api.field_behavior) = OPTIONAL];
*
* @return The newValue.
*/
public java.lang.String getNewValue() {
java.lang.Object ref = newValue_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
newValue_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
*
*
* Optional. This is the new value to set for any fields that pass the
* filtering and selection criteria. To remove a value from a Kubernetes
* resource, either leave this field unspecified, or set it to the empty
* string ("").
*
*
* string new_value = 5 [(.google.api.field_behavior) = OPTIONAL];
*
* @return The bytes for newValue.
*/
public com.google.protobuf.ByteString getNewValueBytes() {
java.lang.Object ref = newValue_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
newValue_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
*
*
* Optional. This is the new value to set for any fields that pass the
* filtering and selection criteria. To remove a value from a Kubernetes
* resource, either leave this field unspecified, or set it to the empty
* string ("").
*
*
* string new_value = 5 [(.google.api.field_behavior) = OPTIONAL];
*
* @param value The newValue to set.
* @return This builder for chaining.
*/
public Builder setNewValue(java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
newValue_ = value;
bitField0_ |= 0x00000010;
onChanged();
return this;
}
/**
*
*
*
* Optional. This is the new value to set for any fields that pass the
* filtering and selection criteria. To remove a value from a Kubernetes
* resource, either leave this field unspecified, or set it to the empty
* string ("").
*
*
* string new_value = 5 [(.google.api.field_behavior) = OPTIONAL];
*
* @return This builder for chaining.
*/
public Builder clearNewValue() {
newValue_ = getDefaultInstance().getNewValue();
bitField0_ = (bitField0_ & ~0x00000010);
onChanged();
return this;
}
/**
*
*
*
* Optional. This is the new value to set for any fields that pass the
* filtering and selection criteria. To remove a value from a Kubernetes
* resource, either leave this field unspecified, or set it to the empty
* string ("").
*
*
* string new_value = 5 [(.google.api.field_behavior) = OPTIONAL];
*
* @param value The bytes for newValue to set.
* @return This builder for chaining.
*/
public Builder setNewValueBytes(com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
newValue_ = value;
bitField0_ |= 0x00000010;
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.RestoreConfig.SubstitutionRule)
}
// @@protoc_insertion_point(class_scope:google.cloud.gkebackup.v1.RestoreConfig.SubstitutionRule)
private static final com.google.cloud.gkebackup.v1.RestoreConfig.SubstitutionRule
DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new com.google.cloud.gkebackup.v1.RestoreConfig.SubstitutionRule();
}
public static com.google.cloud.gkebackup.v1.RestoreConfig.SubstitutionRule
getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser PARSER =
new com.google.protobuf.AbstractParser() {
@java.lang.Override
public SubstitutionRule 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.RestoreConfig.SubstitutionRule
getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
public interface TransformationRuleActionOrBuilder
extends
// @@protoc_insertion_point(interface_extends:google.cloud.gkebackup.v1.RestoreConfig.TransformationRuleAction)
com.google.protobuf.MessageOrBuilder {
/**
*
*
*
* Required. op specifies the operation to perform.
*
*
*
* .google.cloud.gkebackup.v1.RestoreConfig.TransformationRuleAction.Op op = 1 [(.google.api.field_behavior) = REQUIRED];
*
*
* @return The enum numeric value on the wire for op.
*/
int getOpValue();
/**
*
*
*
* Required. op specifies the operation to perform.
*
*
*
* .google.cloud.gkebackup.v1.RestoreConfig.TransformationRuleAction.Op op = 1 [(.google.api.field_behavior) = REQUIRED];
*
*
* @return The op.
*/
com.google.cloud.gkebackup.v1.RestoreConfig.TransformationRuleAction.Op getOp();
/**
*
*
*
* Optional. A string containing a JSON Pointer value that references the
* location in the target document to move the value from.
*
*
* string from_path = 2 [(.google.api.field_behavior) = OPTIONAL];
*
* @return The fromPath.
*/
java.lang.String getFromPath();
/**
*
*
*
* Optional. A string containing a JSON Pointer value that references the
* location in the target document to move the value from.
*
*
* string from_path = 2 [(.google.api.field_behavior) = OPTIONAL];
*
* @return The bytes for fromPath.
*/
com.google.protobuf.ByteString getFromPathBytes();
/**
*
*
*
* Optional. A string containing a JSON-Pointer value that references a
* location within the target document where the operation is performed.
*
*
* string path = 3 [(.google.api.field_behavior) = OPTIONAL];
*
* @return The path.
*/
java.lang.String getPath();
/**
*
*
*
* Optional. A string containing a JSON-Pointer value that references a
* location within the target document where the operation is performed.
*
*
* string path = 3 [(.google.api.field_behavior) = OPTIONAL];
*
* @return The bytes for path.
*/
com.google.protobuf.ByteString getPathBytes();
/**
*
*
*
* Optional. A string that specifies the desired value in string format to
* use for transformation.
*
*
* string value = 4 [(.google.api.field_behavior) = OPTIONAL];
*
* @return The value.
*/
java.lang.String getValue();
/**
*
*
*
* Optional. A string that specifies the desired value in string format to
* use for transformation.
*
*
* string value = 4 [(.google.api.field_behavior) = OPTIONAL];
*
* @return The bytes for value.
*/
com.google.protobuf.ByteString getValueBytes();
}
/**
*
*
*
* TransformationRuleAction defines a TransformationRule action based on the
* JSON Patch RFC (https://www.rfc-editor.org/rfc/rfc6902)
*
*
* Protobuf type {@code google.cloud.gkebackup.v1.RestoreConfig.TransformationRuleAction}
*/
public static final class TransformationRuleAction extends com.google.protobuf.GeneratedMessageV3
implements
// @@protoc_insertion_point(message_implements:google.cloud.gkebackup.v1.RestoreConfig.TransformationRuleAction)
TransformationRuleActionOrBuilder {
private static final long serialVersionUID = 0L;
// Use TransformationRuleAction.newBuilder() to construct.
private TransformationRuleAction(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private TransformationRuleAction() {
op_ = 0;
fromPath_ = "";
path_ = "";
value_ = "";
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(UnusedPrivateParameter unused) {
return new TransformationRuleAction();
}
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
return com.google.cloud.gkebackup.v1.RestoreProto
.internal_static_google_cloud_gkebackup_v1_RestoreConfig_TransformationRuleAction_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.google.cloud.gkebackup.v1.RestoreProto
.internal_static_google_cloud_gkebackup_v1_RestoreConfig_TransformationRuleAction_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.google.cloud.gkebackup.v1.RestoreConfig.TransformationRuleAction.class,
com.google.cloud.gkebackup.v1.RestoreConfig.TransformationRuleAction.Builder.class);
}
/**
*
*
*
* Possible values for operations of a transformation rule action.
*
*
* Protobuf enum {@code google.cloud.gkebackup.v1.RestoreConfig.TransformationRuleAction.Op}
*/
public enum Op implements com.google.protobuf.ProtocolMessageEnum {
/**
*
*
*
* Unspecified operation
*
*
* OP_UNSPECIFIED = 0;
*/
OP_UNSPECIFIED(0),
/**
*
*
*
* The "remove" operation removes the value at the target location.
*
*
* REMOVE = 1;
*/
REMOVE(1),
/**
*
*
*
* The "move" operation removes the value at a specified location and
* adds it to the target location.
*
*
* MOVE = 2;
*/
MOVE(2),
/**
*
*
*
* The "copy" operation copies the value at a specified location to the
* target location.
*
*
* COPY = 3;
*/
COPY(3),
/**
*
*
*
* The "add" operation performs one of the following functions,
* depending upon what the target location references:
* 1. If the target location specifies an array index, a new value is
* inserted into the array at the specified index.
* 2. If the target location specifies an object member that does not
* already exist, a new member is added to the object.
* 3. If the target location specifies an object member that does exist,
* that member's value is replaced.
*
*
* ADD = 4;
*/
ADD(4),
/**
*
*
*
* The "test" operation tests that a value at the target location is
* equal to a specified value.
*
*
* TEST = 5;
*/
TEST(5),
/**
*
*
*
* The "replace" operation replaces the value at the target location
* with a new value. The operation object MUST contain a "value" member
* whose content specifies the replacement value.
*
*
* REPLACE = 6;
*/
REPLACE(6),
UNRECOGNIZED(-1),
;
/**
*
*
*
* Unspecified operation
*
*
* OP_UNSPECIFIED = 0;
*/
public static final int OP_UNSPECIFIED_VALUE = 0;
/**
*
*
*
* The "remove" operation removes the value at the target location.
*
*
* REMOVE = 1;
*/
public static final int REMOVE_VALUE = 1;
/**
*
*
*
* The "move" operation removes the value at a specified location and
* adds it to the target location.
*
*
* MOVE = 2;
*/
public static final int MOVE_VALUE = 2;
/**
*
*
*
* The "copy" operation copies the value at a specified location to the
* target location.
*
*
* COPY = 3;
*/
public static final int COPY_VALUE = 3;
/**
*
*
*
* The "add" operation performs one of the following functions,
* depending upon what the target location references:
* 1. If the target location specifies an array index, a new value is
* inserted into the array at the specified index.
* 2. If the target location specifies an object member that does not
* already exist, a new member is added to the object.
* 3. If the target location specifies an object member that does exist,
* that member's value is replaced.
*
*
* ADD = 4;
*/
public static final int ADD_VALUE = 4;
/**
*
*
*
* The "test" operation tests that a value at the target location is
* equal to a specified value.
*
*
* TEST = 5;
*/
public static final int TEST_VALUE = 5;
/**
*
*
*
* The "replace" operation replaces the value at the target location
* with a new value. The operation object MUST contain a "value" member
* whose content specifies the replacement value.
*
*
* REPLACE = 6;
*/
public static final int REPLACE_VALUE = 6;
public final int getNumber() {
if (this == UNRECOGNIZED) {
throw new java.lang.IllegalArgumentException(
"Can't get the number of an unknown enum value.");
}
return value;
}
/**
* @param value The numeric wire value of the corresponding enum entry.
* @return The enum associated with the given numeric wire value.
* @deprecated Use {@link #forNumber(int)} instead.
*/
@java.lang.Deprecated
public static Op valueOf(int value) {
return forNumber(value);
}
/**
* @param value The numeric wire value of the corresponding enum entry.
* @return The enum associated with the given numeric wire value.
*/
public static Op forNumber(int value) {
switch (value) {
case 0:
return OP_UNSPECIFIED;
case 1:
return REMOVE;
case 2:
return MOVE;
case 3:
return COPY;
case 4:
return ADD;
case 5:
return TEST;
case 6:
return REPLACE;
default:
return null;
}
}
public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() {
return internalValueMap;
}
private static final com.google.protobuf.Internal.EnumLiteMap internalValueMap =
new com.google.protobuf.Internal.EnumLiteMap() {
public Op findValueByNumber(int number) {
return Op.forNumber(number);
}
};
public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() {
if (this == UNRECOGNIZED) {
throw new java.lang.IllegalStateException(
"Can't get the descriptor of an unrecognized enum value.");
}
return getDescriptor().getValues().get(ordinal());
}
public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() {
return getDescriptor();
}
public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() {
return com.google.cloud.gkebackup.v1.RestoreConfig.TransformationRuleAction.getDescriptor()
.getEnumTypes()
.get(0);
}
private static final Op[] VALUES = values();
public static Op valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) {
if (desc.getType() != getDescriptor()) {
throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type.");
}
if (desc.getIndex() == -1) {
return UNRECOGNIZED;
}
return VALUES[desc.getIndex()];
}
private final int value;
private Op(int value) {
this.value = value;
}
// @@protoc_insertion_point(enum_scope:google.cloud.gkebackup.v1.RestoreConfig.TransformationRuleAction.Op)
}
public static final int OP_FIELD_NUMBER = 1;
private int op_ = 0;
/**
*
*
*
* Required. op specifies the operation to perform.
*
*
*
* .google.cloud.gkebackup.v1.RestoreConfig.TransformationRuleAction.Op op = 1 [(.google.api.field_behavior) = REQUIRED];
*
*
* @return The enum numeric value on the wire for op.
*/
@java.lang.Override
public int getOpValue() {
return op_;
}
/**
*
*
*
* Required. op specifies the operation to perform.
*
*
*
* .google.cloud.gkebackup.v1.RestoreConfig.TransformationRuleAction.Op op = 1 [(.google.api.field_behavior) = REQUIRED];
*
*
* @return The op.
*/
@java.lang.Override
public com.google.cloud.gkebackup.v1.RestoreConfig.TransformationRuleAction.Op getOp() {
com.google.cloud.gkebackup.v1.RestoreConfig.TransformationRuleAction.Op result =
com.google.cloud.gkebackup.v1.RestoreConfig.TransformationRuleAction.Op.forNumber(op_);
return result == null
? com.google.cloud.gkebackup.v1.RestoreConfig.TransformationRuleAction.Op.UNRECOGNIZED
: result;
}
public static final int FROM_PATH_FIELD_NUMBER = 2;
@SuppressWarnings("serial")
private volatile java.lang.Object fromPath_ = "";
/**
*
*
*
* Optional. A string containing a JSON Pointer value that references the
* location in the target document to move the value from.
*
*
* string from_path = 2 [(.google.api.field_behavior) = OPTIONAL];
*
* @return The fromPath.
*/
@java.lang.Override
public java.lang.String getFromPath() {
java.lang.Object ref = fromPath_;
if (ref instanceof java.lang.String) {
return (java.lang.String) ref;
} else {
com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
fromPath_ = s;
return s;
}
}
/**
*
*
*
* Optional. A string containing a JSON Pointer value that references the
* location in the target document to move the value from.
*
*
* string from_path = 2 [(.google.api.field_behavior) = OPTIONAL];
*
* @return The bytes for fromPath.
*/
@java.lang.Override
public com.google.protobuf.ByteString getFromPathBytes() {
java.lang.Object ref = fromPath_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
fromPath_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int PATH_FIELD_NUMBER = 3;
@SuppressWarnings("serial")
private volatile java.lang.Object path_ = "";
/**
*
*
*
* Optional. A string containing a JSON-Pointer value that references a
* location within the target document where the operation is performed.
*
*
* string path = 3 [(.google.api.field_behavior) = OPTIONAL];
*
* @return The path.
*/
@java.lang.Override
public java.lang.String getPath() {
java.lang.Object ref = path_;
if (ref instanceof java.lang.String) {
return (java.lang.String) ref;
} else {
com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
path_ = s;
return s;
}
}
/**
*
*
*
* Optional. A string containing a JSON-Pointer value that references a
* location within the target document where the operation is performed.
*
*
* string path = 3 [(.google.api.field_behavior) = OPTIONAL];
*
* @return The bytes for path.
*/
@java.lang.Override
public com.google.protobuf.ByteString getPathBytes() {
java.lang.Object ref = path_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
path_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int VALUE_FIELD_NUMBER = 4;
@SuppressWarnings("serial")
private volatile java.lang.Object value_ = "";
/**
*
*
*
* Optional. A string that specifies the desired value in string format to
* use for transformation.
*
*
* string value = 4 [(.google.api.field_behavior) = OPTIONAL];
*
* @return The value.
*/
@java.lang.Override
public java.lang.String getValue() {
java.lang.Object ref = value_;
if (ref instanceof java.lang.String) {
return (java.lang.String) ref;
} else {
com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
value_ = s;
return s;
}
}
/**
*
*
*
* Optional. A string that specifies the desired value in string format to
* use for transformation.
*
*
* string value = 4 [(.google.api.field_behavior) = OPTIONAL];
*
* @return The bytes for value.
*/
@java.lang.Override
public com.google.protobuf.ByteString getValueBytes() {
java.lang.Object ref = value_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
value_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
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 (op_
!= com.google.cloud.gkebackup.v1.RestoreConfig.TransformationRuleAction.Op.OP_UNSPECIFIED
.getNumber()) {
output.writeEnum(1, op_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(fromPath_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 2, fromPath_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(path_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 3, path_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(value_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 4, value_);
}
getUnknownFields().writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (op_
!= com.google.cloud.gkebackup.v1.RestoreConfig.TransformationRuleAction.Op.OP_UNSPECIFIED
.getNumber()) {
size += com.google.protobuf.CodedOutputStream.computeEnumSize(1, op_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(fromPath_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, fromPath_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(path_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, path_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(value_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, value_);
}
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.RestoreConfig.TransformationRuleAction)) {
return super.equals(obj);
}
com.google.cloud.gkebackup.v1.RestoreConfig.TransformationRuleAction other =
(com.google.cloud.gkebackup.v1.RestoreConfig.TransformationRuleAction) obj;
if (op_ != other.op_) return false;
if (!getFromPath().equals(other.getFromPath())) return false;
if (!getPath().equals(other.getPath())) return false;
if (!getValue().equals(other.getValue())) 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) + OP_FIELD_NUMBER;
hash = (53 * hash) + op_;
hash = (37 * hash) + FROM_PATH_FIELD_NUMBER;
hash = (53 * hash) + getFromPath().hashCode();
hash = (37 * hash) + PATH_FIELD_NUMBER;
hash = (53 * hash) + getPath().hashCode();
hash = (37 * hash) + VALUE_FIELD_NUMBER;
hash = (53 * hash) + getValue().hashCode();
hash = (29 * hash) + getUnknownFields().hashCode();
memoizedHashCode = hash;
return hash;
}
public static com.google.cloud.gkebackup.v1.RestoreConfig.TransformationRuleAction parseFrom(
java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.cloud.gkebackup.v1.RestoreConfig.TransformationRuleAction 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.RestoreConfig.TransformationRuleAction parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.cloud.gkebackup.v1.RestoreConfig.TransformationRuleAction 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.RestoreConfig.TransformationRuleAction parseFrom(
byte[] data) throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.cloud.gkebackup.v1.RestoreConfig.TransformationRuleAction 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.RestoreConfig.TransformationRuleAction parseFrom(
java.io.InputStream input) throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
}
public static com.google.cloud.gkebackup.v1.RestoreConfig.TransformationRuleAction 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.RestoreConfig.TransformationRuleAction
parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input);
}
public static com.google.cloud.gkebackup.v1.RestoreConfig.TransformationRuleAction
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.RestoreConfig.TransformationRuleAction 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.RestoreConfig.TransformationRuleAction 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.RestoreConfig.TransformationRuleAction 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;
}
/**
*
*
*
* TransformationRuleAction defines a TransformationRule action based on the
* JSON Patch RFC (https://www.rfc-editor.org/rfc/rfc6902)
*
*
* Protobuf type {@code google.cloud.gkebackup.v1.RestoreConfig.TransformationRuleAction}
*/
public static final class Builder
extends com.google.protobuf.GeneratedMessageV3.Builder
implements
// @@protoc_insertion_point(builder_implements:google.cloud.gkebackup.v1.RestoreConfig.TransformationRuleAction)
com.google.cloud.gkebackup.v1.RestoreConfig.TransformationRuleActionOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
return com.google.cloud.gkebackup.v1.RestoreProto
.internal_static_google_cloud_gkebackup_v1_RestoreConfig_TransformationRuleAction_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.google.cloud.gkebackup.v1.RestoreProto
.internal_static_google_cloud_gkebackup_v1_RestoreConfig_TransformationRuleAction_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.google.cloud.gkebackup.v1.RestoreConfig.TransformationRuleAction.class,
com.google.cloud.gkebackup.v1.RestoreConfig.TransformationRuleAction.Builder.class);
}
// Construct using
// com.google.cloud.gkebackup.v1.RestoreConfig.TransformationRuleAction.newBuilder()
private Builder() {}
private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
}
@java.lang.Override
public Builder clear() {
super.clear();
bitField0_ = 0;
op_ = 0;
fromPath_ = "";
path_ = "";
value_ = "";
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() {
return com.google.cloud.gkebackup.v1.RestoreProto
.internal_static_google_cloud_gkebackup_v1_RestoreConfig_TransformationRuleAction_descriptor;
}
@java.lang.Override
public com.google.cloud.gkebackup.v1.RestoreConfig.TransformationRuleAction
getDefaultInstanceForType() {
return com.google.cloud.gkebackup.v1.RestoreConfig.TransformationRuleAction
.getDefaultInstance();
}
@java.lang.Override
public com.google.cloud.gkebackup.v1.RestoreConfig.TransformationRuleAction build() {
com.google.cloud.gkebackup.v1.RestoreConfig.TransformationRuleAction result =
buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public com.google.cloud.gkebackup.v1.RestoreConfig.TransformationRuleAction buildPartial() {
com.google.cloud.gkebackup.v1.RestoreConfig.TransformationRuleAction result =
new com.google.cloud.gkebackup.v1.RestoreConfig.TransformationRuleAction(this);
if (bitField0_ != 0) {
buildPartial0(result);
}
onBuilt();
return result;
}
private void buildPartial0(
com.google.cloud.gkebackup.v1.RestoreConfig.TransformationRuleAction result) {
int from_bitField0_ = bitField0_;
if (((from_bitField0_ & 0x00000001) != 0)) {
result.op_ = op_;
}
if (((from_bitField0_ & 0x00000002) != 0)) {
result.fromPath_ = fromPath_;
}
if (((from_bitField0_ & 0x00000004) != 0)) {
result.path_ = path_;
}
if (((from_bitField0_ & 0x00000008) != 0)) {
result.value_ = value_;
}
}
@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.RestoreConfig.TransformationRuleAction) {
return mergeFrom(
(com.google.cloud.gkebackup.v1.RestoreConfig.TransformationRuleAction) other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(
com.google.cloud.gkebackup.v1.RestoreConfig.TransformationRuleAction other) {
if (other
== com.google.cloud.gkebackup.v1.RestoreConfig.TransformationRuleAction
.getDefaultInstance()) return this;
if (other.op_ != 0) {
setOpValue(other.getOpValue());
}
if (!other.getFromPath().isEmpty()) {
fromPath_ = other.fromPath_;
bitField0_ |= 0x00000002;
onChanged();
}
if (!other.getPath().isEmpty()) {
path_ = other.path_;
bitField0_ |= 0x00000004;
onChanged();
}
if (!other.getValue().isEmpty()) {
value_ = other.value_;
bitField0_ |= 0x00000008;
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:
{
op_ = input.readEnum();
bitField0_ |= 0x00000001;
break;
} // case 8
case 18:
{
fromPath_ = input.readStringRequireUtf8();
bitField0_ |= 0x00000002;
break;
} // case 18
case 26:
{
path_ = input.readStringRequireUtf8();
bitField0_ |= 0x00000004;
break;
} // case 26
case 34:
{
value_ = input.readStringRequireUtf8();
bitField0_ |= 0x00000008;
break;
} // case 34
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 op_ = 0;
/**
*
*
*
* Required. op specifies the operation to perform.
*
*
*
* .google.cloud.gkebackup.v1.RestoreConfig.TransformationRuleAction.Op op = 1 [(.google.api.field_behavior) = REQUIRED];
*
*
* @return The enum numeric value on the wire for op.
*/
@java.lang.Override
public int getOpValue() {
return op_;
}
/**
*
*
*
* Required. op specifies the operation to perform.
*
*
*
* .google.cloud.gkebackup.v1.RestoreConfig.TransformationRuleAction.Op op = 1 [(.google.api.field_behavior) = REQUIRED];
*
*
* @param value The enum numeric value on the wire for op to set.
* @return This builder for chaining.
*/
public Builder setOpValue(int value) {
op_ = value;
bitField0_ |= 0x00000001;
onChanged();
return this;
}
/**
*
*
*
* Required. op specifies the operation to perform.
*
*
*
* .google.cloud.gkebackup.v1.RestoreConfig.TransformationRuleAction.Op op = 1 [(.google.api.field_behavior) = REQUIRED];
*
*
* @return The op.
*/
@java.lang.Override
public com.google.cloud.gkebackup.v1.RestoreConfig.TransformationRuleAction.Op getOp() {
com.google.cloud.gkebackup.v1.RestoreConfig.TransformationRuleAction.Op result =
com.google.cloud.gkebackup.v1.RestoreConfig.TransformationRuleAction.Op.forNumber(op_);
return result == null
? com.google.cloud.gkebackup.v1.RestoreConfig.TransformationRuleAction.Op.UNRECOGNIZED
: result;
}
/**
*
*
*
* Required. op specifies the operation to perform.
*
*
*
* .google.cloud.gkebackup.v1.RestoreConfig.TransformationRuleAction.Op op = 1 [(.google.api.field_behavior) = REQUIRED];
*
*
* @param value The op to set.
* @return This builder for chaining.
*/
public Builder setOp(
com.google.cloud.gkebackup.v1.RestoreConfig.TransformationRuleAction.Op value) {
if (value == null) {
throw new NullPointerException();
}
bitField0_ |= 0x00000001;
op_ = value.getNumber();
onChanged();
return this;
}
/**
*
*
*
* Required. op specifies the operation to perform.
*
*
*
* .google.cloud.gkebackup.v1.RestoreConfig.TransformationRuleAction.Op op = 1 [(.google.api.field_behavior) = REQUIRED];
*
*
* @return This builder for chaining.
*/
public Builder clearOp() {
bitField0_ = (bitField0_ & ~0x00000001);
op_ = 0;
onChanged();
return this;
}
private java.lang.Object fromPath_ = "";
/**
*
*
*
* Optional. A string containing a JSON Pointer value that references the
* location in the target document to move the value from.
*
*
* string from_path = 2 [(.google.api.field_behavior) = OPTIONAL];
*
* @return The fromPath.
*/
public java.lang.String getFromPath() {
java.lang.Object ref = fromPath_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
fromPath_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
*
*
* Optional. A string containing a JSON Pointer value that references the
* location in the target document to move the value from.
*
*
* string from_path = 2 [(.google.api.field_behavior) = OPTIONAL];
*
* @return The bytes for fromPath.
*/
public com.google.protobuf.ByteString getFromPathBytes() {
java.lang.Object ref = fromPath_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
fromPath_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
*
*
* Optional. A string containing a JSON Pointer value that references the
* location in the target document to move the value from.
*
*
* string from_path = 2 [(.google.api.field_behavior) = OPTIONAL];
*
* @param value The fromPath to set.
* @return This builder for chaining.
*/
public Builder setFromPath(java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
fromPath_ = value;
bitField0_ |= 0x00000002;
onChanged();
return this;
}
/**
*
*
*
* Optional. A string containing a JSON Pointer value that references the
* location in the target document to move the value from.
*
*
* string from_path = 2 [(.google.api.field_behavior) = OPTIONAL];
*
* @return This builder for chaining.
*/
public Builder clearFromPath() {
fromPath_ = getDefaultInstance().getFromPath();
bitField0_ = (bitField0_ & ~0x00000002);
onChanged();
return this;
}
/**
*
*
*
* Optional. A string containing a JSON Pointer value that references the
* location in the target document to move the value from.
*
*
* string from_path = 2 [(.google.api.field_behavior) = OPTIONAL];
*
* @param value The bytes for fromPath to set.
* @return This builder for chaining.
*/
public Builder setFromPathBytes(com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
fromPath_ = value;
bitField0_ |= 0x00000002;
onChanged();
return this;
}
private java.lang.Object path_ = "";
/**
*
*
*
* Optional. A string containing a JSON-Pointer value that references a
* location within the target document where the operation is performed.
*
*
* string path = 3 [(.google.api.field_behavior) = OPTIONAL];
*
* @return The path.
*/
public java.lang.String getPath() {
java.lang.Object ref = path_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
path_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
*
*
* Optional. A string containing a JSON-Pointer value that references a
* location within the target document where the operation is performed.
*
*
* string path = 3 [(.google.api.field_behavior) = OPTIONAL];
*
* @return The bytes for path.
*/
public com.google.protobuf.ByteString getPathBytes() {
java.lang.Object ref = path_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
path_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
*
*
* Optional. A string containing a JSON-Pointer value that references a
* location within the target document where the operation is performed.
*
*
* string path = 3 [(.google.api.field_behavior) = OPTIONAL];
*
* @param value The path to set.
* @return This builder for chaining.
*/
public Builder setPath(java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
path_ = value;
bitField0_ |= 0x00000004;
onChanged();
return this;
}
/**
*
*
*
* Optional. A string containing a JSON-Pointer value that references a
* location within the target document where the operation is performed.
*
*
* string path = 3 [(.google.api.field_behavior) = OPTIONAL];
*
* @return This builder for chaining.
*/
public Builder clearPath() {
path_ = getDefaultInstance().getPath();
bitField0_ = (bitField0_ & ~0x00000004);
onChanged();
return this;
}
/**
*
*
*
* Optional. A string containing a JSON-Pointer value that references a
* location within the target document where the operation is performed.
*
*
* string path = 3 [(.google.api.field_behavior) = OPTIONAL];
*
* @param value The bytes for path to set.
* @return This builder for chaining.
*/
public Builder setPathBytes(com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
path_ = value;
bitField0_ |= 0x00000004;
onChanged();
return this;
}
private java.lang.Object value_ = "";
/**
*
*
*
* Optional. A string that specifies the desired value in string format to
* use for transformation.
*
*
* string value = 4 [(.google.api.field_behavior) = OPTIONAL];
*
* @return The value.
*/
public java.lang.String getValue() {
java.lang.Object ref = value_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
value_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
*
*
* Optional. A string that specifies the desired value in string format to
* use for transformation.
*
*
* string value = 4 [(.google.api.field_behavior) = OPTIONAL];
*
* @return The bytes for value.
*/
public com.google.protobuf.ByteString getValueBytes() {
java.lang.Object ref = value_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
value_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
*
*
* Optional. A string that specifies the desired value in string format to
* use for transformation.
*
*
* string value = 4 [(.google.api.field_behavior) = OPTIONAL];
*
* @param value The value to set.
* @return This builder for chaining.
*/
public Builder setValue(java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
value_ = value;
bitField0_ |= 0x00000008;
onChanged();
return this;
}
/**
*
*
*
* Optional. A string that specifies the desired value in string format to
* use for transformation.
*
*
* string value = 4 [(.google.api.field_behavior) = OPTIONAL];
*
* @return This builder for chaining.
*/
public Builder clearValue() {
value_ = getDefaultInstance().getValue();
bitField0_ = (bitField0_ & ~0x00000008);
onChanged();
return this;
}
/**
*
*
*
* Optional. A string that specifies the desired value in string format to
* use for transformation.
*
*
* string value = 4 [(.google.api.field_behavior) = OPTIONAL];
*
* @param value The bytes for value to set.
* @return This builder for chaining.
*/
public Builder setValueBytes(com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
value_ = value;
bitField0_ |= 0x00000008;
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.RestoreConfig.TransformationRuleAction)
}
// @@protoc_insertion_point(class_scope:google.cloud.gkebackup.v1.RestoreConfig.TransformationRuleAction)
private static final com.google.cloud.gkebackup.v1.RestoreConfig.TransformationRuleAction
DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new com.google.cloud.gkebackup.v1.RestoreConfig.TransformationRuleAction();
}
public static com.google.cloud.gkebackup.v1.RestoreConfig.TransformationRuleAction
getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser PARSER =
new com.google.protobuf.AbstractParser() {
@java.lang.Override
public TransformationRuleAction 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.RestoreConfig.TransformationRuleAction
getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
public interface ResourceFilterOrBuilder
extends
// @@protoc_insertion_point(interface_extends:google.cloud.gkebackup.v1.RestoreConfig.ResourceFilter)
com.google.protobuf.MessageOrBuilder {
/**
*
*
*
* Optional. (Filtering parameter) Any resource subject to transformation
* must be contained within one of the listed Kubernetes Namespace in the
* Backup. If this field is not provided, no namespace filtering will be
* performed (all resources in all Namespaces, including all cluster-scoped
* resources, will be candidates for transformation).
*
*
* repeated string namespaces = 1 [(.google.api.field_behavior) = OPTIONAL];
*
* @return A list containing the namespaces.
*/
java.util.List getNamespacesList();
/**
*
*
*
* Optional. (Filtering parameter) Any resource subject to transformation
* must be contained within one of the listed Kubernetes Namespace in the
* Backup. If this field is not provided, no namespace filtering will be
* performed (all resources in all Namespaces, including all cluster-scoped
* resources, will be candidates for transformation).
*
*
* repeated string namespaces = 1 [(.google.api.field_behavior) = OPTIONAL];
*
* @return The count of namespaces.
*/
int getNamespacesCount();
/**
*
*
*
* Optional. (Filtering parameter) Any resource subject to transformation
* must be contained within one of the listed Kubernetes Namespace in the
* Backup. If this field is not provided, no namespace filtering will be
* performed (all resources in all Namespaces, including all cluster-scoped
* resources, will be candidates for transformation).
*
*
* repeated string namespaces = 1 [(.google.api.field_behavior) = OPTIONAL];
*
* @param index The index of the element to return.
* @return The namespaces at the given index.
*/
java.lang.String getNamespaces(int index);
/**
*
*
*
* Optional. (Filtering parameter) Any resource subject to transformation
* must be contained within one of the listed Kubernetes Namespace in the
* Backup. If this field is not provided, no namespace filtering will be
* performed (all resources in all Namespaces, including all cluster-scoped
* resources, will be candidates for transformation).
*
*
* repeated string namespaces = 1 [(.google.api.field_behavior) = OPTIONAL];
*
* @param index The index of the value to return.
* @return The bytes of the namespaces at the given index.
*/
com.google.protobuf.ByteString getNamespacesBytes(int index);
/**
*
*
*
* Optional. (Filtering parameter) Any resource subject to transformation
* must belong to one of the listed "types". If this field is not provided,
* no type filtering will be performed (all resources of all types matching
* previous filtering parameters will be candidates for transformation).
*
*
*
* repeated .google.cloud.gkebackup.v1.RestoreConfig.GroupKind group_kinds = 2 [(.google.api.field_behavior) = OPTIONAL];
*
*/
java.util.List getGroupKindsList();
/**
*
*
*
* Optional. (Filtering parameter) Any resource subject to transformation
* must belong to one of the listed "types". If this field is not provided,
* no type filtering will be performed (all resources of all types matching
* previous filtering parameters will be candidates for transformation).
*
*
*
* repeated .google.cloud.gkebackup.v1.RestoreConfig.GroupKind group_kinds = 2 [(.google.api.field_behavior) = OPTIONAL];
*
*/
com.google.cloud.gkebackup.v1.RestoreConfig.GroupKind getGroupKinds(int index);
/**
*
*
*
* Optional. (Filtering parameter) Any resource subject to transformation
* must belong to one of the listed "types". If this field is not provided,
* no type filtering will be performed (all resources of all types matching
* previous filtering parameters will be candidates for transformation).
*
*
*
* repeated .google.cloud.gkebackup.v1.RestoreConfig.GroupKind group_kinds = 2 [(.google.api.field_behavior) = OPTIONAL];
*
*/
int getGroupKindsCount();
/**
*
*
*
* Optional. (Filtering parameter) Any resource subject to transformation
* must belong to one of the listed "types". If this field is not provided,
* no type filtering will be performed (all resources of all types matching
* previous filtering parameters will be candidates for transformation).
*
*
*
* repeated .google.cloud.gkebackup.v1.RestoreConfig.GroupKind group_kinds = 2 [(.google.api.field_behavior) = OPTIONAL];
*
*/
java.util.List extends com.google.cloud.gkebackup.v1.RestoreConfig.GroupKindOrBuilder>
getGroupKindsOrBuilderList();
/**
*
*
*
* Optional. (Filtering parameter) Any resource subject to transformation
* must belong to one of the listed "types". If this field is not provided,
* no type filtering will be performed (all resources of all types matching
* previous filtering parameters will be candidates for transformation).
*
*
*
* repeated .google.cloud.gkebackup.v1.RestoreConfig.GroupKind group_kinds = 2 [(.google.api.field_behavior) = OPTIONAL];
*
*/
com.google.cloud.gkebackup.v1.RestoreConfig.GroupKindOrBuilder getGroupKindsOrBuilder(
int index);
/**
*
*
*
* Optional. This is a [JSONPath]
* (https://github.com/json-path/JsonPath/blob/master/README.md)
* expression that matches specific fields of candidate
* resources and it operates as a filtering parameter (resources that
* are not matched with this expression will not be candidates for
* transformation).
*
*
* string json_path = 3 [(.google.api.field_behavior) = OPTIONAL];
*
* @return The jsonPath.
*/
java.lang.String getJsonPath();
/**
*
*
*
* Optional. This is a [JSONPath]
* (https://github.com/json-path/JsonPath/blob/master/README.md)
* expression that matches specific fields of candidate
* resources and it operates as a filtering parameter (resources that
* are not matched with this expression will not be candidates for
* transformation).
*
*
* string json_path = 3 [(.google.api.field_behavior) = OPTIONAL];
*
* @return The bytes for jsonPath.
*/
com.google.protobuf.ByteString getJsonPathBytes();
}
/**
*
*
*
* ResourceFilter specifies matching criteria to limit the scope of a
* change to a specific set of kubernetes resources that are selected for
* restoration from a backup.
*
*
* Protobuf type {@code google.cloud.gkebackup.v1.RestoreConfig.ResourceFilter}
*/
public static final class ResourceFilter extends com.google.protobuf.GeneratedMessageV3
implements
// @@protoc_insertion_point(message_implements:google.cloud.gkebackup.v1.RestoreConfig.ResourceFilter)
ResourceFilterOrBuilder {
private static final long serialVersionUID = 0L;
// Use ResourceFilter.newBuilder() to construct.
private ResourceFilter(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private ResourceFilter() {
namespaces_ = com.google.protobuf.LazyStringArrayList.emptyList();
groupKinds_ = java.util.Collections.emptyList();
jsonPath_ = "";
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(UnusedPrivateParameter unused) {
return new ResourceFilter();
}
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
return com.google.cloud.gkebackup.v1.RestoreProto
.internal_static_google_cloud_gkebackup_v1_RestoreConfig_ResourceFilter_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.google.cloud.gkebackup.v1.RestoreProto
.internal_static_google_cloud_gkebackup_v1_RestoreConfig_ResourceFilter_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.google.cloud.gkebackup.v1.RestoreConfig.ResourceFilter.class,
com.google.cloud.gkebackup.v1.RestoreConfig.ResourceFilter.Builder.class);
}
public static final int NAMESPACES_FIELD_NUMBER = 1;
@SuppressWarnings("serial")
private com.google.protobuf.LazyStringArrayList namespaces_ =
com.google.protobuf.LazyStringArrayList.emptyList();
/**
*
*
*
* Optional. (Filtering parameter) Any resource subject to transformation
* must be contained within one of the listed Kubernetes Namespace in the
* Backup. If this field is not provided, no namespace filtering will be
* performed (all resources in all Namespaces, including all cluster-scoped
* resources, will be candidates for transformation).
*
*
* repeated string namespaces = 1 [(.google.api.field_behavior) = OPTIONAL];
*
* @return A list containing the namespaces.
*/
public com.google.protobuf.ProtocolStringList getNamespacesList() {
return namespaces_;
}
/**
*
*
*
* Optional. (Filtering parameter) Any resource subject to transformation
* must be contained within one of the listed Kubernetes Namespace in the
* Backup. If this field is not provided, no namespace filtering will be
* performed (all resources in all Namespaces, including all cluster-scoped
* resources, will be candidates for transformation).
*
*
* repeated string namespaces = 1 [(.google.api.field_behavior) = OPTIONAL];
*
* @return The count of namespaces.
*/
public int getNamespacesCount() {
return namespaces_.size();
}
/**
*
*
*
* Optional. (Filtering parameter) Any resource subject to transformation
* must be contained within one of the listed Kubernetes Namespace in the
* Backup. If this field is not provided, no namespace filtering will be
* performed (all resources in all Namespaces, including all cluster-scoped
* resources, will be candidates for transformation).
*
*
* repeated string namespaces = 1 [(.google.api.field_behavior) = OPTIONAL];
*
* @param index The index of the element to return.
* @return The namespaces at the given index.
*/
public java.lang.String getNamespaces(int index) {
return namespaces_.get(index);
}
/**
*
*
*
* Optional. (Filtering parameter) Any resource subject to transformation
* must be contained within one of the listed Kubernetes Namespace in the
* Backup. If this field is not provided, no namespace filtering will be
* performed (all resources in all Namespaces, including all cluster-scoped
* resources, will be candidates for transformation).
*
*
* repeated string namespaces = 1 [(.google.api.field_behavior) = OPTIONAL];
*
* @param index The index of the value to return.
* @return The bytes of the namespaces at the given index.
*/
public com.google.protobuf.ByteString getNamespacesBytes(int index) {
return namespaces_.getByteString(index);
}
public static final int GROUP_KINDS_FIELD_NUMBER = 2;
@SuppressWarnings("serial")
private java.util.List groupKinds_;
/**
*
*
*
* Optional. (Filtering parameter) Any resource subject to transformation
* must belong to one of the listed "types". If this field is not provided,
* no type filtering will be performed (all resources of all types matching
* previous filtering parameters will be candidates for transformation).
*
*
*
* repeated .google.cloud.gkebackup.v1.RestoreConfig.GroupKind group_kinds = 2 [(.google.api.field_behavior) = OPTIONAL];
*
*/
@java.lang.Override
public java.util.List
getGroupKindsList() {
return groupKinds_;
}
/**
*
*
*
* Optional. (Filtering parameter) Any resource subject to transformation
* must belong to one of the listed "types". If this field is not provided,
* no type filtering will be performed (all resources of all types matching
* previous filtering parameters will be candidates for transformation).
*
*
*
* repeated .google.cloud.gkebackup.v1.RestoreConfig.GroupKind group_kinds = 2 [(.google.api.field_behavior) = OPTIONAL];
*
*/
@java.lang.Override
public java.util.List extends com.google.cloud.gkebackup.v1.RestoreConfig.GroupKindOrBuilder>
getGroupKindsOrBuilderList() {
return groupKinds_;
}
/**
*
*
*
* Optional. (Filtering parameter) Any resource subject to transformation
* must belong to one of the listed "types". If this field is not provided,
* no type filtering will be performed (all resources of all types matching
* previous filtering parameters will be candidates for transformation).
*
*
*
* repeated .google.cloud.gkebackup.v1.RestoreConfig.GroupKind group_kinds = 2 [(.google.api.field_behavior) = OPTIONAL];
*
*/
@java.lang.Override
public int getGroupKindsCount() {
return groupKinds_.size();
}
/**
*
*
*
* Optional. (Filtering parameter) Any resource subject to transformation
* must belong to one of the listed "types". If this field is not provided,
* no type filtering will be performed (all resources of all types matching
* previous filtering parameters will be candidates for transformation).
*
*
*
* repeated .google.cloud.gkebackup.v1.RestoreConfig.GroupKind group_kinds = 2 [(.google.api.field_behavior) = OPTIONAL];
*
*/
@java.lang.Override
public com.google.cloud.gkebackup.v1.RestoreConfig.GroupKind getGroupKinds(int index) {
return groupKinds_.get(index);
}
/**
*
*
*
* Optional. (Filtering parameter) Any resource subject to transformation
* must belong to one of the listed "types". If this field is not provided,
* no type filtering will be performed (all resources of all types matching
* previous filtering parameters will be candidates for transformation).
*
*
*
* repeated .google.cloud.gkebackup.v1.RestoreConfig.GroupKind group_kinds = 2 [(.google.api.field_behavior) = OPTIONAL];
*
*/
@java.lang.Override
public com.google.cloud.gkebackup.v1.RestoreConfig.GroupKindOrBuilder getGroupKindsOrBuilder(
int index) {
return groupKinds_.get(index);
}
public static final int JSON_PATH_FIELD_NUMBER = 3;
@SuppressWarnings("serial")
private volatile java.lang.Object jsonPath_ = "";
/**
*
*
*
* Optional. This is a [JSONPath]
* (https://github.com/json-path/JsonPath/blob/master/README.md)
* expression that matches specific fields of candidate
* resources and it operates as a filtering parameter (resources that
* are not matched with this expression will not be candidates for
* transformation).
*
*
* string json_path = 3 [(.google.api.field_behavior) = OPTIONAL];
*
* @return The jsonPath.
*/
@java.lang.Override
public java.lang.String getJsonPath() {
java.lang.Object ref = jsonPath_;
if (ref instanceof java.lang.String) {
return (java.lang.String) ref;
} else {
com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
jsonPath_ = s;
return s;
}
}
/**
*
*
*
* Optional. This is a [JSONPath]
* (https://github.com/json-path/JsonPath/blob/master/README.md)
* expression that matches specific fields of candidate
* resources and it operates as a filtering parameter (resources that
* are not matched with this expression will not be candidates for
* transformation).
*
*
* string json_path = 3 [(.google.api.field_behavior) = OPTIONAL];
*
* @return The bytes for jsonPath.
*/
@java.lang.Override
public com.google.protobuf.ByteString getJsonPathBytes() {
java.lang.Object ref = jsonPath_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
jsonPath_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
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 {
for (int i = 0; i < namespaces_.size(); i++) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 1, namespaces_.getRaw(i));
}
for (int i = 0; i < groupKinds_.size(); i++) {
output.writeMessage(2, groupKinds_.get(i));
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(jsonPath_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 3, jsonPath_);
}
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 < namespaces_.size(); i++) {
dataSize += computeStringSizeNoTag(namespaces_.getRaw(i));
}
size += dataSize;
size += 1 * getNamespacesList().size();
}
for (int i = 0; i < groupKinds_.size(); i++) {
size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, groupKinds_.get(i));
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(jsonPath_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, jsonPath_);
}
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.RestoreConfig.ResourceFilter)) {
return super.equals(obj);
}
com.google.cloud.gkebackup.v1.RestoreConfig.ResourceFilter other =
(com.google.cloud.gkebackup.v1.RestoreConfig.ResourceFilter) obj;
if (!getNamespacesList().equals(other.getNamespacesList())) return false;
if (!getGroupKindsList().equals(other.getGroupKindsList())) return false;
if (!getJsonPath().equals(other.getJsonPath())) 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 (getNamespacesCount() > 0) {
hash = (37 * hash) + NAMESPACES_FIELD_NUMBER;
hash = (53 * hash) + getNamespacesList().hashCode();
}
if (getGroupKindsCount() > 0) {
hash = (37 * hash) + GROUP_KINDS_FIELD_NUMBER;
hash = (53 * hash) + getGroupKindsList().hashCode();
}
hash = (37 * hash) + JSON_PATH_FIELD_NUMBER;
hash = (53 * hash) + getJsonPath().hashCode();
hash = (29 * hash) + getUnknownFields().hashCode();
memoizedHashCode = hash;
return hash;
}
public static com.google.cloud.gkebackup.v1.RestoreConfig.ResourceFilter parseFrom(
java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.cloud.gkebackup.v1.RestoreConfig.ResourceFilter 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.RestoreConfig.ResourceFilter parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.cloud.gkebackup.v1.RestoreConfig.ResourceFilter 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.RestoreConfig.ResourceFilter parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.cloud.gkebackup.v1.RestoreConfig.ResourceFilter 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.RestoreConfig.ResourceFilter parseFrom(
java.io.InputStream input) throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
}
public static com.google.cloud.gkebackup.v1.RestoreConfig.ResourceFilter 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.RestoreConfig.ResourceFilter parseDelimitedFrom(
java.io.InputStream input) throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input);
}
public static com.google.cloud.gkebackup.v1.RestoreConfig.ResourceFilter 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.RestoreConfig.ResourceFilter 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.RestoreConfig.ResourceFilter 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.RestoreConfig.ResourceFilter 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;
}
/**
*
*
*
* ResourceFilter specifies matching criteria to limit the scope of a
* change to a specific set of kubernetes resources that are selected for
* restoration from a backup.
*
*
* Protobuf type {@code google.cloud.gkebackup.v1.RestoreConfig.ResourceFilter}
*/
public static final class Builder
extends com.google.protobuf.GeneratedMessageV3.Builder
implements
// @@protoc_insertion_point(builder_implements:google.cloud.gkebackup.v1.RestoreConfig.ResourceFilter)
com.google.cloud.gkebackup.v1.RestoreConfig.ResourceFilterOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
return com.google.cloud.gkebackup.v1.RestoreProto
.internal_static_google_cloud_gkebackup_v1_RestoreConfig_ResourceFilter_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.google.cloud.gkebackup.v1.RestoreProto
.internal_static_google_cloud_gkebackup_v1_RestoreConfig_ResourceFilter_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.google.cloud.gkebackup.v1.RestoreConfig.ResourceFilter.class,
com.google.cloud.gkebackup.v1.RestoreConfig.ResourceFilter.Builder.class);
}
// Construct using com.google.cloud.gkebackup.v1.RestoreConfig.ResourceFilter.newBuilder()
private Builder() {}
private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
}
@java.lang.Override
public Builder clear() {
super.clear();
bitField0_ = 0;
namespaces_ = com.google.protobuf.LazyStringArrayList.emptyList();
if (groupKindsBuilder_ == null) {
groupKinds_ = java.util.Collections.emptyList();
} else {
groupKinds_ = null;
groupKindsBuilder_.clear();
}
bitField0_ = (bitField0_ & ~0x00000002);
jsonPath_ = "";
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() {
return com.google.cloud.gkebackup.v1.RestoreProto
.internal_static_google_cloud_gkebackup_v1_RestoreConfig_ResourceFilter_descriptor;
}
@java.lang.Override
public com.google.cloud.gkebackup.v1.RestoreConfig.ResourceFilter
getDefaultInstanceForType() {
return com.google.cloud.gkebackup.v1.RestoreConfig.ResourceFilter.getDefaultInstance();
}
@java.lang.Override
public com.google.cloud.gkebackup.v1.RestoreConfig.ResourceFilter build() {
com.google.cloud.gkebackup.v1.RestoreConfig.ResourceFilter result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public com.google.cloud.gkebackup.v1.RestoreConfig.ResourceFilter buildPartial() {
com.google.cloud.gkebackup.v1.RestoreConfig.ResourceFilter result =
new com.google.cloud.gkebackup.v1.RestoreConfig.ResourceFilter(this);
buildPartialRepeatedFields(result);
if (bitField0_ != 0) {
buildPartial0(result);
}
onBuilt();
return result;
}
private void buildPartialRepeatedFields(
com.google.cloud.gkebackup.v1.RestoreConfig.ResourceFilter result) {
if (groupKindsBuilder_ == null) {
if (((bitField0_ & 0x00000002) != 0)) {
groupKinds_ = java.util.Collections.unmodifiableList(groupKinds_);
bitField0_ = (bitField0_ & ~0x00000002);
}
result.groupKinds_ = groupKinds_;
} else {
result.groupKinds_ = groupKindsBuilder_.build();
}
}
private void buildPartial0(
com.google.cloud.gkebackup.v1.RestoreConfig.ResourceFilter result) {
int from_bitField0_ = bitField0_;
if (((from_bitField0_ & 0x00000001) != 0)) {
namespaces_.makeImmutable();
result.namespaces_ = namespaces_;
}
if (((from_bitField0_ & 0x00000004) != 0)) {
result.jsonPath_ = jsonPath_;
}
}
@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.RestoreConfig.ResourceFilter) {
return mergeFrom((com.google.cloud.gkebackup.v1.RestoreConfig.ResourceFilter) other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(com.google.cloud.gkebackup.v1.RestoreConfig.ResourceFilter other) {
if (other
== com.google.cloud.gkebackup.v1.RestoreConfig.ResourceFilter.getDefaultInstance())
return this;
if (!other.namespaces_.isEmpty()) {
if (namespaces_.isEmpty()) {
namespaces_ = other.namespaces_;
bitField0_ |= 0x00000001;
} else {
ensureNamespacesIsMutable();
namespaces_.addAll(other.namespaces_);
}
onChanged();
}
if (groupKindsBuilder_ == null) {
if (!other.groupKinds_.isEmpty()) {
if (groupKinds_.isEmpty()) {
groupKinds_ = other.groupKinds_;
bitField0_ = (bitField0_ & ~0x00000002);
} else {
ensureGroupKindsIsMutable();
groupKinds_.addAll(other.groupKinds_);
}
onChanged();
}
} else {
if (!other.groupKinds_.isEmpty()) {
if (groupKindsBuilder_.isEmpty()) {
groupKindsBuilder_.dispose();
groupKindsBuilder_ = null;
groupKinds_ = other.groupKinds_;
bitField0_ = (bitField0_ & ~0x00000002);
groupKindsBuilder_ =
com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders
? getGroupKindsFieldBuilder()
: null;
} else {
groupKindsBuilder_.addAllMessages(other.groupKinds_);
}
}
}
if (!other.getJsonPath().isEmpty()) {
jsonPath_ = other.jsonPath_;
bitField0_ |= 0x00000004;
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 10:
{
java.lang.String s = input.readStringRequireUtf8();
ensureNamespacesIsMutable();
namespaces_.add(s);
break;
} // case 10
case 18:
{
com.google.cloud.gkebackup.v1.RestoreConfig.GroupKind m =
input.readMessage(
com.google.cloud.gkebackup.v1.RestoreConfig.GroupKind.parser(),
extensionRegistry);
if (groupKindsBuilder_ == null) {
ensureGroupKindsIsMutable();
groupKinds_.add(m);
} else {
groupKindsBuilder_.addMessage(m);
}
break;
} // case 18
case 26:
{
jsonPath_ = input.readStringRequireUtf8();
bitField0_ |= 0x00000004;
break;
} // case 26
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 com.google.protobuf.LazyStringArrayList namespaces_ =
com.google.protobuf.LazyStringArrayList.emptyList();
private void ensureNamespacesIsMutable() {
if (!namespaces_.isModifiable()) {
namespaces_ = new com.google.protobuf.LazyStringArrayList(namespaces_);
}
bitField0_ |= 0x00000001;
}
/**
*
*
*
* Optional. (Filtering parameter) Any resource subject to transformation
* must be contained within one of the listed Kubernetes Namespace in the
* Backup. If this field is not provided, no namespace filtering will be
* performed (all resources in all Namespaces, including all cluster-scoped
* resources, will be candidates for transformation).
*
*
* repeated string namespaces = 1 [(.google.api.field_behavior) = OPTIONAL];
*
* @return A list containing the namespaces.
*/
public com.google.protobuf.ProtocolStringList getNamespacesList() {
namespaces_.makeImmutable();
return namespaces_;
}
/**
*
*
*
* Optional. (Filtering parameter) Any resource subject to transformation
* must be contained within one of the listed Kubernetes Namespace in the
* Backup. If this field is not provided, no namespace filtering will be
* performed (all resources in all Namespaces, including all cluster-scoped
* resources, will be candidates for transformation).
*
*
* repeated string namespaces = 1 [(.google.api.field_behavior) = OPTIONAL];
*
* @return The count of namespaces.
*/
public int getNamespacesCount() {
return namespaces_.size();
}
/**
*
*
*
* Optional. (Filtering parameter) Any resource subject to transformation
* must be contained within one of the listed Kubernetes Namespace in the
* Backup. If this field is not provided, no namespace filtering will be
* performed (all resources in all Namespaces, including all cluster-scoped
* resources, will be candidates for transformation).
*
*
* repeated string namespaces = 1 [(.google.api.field_behavior) = OPTIONAL];
*
* @param index The index of the element to return.
* @return The namespaces at the given index.
*/
public java.lang.String getNamespaces(int index) {
return namespaces_.get(index);
}
/**
*
*
*
* Optional. (Filtering parameter) Any resource subject to transformation
* must be contained within one of the listed Kubernetes Namespace in the
* Backup. If this field is not provided, no namespace filtering will be
* performed (all resources in all Namespaces, including all cluster-scoped
* resources, will be candidates for transformation).
*
*
* repeated string namespaces = 1 [(.google.api.field_behavior) = OPTIONAL];
*
* @param index The index of the value to return.
* @return The bytes of the namespaces at the given index.
*/
public com.google.protobuf.ByteString getNamespacesBytes(int index) {
return namespaces_.getByteString(index);
}
/**
*
*
*
* Optional. (Filtering parameter) Any resource subject to transformation
* must be contained within one of the listed Kubernetes Namespace in the
* Backup. If this field is not provided, no namespace filtering will be
* performed (all resources in all Namespaces, including all cluster-scoped
* resources, will be candidates for transformation).
*
*
* repeated string namespaces = 1 [(.google.api.field_behavior) = OPTIONAL];
*
* @param index The index to set the value at.
* @param value The namespaces to set.
* @return This builder for chaining.
*/
public Builder setNamespaces(int index, java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
ensureNamespacesIsMutable();
namespaces_.set(index, value);
bitField0_ |= 0x00000001;
onChanged();
return this;
}
/**
*
*
*
* Optional. (Filtering parameter) Any resource subject to transformation
* must be contained within one of the listed Kubernetes Namespace in the
* Backup. If this field is not provided, no namespace filtering will be
* performed (all resources in all Namespaces, including all cluster-scoped
* resources, will be candidates for transformation).
*
*
* repeated string namespaces = 1 [(.google.api.field_behavior) = OPTIONAL];
*
* @param value The namespaces to add.
* @return This builder for chaining.
*/
public Builder addNamespaces(java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
ensureNamespacesIsMutable();
namespaces_.add(value);
bitField0_ |= 0x00000001;
onChanged();
return this;
}
/**
*
*
*
* Optional. (Filtering parameter) Any resource subject to transformation
* must be contained within one of the listed Kubernetes Namespace in the
* Backup. If this field is not provided, no namespace filtering will be
* performed (all resources in all Namespaces, including all cluster-scoped
* resources, will be candidates for transformation).
*
*
* repeated string namespaces = 1 [(.google.api.field_behavior) = OPTIONAL];
*
* @param values The namespaces to add.
* @return This builder for chaining.
*/
public Builder addAllNamespaces(java.lang.Iterable values) {
ensureNamespacesIsMutable();
com.google.protobuf.AbstractMessageLite.Builder.addAll(values, namespaces_);
bitField0_ |= 0x00000001;
onChanged();
return this;
}
/**
*
*
*
* Optional. (Filtering parameter) Any resource subject to transformation
* must be contained within one of the listed Kubernetes Namespace in the
* Backup. If this field is not provided, no namespace filtering will be
* performed (all resources in all Namespaces, including all cluster-scoped
* resources, will be candidates for transformation).
*
*
* repeated string namespaces = 1 [(.google.api.field_behavior) = OPTIONAL];
*
* @return This builder for chaining.
*/
public Builder clearNamespaces() {
namespaces_ = com.google.protobuf.LazyStringArrayList.emptyList();
bitField0_ = (bitField0_ & ~0x00000001);
;
onChanged();
return this;
}
/**
*
*
*
* Optional. (Filtering parameter) Any resource subject to transformation
* must be contained within one of the listed Kubernetes Namespace in the
* Backup. If this field is not provided, no namespace filtering will be
* performed (all resources in all Namespaces, including all cluster-scoped
* resources, will be candidates for transformation).
*
*
* repeated string namespaces = 1 [(.google.api.field_behavior) = OPTIONAL];
*
* @param value The bytes of the namespaces to add.
* @return This builder for chaining.
*/
public Builder addNamespacesBytes(com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
ensureNamespacesIsMutable();
namespaces_.add(value);
bitField0_ |= 0x00000001;
onChanged();
return this;
}
private java.util.List groupKinds_ =
java.util.Collections.emptyList();
private void ensureGroupKindsIsMutable() {
if (!((bitField0_ & 0x00000002) != 0)) {
groupKinds_ =
new java.util.ArrayList(
groupKinds_);
bitField0_ |= 0x00000002;
}
}
private com.google.protobuf.RepeatedFieldBuilderV3<
com.google.cloud.gkebackup.v1.RestoreConfig.GroupKind,
com.google.cloud.gkebackup.v1.RestoreConfig.GroupKind.Builder,
com.google.cloud.gkebackup.v1.RestoreConfig.GroupKindOrBuilder>
groupKindsBuilder_;
/**
*
*
*
* Optional. (Filtering parameter) Any resource subject to transformation
* must belong to one of the listed "types". If this field is not provided,
* no type filtering will be performed (all resources of all types matching
* previous filtering parameters will be candidates for transformation).
*
*
*
* repeated .google.cloud.gkebackup.v1.RestoreConfig.GroupKind group_kinds = 2 [(.google.api.field_behavior) = OPTIONAL];
*
*/
public java.util.List
getGroupKindsList() {
if (groupKindsBuilder_ == null) {
return java.util.Collections.unmodifiableList(groupKinds_);
} else {
return groupKindsBuilder_.getMessageList();
}
}
/**
*
*
*
* Optional. (Filtering parameter) Any resource subject to transformation
* must belong to one of the listed "types". If this field is not provided,
* no type filtering will be performed (all resources of all types matching
* previous filtering parameters will be candidates for transformation).
*
*
*
* repeated .google.cloud.gkebackup.v1.RestoreConfig.GroupKind group_kinds = 2 [(.google.api.field_behavior) = OPTIONAL];
*
*/
public int getGroupKindsCount() {
if (groupKindsBuilder_ == null) {
return groupKinds_.size();
} else {
return groupKindsBuilder_.getCount();
}
}
/**
*
*
*
* Optional. (Filtering parameter) Any resource subject to transformation
* must belong to one of the listed "types". If this field is not provided,
* no type filtering will be performed (all resources of all types matching
* previous filtering parameters will be candidates for transformation).
*
*
*
* repeated .google.cloud.gkebackup.v1.RestoreConfig.GroupKind group_kinds = 2 [(.google.api.field_behavior) = OPTIONAL];
*
*/
public com.google.cloud.gkebackup.v1.RestoreConfig.GroupKind getGroupKinds(int index) {
if (groupKindsBuilder_ == null) {
return groupKinds_.get(index);
} else {
return groupKindsBuilder_.getMessage(index);
}
}
/**
*
*
*
* Optional. (Filtering parameter) Any resource subject to transformation
* must belong to one of the listed "types". If this field is not provided,
* no type filtering will be performed (all resources of all types matching
* previous filtering parameters will be candidates for transformation).
*
*
*
* repeated .google.cloud.gkebackup.v1.RestoreConfig.GroupKind group_kinds = 2 [(.google.api.field_behavior) = OPTIONAL];
*
*/
public Builder setGroupKinds(
int index, com.google.cloud.gkebackup.v1.RestoreConfig.GroupKind value) {
if (groupKindsBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureGroupKindsIsMutable();
groupKinds_.set(index, value);
onChanged();
} else {
groupKindsBuilder_.setMessage(index, value);
}
return this;
}
/**
*
*
*
* Optional. (Filtering parameter) Any resource subject to transformation
* must belong to one of the listed "types". If this field is not provided,
* no type filtering will be performed (all resources of all types matching
* previous filtering parameters will be candidates for transformation).
*
*
*
* repeated .google.cloud.gkebackup.v1.RestoreConfig.GroupKind group_kinds = 2 [(.google.api.field_behavior) = OPTIONAL];
*
*/
public Builder setGroupKinds(
int index,
com.google.cloud.gkebackup.v1.RestoreConfig.GroupKind.Builder builderForValue) {
if (groupKindsBuilder_ == null) {
ensureGroupKindsIsMutable();
groupKinds_.set(index, builderForValue.build());
onChanged();
} else {
groupKindsBuilder_.setMessage(index, builderForValue.build());
}
return this;
}
/**
*
*
*
* Optional. (Filtering parameter) Any resource subject to transformation
* must belong to one of the listed "types". If this field is not provided,
* no type filtering will be performed (all resources of all types matching
* previous filtering parameters will be candidates for transformation).
*
*
*
* repeated .google.cloud.gkebackup.v1.RestoreConfig.GroupKind group_kinds = 2 [(.google.api.field_behavior) = OPTIONAL];
*
*/
public Builder addGroupKinds(com.google.cloud.gkebackup.v1.RestoreConfig.GroupKind value) {
if (groupKindsBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureGroupKindsIsMutable();
groupKinds_.add(value);
onChanged();
} else {
groupKindsBuilder_.addMessage(value);
}
return this;
}
/**
*
*
*
* Optional. (Filtering parameter) Any resource subject to transformation
* must belong to one of the listed "types". If this field is not provided,
* no type filtering will be performed (all resources of all types matching
* previous filtering parameters will be candidates for transformation).
*
*
*
* repeated .google.cloud.gkebackup.v1.RestoreConfig.GroupKind group_kinds = 2 [(.google.api.field_behavior) = OPTIONAL];
*
*/
public Builder addGroupKinds(
int index, com.google.cloud.gkebackup.v1.RestoreConfig.GroupKind value) {
if (groupKindsBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureGroupKindsIsMutable();
groupKinds_.add(index, value);
onChanged();
} else {
groupKindsBuilder_.addMessage(index, value);
}
return this;
}
/**
*
*
*
* Optional. (Filtering parameter) Any resource subject to transformation
* must belong to one of the listed "types". If this field is not provided,
* no type filtering will be performed (all resources of all types matching
* previous filtering parameters will be candidates for transformation).
*
*
*
* repeated .google.cloud.gkebackup.v1.RestoreConfig.GroupKind group_kinds = 2 [(.google.api.field_behavior) = OPTIONAL];
*
*/
public Builder addGroupKinds(
com.google.cloud.gkebackup.v1.RestoreConfig.GroupKind.Builder builderForValue) {
if (groupKindsBuilder_ == null) {
ensureGroupKindsIsMutable();
groupKinds_.add(builderForValue.build());
onChanged();
} else {
groupKindsBuilder_.addMessage(builderForValue.build());
}
return this;
}
/**
*
*
*
* Optional. (Filtering parameter) Any resource subject to transformation
* must belong to one of the listed "types". If this field is not provided,
* no type filtering will be performed (all resources of all types matching
* previous filtering parameters will be candidates for transformation).
*
*
*
* repeated .google.cloud.gkebackup.v1.RestoreConfig.GroupKind group_kinds = 2 [(.google.api.field_behavior) = OPTIONAL];
*
*/
public Builder addGroupKinds(
int index,
com.google.cloud.gkebackup.v1.RestoreConfig.GroupKind.Builder builderForValue) {
if (groupKindsBuilder_ == null) {
ensureGroupKindsIsMutable();
groupKinds_.add(index, builderForValue.build());
onChanged();
} else {
groupKindsBuilder_.addMessage(index, builderForValue.build());
}
return this;
}
/**
*
*
*
* Optional. (Filtering parameter) Any resource subject to transformation
* must belong to one of the listed "types". If this field is not provided,
* no type filtering will be performed (all resources of all types matching
* previous filtering parameters will be candidates for transformation).
*
*
*
* repeated .google.cloud.gkebackup.v1.RestoreConfig.GroupKind group_kinds = 2 [(.google.api.field_behavior) = OPTIONAL];
*
*/
public Builder addAllGroupKinds(
java.lang.Iterable extends com.google.cloud.gkebackup.v1.RestoreConfig.GroupKind>
values) {
if (groupKindsBuilder_ == null) {
ensureGroupKindsIsMutable();
com.google.protobuf.AbstractMessageLite.Builder.addAll(values, groupKinds_);
onChanged();
} else {
groupKindsBuilder_.addAllMessages(values);
}
return this;
}
/**
*
*
*
* Optional. (Filtering parameter) Any resource subject to transformation
* must belong to one of the listed "types". If this field is not provided,
* no type filtering will be performed (all resources of all types matching
* previous filtering parameters will be candidates for transformation).
*
*
*
* repeated .google.cloud.gkebackup.v1.RestoreConfig.GroupKind group_kinds = 2 [(.google.api.field_behavior) = OPTIONAL];
*
*/
public Builder clearGroupKinds() {
if (groupKindsBuilder_ == null) {
groupKinds_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000002);
onChanged();
} else {
groupKindsBuilder_.clear();
}
return this;
}
/**
*
*
*
* Optional. (Filtering parameter) Any resource subject to transformation
* must belong to one of the listed "types". If this field is not provided,
* no type filtering will be performed (all resources of all types matching
* previous filtering parameters will be candidates for transformation).
*
*
*
* repeated .google.cloud.gkebackup.v1.RestoreConfig.GroupKind group_kinds = 2 [(.google.api.field_behavior) = OPTIONAL];
*
*/
public Builder removeGroupKinds(int index) {
if (groupKindsBuilder_ == null) {
ensureGroupKindsIsMutable();
groupKinds_.remove(index);
onChanged();
} else {
groupKindsBuilder_.remove(index);
}
return this;
}
/**
*
*
*
* Optional. (Filtering parameter) Any resource subject to transformation
* must belong to one of the listed "types". If this field is not provided,
* no type filtering will be performed (all resources of all types matching
* previous filtering parameters will be candidates for transformation).
*
*
*
* repeated .google.cloud.gkebackup.v1.RestoreConfig.GroupKind group_kinds = 2 [(.google.api.field_behavior) = OPTIONAL];
*
*/
public com.google.cloud.gkebackup.v1.RestoreConfig.GroupKind.Builder getGroupKindsBuilder(
int index) {
return getGroupKindsFieldBuilder().getBuilder(index);
}
/**
*
*
*
* Optional. (Filtering parameter) Any resource subject to transformation
* must belong to one of the listed "types". If this field is not provided,
* no type filtering will be performed (all resources of all types matching
* previous filtering parameters will be candidates for transformation).
*
*
*
* repeated .google.cloud.gkebackup.v1.RestoreConfig.GroupKind group_kinds = 2 [(.google.api.field_behavior) = OPTIONAL];
*
*/
public com.google.cloud.gkebackup.v1.RestoreConfig.GroupKindOrBuilder getGroupKindsOrBuilder(
int index) {
if (groupKindsBuilder_ == null) {
return groupKinds_.get(index);
} else {
return groupKindsBuilder_.getMessageOrBuilder(index);
}
}
/**
*
*
*
* Optional. (Filtering parameter) Any resource subject to transformation
* must belong to one of the listed "types". If this field is not provided,
* no type filtering will be performed (all resources of all types matching
* previous filtering parameters will be candidates for transformation).
*
*
*
* repeated .google.cloud.gkebackup.v1.RestoreConfig.GroupKind group_kinds = 2 [(.google.api.field_behavior) = OPTIONAL];
*
*/
public java.util.List<
? extends com.google.cloud.gkebackup.v1.RestoreConfig.GroupKindOrBuilder>
getGroupKindsOrBuilderList() {
if (groupKindsBuilder_ != null) {
return groupKindsBuilder_.getMessageOrBuilderList();
} else {
return java.util.Collections.unmodifiableList(groupKinds_);
}
}
/**
*
*
*
* Optional. (Filtering parameter) Any resource subject to transformation
* must belong to one of the listed "types". If this field is not provided,
* no type filtering will be performed (all resources of all types matching
* previous filtering parameters will be candidates for transformation).
*
*
*
* repeated .google.cloud.gkebackup.v1.RestoreConfig.GroupKind group_kinds = 2 [(.google.api.field_behavior) = OPTIONAL];
*
*/
public com.google.cloud.gkebackup.v1.RestoreConfig.GroupKind.Builder addGroupKindsBuilder() {
return getGroupKindsFieldBuilder()
.addBuilder(com.google.cloud.gkebackup.v1.RestoreConfig.GroupKind.getDefaultInstance());
}
/**
*
*
*
* Optional. (Filtering parameter) Any resource subject to transformation
* must belong to one of the listed "types". If this field is not provided,
* no type filtering will be performed (all resources of all types matching
* previous filtering parameters will be candidates for transformation).
*
*
*
* repeated .google.cloud.gkebackup.v1.RestoreConfig.GroupKind group_kinds = 2 [(.google.api.field_behavior) = OPTIONAL];
*
*/
public com.google.cloud.gkebackup.v1.RestoreConfig.GroupKind.Builder addGroupKindsBuilder(
int index) {
return getGroupKindsFieldBuilder()
.addBuilder(
index, com.google.cloud.gkebackup.v1.RestoreConfig.GroupKind.getDefaultInstance());
}
/**
*
*
*
* Optional. (Filtering parameter) Any resource subject to transformation
* must belong to one of the listed "types". If this field is not provided,
* no type filtering will be performed (all resources of all types matching
* previous filtering parameters will be candidates for transformation).
*
*
*
* repeated .google.cloud.gkebackup.v1.RestoreConfig.GroupKind group_kinds = 2 [(.google.api.field_behavior) = OPTIONAL];
*
*/
public java.util.List
getGroupKindsBuilderList() {
return getGroupKindsFieldBuilder().getBuilderList();
}
private com.google.protobuf.RepeatedFieldBuilderV3<
com.google.cloud.gkebackup.v1.RestoreConfig.GroupKind,
com.google.cloud.gkebackup.v1.RestoreConfig.GroupKind.Builder,
com.google.cloud.gkebackup.v1.RestoreConfig.GroupKindOrBuilder>
getGroupKindsFieldBuilder() {
if (groupKindsBuilder_ == null) {
groupKindsBuilder_ =
new com.google.protobuf.RepeatedFieldBuilderV3<
com.google.cloud.gkebackup.v1.RestoreConfig.GroupKind,
com.google.cloud.gkebackup.v1.RestoreConfig.GroupKind.Builder,
com.google.cloud.gkebackup.v1.RestoreConfig.GroupKindOrBuilder>(
groupKinds_, ((bitField0_ & 0x00000002) != 0), getParentForChildren(), isClean());
groupKinds_ = null;
}
return groupKindsBuilder_;
}
private java.lang.Object jsonPath_ = "";
/**
*
*
*
* Optional. This is a [JSONPath]
* (https://github.com/json-path/JsonPath/blob/master/README.md)
* expression that matches specific fields of candidate
* resources and it operates as a filtering parameter (resources that
* are not matched with this expression will not be candidates for
* transformation).
*
*
* string json_path = 3 [(.google.api.field_behavior) = OPTIONAL];
*
* @return The jsonPath.
*/
public java.lang.String getJsonPath() {
java.lang.Object ref = jsonPath_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
jsonPath_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
*
*
* Optional. This is a [JSONPath]
* (https://github.com/json-path/JsonPath/blob/master/README.md)
* expression that matches specific fields of candidate
* resources and it operates as a filtering parameter (resources that
* are not matched with this expression will not be candidates for
* transformation).
*
*
* string json_path = 3 [(.google.api.field_behavior) = OPTIONAL];
*
* @return The bytes for jsonPath.
*/
public com.google.protobuf.ByteString getJsonPathBytes() {
java.lang.Object ref = jsonPath_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
jsonPath_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
*
*
* Optional. This is a [JSONPath]
* (https://github.com/json-path/JsonPath/blob/master/README.md)
* expression that matches specific fields of candidate
* resources and it operates as a filtering parameter (resources that
* are not matched with this expression will not be candidates for
* transformation).
*
*
* string json_path = 3 [(.google.api.field_behavior) = OPTIONAL];
*
* @param value The jsonPath to set.
* @return This builder for chaining.
*/
public Builder setJsonPath(java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
jsonPath_ = value;
bitField0_ |= 0x00000004;
onChanged();
return this;
}
/**
*
*
*
* Optional. This is a [JSONPath]
* (https://github.com/json-path/JsonPath/blob/master/README.md)
* expression that matches specific fields of candidate
* resources and it operates as a filtering parameter (resources that
* are not matched with this expression will not be candidates for
* transformation).
*
*
* string json_path = 3 [(.google.api.field_behavior) = OPTIONAL];
*
* @return This builder for chaining.
*/
public Builder clearJsonPath() {
jsonPath_ = getDefaultInstance().getJsonPath();
bitField0_ = (bitField0_ & ~0x00000004);
onChanged();
return this;
}
/**
*
*
*
* Optional. This is a [JSONPath]
* (https://github.com/json-path/JsonPath/blob/master/README.md)
* expression that matches specific fields of candidate
* resources and it operates as a filtering parameter (resources that
* are not matched with this expression will not be candidates for
* transformation).
*
*
* string json_path = 3 [(.google.api.field_behavior) = OPTIONAL];
*
* @param value The bytes for jsonPath to set.
* @return This builder for chaining.
*/
public Builder setJsonPathBytes(com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
jsonPath_ = value;
bitField0_ |= 0x00000004;
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.RestoreConfig.ResourceFilter)
}
// @@protoc_insertion_point(class_scope:google.cloud.gkebackup.v1.RestoreConfig.ResourceFilter)
private static final com.google.cloud.gkebackup.v1.RestoreConfig.ResourceFilter
DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new com.google.cloud.gkebackup.v1.RestoreConfig.ResourceFilter();
}
public static com.google.cloud.gkebackup.v1.RestoreConfig.ResourceFilter getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser PARSER =
new com.google.protobuf.AbstractParser() {
@java.lang.Override
public ResourceFilter 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.RestoreConfig.ResourceFilter getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
public interface TransformationRuleOrBuilder
extends
// @@protoc_insertion_point(interface_extends:google.cloud.gkebackup.v1.RestoreConfig.TransformationRule)
com.google.protobuf.MessageOrBuilder {
/**
*
*
*
* Required. A list of transformation rule actions to take against candidate
* resources. Actions are executed in order defined - this order matters, as
* they could potentially interfere with each other and the first operation
* could affect the outcome of the second operation.
*
*
*
* repeated .google.cloud.gkebackup.v1.RestoreConfig.TransformationRuleAction field_actions = 1 [(.google.api.field_behavior) = REQUIRED];
*
*/
java.util.List
getFieldActionsList();
/**
*
*
*
* Required. A list of transformation rule actions to take against candidate
* resources. Actions are executed in order defined - this order matters, as
* they could potentially interfere with each other and the first operation
* could affect the outcome of the second operation.
*
*
*
* repeated .google.cloud.gkebackup.v1.RestoreConfig.TransformationRuleAction field_actions = 1 [(.google.api.field_behavior) = REQUIRED];
*
*/
com.google.cloud.gkebackup.v1.RestoreConfig.TransformationRuleAction getFieldActions(int index);
/**
*
*
*
* Required. A list of transformation rule actions to take against candidate
* resources. Actions are executed in order defined - this order matters, as
* they could potentially interfere with each other and the first operation
* could affect the outcome of the second operation.
*
*
*
* repeated .google.cloud.gkebackup.v1.RestoreConfig.TransformationRuleAction field_actions = 1 [(.google.api.field_behavior) = REQUIRED];
*
*/
int getFieldActionsCount();
/**
*
*
*
* Required. A list of transformation rule actions to take against candidate
* resources. Actions are executed in order defined - this order matters, as
* they could potentially interfere with each other and the first operation
* could affect the outcome of the second operation.
*
*
*
* repeated .google.cloud.gkebackup.v1.RestoreConfig.TransformationRuleAction field_actions = 1 [(.google.api.field_behavior) = REQUIRED];
*
*/
java.util.List<
? extends com.google.cloud.gkebackup.v1.RestoreConfig.TransformationRuleActionOrBuilder>
getFieldActionsOrBuilderList();
/**
*
*
*
* Required. A list of transformation rule actions to take against candidate
* resources. Actions are executed in order defined - this order matters, as
* they could potentially interfere with each other and the first operation
* could affect the outcome of the second operation.
*
*
*
* repeated .google.cloud.gkebackup.v1.RestoreConfig.TransformationRuleAction field_actions = 1 [(.google.api.field_behavior) = REQUIRED];
*
*/
com.google.cloud.gkebackup.v1.RestoreConfig.TransformationRuleActionOrBuilder
getFieldActionsOrBuilder(int index);
/**
*
*
*
* Optional. This field is used to specify a set of fields that should be
* used to determine which resources in backup should be acted upon by the
* supplied transformation rule actions, and this will ensure that only
* specific resources are affected by transformation rule actions.
*
*
*
* .google.cloud.gkebackup.v1.RestoreConfig.ResourceFilter resource_filter = 2 [(.google.api.field_behavior) = OPTIONAL];
*
*
* @return Whether the resourceFilter field is set.
*/
boolean hasResourceFilter();
/**
*
*
*
* Optional. This field is used to specify a set of fields that should be
* used to determine which resources in backup should be acted upon by the
* supplied transformation rule actions, and this will ensure that only
* specific resources are affected by transformation rule actions.
*
*
*
* .google.cloud.gkebackup.v1.RestoreConfig.ResourceFilter resource_filter = 2 [(.google.api.field_behavior) = OPTIONAL];
*
*
* @return The resourceFilter.
*/
com.google.cloud.gkebackup.v1.RestoreConfig.ResourceFilter getResourceFilter();
/**
*
*
*
* Optional. This field is used to specify a set of fields that should be
* used to determine which resources in backup should be acted upon by the
* supplied transformation rule actions, and this will ensure that only
* specific resources are affected by transformation rule actions.
*
*
*
* .google.cloud.gkebackup.v1.RestoreConfig.ResourceFilter resource_filter = 2 [(.google.api.field_behavior) = OPTIONAL];
*
*/
com.google.cloud.gkebackup.v1.RestoreConfig.ResourceFilterOrBuilder
getResourceFilterOrBuilder();
/**
*
*
*
* Optional. The description is a user specified string description of the
* transformation rule.
*
*
* string description = 3 [(.google.api.field_behavior) = OPTIONAL];
*
* @return The description.
*/
java.lang.String getDescription();
/**
*
*
*
* Optional. The description is a user specified string description of the
* transformation rule.
*
*
* string description = 3 [(.google.api.field_behavior) = OPTIONAL];
*
* @return The bytes for description.
*/
com.google.protobuf.ByteString getDescriptionBytes();
}
/**
*
*
*
* A transformation rule to be applied against Kubernetes resources as they
* are selected for restoration from a Backup. A rule contains both filtering
* logic (which resources are subject to transform) and transformation logic.
*
*
* Protobuf type {@code google.cloud.gkebackup.v1.RestoreConfig.TransformationRule}
*/
public static final class TransformationRule extends com.google.protobuf.GeneratedMessageV3
implements
// @@protoc_insertion_point(message_implements:google.cloud.gkebackup.v1.RestoreConfig.TransformationRule)
TransformationRuleOrBuilder {
private static final long serialVersionUID = 0L;
// Use TransformationRule.newBuilder() to construct.
private TransformationRule(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private TransformationRule() {
fieldActions_ = java.util.Collections.emptyList();
description_ = "";
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(UnusedPrivateParameter unused) {
return new TransformationRule();
}
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
return com.google.cloud.gkebackup.v1.RestoreProto
.internal_static_google_cloud_gkebackup_v1_RestoreConfig_TransformationRule_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.google.cloud.gkebackup.v1.RestoreProto
.internal_static_google_cloud_gkebackup_v1_RestoreConfig_TransformationRule_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.google.cloud.gkebackup.v1.RestoreConfig.TransformationRule.class,
com.google.cloud.gkebackup.v1.RestoreConfig.TransformationRule.Builder.class);
}
private int bitField0_;
public static final int FIELD_ACTIONS_FIELD_NUMBER = 1;
@SuppressWarnings("serial")
private java.util.List
fieldActions_;
/**
*
*
*
* Required. A list of transformation rule actions to take against candidate
* resources. Actions are executed in order defined - this order matters, as
* they could potentially interfere with each other and the first operation
* could affect the outcome of the second operation.
*
*
*
* repeated .google.cloud.gkebackup.v1.RestoreConfig.TransformationRuleAction field_actions = 1 [(.google.api.field_behavior) = REQUIRED];
*
*/
@java.lang.Override
public java.util.List
getFieldActionsList() {
return fieldActions_;
}
/**
*
*
*
* Required. A list of transformation rule actions to take against candidate
* resources. Actions are executed in order defined - this order matters, as
* they could potentially interfere with each other and the first operation
* could affect the outcome of the second operation.
*
*
*
* repeated .google.cloud.gkebackup.v1.RestoreConfig.TransformationRuleAction field_actions = 1 [(.google.api.field_behavior) = REQUIRED];
*
*/
@java.lang.Override
public java.util.List<
? extends com.google.cloud.gkebackup.v1.RestoreConfig.TransformationRuleActionOrBuilder>
getFieldActionsOrBuilderList() {
return fieldActions_;
}
/**
*
*
*
* Required. A list of transformation rule actions to take against candidate
* resources. Actions are executed in order defined - this order matters, as
* they could potentially interfere with each other and the first operation
* could affect the outcome of the second operation.
*
*
*
* repeated .google.cloud.gkebackup.v1.RestoreConfig.TransformationRuleAction field_actions = 1 [(.google.api.field_behavior) = REQUIRED];
*
*/
@java.lang.Override
public int getFieldActionsCount() {
return fieldActions_.size();
}
/**
*
*
*
* Required. A list of transformation rule actions to take against candidate
* resources. Actions are executed in order defined - this order matters, as
* they could potentially interfere with each other and the first operation
* could affect the outcome of the second operation.
*
*
*
* repeated .google.cloud.gkebackup.v1.RestoreConfig.TransformationRuleAction field_actions = 1 [(.google.api.field_behavior) = REQUIRED];
*
*/
@java.lang.Override
public com.google.cloud.gkebackup.v1.RestoreConfig.TransformationRuleAction getFieldActions(
int index) {
return fieldActions_.get(index);
}
/**
*
*
*
* Required. A list of transformation rule actions to take against candidate
* resources. Actions are executed in order defined - this order matters, as
* they could potentially interfere with each other and the first operation
* could affect the outcome of the second operation.
*
*
*
* repeated .google.cloud.gkebackup.v1.RestoreConfig.TransformationRuleAction field_actions = 1 [(.google.api.field_behavior) = REQUIRED];
*
*/
@java.lang.Override
public com.google.cloud.gkebackup.v1.RestoreConfig.TransformationRuleActionOrBuilder
getFieldActionsOrBuilder(int index) {
return fieldActions_.get(index);
}
public static final int RESOURCE_FILTER_FIELD_NUMBER = 2;
private com.google.cloud.gkebackup.v1.RestoreConfig.ResourceFilter resourceFilter_;
/**
*
*
*
* Optional. This field is used to specify a set of fields that should be
* used to determine which resources in backup should be acted upon by the
* supplied transformation rule actions, and this will ensure that only
* specific resources are affected by transformation rule actions.
*
*
*
* .google.cloud.gkebackup.v1.RestoreConfig.ResourceFilter resource_filter = 2 [(.google.api.field_behavior) = OPTIONAL];
*
*
* @return Whether the resourceFilter field is set.
*/
@java.lang.Override
public boolean hasResourceFilter() {
return ((bitField0_ & 0x00000001) != 0);
}
/**
*
*
*
* Optional. This field is used to specify a set of fields that should be
* used to determine which resources in backup should be acted upon by the
* supplied transformation rule actions, and this will ensure that only
* specific resources are affected by transformation rule actions.
*
*
*
* .google.cloud.gkebackup.v1.RestoreConfig.ResourceFilter resource_filter = 2 [(.google.api.field_behavior) = OPTIONAL];
*
*
* @return The resourceFilter.
*/
@java.lang.Override
public com.google.cloud.gkebackup.v1.RestoreConfig.ResourceFilter getResourceFilter() {
return resourceFilter_ == null
? com.google.cloud.gkebackup.v1.RestoreConfig.ResourceFilter.getDefaultInstance()
: resourceFilter_;
}
/**
*
*
*
* Optional. This field is used to specify a set of fields that should be
* used to determine which resources in backup should be acted upon by the
* supplied transformation rule actions, and this will ensure that only
* specific resources are affected by transformation rule actions.
*
*
*
* .google.cloud.gkebackup.v1.RestoreConfig.ResourceFilter resource_filter = 2 [(.google.api.field_behavior) = OPTIONAL];
*
*/
@java.lang.Override
public com.google.cloud.gkebackup.v1.RestoreConfig.ResourceFilterOrBuilder
getResourceFilterOrBuilder() {
return resourceFilter_ == null
? com.google.cloud.gkebackup.v1.RestoreConfig.ResourceFilter.getDefaultInstance()
: resourceFilter_;
}
public static final int DESCRIPTION_FIELD_NUMBER = 3;
@SuppressWarnings("serial")
private volatile java.lang.Object description_ = "";
/**
*
*
*
* Optional. The description is a user specified string description of the
* transformation rule.
*
*
* string description = 3 [(.google.api.field_behavior) = OPTIONAL];
*
* @return The description.
*/
@java.lang.Override
public java.lang.String getDescription() {
java.lang.Object ref = description_;
if (ref instanceof java.lang.String) {
return (java.lang.String) ref;
} else {
com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
description_ = s;
return s;
}
}
/**
*
*
*
* Optional. The description is a user specified string description of the
* transformation rule.
*
*
* string description = 3 [(.google.api.field_behavior) = OPTIONAL];
*
* @return The bytes for description.
*/
@java.lang.Override
public com.google.protobuf.ByteString getDescriptionBytes() {
java.lang.Object ref = description_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
description_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
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 {
for (int i = 0; i < fieldActions_.size(); i++) {
output.writeMessage(1, fieldActions_.get(i));
}
if (((bitField0_ & 0x00000001) != 0)) {
output.writeMessage(2, getResourceFilter());
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 3, description_);
}
getUnknownFields().writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
for (int i = 0; i < fieldActions_.size(); i++) {
size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, fieldActions_.get(i));
}
if (((bitField0_ & 0x00000001) != 0)) {
size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getResourceFilter());
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, description_);
}
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.RestoreConfig.TransformationRule)) {
return super.equals(obj);
}
com.google.cloud.gkebackup.v1.RestoreConfig.TransformationRule other =
(com.google.cloud.gkebackup.v1.RestoreConfig.TransformationRule) obj;
if (!getFieldActionsList().equals(other.getFieldActionsList())) return false;
if (hasResourceFilter() != other.hasResourceFilter()) return false;
if (hasResourceFilter()) {
if (!getResourceFilter().equals(other.getResourceFilter())) return false;
}
if (!getDescription().equals(other.getDescription())) 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 (getFieldActionsCount() > 0) {
hash = (37 * hash) + FIELD_ACTIONS_FIELD_NUMBER;
hash = (53 * hash) + getFieldActionsList().hashCode();
}
if (hasResourceFilter()) {
hash = (37 * hash) + RESOURCE_FILTER_FIELD_NUMBER;
hash = (53 * hash) + getResourceFilter().hashCode();
}
hash = (37 * hash) + DESCRIPTION_FIELD_NUMBER;
hash = (53 * hash) + getDescription().hashCode();
hash = (29 * hash) + getUnknownFields().hashCode();
memoizedHashCode = hash;
return hash;
}
public static com.google.cloud.gkebackup.v1.RestoreConfig.TransformationRule parseFrom(
java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.cloud.gkebackup.v1.RestoreConfig.TransformationRule 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.RestoreConfig.TransformationRule parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.cloud.gkebackup.v1.RestoreConfig.TransformationRule 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.RestoreConfig.TransformationRule parseFrom(
byte[] data) throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.cloud.gkebackup.v1.RestoreConfig.TransformationRule 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.RestoreConfig.TransformationRule parseFrom(
java.io.InputStream input) throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
}
public static com.google.cloud.gkebackup.v1.RestoreConfig.TransformationRule 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.RestoreConfig.TransformationRule parseDelimitedFrom(
java.io.InputStream input) throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input);
}
public static com.google.cloud.gkebackup.v1.RestoreConfig.TransformationRule 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.RestoreConfig.TransformationRule 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.RestoreConfig.TransformationRule 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.RestoreConfig.TransformationRule 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;
}
/**
*
*
*
* A transformation rule to be applied against Kubernetes resources as they
* are selected for restoration from a Backup. A rule contains both filtering
* logic (which resources are subject to transform) and transformation logic.
*
*
* Protobuf type {@code google.cloud.gkebackup.v1.RestoreConfig.TransformationRule}
*/
public static final class Builder
extends com.google.protobuf.GeneratedMessageV3.Builder
implements
// @@protoc_insertion_point(builder_implements:google.cloud.gkebackup.v1.RestoreConfig.TransformationRule)
com.google.cloud.gkebackup.v1.RestoreConfig.TransformationRuleOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
return com.google.cloud.gkebackup.v1.RestoreProto
.internal_static_google_cloud_gkebackup_v1_RestoreConfig_TransformationRule_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.google.cloud.gkebackup.v1.RestoreProto
.internal_static_google_cloud_gkebackup_v1_RestoreConfig_TransformationRule_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.google.cloud.gkebackup.v1.RestoreConfig.TransformationRule.class,
com.google.cloud.gkebackup.v1.RestoreConfig.TransformationRule.Builder.class);
}
// Construct using com.google.cloud.gkebackup.v1.RestoreConfig.TransformationRule.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {
getFieldActionsFieldBuilder();
getResourceFilterFieldBuilder();
}
}
@java.lang.Override
public Builder clear() {
super.clear();
bitField0_ = 0;
if (fieldActionsBuilder_ == null) {
fieldActions_ = java.util.Collections.emptyList();
} else {
fieldActions_ = null;
fieldActionsBuilder_.clear();
}
bitField0_ = (bitField0_ & ~0x00000001);
resourceFilter_ = null;
if (resourceFilterBuilder_ != null) {
resourceFilterBuilder_.dispose();
resourceFilterBuilder_ = null;
}
description_ = "";
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() {
return com.google.cloud.gkebackup.v1.RestoreProto
.internal_static_google_cloud_gkebackup_v1_RestoreConfig_TransformationRule_descriptor;
}
@java.lang.Override
public com.google.cloud.gkebackup.v1.RestoreConfig.TransformationRule
getDefaultInstanceForType() {
return com.google.cloud.gkebackup.v1.RestoreConfig.TransformationRule.getDefaultInstance();
}
@java.lang.Override
public com.google.cloud.gkebackup.v1.RestoreConfig.TransformationRule build() {
com.google.cloud.gkebackup.v1.RestoreConfig.TransformationRule result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public com.google.cloud.gkebackup.v1.RestoreConfig.TransformationRule buildPartial() {
com.google.cloud.gkebackup.v1.RestoreConfig.TransformationRule result =
new com.google.cloud.gkebackup.v1.RestoreConfig.TransformationRule(this);
buildPartialRepeatedFields(result);
if (bitField0_ != 0) {
buildPartial0(result);
}
onBuilt();
return result;
}
private void buildPartialRepeatedFields(
com.google.cloud.gkebackup.v1.RestoreConfig.TransformationRule result) {
if (fieldActionsBuilder_ == null) {
if (((bitField0_ & 0x00000001) != 0)) {
fieldActions_ = java.util.Collections.unmodifiableList(fieldActions_);
bitField0_ = (bitField0_ & ~0x00000001);
}
result.fieldActions_ = fieldActions_;
} else {
result.fieldActions_ = fieldActionsBuilder_.build();
}
}
private void buildPartial0(
com.google.cloud.gkebackup.v1.RestoreConfig.TransformationRule result) {
int from_bitField0_ = bitField0_;
int to_bitField0_ = 0;
if (((from_bitField0_ & 0x00000002) != 0)) {
result.resourceFilter_ =
resourceFilterBuilder_ == null ? resourceFilter_ : resourceFilterBuilder_.build();
to_bitField0_ |= 0x00000001;
}
if (((from_bitField0_ & 0x00000004) != 0)) {
result.description_ = description_;
}
result.bitField0_ |= to_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.RestoreConfig.TransformationRule) {
return mergeFrom((com.google.cloud.gkebackup.v1.RestoreConfig.TransformationRule) other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(
com.google.cloud.gkebackup.v1.RestoreConfig.TransformationRule other) {
if (other
== com.google.cloud.gkebackup.v1.RestoreConfig.TransformationRule.getDefaultInstance())
return this;
if (fieldActionsBuilder_ == null) {
if (!other.fieldActions_.isEmpty()) {
if (fieldActions_.isEmpty()) {
fieldActions_ = other.fieldActions_;
bitField0_ = (bitField0_ & ~0x00000001);
} else {
ensureFieldActionsIsMutable();
fieldActions_.addAll(other.fieldActions_);
}
onChanged();
}
} else {
if (!other.fieldActions_.isEmpty()) {
if (fieldActionsBuilder_.isEmpty()) {
fieldActionsBuilder_.dispose();
fieldActionsBuilder_ = null;
fieldActions_ = other.fieldActions_;
bitField0_ = (bitField0_ & ~0x00000001);
fieldActionsBuilder_ =
com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders
? getFieldActionsFieldBuilder()
: null;
} else {
fieldActionsBuilder_.addAllMessages(other.fieldActions_);
}
}
}
if (other.hasResourceFilter()) {
mergeResourceFilter(other.getResourceFilter());
}
if (!other.getDescription().isEmpty()) {
description_ = other.description_;
bitField0_ |= 0x00000004;
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 10:
{
com.google.cloud.gkebackup.v1.RestoreConfig.TransformationRuleAction m =
input.readMessage(
com.google.cloud.gkebackup.v1.RestoreConfig.TransformationRuleAction
.parser(),
extensionRegistry);
if (fieldActionsBuilder_ == null) {
ensureFieldActionsIsMutable();
fieldActions_.add(m);
} else {
fieldActionsBuilder_.addMessage(m);
}
break;
} // case 10
case 18:
{
input.readMessage(
getResourceFilterFieldBuilder().getBuilder(), extensionRegistry);
bitField0_ |= 0x00000002;
break;
} // case 18
case 26:
{
description_ = input.readStringRequireUtf8();
bitField0_ |= 0x00000004;
break;
} // case 26
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
fieldActions_ = java.util.Collections.emptyList();
private void ensureFieldActionsIsMutable() {
if (!((bitField0_ & 0x00000001) != 0)) {
fieldActions_ =
new java.util.ArrayList<
com.google.cloud.gkebackup.v1.RestoreConfig.TransformationRuleAction>(
fieldActions_);
bitField0_ |= 0x00000001;
}
}
private com.google.protobuf.RepeatedFieldBuilderV3<
com.google.cloud.gkebackup.v1.RestoreConfig.TransformationRuleAction,
com.google.cloud.gkebackup.v1.RestoreConfig.TransformationRuleAction.Builder,
com.google.cloud.gkebackup.v1.RestoreConfig.TransformationRuleActionOrBuilder>
fieldActionsBuilder_;
/**
*
*
*
* Required. A list of transformation rule actions to take against candidate
* resources. Actions are executed in order defined - this order matters, as
* they could potentially interfere with each other and the first operation
* could affect the outcome of the second operation.
*
*
*
* repeated .google.cloud.gkebackup.v1.RestoreConfig.TransformationRuleAction field_actions = 1 [(.google.api.field_behavior) = REQUIRED];
*
*/
public java.util.List
getFieldActionsList() {
if (fieldActionsBuilder_ == null) {
return java.util.Collections.unmodifiableList(fieldActions_);
} else {
return fieldActionsBuilder_.getMessageList();
}
}
/**
*
*
*
* Required. A list of transformation rule actions to take against candidate
* resources. Actions are executed in order defined - this order matters, as
* they could potentially interfere with each other and the first operation
* could affect the outcome of the second operation.
*
*
*
* repeated .google.cloud.gkebackup.v1.RestoreConfig.TransformationRuleAction field_actions = 1 [(.google.api.field_behavior) = REQUIRED];
*
*/
public int getFieldActionsCount() {
if (fieldActionsBuilder_ == null) {
return fieldActions_.size();
} else {
return fieldActionsBuilder_.getCount();
}
}
/**
*
*
*
* Required. A list of transformation rule actions to take against candidate
* resources. Actions are executed in order defined - this order matters, as
* they could potentially interfere with each other and the first operation
* could affect the outcome of the second operation.
*
*
*
* repeated .google.cloud.gkebackup.v1.RestoreConfig.TransformationRuleAction field_actions = 1 [(.google.api.field_behavior) = REQUIRED];
*
*/
public com.google.cloud.gkebackup.v1.RestoreConfig.TransformationRuleAction getFieldActions(
int index) {
if (fieldActionsBuilder_ == null) {
return fieldActions_.get(index);
} else {
return fieldActionsBuilder_.getMessage(index);
}
}
/**
*
*
*
* Required. A list of transformation rule actions to take against candidate
* resources. Actions are executed in order defined - this order matters, as
* they could potentially interfere with each other and the first operation
* could affect the outcome of the second operation.
*
*
*
* repeated .google.cloud.gkebackup.v1.RestoreConfig.TransformationRuleAction field_actions = 1 [(.google.api.field_behavior) = REQUIRED];
*
*/
public Builder setFieldActions(
int index, com.google.cloud.gkebackup.v1.RestoreConfig.TransformationRuleAction value) {
if (fieldActionsBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureFieldActionsIsMutable();
fieldActions_.set(index, value);
onChanged();
} else {
fieldActionsBuilder_.setMessage(index, value);
}
return this;
}
/**
*
*
*
* Required. A list of transformation rule actions to take against candidate
* resources. Actions are executed in order defined - this order matters, as
* they could potentially interfere with each other and the first operation
* could affect the outcome of the second operation.
*
*
*
* repeated .google.cloud.gkebackup.v1.RestoreConfig.TransformationRuleAction field_actions = 1 [(.google.api.field_behavior) = REQUIRED];
*
*/
public Builder setFieldActions(
int index,
com.google.cloud.gkebackup.v1.RestoreConfig.TransformationRuleAction.Builder
builderForValue) {
if (fieldActionsBuilder_ == null) {
ensureFieldActionsIsMutable();
fieldActions_.set(index, builderForValue.build());
onChanged();
} else {
fieldActionsBuilder_.setMessage(index, builderForValue.build());
}
return this;
}
/**
*
*
*
* Required. A list of transformation rule actions to take against candidate
* resources. Actions are executed in order defined - this order matters, as
* they could potentially interfere with each other and the first operation
* could affect the outcome of the second operation.
*
*
*
* repeated .google.cloud.gkebackup.v1.RestoreConfig.TransformationRuleAction field_actions = 1 [(.google.api.field_behavior) = REQUIRED];
*
*/
public Builder addFieldActions(
com.google.cloud.gkebackup.v1.RestoreConfig.TransformationRuleAction value) {
if (fieldActionsBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureFieldActionsIsMutable();
fieldActions_.add(value);
onChanged();
} else {
fieldActionsBuilder_.addMessage(value);
}
return this;
}
/**
*
*
*
* Required. A list of transformation rule actions to take against candidate
* resources. Actions are executed in order defined - this order matters, as
* they could potentially interfere with each other and the first operation
* could affect the outcome of the second operation.
*
*
*
* repeated .google.cloud.gkebackup.v1.RestoreConfig.TransformationRuleAction field_actions = 1 [(.google.api.field_behavior) = REQUIRED];
*
*/
public Builder addFieldActions(
int index, com.google.cloud.gkebackup.v1.RestoreConfig.TransformationRuleAction value) {
if (fieldActionsBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureFieldActionsIsMutable();
fieldActions_.add(index, value);
onChanged();
} else {
fieldActionsBuilder_.addMessage(index, value);
}
return this;
}
/**
*
*
*
* Required. A list of transformation rule actions to take against candidate
* resources. Actions are executed in order defined - this order matters, as
* they could potentially interfere with each other and the first operation
* could affect the outcome of the second operation.
*
*
*
* repeated .google.cloud.gkebackup.v1.RestoreConfig.TransformationRuleAction field_actions = 1 [(.google.api.field_behavior) = REQUIRED];
*
*/
public Builder addFieldActions(
com.google.cloud.gkebackup.v1.RestoreConfig.TransformationRuleAction.Builder
builderForValue) {
if (fieldActionsBuilder_ == null) {
ensureFieldActionsIsMutable();
fieldActions_.add(builderForValue.build());
onChanged();
} else {
fieldActionsBuilder_.addMessage(builderForValue.build());
}
return this;
}
/**
*
*
*
* Required. A list of transformation rule actions to take against candidate
* resources. Actions are executed in order defined - this order matters, as
* they could potentially interfere with each other and the first operation
* could affect the outcome of the second operation.
*
*
*
* repeated .google.cloud.gkebackup.v1.RestoreConfig.TransformationRuleAction field_actions = 1 [(.google.api.field_behavior) = REQUIRED];
*
*/
public Builder addFieldActions(
int index,
com.google.cloud.gkebackup.v1.RestoreConfig.TransformationRuleAction.Builder
builderForValue) {
if (fieldActionsBuilder_ == null) {
ensureFieldActionsIsMutable();
fieldActions_.add(index, builderForValue.build());
onChanged();
} else {
fieldActionsBuilder_.addMessage(index, builderForValue.build());
}
return this;
}
/**
*
*
*
* Required. A list of transformation rule actions to take against candidate
* resources. Actions are executed in order defined - this order matters, as
* they could potentially interfere with each other and the first operation
* could affect the outcome of the second operation.
*
*
*
* repeated .google.cloud.gkebackup.v1.RestoreConfig.TransformationRuleAction field_actions = 1 [(.google.api.field_behavior) = REQUIRED];
*
*/
public Builder addAllFieldActions(
java.lang.Iterable<
? extends com.google.cloud.gkebackup.v1.RestoreConfig.TransformationRuleAction>
values) {
if (fieldActionsBuilder_ == null) {
ensureFieldActionsIsMutable();
com.google.protobuf.AbstractMessageLite.Builder.addAll(values, fieldActions_);
onChanged();
} else {
fieldActionsBuilder_.addAllMessages(values);
}
return this;
}
/**
*
*
*
* Required. A list of transformation rule actions to take against candidate
* resources. Actions are executed in order defined - this order matters, as
* they could potentially interfere with each other and the first operation
* could affect the outcome of the second operation.
*
*
*
* repeated .google.cloud.gkebackup.v1.RestoreConfig.TransformationRuleAction field_actions = 1 [(.google.api.field_behavior) = REQUIRED];
*
*/
public Builder clearFieldActions() {
if (fieldActionsBuilder_ == null) {
fieldActions_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000001);
onChanged();
} else {
fieldActionsBuilder_.clear();
}
return this;
}
/**
*
*
*
* Required. A list of transformation rule actions to take against candidate
* resources. Actions are executed in order defined - this order matters, as
* they could potentially interfere with each other and the first operation
* could affect the outcome of the second operation.
*
*
*
* repeated .google.cloud.gkebackup.v1.RestoreConfig.TransformationRuleAction field_actions = 1 [(.google.api.field_behavior) = REQUIRED];
*
*/
public Builder removeFieldActions(int index) {
if (fieldActionsBuilder_ == null) {
ensureFieldActionsIsMutable();
fieldActions_.remove(index);
onChanged();
} else {
fieldActionsBuilder_.remove(index);
}
return this;
}
/**
*
*
*
* Required. A list of transformation rule actions to take against candidate
* resources. Actions are executed in order defined - this order matters, as
* they could potentially interfere with each other and the first operation
* could affect the outcome of the second operation.
*
*
*
* repeated .google.cloud.gkebackup.v1.RestoreConfig.TransformationRuleAction field_actions = 1 [(.google.api.field_behavior) = REQUIRED];
*
*/
public com.google.cloud.gkebackup.v1.RestoreConfig.TransformationRuleAction.Builder
getFieldActionsBuilder(int index) {
return getFieldActionsFieldBuilder().getBuilder(index);
}
/**
*
*
*
* Required. A list of transformation rule actions to take against candidate
* resources. Actions are executed in order defined - this order matters, as
* they could potentially interfere with each other and the first operation
* could affect the outcome of the second operation.
*
*
*
* repeated .google.cloud.gkebackup.v1.RestoreConfig.TransformationRuleAction field_actions = 1 [(.google.api.field_behavior) = REQUIRED];
*
*/
public com.google.cloud.gkebackup.v1.RestoreConfig.TransformationRuleActionOrBuilder
getFieldActionsOrBuilder(int index) {
if (fieldActionsBuilder_ == null) {
return fieldActions_.get(index);
} else {
return fieldActionsBuilder_.getMessageOrBuilder(index);
}
}
/**
*
*
*
* Required. A list of transformation rule actions to take against candidate
* resources. Actions are executed in order defined - this order matters, as
* they could potentially interfere with each other and the first operation
* could affect the outcome of the second operation.
*
*
*
* repeated .google.cloud.gkebackup.v1.RestoreConfig.TransformationRuleAction field_actions = 1 [(.google.api.field_behavior) = REQUIRED];
*
*/
public java.util.List<
? extends
com.google.cloud.gkebackup.v1.RestoreConfig.TransformationRuleActionOrBuilder>
getFieldActionsOrBuilderList() {
if (fieldActionsBuilder_ != null) {
return fieldActionsBuilder_.getMessageOrBuilderList();
} else {
return java.util.Collections.unmodifiableList(fieldActions_);
}
}
/**
*
*
*
* Required. A list of transformation rule actions to take against candidate
* resources. Actions are executed in order defined - this order matters, as
* they could potentially interfere with each other and the first operation
* could affect the outcome of the second operation.
*
*
*
* repeated .google.cloud.gkebackup.v1.RestoreConfig.TransformationRuleAction field_actions = 1 [(.google.api.field_behavior) = REQUIRED];
*
*/
public com.google.cloud.gkebackup.v1.RestoreConfig.TransformationRuleAction.Builder
addFieldActionsBuilder() {
return getFieldActionsFieldBuilder()
.addBuilder(
com.google.cloud.gkebackup.v1.RestoreConfig.TransformationRuleAction
.getDefaultInstance());
}
/**
*
*
*
* Required. A list of transformation rule actions to take against candidate
* resources. Actions are executed in order defined - this order matters, as
* they could potentially interfere with each other and the first operation
* could affect the outcome of the second operation.
*
*
*
* repeated .google.cloud.gkebackup.v1.RestoreConfig.TransformationRuleAction field_actions = 1 [(.google.api.field_behavior) = REQUIRED];
*
*/
public com.google.cloud.gkebackup.v1.RestoreConfig.TransformationRuleAction.Builder
addFieldActionsBuilder(int index) {
return getFieldActionsFieldBuilder()
.addBuilder(
index,
com.google.cloud.gkebackup.v1.RestoreConfig.TransformationRuleAction
.getDefaultInstance());
}
/**
*
*
*
* Required. A list of transformation rule actions to take against candidate
* resources. Actions are executed in order defined - this order matters, as
* they could potentially interfere with each other and the first operation
* could affect the outcome of the second operation.
*
*
*
* repeated .google.cloud.gkebackup.v1.RestoreConfig.TransformationRuleAction field_actions = 1 [(.google.api.field_behavior) = REQUIRED];
*
*/
public java.util.List<
com.google.cloud.gkebackup.v1.RestoreConfig.TransformationRuleAction.Builder>
getFieldActionsBuilderList() {
return getFieldActionsFieldBuilder().getBuilderList();
}
private com.google.protobuf.RepeatedFieldBuilderV3<
com.google.cloud.gkebackup.v1.RestoreConfig.TransformationRuleAction,
com.google.cloud.gkebackup.v1.RestoreConfig.TransformationRuleAction.Builder,
com.google.cloud.gkebackup.v1.RestoreConfig.TransformationRuleActionOrBuilder>
getFieldActionsFieldBuilder() {
if (fieldActionsBuilder_ == null) {
fieldActionsBuilder_ =
new com.google.protobuf.RepeatedFieldBuilderV3<
com.google.cloud.gkebackup.v1.RestoreConfig.TransformationRuleAction,
com.google.cloud.gkebackup.v1.RestoreConfig.TransformationRuleAction.Builder,
com.google.cloud.gkebackup.v1.RestoreConfig.TransformationRuleActionOrBuilder>(
fieldActions_,
((bitField0_ & 0x00000001) != 0),
getParentForChildren(),
isClean());
fieldActions_ = null;
}
return fieldActionsBuilder_;
}
private com.google.cloud.gkebackup.v1.RestoreConfig.ResourceFilter resourceFilter_;
private com.google.protobuf.SingleFieldBuilderV3<
com.google.cloud.gkebackup.v1.RestoreConfig.ResourceFilter,
com.google.cloud.gkebackup.v1.RestoreConfig.ResourceFilter.Builder,
com.google.cloud.gkebackup.v1.RestoreConfig.ResourceFilterOrBuilder>
resourceFilterBuilder_;
/**
*
*
*
* Optional. This field is used to specify a set of fields that should be
* used to determine which resources in backup should be acted upon by the
* supplied transformation rule actions, and this will ensure that only
* specific resources are affected by transformation rule actions.
*
*
*
* .google.cloud.gkebackup.v1.RestoreConfig.ResourceFilter resource_filter = 2 [(.google.api.field_behavior) = OPTIONAL];
*
*
* @return Whether the resourceFilter field is set.
*/
public boolean hasResourceFilter() {
return ((bitField0_ & 0x00000002) != 0);
}
/**
*
*
*
* Optional. This field is used to specify a set of fields that should be
* used to determine which resources in backup should be acted upon by the
* supplied transformation rule actions, and this will ensure that only
* specific resources are affected by transformation rule actions.
*
*
*
* .google.cloud.gkebackup.v1.RestoreConfig.ResourceFilter resource_filter = 2 [(.google.api.field_behavior) = OPTIONAL];
*
*
* @return The resourceFilter.
*/
public com.google.cloud.gkebackup.v1.RestoreConfig.ResourceFilter getResourceFilter() {
if (resourceFilterBuilder_ == null) {
return resourceFilter_ == null
? com.google.cloud.gkebackup.v1.RestoreConfig.ResourceFilter.getDefaultInstance()
: resourceFilter_;
} else {
return resourceFilterBuilder_.getMessage();
}
}
/**
*
*
*
* Optional. This field is used to specify a set of fields that should be
* used to determine which resources in backup should be acted upon by the
* supplied transformation rule actions, and this will ensure that only
* specific resources are affected by transformation rule actions.
*
*
*
* .google.cloud.gkebackup.v1.RestoreConfig.ResourceFilter resource_filter = 2 [(.google.api.field_behavior) = OPTIONAL];
*
*/
public Builder setResourceFilter(
com.google.cloud.gkebackup.v1.RestoreConfig.ResourceFilter value) {
if (resourceFilterBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
resourceFilter_ = value;
} else {
resourceFilterBuilder_.setMessage(value);
}
bitField0_ |= 0x00000002;
onChanged();
return this;
}
/**
*
*
*
* Optional. This field is used to specify a set of fields that should be
* used to determine which resources in backup should be acted upon by the
* supplied transformation rule actions, and this will ensure that only
* specific resources are affected by transformation rule actions.
*
*
*
* .google.cloud.gkebackup.v1.RestoreConfig.ResourceFilter resource_filter = 2 [(.google.api.field_behavior) = OPTIONAL];
*
*/
public Builder setResourceFilter(
com.google.cloud.gkebackup.v1.RestoreConfig.ResourceFilter.Builder builderForValue) {
if (resourceFilterBuilder_ == null) {
resourceFilter_ = builderForValue.build();
} else {
resourceFilterBuilder_.setMessage(builderForValue.build());
}
bitField0_ |= 0x00000002;
onChanged();
return this;
}
/**
*
*
*
* Optional. This field is used to specify a set of fields that should be
* used to determine which resources in backup should be acted upon by the
* supplied transformation rule actions, and this will ensure that only
* specific resources are affected by transformation rule actions.
*
*
*
* .google.cloud.gkebackup.v1.RestoreConfig.ResourceFilter resource_filter = 2 [(.google.api.field_behavior) = OPTIONAL];
*
*/
public Builder mergeResourceFilter(
com.google.cloud.gkebackup.v1.RestoreConfig.ResourceFilter value) {
if (resourceFilterBuilder_ == null) {
if (((bitField0_ & 0x00000002) != 0)
&& resourceFilter_ != null
&& resourceFilter_
!= com.google.cloud.gkebackup.v1.RestoreConfig.ResourceFilter
.getDefaultInstance()) {
getResourceFilterBuilder().mergeFrom(value);
} else {
resourceFilter_ = value;
}
} else {
resourceFilterBuilder_.mergeFrom(value);
}
if (resourceFilter_ != null) {
bitField0_ |= 0x00000002;
onChanged();
}
return this;
}
/**
*
*
*
* Optional. This field is used to specify a set of fields that should be
* used to determine which resources in backup should be acted upon by the
* supplied transformation rule actions, and this will ensure that only
* specific resources are affected by transformation rule actions.
*
*
*
* .google.cloud.gkebackup.v1.RestoreConfig.ResourceFilter resource_filter = 2 [(.google.api.field_behavior) = OPTIONAL];
*
*/
public Builder clearResourceFilter() {
bitField0_ = (bitField0_ & ~0x00000002);
resourceFilter_ = null;
if (resourceFilterBuilder_ != null) {
resourceFilterBuilder_.dispose();
resourceFilterBuilder_ = null;
}
onChanged();
return this;
}
/**
*
*
*
* Optional. This field is used to specify a set of fields that should be
* used to determine which resources in backup should be acted upon by the
* supplied transformation rule actions, and this will ensure that only
* specific resources are affected by transformation rule actions.
*
*
*
* .google.cloud.gkebackup.v1.RestoreConfig.ResourceFilter resource_filter = 2 [(.google.api.field_behavior) = OPTIONAL];
*
*/
public com.google.cloud.gkebackup.v1.RestoreConfig.ResourceFilter.Builder
getResourceFilterBuilder() {
bitField0_ |= 0x00000002;
onChanged();
return getResourceFilterFieldBuilder().getBuilder();
}
/**
*
*
*
* Optional. This field is used to specify a set of fields that should be
* used to determine which resources in backup should be acted upon by the
* supplied transformation rule actions, and this will ensure that only
* specific resources are affected by transformation rule actions.
*
*
*
* .google.cloud.gkebackup.v1.RestoreConfig.ResourceFilter resource_filter = 2 [(.google.api.field_behavior) = OPTIONAL];
*
*/
public com.google.cloud.gkebackup.v1.RestoreConfig.ResourceFilterOrBuilder
getResourceFilterOrBuilder() {
if (resourceFilterBuilder_ != null) {
return resourceFilterBuilder_.getMessageOrBuilder();
} else {
return resourceFilter_ == null
? com.google.cloud.gkebackup.v1.RestoreConfig.ResourceFilter.getDefaultInstance()
: resourceFilter_;
}
}
/**
*
*
*
* Optional. This field is used to specify a set of fields that should be
* used to determine which resources in backup should be acted upon by the
* supplied transformation rule actions, and this will ensure that only
* specific resources are affected by transformation rule actions.
*
*
*
* .google.cloud.gkebackup.v1.RestoreConfig.ResourceFilter resource_filter = 2 [(.google.api.field_behavior) = OPTIONAL];
*
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.google.cloud.gkebackup.v1.RestoreConfig.ResourceFilter,
com.google.cloud.gkebackup.v1.RestoreConfig.ResourceFilter.Builder,
com.google.cloud.gkebackup.v1.RestoreConfig.ResourceFilterOrBuilder>
getResourceFilterFieldBuilder() {
if (resourceFilterBuilder_ == null) {
resourceFilterBuilder_ =
new com.google.protobuf.SingleFieldBuilderV3<
com.google.cloud.gkebackup.v1.RestoreConfig.ResourceFilter,
com.google.cloud.gkebackup.v1.RestoreConfig.ResourceFilter.Builder,
com.google.cloud.gkebackup.v1.RestoreConfig.ResourceFilterOrBuilder>(
getResourceFilter(), getParentForChildren(), isClean());
resourceFilter_ = null;
}
return resourceFilterBuilder_;
}
private java.lang.Object description_ = "";
/**
*
*
*
* Optional. The description is a user specified string description of the
* transformation rule.
*
*
* string description = 3 [(.google.api.field_behavior) = OPTIONAL];
*
* @return The description.
*/
public java.lang.String getDescription() {
java.lang.Object ref = description_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
description_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
*
*
* Optional. The description is a user specified string description of the
* transformation rule.
*
*
* string description = 3 [(.google.api.field_behavior) = OPTIONAL];
*
* @return The bytes for description.
*/
public com.google.protobuf.ByteString getDescriptionBytes() {
java.lang.Object ref = description_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
description_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
*
*
* Optional. The description is a user specified string description of the
* transformation rule.
*
*
* string description = 3 [(.google.api.field_behavior) = OPTIONAL];
*
* @param value The description to set.
* @return This builder for chaining.
*/
public Builder setDescription(java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
description_ = value;
bitField0_ |= 0x00000004;
onChanged();
return this;
}
/**
*
*
*
* Optional. The description is a user specified string description of the
* transformation rule.
*
*
* string description = 3 [(.google.api.field_behavior) = OPTIONAL];
*
* @return This builder for chaining.
*/
public Builder clearDescription() {
description_ = getDefaultInstance().getDescription();
bitField0_ = (bitField0_ & ~0x00000004);
onChanged();
return this;
}
/**
*
*
*
* Optional. The description is a user specified string description of the
* transformation rule.
*
*
* string description = 3 [(.google.api.field_behavior) = OPTIONAL];
*
* @param value The bytes for description to set.
* @return This builder for chaining.
*/
public Builder setDescriptionBytes(com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
description_ = value;
bitField0_ |= 0x00000004;
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.RestoreConfig.TransformationRule)
}
// @@protoc_insertion_point(class_scope:google.cloud.gkebackup.v1.RestoreConfig.TransformationRule)
private static final com.google.cloud.gkebackup.v1.RestoreConfig.TransformationRule
DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new com.google.cloud.gkebackup.v1.RestoreConfig.TransformationRule();
}
public static com.google.cloud.gkebackup.v1.RestoreConfig.TransformationRule
getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser PARSER =
new com.google.protobuf.AbstractParser() {
@java.lang.Override
public TransformationRule 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.RestoreConfig.TransformationRule
getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
public interface VolumeDataRestorePolicyBindingOrBuilder
extends
// @@protoc_insertion_point(interface_extends:google.cloud.gkebackup.v1.RestoreConfig.VolumeDataRestorePolicyBinding)
com.google.protobuf.MessageOrBuilder {
/**
*
*
*
* Required. The VolumeDataRestorePolicy to apply when restoring volumes in
* scope.
*
*
*
* .google.cloud.gkebackup.v1.RestoreConfig.VolumeDataRestorePolicy policy = 1 [(.google.api.field_behavior) = REQUIRED];
*
*
* @return The enum numeric value on the wire for policy.
*/
int getPolicyValue();
/**
*
*
*
* Required. The VolumeDataRestorePolicy to apply when restoring volumes in
* scope.
*
*
*
* .google.cloud.gkebackup.v1.RestoreConfig.VolumeDataRestorePolicy policy = 1 [(.google.api.field_behavior) = REQUIRED];
*
*
* @return The policy.
*/
com.google.cloud.gkebackup.v1.RestoreConfig.VolumeDataRestorePolicy getPolicy();
/**
*
*
*
* The volume type, as determined by the PVC's bound PV,
* to apply the policy to.
*
*
* .google.cloud.gkebackup.v1.VolumeTypeEnum.VolumeType volume_type = 2;
*
* @return Whether the volumeType field is set.
*/
boolean hasVolumeType();
/**
*
*
*
* The volume type, as determined by the PVC's bound PV,
* to apply the policy to.
*
*
* .google.cloud.gkebackup.v1.VolumeTypeEnum.VolumeType volume_type = 2;
*
* @return The enum numeric value on the wire for volumeType.
*/
int getVolumeTypeValue();
/**
*
*
*
* The volume type, as determined by the PVC's bound PV,
* to apply the policy to.
*
*
* .google.cloud.gkebackup.v1.VolumeTypeEnum.VolumeType volume_type = 2;
*
* @return The volumeType.
*/
com.google.cloud.gkebackup.v1.VolumeTypeEnum.VolumeType getVolumeType();
com.google.cloud.gkebackup.v1.RestoreConfig.VolumeDataRestorePolicyBinding.ScopeCase
getScopeCase();
}
/**
*
*
*
* Binds resources in the scope to the given VolumeDataRestorePolicy.
*
*
* Protobuf type {@code google.cloud.gkebackup.v1.RestoreConfig.VolumeDataRestorePolicyBinding}
*/
public static final class VolumeDataRestorePolicyBinding
extends com.google.protobuf.GeneratedMessageV3
implements
// @@protoc_insertion_point(message_implements:google.cloud.gkebackup.v1.RestoreConfig.VolumeDataRestorePolicyBinding)
VolumeDataRestorePolicyBindingOrBuilder {
private static final long serialVersionUID = 0L;
// Use VolumeDataRestorePolicyBinding.newBuilder() to construct.
private VolumeDataRestorePolicyBinding(
com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private VolumeDataRestorePolicyBinding() {
policy_ = 0;
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(UnusedPrivateParameter unused) {
return new VolumeDataRestorePolicyBinding();
}
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
return com.google.cloud.gkebackup.v1.RestoreProto
.internal_static_google_cloud_gkebackup_v1_RestoreConfig_VolumeDataRestorePolicyBinding_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.google.cloud.gkebackup.v1.RestoreProto
.internal_static_google_cloud_gkebackup_v1_RestoreConfig_VolumeDataRestorePolicyBinding_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.google.cloud.gkebackup.v1.RestoreConfig.VolumeDataRestorePolicyBinding.class,
com.google.cloud.gkebackup.v1.RestoreConfig.VolumeDataRestorePolicyBinding.Builder
.class);
}
private int scopeCase_ = 0;
@SuppressWarnings("serial")
private java.lang.Object scope_;
public enum ScopeCase
implements
com.google.protobuf.Internal.EnumLite,
com.google.protobuf.AbstractMessage.InternalOneOfEnum {
VOLUME_TYPE(2),
SCOPE_NOT_SET(0);
private final int value;
private ScopeCase(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 ScopeCase valueOf(int value) {
return forNumber(value);
}
public static ScopeCase forNumber(int value) {
switch (value) {
case 2:
return VOLUME_TYPE;
case 0:
return SCOPE_NOT_SET;
default:
return null;
}
}
public int getNumber() {
return this.value;
}
};
public ScopeCase getScopeCase() {
return ScopeCase.forNumber(scopeCase_);
}
public static final int POLICY_FIELD_NUMBER = 1;
private int policy_ = 0;
/**
*
*
*
* Required. The VolumeDataRestorePolicy to apply when restoring volumes in
* scope.
*
*
*
* .google.cloud.gkebackup.v1.RestoreConfig.VolumeDataRestorePolicy policy = 1 [(.google.api.field_behavior) = REQUIRED];
*
*
* @return The enum numeric value on the wire for policy.
*/
@java.lang.Override
public int getPolicyValue() {
return policy_;
}
/**
*
*
*
* Required. The VolumeDataRestorePolicy to apply when restoring volumes in
* scope.
*
*
*
* .google.cloud.gkebackup.v1.RestoreConfig.VolumeDataRestorePolicy policy = 1 [(.google.api.field_behavior) = REQUIRED];
*
*
* @return The policy.
*/
@java.lang.Override
public com.google.cloud.gkebackup.v1.RestoreConfig.VolumeDataRestorePolicy getPolicy() {
com.google.cloud.gkebackup.v1.RestoreConfig.VolumeDataRestorePolicy result =
com.google.cloud.gkebackup.v1.RestoreConfig.VolumeDataRestorePolicy.forNumber(policy_);
return result == null
? com.google.cloud.gkebackup.v1.RestoreConfig.VolumeDataRestorePolicy.UNRECOGNIZED
: result;
}
public static final int VOLUME_TYPE_FIELD_NUMBER = 2;
/**
*
*
*
* The volume type, as determined by the PVC's bound PV,
* to apply the policy to.
*
*
* .google.cloud.gkebackup.v1.VolumeTypeEnum.VolumeType volume_type = 2;
*
* @return Whether the volumeType field is set.
*/
public boolean hasVolumeType() {
return scopeCase_ == 2;
}
/**
*
*
*
* The volume type, as determined by the PVC's bound PV,
* to apply the policy to.
*
*
* .google.cloud.gkebackup.v1.VolumeTypeEnum.VolumeType volume_type = 2;
*
* @return The enum numeric value on the wire for volumeType.
*/
public int getVolumeTypeValue() {
if (scopeCase_ == 2) {
return (java.lang.Integer) scope_;
}
return 0;
}
/**
*
*
*
* The volume type, as determined by the PVC's bound PV,
* to apply the policy to.
*
*
* .google.cloud.gkebackup.v1.VolumeTypeEnum.VolumeType volume_type = 2;
*
* @return The volumeType.
*/
public com.google.cloud.gkebackup.v1.VolumeTypeEnum.VolumeType getVolumeType() {
if (scopeCase_ == 2) {
com.google.cloud.gkebackup.v1.VolumeTypeEnum.VolumeType result =
com.google.cloud.gkebackup.v1.VolumeTypeEnum.VolumeType.forNumber(
(java.lang.Integer) scope_);
return result == null
? com.google.cloud.gkebackup.v1.VolumeTypeEnum.VolumeType.UNRECOGNIZED
: result;
}
return com.google.cloud.gkebackup.v1.VolumeTypeEnum.VolumeType.VOLUME_TYPE_UNSPECIFIED;
}
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 (policy_
!= com.google.cloud.gkebackup.v1.RestoreConfig.VolumeDataRestorePolicy
.VOLUME_DATA_RESTORE_POLICY_UNSPECIFIED
.getNumber()) {
output.writeEnum(1, policy_);
}
if (scopeCase_ == 2) {
output.writeEnum(2, ((java.lang.Integer) scope_));
}
getUnknownFields().writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (policy_
!= com.google.cloud.gkebackup.v1.RestoreConfig.VolumeDataRestorePolicy
.VOLUME_DATA_RESTORE_POLICY_UNSPECIFIED
.getNumber()) {
size += com.google.protobuf.CodedOutputStream.computeEnumSize(1, policy_);
}
if (scopeCase_ == 2) {
size +=
com.google.protobuf.CodedOutputStream.computeEnumSize(2, ((java.lang.Integer) scope_));
}
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.RestoreConfig.VolumeDataRestorePolicyBinding)) {
return super.equals(obj);
}
com.google.cloud.gkebackup.v1.RestoreConfig.VolumeDataRestorePolicyBinding other =
(com.google.cloud.gkebackup.v1.RestoreConfig.VolumeDataRestorePolicyBinding) obj;
if (policy_ != other.policy_) return false;
if (!getScopeCase().equals(other.getScopeCase())) return false;
switch (scopeCase_) {
case 2:
if (getVolumeTypeValue() != other.getVolumeTypeValue()) 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();
hash = (37 * hash) + POLICY_FIELD_NUMBER;
hash = (53 * hash) + policy_;
switch (scopeCase_) {
case 2:
hash = (37 * hash) + VOLUME_TYPE_FIELD_NUMBER;
hash = (53 * hash) + getVolumeTypeValue();
break;
case 0:
default:
}
hash = (29 * hash) + getUnknownFields().hashCode();
memoizedHashCode = hash;
return hash;
}
public static com.google.cloud.gkebackup.v1.RestoreConfig.VolumeDataRestorePolicyBinding
parseFrom(java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.cloud.gkebackup.v1.RestoreConfig.VolumeDataRestorePolicyBinding
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.RestoreConfig.VolumeDataRestorePolicyBinding
parseFrom(com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.cloud.gkebackup.v1.RestoreConfig.VolumeDataRestorePolicyBinding
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.RestoreConfig.VolumeDataRestorePolicyBinding
parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.cloud.gkebackup.v1.RestoreConfig.VolumeDataRestorePolicyBinding
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.RestoreConfig.VolumeDataRestorePolicyBinding
parseFrom(java.io.InputStream input) throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
}
public static com.google.cloud.gkebackup.v1.RestoreConfig.VolumeDataRestorePolicyBinding
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.RestoreConfig.VolumeDataRestorePolicyBinding
parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input);
}
public static com.google.cloud.gkebackup.v1.RestoreConfig.VolumeDataRestorePolicyBinding
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.RestoreConfig.VolumeDataRestorePolicyBinding
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.RestoreConfig.VolumeDataRestorePolicyBinding
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.RestoreConfig.VolumeDataRestorePolicyBinding 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;
}
/**
*
*
*
* Binds resources in the scope to the given VolumeDataRestorePolicy.
*
*
* Protobuf type {@code google.cloud.gkebackup.v1.RestoreConfig.VolumeDataRestorePolicyBinding}
*/
public static final class Builder
extends com.google.protobuf.GeneratedMessageV3.Builder
implements
// @@protoc_insertion_point(builder_implements:google.cloud.gkebackup.v1.RestoreConfig.VolumeDataRestorePolicyBinding)
com.google.cloud.gkebackup.v1.RestoreConfig.VolumeDataRestorePolicyBindingOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
return com.google.cloud.gkebackup.v1.RestoreProto
.internal_static_google_cloud_gkebackup_v1_RestoreConfig_VolumeDataRestorePolicyBinding_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.google.cloud.gkebackup.v1.RestoreProto
.internal_static_google_cloud_gkebackup_v1_RestoreConfig_VolumeDataRestorePolicyBinding_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.google.cloud.gkebackup.v1.RestoreConfig.VolumeDataRestorePolicyBinding.class,
com.google.cloud.gkebackup.v1.RestoreConfig.VolumeDataRestorePolicyBinding.Builder
.class);
}
// Construct using
// com.google.cloud.gkebackup.v1.RestoreConfig.VolumeDataRestorePolicyBinding.newBuilder()
private Builder() {}
private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
}
@java.lang.Override
public Builder clear() {
super.clear();
bitField0_ = 0;
policy_ = 0;
scopeCase_ = 0;
scope_ = null;
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() {
return com.google.cloud.gkebackup.v1.RestoreProto
.internal_static_google_cloud_gkebackup_v1_RestoreConfig_VolumeDataRestorePolicyBinding_descriptor;
}
@java.lang.Override
public com.google.cloud.gkebackup.v1.RestoreConfig.VolumeDataRestorePolicyBinding
getDefaultInstanceForType() {
return com.google.cloud.gkebackup.v1.RestoreConfig.VolumeDataRestorePolicyBinding
.getDefaultInstance();
}
@java.lang.Override
public com.google.cloud.gkebackup.v1.RestoreConfig.VolumeDataRestorePolicyBinding build() {
com.google.cloud.gkebackup.v1.RestoreConfig.VolumeDataRestorePolicyBinding result =
buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public com.google.cloud.gkebackup.v1.RestoreConfig.VolumeDataRestorePolicyBinding
buildPartial() {
com.google.cloud.gkebackup.v1.RestoreConfig.VolumeDataRestorePolicyBinding result =
new com.google.cloud.gkebackup.v1.RestoreConfig.VolumeDataRestorePolicyBinding(this);
if (bitField0_ != 0) {
buildPartial0(result);
}
buildPartialOneofs(result);
onBuilt();
return result;
}
private void buildPartial0(
com.google.cloud.gkebackup.v1.RestoreConfig.VolumeDataRestorePolicyBinding result) {
int from_bitField0_ = bitField0_;
if (((from_bitField0_ & 0x00000001) != 0)) {
result.policy_ = policy_;
}
}
private void buildPartialOneofs(
com.google.cloud.gkebackup.v1.RestoreConfig.VolumeDataRestorePolicyBinding result) {
result.scopeCase_ = scopeCase_;
result.scope_ = this.scope_;
}
@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.RestoreConfig.VolumeDataRestorePolicyBinding) {
return mergeFrom(
(com.google.cloud.gkebackup.v1.RestoreConfig.VolumeDataRestorePolicyBinding) other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(
com.google.cloud.gkebackup.v1.RestoreConfig.VolumeDataRestorePolicyBinding other) {
if (other
== com.google.cloud.gkebackup.v1.RestoreConfig.VolumeDataRestorePolicyBinding
.getDefaultInstance()) return this;
if (other.policy_ != 0) {
setPolicyValue(other.getPolicyValue());
}
switch (other.getScopeCase()) {
case VOLUME_TYPE:
{
setVolumeTypeValue(other.getVolumeTypeValue());
break;
}
case SCOPE_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 8:
{
policy_ = input.readEnum();
bitField0_ |= 0x00000001;
break;
} // case 8
case 16:
{
int rawValue = input.readEnum();
scopeCase_ = 2;
scope_ = rawValue;
break;
} // case 16
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 scopeCase_ = 0;
private java.lang.Object scope_;
public ScopeCase getScopeCase() {
return ScopeCase.forNumber(scopeCase_);
}
public Builder clearScope() {
scopeCase_ = 0;
scope_ = null;
onChanged();
return this;
}
private int bitField0_;
private int policy_ = 0;
/**
*
*
*
* Required. The VolumeDataRestorePolicy to apply when restoring volumes in
* scope.
*
*
*
* .google.cloud.gkebackup.v1.RestoreConfig.VolumeDataRestorePolicy policy = 1 [(.google.api.field_behavior) = REQUIRED];
*
*
* @return The enum numeric value on the wire for policy.
*/
@java.lang.Override
public int getPolicyValue() {
return policy_;
}
/**
*
*
*
* Required. The VolumeDataRestorePolicy to apply when restoring volumes in
* scope.
*
*
*
* .google.cloud.gkebackup.v1.RestoreConfig.VolumeDataRestorePolicy policy = 1 [(.google.api.field_behavior) = REQUIRED];
*
*
* @param value The enum numeric value on the wire for policy to set.
* @return This builder for chaining.
*/
public Builder setPolicyValue(int value) {
policy_ = value;
bitField0_ |= 0x00000001;
onChanged();
return this;
}
/**
*
*
*
* Required. The VolumeDataRestorePolicy to apply when restoring volumes in
* scope.
*
*
*
* .google.cloud.gkebackup.v1.RestoreConfig.VolumeDataRestorePolicy policy = 1 [(.google.api.field_behavior) = REQUIRED];
*
*
* @return The policy.
*/
@java.lang.Override
public com.google.cloud.gkebackup.v1.RestoreConfig.VolumeDataRestorePolicy getPolicy() {
com.google.cloud.gkebackup.v1.RestoreConfig.VolumeDataRestorePolicy result =
com.google.cloud.gkebackup.v1.RestoreConfig.VolumeDataRestorePolicy.forNumber(policy_);
return result == null
? com.google.cloud.gkebackup.v1.RestoreConfig.VolumeDataRestorePolicy.UNRECOGNIZED
: result;
}
/**
*
*
*
* Required. The VolumeDataRestorePolicy to apply when restoring volumes in
* scope.
*
*
*
* .google.cloud.gkebackup.v1.RestoreConfig.VolumeDataRestorePolicy policy = 1 [(.google.api.field_behavior) = REQUIRED];
*
*
* @param value The policy to set.
* @return This builder for chaining.
*/
public Builder setPolicy(
com.google.cloud.gkebackup.v1.RestoreConfig.VolumeDataRestorePolicy value) {
if (value == null) {
throw new NullPointerException();
}
bitField0_ |= 0x00000001;
policy_ = value.getNumber();
onChanged();
return this;
}
/**
*
*
*
* Required. The VolumeDataRestorePolicy to apply when restoring volumes in
* scope.
*
*
*
* .google.cloud.gkebackup.v1.RestoreConfig.VolumeDataRestorePolicy policy = 1 [(.google.api.field_behavior) = REQUIRED];
*
*
* @return This builder for chaining.
*/
public Builder clearPolicy() {
bitField0_ = (bitField0_ & ~0x00000001);
policy_ = 0;
onChanged();
return this;
}
/**
*
*
*
* The volume type, as determined by the PVC's bound PV,
* to apply the policy to.
*
*
* .google.cloud.gkebackup.v1.VolumeTypeEnum.VolumeType volume_type = 2;
*
* @return Whether the volumeType field is set.
*/
@java.lang.Override
public boolean hasVolumeType() {
return scopeCase_ == 2;
}
/**
*
*
*
* The volume type, as determined by the PVC's bound PV,
* to apply the policy to.
*
*
* .google.cloud.gkebackup.v1.VolumeTypeEnum.VolumeType volume_type = 2;
*
* @return The enum numeric value on the wire for volumeType.
*/
@java.lang.Override
public int getVolumeTypeValue() {
if (scopeCase_ == 2) {
return ((java.lang.Integer) scope_).intValue();
}
return 0;
}
/**
*
*
*
* The volume type, as determined by the PVC's bound PV,
* to apply the policy to.
*
*
* .google.cloud.gkebackup.v1.VolumeTypeEnum.VolumeType volume_type = 2;
*
* @param value The enum numeric value on the wire for volumeType to set.
* @return This builder for chaining.
*/
public Builder setVolumeTypeValue(int value) {
scopeCase_ = 2;
scope_ = value;
onChanged();
return this;
}
/**
*
*
*
* The volume type, as determined by the PVC's bound PV,
* to apply the policy to.
*
*
* .google.cloud.gkebackup.v1.VolumeTypeEnum.VolumeType volume_type = 2;
*
* @return The volumeType.
*/
@java.lang.Override
public com.google.cloud.gkebackup.v1.VolumeTypeEnum.VolumeType getVolumeType() {
if (scopeCase_ == 2) {
com.google.cloud.gkebackup.v1.VolumeTypeEnum.VolumeType result =
com.google.cloud.gkebackup.v1.VolumeTypeEnum.VolumeType.forNumber(
(java.lang.Integer) scope_);
return result == null
? com.google.cloud.gkebackup.v1.VolumeTypeEnum.VolumeType.UNRECOGNIZED
: result;
}
return com.google.cloud.gkebackup.v1.VolumeTypeEnum.VolumeType.VOLUME_TYPE_UNSPECIFIED;
}
/**
*
*
*
* The volume type, as determined by the PVC's bound PV,
* to apply the policy to.
*
*
* .google.cloud.gkebackup.v1.VolumeTypeEnum.VolumeType volume_type = 2;
*
* @param value The volumeType to set.
* @return This builder for chaining.
*/
public Builder setVolumeType(com.google.cloud.gkebackup.v1.VolumeTypeEnum.VolumeType value) {
if (value == null) {
throw new NullPointerException();
}
scopeCase_ = 2;
scope_ = value.getNumber();
onChanged();
return this;
}
/**
*
*
*
* The volume type, as determined by the PVC's bound PV,
* to apply the policy to.
*
*
* .google.cloud.gkebackup.v1.VolumeTypeEnum.VolumeType volume_type = 2;
*
* @return This builder for chaining.
*/
public Builder clearVolumeType() {
if (scopeCase_ == 2) {
scopeCase_ = 0;
scope_ = null;
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.RestoreConfig.VolumeDataRestorePolicyBinding)
}
// @@protoc_insertion_point(class_scope:google.cloud.gkebackup.v1.RestoreConfig.VolumeDataRestorePolicyBinding)
private static final com.google.cloud.gkebackup.v1.RestoreConfig.VolumeDataRestorePolicyBinding
DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE =
new com.google.cloud.gkebackup.v1.RestoreConfig.VolumeDataRestorePolicyBinding();
}
public static com.google.cloud.gkebackup.v1.RestoreConfig.VolumeDataRestorePolicyBinding
getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser PARSER =
new com.google.protobuf.AbstractParser() {
@java.lang.Override
public VolumeDataRestorePolicyBinding 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.RestoreConfig.VolumeDataRestorePolicyBinding
getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
public interface RestoreOrderOrBuilder
extends
// @@protoc_insertion_point(interface_extends:google.cloud.gkebackup.v1.RestoreConfig.RestoreOrder)
com.google.protobuf.MessageOrBuilder {
/**
*
*
*
* Optional. Contains a list of group kind dependency pairs provided
* by the customer, that is used by Backup for GKE to
* generate a group kind restore order.
*
*
*
* repeated .google.cloud.gkebackup.v1.RestoreConfig.RestoreOrder.GroupKindDependency group_kind_dependencies = 1 [(.google.api.field_behavior) = OPTIONAL];
*
*/
java.util.List
getGroupKindDependenciesList();
/**
*
*
*
* Optional. Contains a list of group kind dependency pairs provided
* by the customer, that is used by Backup for GKE to
* generate a group kind restore order.
*
*
*
* repeated .google.cloud.gkebackup.v1.RestoreConfig.RestoreOrder.GroupKindDependency group_kind_dependencies = 1 [(.google.api.field_behavior) = OPTIONAL];
*
*/
com.google.cloud.gkebackup.v1.RestoreConfig.RestoreOrder.GroupKindDependency
getGroupKindDependencies(int index);
/**
*
*
*
* Optional. Contains a list of group kind dependency pairs provided
* by the customer, that is used by Backup for GKE to
* generate a group kind restore order.
*
*
*
* repeated .google.cloud.gkebackup.v1.RestoreConfig.RestoreOrder.GroupKindDependency group_kind_dependencies = 1 [(.google.api.field_behavior) = OPTIONAL];
*
*/
int getGroupKindDependenciesCount();
/**
*
*
*
* Optional. Contains a list of group kind dependency pairs provided
* by the customer, that is used by Backup for GKE to
* generate a group kind restore order.
*
*
*
* repeated .google.cloud.gkebackup.v1.RestoreConfig.RestoreOrder.GroupKindDependency group_kind_dependencies = 1 [(.google.api.field_behavior) = OPTIONAL];
*
*/
java.util.List<
? extends
com.google.cloud.gkebackup.v1.RestoreConfig.RestoreOrder
.GroupKindDependencyOrBuilder>
getGroupKindDependenciesOrBuilderList();
/**
*
*
*
* Optional. Contains a list of group kind dependency pairs provided
* by the customer, that is used by Backup for GKE to
* generate a group kind restore order.
*
*
*
* repeated .google.cloud.gkebackup.v1.RestoreConfig.RestoreOrder.GroupKindDependency group_kind_dependencies = 1 [(.google.api.field_behavior) = OPTIONAL];
*
*/
com.google.cloud.gkebackup.v1.RestoreConfig.RestoreOrder.GroupKindDependencyOrBuilder
getGroupKindDependenciesOrBuilder(int index);
}
/**
*
*
*
* Allows customers to specify dependencies between resources
* that Backup for GKE can use to compute a resasonable restore order.
*
*
* Protobuf type {@code google.cloud.gkebackup.v1.RestoreConfig.RestoreOrder}
*/
public static final class RestoreOrder extends com.google.protobuf.GeneratedMessageV3
implements
// @@protoc_insertion_point(message_implements:google.cloud.gkebackup.v1.RestoreConfig.RestoreOrder)
RestoreOrderOrBuilder {
private static final long serialVersionUID = 0L;
// Use RestoreOrder.newBuilder() to construct.
private RestoreOrder(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private RestoreOrder() {
groupKindDependencies_ = java.util.Collections.emptyList();
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(UnusedPrivateParameter unused) {
return new RestoreOrder();
}
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
return com.google.cloud.gkebackup.v1.RestoreProto
.internal_static_google_cloud_gkebackup_v1_RestoreConfig_RestoreOrder_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.google.cloud.gkebackup.v1.RestoreProto
.internal_static_google_cloud_gkebackup_v1_RestoreConfig_RestoreOrder_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.google.cloud.gkebackup.v1.RestoreConfig.RestoreOrder.class,
com.google.cloud.gkebackup.v1.RestoreConfig.RestoreOrder.Builder.class);
}
public interface GroupKindDependencyOrBuilder
extends
// @@protoc_insertion_point(interface_extends:google.cloud.gkebackup.v1.RestoreConfig.RestoreOrder.GroupKindDependency)
com.google.protobuf.MessageOrBuilder {
/**
*
*
*
* Required. The satisfying group kind must be restored first
* in order to satisfy the dependency.
*
*
*
* .google.cloud.gkebackup.v1.RestoreConfig.GroupKind satisfying = 1 [(.google.api.field_behavior) = REQUIRED];
*
*
* @return Whether the satisfying field is set.
*/
boolean hasSatisfying();
/**
*
*
*
* Required. The satisfying group kind must be restored first
* in order to satisfy the dependency.
*
*
*
* .google.cloud.gkebackup.v1.RestoreConfig.GroupKind satisfying = 1 [(.google.api.field_behavior) = REQUIRED];
*
*
* @return The satisfying.
*/
com.google.cloud.gkebackup.v1.RestoreConfig.GroupKind getSatisfying();
/**
*
*
*
* Required. The satisfying group kind must be restored first
* in order to satisfy the dependency.
*
*
*
* .google.cloud.gkebackup.v1.RestoreConfig.GroupKind satisfying = 1 [(.google.api.field_behavior) = REQUIRED];
*
*/
com.google.cloud.gkebackup.v1.RestoreConfig.GroupKindOrBuilder getSatisfyingOrBuilder();
/**
*
*
*
* Required. The requiring group kind requires that the other
* group kind be restored first.
*
*
*
* .google.cloud.gkebackup.v1.RestoreConfig.GroupKind requiring = 2 [(.google.api.field_behavior) = REQUIRED];
*
*
* @return Whether the requiring field is set.
*/
boolean hasRequiring();
/**
*
*
*
* Required. The requiring group kind requires that the other
* group kind be restored first.
*
*
*
* .google.cloud.gkebackup.v1.RestoreConfig.GroupKind requiring = 2 [(.google.api.field_behavior) = REQUIRED];
*
*
* @return The requiring.
*/
com.google.cloud.gkebackup.v1.RestoreConfig.GroupKind getRequiring();
/**
*
*
*
* Required. The requiring group kind requires that the other
* group kind be restored first.
*
*
*
* .google.cloud.gkebackup.v1.RestoreConfig.GroupKind requiring = 2 [(.google.api.field_behavior) = REQUIRED];
*
*/
com.google.cloud.gkebackup.v1.RestoreConfig.GroupKindOrBuilder getRequiringOrBuilder();
}
/**
*
*
*
* Defines a dependency between two group kinds.
*
*
* Protobuf type {@code
* google.cloud.gkebackup.v1.RestoreConfig.RestoreOrder.GroupKindDependency}
*/
public static final class GroupKindDependency extends com.google.protobuf.GeneratedMessageV3
implements
// @@protoc_insertion_point(message_implements:google.cloud.gkebackup.v1.RestoreConfig.RestoreOrder.GroupKindDependency)
GroupKindDependencyOrBuilder {
private static final long serialVersionUID = 0L;
// Use GroupKindDependency.newBuilder() to construct.
private GroupKindDependency(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private GroupKindDependency() {}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(UnusedPrivateParameter unused) {
return new GroupKindDependency();
}
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
return com.google.cloud.gkebackup.v1.RestoreProto
.internal_static_google_cloud_gkebackup_v1_RestoreConfig_RestoreOrder_GroupKindDependency_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.google.cloud.gkebackup.v1.RestoreProto
.internal_static_google_cloud_gkebackup_v1_RestoreConfig_RestoreOrder_GroupKindDependency_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.google.cloud.gkebackup.v1.RestoreConfig.RestoreOrder.GroupKindDependency.class,
com.google.cloud.gkebackup.v1.RestoreConfig.RestoreOrder.GroupKindDependency.Builder
.class);
}
private int bitField0_;
public static final int SATISFYING_FIELD_NUMBER = 1;
private com.google.cloud.gkebackup.v1.RestoreConfig.GroupKind satisfying_;
/**
*
*
*
* Required. The satisfying group kind must be restored first
* in order to satisfy the dependency.
*
*
*
* .google.cloud.gkebackup.v1.RestoreConfig.GroupKind satisfying = 1 [(.google.api.field_behavior) = REQUIRED];
*
*
* @return Whether the satisfying field is set.
*/
@java.lang.Override
public boolean hasSatisfying() {
return ((bitField0_ & 0x00000001) != 0);
}
/**
*
*
*
* Required. The satisfying group kind must be restored first
* in order to satisfy the dependency.
*
*
*
* .google.cloud.gkebackup.v1.RestoreConfig.GroupKind satisfying = 1 [(.google.api.field_behavior) = REQUIRED];
*
*
* @return The satisfying.
*/
@java.lang.Override
public com.google.cloud.gkebackup.v1.RestoreConfig.GroupKind getSatisfying() {
return satisfying_ == null
? com.google.cloud.gkebackup.v1.RestoreConfig.GroupKind.getDefaultInstance()
: satisfying_;
}
/**
*
*
*
* Required. The satisfying group kind must be restored first
* in order to satisfy the dependency.
*
*
*
* .google.cloud.gkebackup.v1.RestoreConfig.GroupKind satisfying = 1 [(.google.api.field_behavior) = REQUIRED];
*
*/
@java.lang.Override
public com.google.cloud.gkebackup.v1.RestoreConfig.GroupKindOrBuilder
getSatisfyingOrBuilder() {
return satisfying_ == null
? com.google.cloud.gkebackup.v1.RestoreConfig.GroupKind.getDefaultInstance()
: satisfying_;
}
public static final int REQUIRING_FIELD_NUMBER = 2;
private com.google.cloud.gkebackup.v1.RestoreConfig.GroupKind requiring_;
/**
*
*
*
* Required. The requiring group kind requires that the other
* group kind be restored first.
*
*
*
* .google.cloud.gkebackup.v1.RestoreConfig.GroupKind requiring = 2 [(.google.api.field_behavior) = REQUIRED];
*
*
* @return Whether the requiring field is set.
*/
@java.lang.Override
public boolean hasRequiring() {
return ((bitField0_ & 0x00000002) != 0);
}
/**
*
*
*
* Required. The requiring group kind requires that the other
* group kind be restored first.
*
*
*
* .google.cloud.gkebackup.v1.RestoreConfig.GroupKind requiring = 2 [(.google.api.field_behavior) = REQUIRED];
*
*
* @return The requiring.
*/
@java.lang.Override
public com.google.cloud.gkebackup.v1.RestoreConfig.GroupKind getRequiring() {
return requiring_ == null
? com.google.cloud.gkebackup.v1.RestoreConfig.GroupKind.getDefaultInstance()
: requiring_;
}
/**
*
*
*
* Required. The requiring group kind requires that the other
* group kind be restored first.
*
*
*
* .google.cloud.gkebackup.v1.RestoreConfig.GroupKind requiring = 2 [(.google.api.field_behavior) = REQUIRED];
*
*/
@java.lang.Override
public com.google.cloud.gkebackup.v1.RestoreConfig.GroupKindOrBuilder
getRequiringOrBuilder() {
return requiring_ == null
? com.google.cloud.gkebackup.v1.RestoreConfig.GroupKind.getDefaultInstance()
: requiring_;
}
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, getSatisfying());
}
if (((bitField0_ & 0x00000002) != 0)) {
output.writeMessage(2, getRequiring());
}
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, getSatisfying());
}
if (((bitField0_ & 0x00000002) != 0)) {
size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getRequiring());
}
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.RestoreConfig.RestoreOrder.GroupKindDependency)) {
return super.equals(obj);
}
com.google.cloud.gkebackup.v1.RestoreConfig.RestoreOrder.GroupKindDependency other =
(com.google.cloud.gkebackup.v1.RestoreConfig.RestoreOrder.GroupKindDependency) obj;
if (hasSatisfying() != other.hasSatisfying()) return false;
if (hasSatisfying()) {
if (!getSatisfying().equals(other.getSatisfying())) return false;
}
if (hasRequiring() != other.hasRequiring()) return false;
if (hasRequiring()) {
if (!getRequiring().equals(other.getRequiring())) 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 (hasSatisfying()) {
hash = (37 * hash) + SATISFYING_FIELD_NUMBER;
hash = (53 * hash) + getSatisfying().hashCode();
}
if (hasRequiring()) {
hash = (37 * hash) + REQUIRING_FIELD_NUMBER;
hash = (53 * hash) + getRequiring().hashCode();
}
hash = (29 * hash) + getUnknownFields().hashCode();
memoizedHashCode = hash;
return hash;
}
public static com.google.cloud.gkebackup.v1.RestoreConfig.RestoreOrder.GroupKindDependency
parseFrom(java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.cloud.gkebackup.v1.RestoreConfig.RestoreOrder.GroupKindDependency
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.RestoreConfig.RestoreOrder.GroupKindDependency
parseFrom(com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.cloud.gkebackup.v1.RestoreConfig.RestoreOrder.GroupKindDependency
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.RestoreConfig.RestoreOrder.GroupKindDependency
parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.cloud.gkebackup.v1.RestoreConfig.RestoreOrder.GroupKindDependency
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.RestoreConfig.RestoreOrder.GroupKindDependency
parseFrom(java.io.InputStream input) throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
}
public static com.google.cloud.gkebackup.v1.RestoreConfig.RestoreOrder.GroupKindDependency
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.RestoreConfig.RestoreOrder.GroupKindDependency
parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input);
}
public static com.google.cloud.gkebackup.v1.RestoreConfig.RestoreOrder.GroupKindDependency
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.RestoreConfig.RestoreOrder.GroupKindDependency
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.RestoreConfig.RestoreOrder.GroupKindDependency
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.RestoreConfig.RestoreOrder.GroupKindDependency 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 dependency between two group kinds.
*
*
* Protobuf type {@code
* google.cloud.gkebackup.v1.RestoreConfig.RestoreOrder.GroupKindDependency}
*/
public static final class Builder
extends com.google.protobuf.GeneratedMessageV3.Builder
implements
// @@protoc_insertion_point(builder_implements:google.cloud.gkebackup.v1.RestoreConfig.RestoreOrder.GroupKindDependency)
com.google.cloud.gkebackup.v1.RestoreConfig.RestoreOrder.GroupKindDependencyOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
return com.google.cloud.gkebackup.v1.RestoreProto
.internal_static_google_cloud_gkebackup_v1_RestoreConfig_RestoreOrder_GroupKindDependency_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.google.cloud.gkebackup.v1.RestoreProto
.internal_static_google_cloud_gkebackup_v1_RestoreConfig_RestoreOrder_GroupKindDependency_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.google.cloud.gkebackup.v1.RestoreConfig.RestoreOrder.GroupKindDependency
.class,
com.google.cloud.gkebackup.v1.RestoreConfig.RestoreOrder.GroupKindDependency
.Builder.class);
}
// Construct using
// com.google.cloud.gkebackup.v1.RestoreConfig.RestoreOrder.GroupKindDependency.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {
getSatisfyingFieldBuilder();
getRequiringFieldBuilder();
}
}
@java.lang.Override
public Builder clear() {
super.clear();
bitField0_ = 0;
satisfying_ = null;
if (satisfyingBuilder_ != null) {
satisfyingBuilder_.dispose();
satisfyingBuilder_ = null;
}
requiring_ = null;
if (requiringBuilder_ != null) {
requiringBuilder_.dispose();
requiringBuilder_ = null;
}
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() {
return com.google.cloud.gkebackup.v1.RestoreProto
.internal_static_google_cloud_gkebackup_v1_RestoreConfig_RestoreOrder_GroupKindDependency_descriptor;
}
@java.lang.Override
public com.google.cloud.gkebackup.v1.RestoreConfig.RestoreOrder.GroupKindDependency
getDefaultInstanceForType() {
return com.google.cloud.gkebackup.v1.RestoreConfig.RestoreOrder.GroupKindDependency
.getDefaultInstance();
}
@java.lang.Override
public com.google.cloud.gkebackup.v1.RestoreConfig.RestoreOrder.GroupKindDependency
build() {
com.google.cloud.gkebackup.v1.RestoreConfig.RestoreOrder.GroupKindDependency result =
buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public com.google.cloud.gkebackup.v1.RestoreConfig.RestoreOrder.GroupKindDependency
buildPartial() {
com.google.cloud.gkebackup.v1.RestoreConfig.RestoreOrder.GroupKindDependency result =
new com.google.cloud.gkebackup.v1.RestoreConfig.RestoreOrder.GroupKindDependency(
this);
if (bitField0_ != 0) {
buildPartial0(result);
}
onBuilt();
return result;
}
private void buildPartial0(
com.google.cloud.gkebackup.v1.RestoreConfig.RestoreOrder.GroupKindDependency result) {
int from_bitField0_ = bitField0_;
int to_bitField0_ = 0;
if (((from_bitField0_ & 0x00000001) != 0)) {
result.satisfying_ =
satisfyingBuilder_ == null ? satisfying_ : satisfyingBuilder_.build();
to_bitField0_ |= 0x00000001;
}
if (((from_bitField0_ & 0x00000002) != 0)) {
result.requiring_ = requiringBuilder_ == null ? requiring_ : requiringBuilder_.build();
to_bitField0_ |= 0x00000002;
}
result.bitField0_ |= to_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.RestoreConfig.RestoreOrder.GroupKindDependency) {
return mergeFrom(
(com.google.cloud.gkebackup.v1.RestoreConfig.RestoreOrder.GroupKindDependency)
other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(
com.google.cloud.gkebackup.v1.RestoreConfig.RestoreOrder.GroupKindDependency other) {
if (other
== com.google.cloud.gkebackup.v1.RestoreConfig.RestoreOrder.GroupKindDependency
.getDefaultInstance()) return this;
if (other.hasSatisfying()) {
mergeSatisfying(other.getSatisfying());
}
if (other.hasRequiring()) {
mergeRequiring(other.getRequiring());
}
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(getSatisfyingFieldBuilder().getBuilder(), extensionRegistry);
bitField0_ |= 0x00000001;
break;
} // case 10
case 18:
{
input.readMessage(getRequiringFieldBuilder().getBuilder(), extensionRegistry);
bitField0_ |= 0x00000002;
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 com.google.cloud.gkebackup.v1.RestoreConfig.GroupKind satisfying_;
private com.google.protobuf.SingleFieldBuilderV3<
com.google.cloud.gkebackup.v1.RestoreConfig.GroupKind,
com.google.cloud.gkebackup.v1.RestoreConfig.GroupKind.Builder,
com.google.cloud.gkebackup.v1.RestoreConfig.GroupKindOrBuilder>
satisfyingBuilder_;
/**
*
*
*
* Required. The satisfying group kind must be restored first
* in order to satisfy the dependency.
*
*
*
* .google.cloud.gkebackup.v1.RestoreConfig.GroupKind satisfying = 1 [(.google.api.field_behavior) = REQUIRED];
*
*
* @return Whether the satisfying field is set.
*/
public boolean hasSatisfying() {
return ((bitField0_ & 0x00000001) != 0);
}
/**
*
*
*
* Required. The satisfying group kind must be restored first
* in order to satisfy the dependency.
*
*
*
* .google.cloud.gkebackup.v1.RestoreConfig.GroupKind satisfying = 1 [(.google.api.field_behavior) = REQUIRED];
*
*
* @return The satisfying.
*/
public com.google.cloud.gkebackup.v1.RestoreConfig.GroupKind getSatisfying() {
if (satisfyingBuilder_ == null) {
return satisfying_ == null
? com.google.cloud.gkebackup.v1.RestoreConfig.GroupKind.getDefaultInstance()
: satisfying_;
} else {
return satisfyingBuilder_.getMessage();
}
}
/**
*
*
*
* Required. The satisfying group kind must be restored first
* in order to satisfy the dependency.
*
*
*
* .google.cloud.gkebackup.v1.RestoreConfig.GroupKind satisfying = 1 [(.google.api.field_behavior) = REQUIRED];
*
*/
public Builder setSatisfying(com.google.cloud.gkebackup.v1.RestoreConfig.GroupKind value) {
if (satisfyingBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
satisfying_ = value;
} else {
satisfyingBuilder_.setMessage(value);
}
bitField0_ |= 0x00000001;
onChanged();
return this;
}
/**
*
*
*
* Required. The satisfying group kind must be restored first
* in order to satisfy the dependency.
*
*
*
* .google.cloud.gkebackup.v1.RestoreConfig.GroupKind satisfying = 1 [(.google.api.field_behavior) = REQUIRED];
*
*/
public Builder setSatisfying(
com.google.cloud.gkebackup.v1.RestoreConfig.GroupKind.Builder builderForValue) {
if (satisfyingBuilder_ == null) {
satisfying_ = builderForValue.build();
} else {
satisfyingBuilder_.setMessage(builderForValue.build());
}
bitField0_ |= 0x00000001;
onChanged();
return this;
}
/**
*
*
*
* Required. The satisfying group kind must be restored first
* in order to satisfy the dependency.
*
*
*
* .google.cloud.gkebackup.v1.RestoreConfig.GroupKind satisfying = 1 [(.google.api.field_behavior) = REQUIRED];
*
*/
public Builder mergeSatisfying(
com.google.cloud.gkebackup.v1.RestoreConfig.GroupKind value) {
if (satisfyingBuilder_ == null) {
if (((bitField0_ & 0x00000001) != 0)
&& satisfying_ != null
&& satisfying_
!= com.google.cloud.gkebackup.v1.RestoreConfig.GroupKind.getDefaultInstance()) {
getSatisfyingBuilder().mergeFrom(value);
} else {
satisfying_ = value;
}
} else {
satisfyingBuilder_.mergeFrom(value);
}
if (satisfying_ != null) {
bitField0_ |= 0x00000001;
onChanged();
}
return this;
}
/**
*
*
*
* Required. The satisfying group kind must be restored first
* in order to satisfy the dependency.
*
*
*
* .google.cloud.gkebackup.v1.RestoreConfig.GroupKind satisfying = 1 [(.google.api.field_behavior) = REQUIRED];
*
*/
public Builder clearSatisfying() {
bitField0_ = (bitField0_ & ~0x00000001);
satisfying_ = null;
if (satisfyingBuilder_ != null) {
satisfyingBuilder_.dispose();
satisfyingBuilder_ = null;
}
onChanged();
return this;
}
/**
*
*
*
* Required. The satisfying group kind must be restored first
* in order to satisfy the dependency.
*
*
*
* .google.cloud.gkebackup.v1.RestoreConfig.GroupKind satisfying = 1 [(.google.api.field_behavior) = REQUIRED];
*
*/
public com.google.cloud.gkebackup.v1.RestoreConfig.GroupKind.Builder
getSatisfyingBuilder() {
bitField0_ |= 0x00000001;
onChanged();
return getSatisfyingFieldBuilder().getBuilder();
}
/**
*
*
*
* Required. The satisfying group kind must be restored first
* in order to satisfy the dependency.
*
*
*
* .google.cloud.gkebackup.v1.RestoreConfig.GroupKind satisfying = 1 [(.google.api.field_behavior) = REQUIRED];
*
*/
public com.google.cloud.gkebackup.v1.RestoreConfig.GroupKindOrBuilder
getSatisfyingOrBuilder() {
if (satisfyingBuilder_ != null) {
return satisfyingBuilder_.getMessageOrBuilder();
} else {
return satisfying_ == null
? com.google.cloud.gkebackup.v1.RestoreConfig.GroupKind.getDefaultInstance()
: satisfying_;
}
}
/**
*
*
*
* Required. The satisfying group kind must be restored first
* in order to satisfy the dependency.
*
*
*
* .google.cloud.gkebackup.v1.RestoreConfig.GroupKind satisfying = 1 [(.google.api.field_behavior) = REQUIRED];
*
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.google.cloud.gkebackup.v1.RestoreConfig.GroupKind,
com.google.cloud.gkebackup.v1.RestoreConfig.GroupKind.Builder,
com.google.cloud.gkebackup.v1.RestoreConfig.GroupKindOrBuilder>
getSatisfyingFieldBuilder() {
if (satisfyingBuilder_ == null) {
satisfyingBuilder_ =
new com.google.protobuf.SingleFieldBuilderV3<
com.google.cloud.gkebackup.v1.RestoreConfig.GroupKind,
com.google.cloud.gkebackup.v1.RestoreConfig.GroupKind.Builder,
com.google.cloud.gkebackup.v1.RestoreConfig.GroupKindOrBuilder>(
getSatisfying(), getParentForChildren(), isClean());
satisfying_ = null;
}
return satisfyingBuilder_;
}
private com.google.cloud.gkebackup.v1.RestoreConfig.GroupKind requiring_;
private com.google.protobuf.SingleFieldBuilderV3<
com.google.cloud.gkebackup.v1.RestoreConfig.GroupKind,
com.google.cloud.gkebackup.v1.RestoreConfig.GroupKind.Builder,
com.google.cloud.gkebackup.v1.RestoreConfig.GroupKindOrBuilder>
requiringBuilder_;
/**
*
*
*
* Required. The requiring group kind requires that the other
* group kind be restored first.
*
*
*
* .google.cloud.gkebackup.v1.RestoreConfig.GroupKind requiring = 2 [(.google.api.field_behavior) = REQUIRED];
*
*
* @return Whether the requiring field is set.
*/
public boolean hasRequiring() {
return ((bitField0_ & 0x00000002) != 0);
}
/**
*
*
*
* Required. The requiring group kind requires that the other
* group kind be restored first.
*
*
*
* .google.cloud.gkebackup.v1.RestoreConfig.GroupKind requiring = 2 [(.google.api.field_behavior) = REQUIRED];
*
*
* @return The requiring.
*/
public com.google.cloud.gkebackup.v1.RestoreConfig.GroupKind getRequiring() {
if (requiringBuilder_ == null) {
return requiring_ == null
? com.google.cloud.gkebackup.v1.RestoreConfig.GroupKind.getDefaultInstance()
: requiring_;
} else {
return requiringBuilder_.getMessage();
}
}
/**
*
*
*
* Required. The requiring group kind requires that the other
* group kind be restored first.
*
*
*
* .google.cloud.gkebackup.v1.RestoreConfig.GroupKind requiring = 2 [(.google.api.field_behavior) = REQUIRED];
*
*/
public Builder setRequiring(com.google.cloud.gkebackup.v1.RestoreConfig.GroupKind value) {
if (requiringBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
requiring_ = value;
} else {
requiringBuilder_.setMessage(value);
}
bitField0_ |= 0x00000002;
onChanged();
return this;
}
/**
*
*
*
* Required. The requiring group kind requires that the other
* group kind be restored first.
*
*
*
* .google.cloud.gkebackup.v1.RestoreConfig.GroupKind requiring = 2 [(.google.api.field_behavior) = REQUIRED];
*
*/
public Builder setRequiring(
com.google.cloud.gkebackup.v1.RestoreConfig.GroupKind.Builder builderForValue) {
if (requiringBuilder_ == null) {
requiring_ = builderForValue.build();
} else {
requiringBuilder_.setMessage(builderForValue.build());
}
bitField0_ |= 0x00000002;
onChanged();
return this;
}
/**
*
*
*
* Required. The requiring group kind requires that the other
* group kind be restored first.
*
*
*
* .google.cloud.gkebackup.v1.RestoreConfig.GroupKind requiring = 2 [(.google.api.field_behavior) = REQUIRED];
*
*/
public Builder mergeRequiring(com.google.cloud.gkebackup.v1.RestoreConfig.GroupKind value) {
if (requiringBuilder_ == null) {
if (((bitField0_ & 0x00000002) != 0)
&& requiring_ != null
&& requiring_
!= com.google.cloud.gkebackup.v1.RestoreConfig.GroupKind.getDefaultInstance()) {
getRequiringBuilder().mergeFrom(value);
} else {
requiring_ = value;
}
} else {
requiringBuilder_.mergeFrom(value);
}
if (requiring_ != null) {
bitField0_ |= 0x00000002;
onChanged();
}
return this;
}
/**
*
*
*
* Required. The requiring group kind requires that the other
* group kind be restored first.
*
*
*
* .google.cloud.gkebackup.v1.RestoreConfig.GroupKind requiring = 2 [(.google.api.field_behavior) = REQUIRED];
*
*/
public Builder clearRequiring() {
bitField0_ = (bitField0_ & ~0x00000002);
requiring_ = null;
if (requiringBuilder_ != null) {
requiringBuilder_.dispose();
requiringBuilder_ = null;
}
onChanged();
return this;
}
/**
*
*
*
* Required. The requiring group kind requires that the other
* group kind be restored first.
*
*
*
* .google.cloud.gkebackup.v1.RestoreConfig.GroupKind requiring = 2 [(.google.api.field_behavior) = REQUIRED];
*
*/
public com.google.cloud.gkebackup.v1.RestoreConfig.GroupKind.Builder getRequiringBuilder() {
bitField0_ |= 0x00000002;
onChanged();
return getRequiringFieldBuilder().getBuilder();
}
/**
*
*
*
* Required. The requiring group kind requires that the other
* group kind be restored first.
*
*
*
* .google.cloud.gkebackup.v1.RestoreConfig.GroupKind requiring = 2 [(.google.api.field_behavior) = REQUIRED];
*
*/
public com.google.cloud.gkebackup.v1.RestoreConfig.GroupKindOrBuilder
getRequiringOrBuilder() {
if (requiringBuilder_ != null) {
return requiringBuilder_.getMessageOrBuilder();
} else {
return requiring_ == null
? com.google.cloud.gkebackup.v1.RestoreConfig.GroupKind.getDefaultInstance()
: requiring_;
}
}
/**
*
*
*
* Required. The requiring group kind requires that the other
* group kind be restored first.
*
*
*
* .google.cloud.gkebackup.v1.RestoreConfig.GroupKind requiring = 2 [(.google.api.field_behavior) = REQUIRED];
*
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.google.cloud.gkebackup.v1.RestoreConfig.GroupKind,
com.google.cloud.gkebackup.v1.RestoreConfig.GroupKind.Builder,
com.google.cloud.gkebackup.v1.RestoreConfig.GroupKindOrBuilder>
getRequiringFieldBuilder() {
if (requiringBuilder_ == null) {
requiringBuilder_ =
new com.google.protobuf.SingleFieldBuilderV3<
com.google.cloud.gkebackup.v1.RestoreConfig.GroupKind,
com.google.cloud.gkebackup.v1.RestoreConfig.GroupKind.Builder,
com.google.cloud.gkebackup.v1.RestoreConfig.GroupKindOrBuilder>(
getRequiring(), getParentForChildren(), isClean());
requiring_ = null;
}
return requiringBuilder_;
}
@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.RestoreConfig.RestoreOrder.GroupKindDependency)
}
// @@protoc_insertion_point(class_scope:google.cloud.gkebackup.v1.RestoreConfig.RestoreOrder.GroupKindDependency)
private static final com.google.cloud.gkebackup.v1.RestoreConfig.RestoreOrder
.GroupKindDependency
DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE =
new com.google.cloud.gkebackup.v1.RestoreConfig.RestoreOrder.GroupKindDependency();
}
public static com.google.cloud.gkebackup.v1.RestoreConfig.RestoreOrder.GroupKindDependency
getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser PARSER =
new com.google.protobuf.AbstractParser() {
@java.lang.Override
public GroupKindDependency 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.RestoreConfig.RestoreOrder.GroupKindDependency
getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
public static final int GROUP_KIND_DEPENDENCIES_FIELD_NUMBER = 1;
@SuppressWarnings("serial")
private java.util.List<
com.google.cloud.gkebackup.v1.RestoreConfig.RestoreOrder.GroupKindDependency>
groupKindDependencies_;
/**
*
*
*
* Optional. Contains a list of group kind dependency pairs provided
* by the customer, that is used by Backup for GKE to
* generate a group kind restore order.
*
*
*
* repeated .google.cloud.gkebackup.v1.RestoreConfig.RestoreOrder.GroupKindDependency group_kind_dependencies = 1 [(.google.api.field_behavior) = OPTIONAL];
*
*/
@java.lang.Override
public java.util.List<
com.google.cloud.gkebackup.v1.RestoreConfig.RestoreOrder.GroupKindDependency>
getGroupKindDependenciesList() {
return groupKindDependencies_;
}
/**
*
*
*
* Optional. Contains a list of group kind dependency pairs provided
* by the customer, that is used by Backup for GKE to
* generate a group kind restore order.
*
*
*
* repeated .google.cloud.gkebackup.v1.RestoreConfig.RestoreOrder.GroupKindDependency group_kind_dependencies = 1 [(.google.api.field_behavior) = OPTIONAL];
*
*/
@java.lang.Override
public java.util.List<
? extends
com.google.cloud.gkebackup.v1.RestoreConfig.RestoreOrder
.GroupKindDependencyOrBuilder>
getGroupKindDependenciesOrBuilderList() {
return groupKindDependencies_;
}
/**
*
*
*
* Optional. Contains a list of group kind dependency pairs provided
* by the customer, that is used by Backup for GKE to
* generate a group kind restore order.
*
*
*
* repeated .google.cloud.gkebackup.v1.RestoreConfig.RestoreOrder.GroupKindDependency group_kind_dependencies = 1 [(.google.api.field_behavior) = OPTIONAL];
*
*/
@java.lang.Override
public int getGroupKindDependenciesCount() {
return groupKindDependencies_.size();
}
/**
*
*
*
* Optional. Contains a list of group kind dependency pairs provided
* by the customer, that is used by Backup for GKE to
* generate a group kind restore order.
*
*
*
* repeated .google.cloud.gkebackup.v1.RestoreConfig.RestoreOrder.GroupKindDependency group_kind_dependencies = 1 [(.google.api.field_behavior) = OPTIONAL];
*
*/
@java.lang.Override
public com.google.cloud.gkebackup.v1.RestoreConfig.RestoreOrder.GroupKindDependency
getGroupKindDependencies(int index) {
return groupKindDependencies_.get(index);
}
/**
*
*
*
* Optional. Contains a list of group kind dependency pairs provided
* by the customer, that is used by Backup for GKE to
* generate a group kind restore order.
*
*
*
* repeated .google.cloud.gkebackup.v1.RestoreConfig.RestoreOrder.GroupKindDependency group_kind_dependencies = 1 [(.google.api.field_behavior) = OPTIONAL];
*
*/
@java.lang.Override
public com.google.cloud.gkebackup.v1.RestoreConfig.RestoreOrder.GroupKindDependencyOrBuilder
getGroupKindDependenciesOrBuilder(int index) {
return groupKindDependencies_.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 {
for (int i = 0; i < groupKindDependencies_.size(); i++) {
output.writeMessage(1, groupKindDependencies_.get(i));
}
getUnknownFields().writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
for (int i = 0; i < groupKindDependencies_.size(); i++) {
size +=
com.google.protobuf.CodedOutputStream.computeMessageSize(
1, groupKindDependencies_.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.RestoreConfig.RestoreOrder)) {
return super.equals(obj);
}
com.google.cloud.gkebackup.v1.RestoreConfig.RestoreOrder other =
(com.google.cloud.gkebackup.v1.RestoreConfig.RestoreOrder) obj;
if (!getGroupKindDependenciesList().equals(other.getGroupKindDependenciesList()))
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 (getGroupKindDependenciesCount() > 0) {
hash = (37 * hash) + GROUP_KIND_DEPENDENCIES_FIELD_NUMBER;
hash = (53 * hash) + getGroupKindDependenciesList().hashCode();
}
hash = (29 * hash) + getUnknownFields().hashCode();
memoizedHashCode = hash;
return hash;
}
public static com.google.cloud.gkebackup.v1.RestoreConfig.RestoreOrder parseFrom(
java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.cloud.gkebackup.v1.RestoreConfig.RestoreOrder 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.RestoreConfig.RestoreOrder parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.cloud.gkebackup.v1.RestoreConfig.RestoreOrder 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.RestoreConfig.RestoreOrder parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.cloud.gkebackup.v1.RestoreConfig.RestoreOrder 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.RestoreConfig.RestoreOrder parseFrom(
java.io.InputStream input) throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
}
public static com.google.cloud.gkebackup.v1.RestoreConfig.RestoreOrder 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.RestoreConfig.RestoreOrder parseDelimitedFrom(
java.io.InputStream input) throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input);
}
public static com.google.cloud.gkebackup.v1.RestoreConfig.RestoreOrder 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.RestoreConfig.RestoreOrder 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.RestoreConfig.RestoreOrder 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.RestoreConfig.RestoreOrder 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;
}
/**
*
*
*
* Allows customers to specify dependencies between resources
* that Backup for GKE can use to compute a resasonable restore order.
*
*
* Protobuf type {@code google.cloud.gkebackup.v1.RestoreConfig.RestoreOrder}
*/
public static final class Builder
extends com.google.protobuf.GeneratedMessageV3.Builder
implements
// @@protoc_insertion_point(builder_implements:google.cloud.gkebackup.v1.RestoreConfig.RestoreOrder)
com.google.cloud.gkebackup.v1.RestoreConfig.RestoreOrderOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
return com.google.cloud.gkebackup.v1.RestoreProto
.internal_static_google_cloud_gkebackup_v1_RestoreConfig_RestoreOrder_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.google.cloud.gkebackup.v1.RestoreProto
.internal_static_google_cloud_gkebackup_v1_RestoreConfig_RestoreOrder_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.google.cloud.gkebackup.v1.RestoreConfig.RestoreOrder.class,
com.google.cloud.gkebackup.v1.RestoreConfig.RestoreOrder.Builder.class);
}
// Construct using com.google.cloud.gkebackup.v1.RestoreConfig.RestoreOrder.newBuilder()
private Builder() {}
private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
}
@java.lang.Override
public Builder clear() {
super.clear();
bitField0_ = 0;
if (groupKindDependenciesBuilder_ == null) {
groupKindDependencies_ = java.util.Collections.emptyList();
} else {
groupKindDependencies_ = null;
groupKindDependenciesBuilder_.clear();
}
bitField0_ = (bitField0_ & ~0x00000001);
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() {
return com.google.cloud.gkebackup.v1.RestoreProto
.internal_static_google_cloud_gkebackup_v1_RestoreConfig_RestoreOrder_descriptor;
}
@java.lang.Override
public com.google.cloud.gkebackup.v1.RestoreConfig.RestoreOrder getDefaultInstanceForType() {
return com.google.cloud.gkebackup.v1.RestoreConfig.RestoreOrder.getDefaultInstance();
}
@java.lang.Override
public com.google.cloud.gkebackup.v1.RestoreConfig.RestoreOrder build() {
com.google.cloud.gkebackup.v1.RestoreConfig.RestoreOrder result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public com.google.cloud.gkebackup.v1.RestoreConfig.RestoreOrder buildPartial() {
com.google.cloud.gkebackup.v1.RestoreConfig.RestoreOrder result =
new com.google.cloud.gkebackup.v1.RestoreConfig.RestoreOrder(this);
buildPartialRepeatedFields(result);
if (bitField0_ != 0) {
buildPartial0(result);
}
onBuilt();
return result;
}
private void buildPartialRepeatedFields(
com.google.cloud.gkebackup.v1.RestoreConfig.RestoreOrder result) {
if (groupKindDependenciesBuilder_ == null) {
if (((bitField0_ & 0x00000001) != 0)) {
groupKindDependencies_ = java.util.Collections.unmodifiableList(groupKindDependencies_);
bitField0_ = (bitField0_ & ~0x00000001);
}
result.groupKindDependencies_ = groupKindDependencies_;
} else {
result.groupKindDependencies_ = groupKindDependenciesBuilder_.build();
}
}
private void buildPartial0(com.google.cloud.gkebackup.v1.RestoreConfig.RestoreOrder 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.RestoreConfig.RestoreOrder) {
return mergeFrom((com.google.cloud.gkebackup.v1.RestoreConfig.RestoreOrder) other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(com.google.cloud.gkebackup.v1.RestoreConfig.RestoreOrder other) {
if (other == com.google.cloud.gkebackup.v1.RestoreConfig.RestoreOrder.getDefaultInstance())
return this;
if (groupKindDependenciesBuilder_ == null) {
if (!other.groupKindDependencies_.isEmpty()) {
if (groupKindDependencies_.isEmpty()) {
groupKindDependencies_ = other.groupKindDependencies_;
bitField0_ = (bitField0_ & ~0x00000001);
} else {
ensureGroupKindDependenciesIsMutable();
groupKindDependencies_.addAll(other.groupKindDependencies_);
}
onChanged();
}
} else {
if (!other.groupKindDependencies_.isEmpty()) {
if (groupKindDependenciesBuilder_.isEmpty()) {
groupKindDependenciesBuilder_.dispose();
groupKindDependenciesBuilder_ = null;
groupKindDependencies_ = other.groupKindDependencies_;
bitField0_ = (bitField0_ & ~0x00000001);
groupKindDependenciesBuilder_ =
com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders
? getGroupKindDependenciesFieldBuilder()
: null;
} else {
groupKindDependenciesBuilder_.addAllMessages(other.groupKindDependencies_);
}
}
}
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:
{
com.google.cloud.gkebackup.v1.RestoreConfig.RestoreOrder.GroupKindDependency m =
input.readMessage(
com.google.cloud.gkebackup.v1.RestoreConfig.RestoreOrder
.GroupKindDependency.parser(),
extensionRegistry);
if (groupKindDependenciesBuilder_ == null) {
ensureGroupKindDependenciesIsMutable();
groupKindDependencies_.add(m);
} else {
groupKindDependenciesBuilder_.addMessage(m);
}
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<
com.google.cloud.gkebackup.v1.RestoreConfig.RestoreOrder.GroupKindDependency>
groupKindDependencies_ = java.util.Collections.emptyList();
private void ensureGroupKindDependenciesIsMutable() {
if (!((bitField0_ & 0x00000001) != 0)) {
groupKindDependencies_ =
new java.util.ArrayList<
com.google.cloud.gkebackup.v1.RestoreConfig.RestoreOrder.GroupKindDependency>(
groupKindDependencies_);
bitField0_ |= 0x00000001;
}
}
private com.google.protobuf.RepeatedFieldBuilderV3<
com.google.cloud.gkebackup.v1.RestoreConfig.RestoreOrder.GroupKindDependency,
com.google.cloud.gkebackup.v1.RestoreConfig.RestoreOrder.GroupKindDependency.Builder,
com.google.cloud.gkebackup.v1.RestoreConfig.RestoreOrder.GroupKindDependencyOrBuilder>
groupKindDependenciesBuilder_;
/**
*
*
*
* Optional. Contains a list of group kind dependency pairs provided
* by the customer, that is used by Backup for GKE to
* generate a group kind restore order.
*
*
*
* repeated .google.cloud.gkebackup.v1.RestoreConfig.RestoreOrder.GroupKindDependency group_kind_dependencies = 1 [(.google.api.field_behavior) = OPTIONAL];
*
*/
public java.util.List<
com.google.cloud.gkebackup.v1.RestoreConfig.RestoreOrder.GroupKindDependency>
getGroupKindDependenciesList() {
if (groupKindDependenciesBuilder_ == null) {
return java.util.Collections.unmodifiableList(groupKindDependencies_);
} else {
return groupKindDependenciesBuilder_.getMessageList();
}
}
/**
*
*
*
* Optional. Contains a list of group kind dependency pairs provided
* by the customer, that is used by Backup for GKE to
* generate a group kind restore order.
*
*
*
* repeated .google.cloud.gkebackup.v1.RestoreConfig.RestoreOrder.GroupKindDependency group_kind_dependencies = 1 [(.google.api.field_behavior) = OPTIONAL];
*
*/
public int getGroupKindDependenciesCount() {
if (groupKindDependenciesBuilder_ == null) {
return groupKindDependencies_.size();
} else {
return groupKindDependenciesBuilder_.getCount();
}
}
/**
*
*
*
* Optional. Contains a list of group kind dependency pairs provided
* by the customer, that is used by Backup for GKE to
* generate a group kind restore order.
*
*
*
* repeated .google.cloud.gkebackup.v1.RestoreConfig.RestoreOrder.GroupKindDependency group_kind_dependencies = 1 [(.google.api.field_behavior) = OPTIONAL];
*
*/
public com.google.cloud.gkebackup.v1.RestoreConfig.RestoreOrder.GroupKindDependency
getGroupKindDependencies(int index) {
if (groupKindDependenciesBuilder_ == null) {
return groupKindDependencies_.get(index);
} else {
return groupKindDependenciesBuilder_.getMessage(index);
}
}
/**
*
*
*
* Optional. Contains a list of group kind dependency pairs provided
* by the customer, that is used by Backup for GKE to
* generate a group kind restore order.
*
*
*
* repeated .google.cloud.gkebackup.v1.RestoreConfig.RestoreOrder.GroupKindDependency group_kind_dependencies = 1 [(.google.api.field_behavior) = OPTIONAL];
*
*/
public Builder setGroupKindDependencies(
int index,
com.google.cloud.gkebackup.v1.RestoreConfig.RestoreOrder.GroupKindDependency value) {
if (groupKindDependenciesBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureGroupKindDependenciesIsMutable();
groupKindDependencies_.set(index, value);
onChanged();
} else {
groupKindDependenciesBuilder_.setMessage(index, value);
}
return this;
}
/**
*
*
*
* Optional. Contains a list of group kind dependency pairs provided
* by the customer, that is used by Backup for GKE to
* generate a group kind restore order.
*
*
*
* repeated .google.cloud.gkebackup.v1.RestoreConfig.RestoreOrder.GroupKindDependency group_kind_dependencies = 1 [(.google.api.field_behavior) = OPTIONAL];
*
*/
public Builder setGroupKindDependencies(
int index,
com.google.cloud.gkebackup.v1.RestoreConfig.RestoreOrder.GroupKindDependency.Builder
builderForValue) {
if (groupKindDependenciesBuilder_ == null) {
ensureGroupKindDependenciesIsMutable();
groupKindDependencies_.set(index, builderForValue.build());
onChanged();
} else {
groupKindDependenciesBuilder_.setMessage(index, builderForValue.build());
}
return this;
}
/**
*
*
*
* Optional. Contains a list of group kind dependency pairs provided
* by the customer, that is used by Backup for GKE to
* generate a group kind restore order.
*
*
*
* repeated .google.cloud.gkebackup.v1.RestoreConfig.RestoreOrder.GroupKindDependency group_kind_dependencies = 1 [(.google.api.field_behavior) = OPTIONAL];
*
*/
public Builder addGroupKindDependencies(
com.google.cloud.gkebackup.v1.RestoreConfig.RestoreOrder.GroupKindDependency value) {
if (groupKindDependenciesBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureGroupKindDependenciesIsMutable();
groupKindDependencies_.add(value);
onChanged();
} else {
groupKindDependenciesBuilder_.addMessage(value);
}
return this;
}
/**
*
*
*
* Optional. Contains a list of group kind dependency pairs provided
* by the customer, that is used by Backup for GKE to
* generate a group kind restore order.
*
*
*
* repeated .google.cloud.gkebackup.v1.RestoreConfig.RestoreOrder.GroupKindDependency group_kind_dependencies = 1 [(.google.api.field_behavior) = OPTIONAL];
*
*/
public Builder addGroupKindDependencies(
int index,
com.google.cloud.gkebackup.v1.RestoreConfig.RestoreOrder.GroupKindDependency value) {
if (groupKindDependenciesBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureGroupKindDependenciesIsMutable();
groupKindDependencies_.add(index, value);
onChanged();
} else {
groupKindDependenciesBuilder_.addMessage(index, value);
}
return this;
}
/**
*
*
*
* Optional. Contains a list of group kind dependency pairs provided
* by the customer, that is used by Backup for GKE to
* generate a group kind restore order.
*
*
*
* repeated .google.cloud.gkebackup.v1.RestoreConfig.RestoreOrder.GroupKindDependency group_kind_dependencies = 1 [(.google.api.field_behavior) = OPTIONAL];
*
*/
public Builder addGroupKindDependencies(
com.google.cloud.gkebackup.v1.RestoreConfig.RestoreOrder.GroupKindDependency.Builder
builderForValue) {
if (groupKindDependenciesBuilder_ == null) {
ensureGroupKindDependenciesIsMutable();
groupKindDependencies_.add(builderForValue.build());
onChanged();
} else {
groupKindDependenciesBuilder_.addMessage(builderForValue.build());
}
return this;
}
/**
*
*
*
* Optional. Contains a list of group kind dependency pairs provided
* by the customer, that is used by Backup for GKE to
* generate a group kind restore order.
*
*
*
* repeated .google.cloud.gkebackup.v1.RestoreConfig.RestoreOrder.GroupKindDependency group_kind_dependencies = 1 [(.google.api.field_behavior) = OPTIONAL];
*
*/
public Builder addGroupKindDependencies(
int index,
com.google.cloud.gkebackup.v1.RestoreConfig.RestoreOrder.GroupKindDependency.Builder
builderForValue) {
if (groupKindDependenciesBuilder_ == null) {
ensureGroupKindDependenciesIsMutable();
groupKindDependencies_.add(index, builderForValue.build());
onChanged();
} else {
groupKindDependenciesBuilder_.addMessage(index, builderForValue.build());
}
return this;
}
/**
*
*
*
* Optional. Contains a list of group kind dependency pairs provided
* by the customer, that is used by Backup for GKE to
* generate a group kind restore order.
*
*
*
* repeated .google.cloud.gkebackup.v1.RestoreConfig.RestoreOrder.GroupKindDependency group_kind_dependencies = 1 [(.google.api.field_behavior) = OPTIONAL];
*
*/
public Builder addAllGroupKindDependencies(
java.lang.Iterable<
? extends
com.google.cloud.gkebackup.v1.RestoreConfig.RestoreOrder.GroupKindDependency>
values) {
if (groupKindDependenciesBuilder_ == null) {
ensureGroupKindDependenciesIsMutable();
com.google.protobuf.AbstractMessageLite.Builder.addAll(values, groupKindDependencies_);
onChanged();
} else {
groupKindDependenciesBuilder_.addAllMessages(values);
}
return this;
}
/**
*
*
*
* Optional. Contains a list of group kind dependency pairs provided
* by the customer, that is used by Backup for GKE to
* generate a group kind restore order.
*
*
*
* repeated .google.cloud.gkebackup.v1.RestoreConfig.RestoreOrder.GroupKindDependency group_kind_dependencies = 1 [(.google.api.field_behavior) = OPTIONAL];
*
*/
public Builder clearGroupKindDependencies() {
if (groupKindDependenciesBuilder_ == null) {
groupKindDependencies_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000001);
onChanged();
} else {
groupKindDependenciesBuilder_.clear();
}
return this;
}
/**
*
*
*
* Optional. Contains a list of group kind dependency pairs provided
* by the customer, that is used by Backup for GKE to
* generate a group kind restore order.
*
*
*
* repeated .google.cloud.gkebackup.v1.RestoreConfig.RestoreOrder.GroupKindDependency group_kind_dependencies = 1 [(.google.api.field_behavior) = OPTIONAL];
*
*/
public Builder removeGroupKindDependencies(int index) {
if (groupKindDependenciesBuilder_ == null) {
ensureGroupKindDependenciesIsMutable();
groupKindDependencies_.remove(index);
onChanged();
} else {
groupKindDependenciesBuilder_.remove(index);
}
return this;
}
/**
*
*
*
* Optional. Contains a list of group kind dependency pairs provided
* by the customer, that is used by Backup for GKE to
* generate a group kind restore order.
*
*
*
* repeated .google.cloud.gkebackup.v1.RestoreConfig.RestoreOrder.GroupKindDependency group_kind_dependencies = 1 [(.google.api.field_behavior) = OPTIONAL];
*
*/
public com.google.cloud.gkebackup.v1.RestoreConfig.RestoreOrder.GroupKindDependency.Builder
getGroupKindDependenciesBuilder(int index) {
return getGroupKindDependenciesFieldBuilder().getBuilder(index);
}
/**
*
*
*
* Optional. Contains a list of group kind dependency pairs provided
* by the customer, that is used by Backup for GKE to
* generate a group kind restore order.
*
*
*
* repeated .google.cloud.gkebackup.v1.RestoreConfig.RestoreOrder.GroupKindDependency group_kind_dependencies = 1 [(.google.api.field_behavior) = OPTIONAL];
*
*/
public com.google.cloud.gkebackup.v1.RestoreConfig.RestoreOrder.GroupKindDependencyOrBuilder
getGroupKindDependenciesOrBuilder(int index) {
if (groupKindDependenciesBuilder_ == null) {
return groupKindDependencies_.get(index);
} else {
return groupKindDependenciesBuilder_.getMessageOrBuilder(index);
}
}
/**
*
*
*
* Optional. Contains a list of group kind dependency pairs provided
* by the customer, that is used by Backup for GKE to
* generate a group kind restore order.
*
*
*
* repeated .google.cloud.gkebackup.v1.RestoreConfig.RestoreOrder.GroupKindDependency group_kind_dependencies = 1 [(.google.api.field_behavior) = OPTIONAL];
*
*/
public java.util.List<
? extends
com.google.cloud.gkebackup.v1.RestoreConfig.RestoreOrder
.GroupKindDependencyOrBuilder>
getGroupKindDependenciesOrBuilderList() {
if (groupKindDependenciesBuilder_ != null) {
return groupKindDependenciesBuilder_.getMessageOrBuilderList();
} else {
return java.util.Collections.unmodifiableList(groupKindDependencies_);
}
}
/**
*
*
*
* Optional. Contains a list of group kind dependency pairs provided
* by the customer, that is used by Backup for GKE to
* generate a group kind restore order.
*
*
*
* repeated .google.cloud.gkebackup.v1.RestoreConfig.RestoreOrder.GroupKindDependency group_kind_dependencies = 1 [(.google.api.field_behavior) = OPTIONAL];
*
*/
public com.google.cloud.gkebackup.v1.RestoreConfig.RestoreOrder.GroupKindDependency.Builder
addGroupKindDependenciesBuilder() {
return getGroupKindDependenciesFieldBuilder()
.addBuilder(
com.google.cloud.gkebackup.v1.RestoreConfig.RestoreOrder.GroupKindDependency
.getDefaultInstance());
}
/**
*
*
*
* Optional. Contains a list of group kind dependency pairs provided
* by the customer, that is used by Backup for GKE to
* generate a group kind restore order.
*
*
*
* repeated .google.cloud.gkebackup.v1.RestoreConfig.RestoreOrder.GroupKindDependency group_kind_dependencies = 1 [(.google.api.field_behavior) = OPTIONAL];
*
*/
public com.google.cloud.gkebackup.v1.RestoreConfig.RestoreOrder.GroupKindDependency.Builder
addGroupKindDependenciesBuilder(int index) {
return getGroupKindDependenciesFieldBuilder()
.addBuilder(
index,
com.google.cloud.gkebackup.v1.RestoreConfig.RestoreOrder.GroupKindDependency
.getDefaultInstance());
}
/**
*
*
*
* Optional. Contains a list of group kind dependency pairs provided
* by the customer, that is used by Backup for GKE to
* generate a group kind restore order.
*
*
*
* repeated .google.cloud.gkebackup.v1.RestoreConfig.RestoreOrder.GroupKindDependency group_kind_dependencies = 1 [(.google.api.field_behavior) = OPTIONAL];
*
*/
public java.util.List<
com.google.cloud.gkebackup.v1.RestoreConfig.RestoreOrder.GroupKindDependency.Builder>
getGroupKindDependenciesBuilderList() {
return getGroupKindDependenciesFieldBuilder().getBuilderList();
}
private com.google.protobuf.RepeatedFieldBuilderV3<
com.google.cloud.gkebackup.v1.RestoreConfig.RestoreOrder.GroupKindDependency,
com.google.cloud.gkebackup.v1.RestoreConfig.RestoreOrder.GroupKindDependency.Builder,
com.google.cloud.gkebackup.v1.RestoreConfig.RestoreOrder.GroupKindDependencyOrBuilder>
getGroupKindDependenciesFieldBuilder() {
if (groupKindDependenciesBuilder_ == null) {
groupKindDependenciesBuilder_ =
new com.google.protobuf.RepeatedFieldBuilderV3<
com.google.cloud.gkebackup.v1.RestoreConfig.RestoreOrder.GroupKindDependency,
com.google.cloud.gkebackup.v1.RestoreConfig.RestoreOrder.GroupKindDependency
.Builder,
com.google.cloud.gkebackup.v1.RestoreConfig.RestoreOrder
.GroupKindDependencyOrBuilder>(
groupKindDependencies_,
((bitField0_ & 0x00000001) != 0),
getParentForChildren(),
isClean());
groupKindDependencies_ = null;
}
return groupKindDependenciesBuilder_;
}
@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.RestoreConfig.RestoreOrder)
}
// @@protoc_insertion_point(class_scope:google.cloud.gkebackup.v1.RestoreConfig.RestoreOrder)
private static final com.google.cloud.gkebackup.v1.RestoreConfig.RestoreOrder DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new com.google.cloud.gkebackup.v1.RestoreConfig.RestoreOrder();
}
public static com.google.cloud.gkebackup.v1.RestoreConfig.RestoreOrder getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser PARSER =
new com.google.protobuf.AbstractParser() {
@java.lang.Override
public RestoreOrder 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.RestoreConfig.RestoreOrder getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
private int bitField0_;
private int namespacedResourceRestoreScopeCase_ = 0;
@SuppressWarnings("serial")
private java.lang.Object namespacedResourceRestoreScope_;
public enum NamespacedResourceRestoreScopeCase
implements
com.google.protobuf.Internal.EnumLite,
com.google.protobuf.AbstractMessage.InternalOneOfEnum {
ALL_NAMESPACES(5),
SELECTED_NAMESPACES(6),
SELECTED_APPLICATIONS(7),
NO_NAMESPACES(9),
EXCLUDED_NAMESPACES(10),
NAMESPACEDRESOURCERESTORESCOPE_NOT_SET(0);
private final int value;
private NamespacedResourceRestoreScopeCase(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 NamespacedResourceRestoreScopeCase valueOf(int value) {
return forNumber(value);
}
public static NamespacedResourceRestoreScopeCase forNumber(int value) {
switch (value) {
case 5:
return ALL_NAMESPACES;
case 6:
return SELECTED_NAMESPACES;
case 7:
return SELECTED_APPLICATIONS;
case 9:
return NO_NAMESPACES;
case 10:
return EXCLUDED_NAMESPACES;
case 0:
return NAMESPACEDRESOURCERESTORESCOPE_NOT_SET;
default:
return null;
}
}
public int getNumber() {
return this.value;
}
};
public NamespacedResourceRestoreScopeCase getNamespacedResourceRestoreScopeCase() {
return NamespacedResourceRestoreScopeCase.forNumber(namespacedResourceRestoreScopeCase_);
}
public static final int VOLUME_DATA_RESTORE_POLICY_FIELD_NUMBER = 1;
private int volumeDataRestorePolicy_ = 0;
/**
*
*
*
* Optional. Specifies the mechanism to be used to restore volume data.
* Default: VOLUME_DATA_RESTORE_POLICY_UNSPECIFIED (will be treated as
* NO_VOLUME_DATA_RESTORATION).
*
*
*
* .google.cloud.gkebackup.v1.RestoreConfig.VolumeDataRestorePolicy volume_data_restore_policy = 1 [(.google.api.field_behavior) = OPTIONAL];
*
*
* @return The enum numeric value on the wire for volumeDataRestorePolicy.
*/
@java.lang.Override
public int getVolumeDataRestorePolicyValue() {
return volumeDataRestorePolicy_;
}
/**
*
*
*
* Optional. Specifies the mechanism to be used to restore volume data.
* Default: VOLUME_DATA_RESTORE_POLICY_UNSPECIFIED (will be treated as
* NO_VOLUME_DATA_RESTORATION).
*
*
*
* .google.cloud.gkebackup.v1.RestoreConfig.VolumeDataRestorePolicy volume_data_restore_policy = 1 [(.google.api.field_behavior) = OPTIONAL];
*
*
* @return The volumeDataRestorePolicy.
*/
@java.lang.Override
public com.google.cloud.gkebackup.v1.RestoreConfig.VolumeDataRestorePolicy
getVolumeDataRestorePolicy() {
com.google.cloud.gkebackup.v1.RestoreConfig.VolumeDataRestorePolicy result =
com.google.cloud.gkebackup.v1.RestoreConfig.VolumeDataRestorePolicy.forNumber(
volumeDataRestorePolicy_);
return result == null
? com.google.cloud.gkebackup.v1.RestoreConfig.VolumeDataRestorePolicy.UNRECOGNIZED
: result;
}
public static final int CLUSTER_RESOURCE_CONFLICT_POLICY_FIELD_NUMBER = 2;
private int clusterResourceConflictPolicy_ = 0;
/**
*
*
*
* Optional. Defines the behavior for handling the situation where
* cluster-scoped resources being restored already exist in the target
* cluster. This MUST be set to a value other than
* CLUSTER_RESOURCE_CONFLICT_POLICY_UNSPECIFIED if
* [cluster_resource_restore_scope][google.cloud.gkebackup.v1.RestoreConfig.cluster_resource_restore_scope]
* is not empty.
*
*
*
* .google.cloud.gkebackup.v1.RestoreConfig.ClusterResourceConflictPolicy cluster_resource_conflict_policy = 2 [(.google.api.field_behavior) = OPTIONAL];
*
*
* @return The enum numeric value on the wire for clusterResourceConflictPolicy.
*/
@java.lang.Override
public int getClusterResourceConflictPolicyValue() {
return clusterResourceConflictPolicy_;
}
/**
*
*
*
* Optional. Defines the behavior for handling the situation where
* cluster-scoped resources being restored already exist in the target
* cluster. This MUST be set to a value other than
* CLUSTER_RESOURCE_CONFLICT_POLICY_UNSPECIFIED if
* [cluster_resource_restore_scope][google.cloud.gkebackup.v1.RestoreConfig.cluster_resource_restore_scope]
* is not empty.
*
*
*
* .google.cloud.gkebackup.v1.RestoreConfig.ClusterResourceConflictPolicy cluster_resource_conflict_policy = 2 [(.google.api.field_behavior) = OPTIONAL];
*
*
* @return The clusterResourceConflictPolicy.
*/
@java.lang.Override
public com.google.cloud.gkebackup.v1.RestoreConfig.ClusterResourceConflictPolicy
getClusterResourceConflictPolicy() {
com.google.cloud.gkebackup.v1.RestoreConfig.ClusterResourceConflictPolicy result =
com.google.cloud.gkebackup.v1.RestoreConfig.ClusterResourceConflictPolicy.forNumber(
clusterResourceConflictPolicy_);
return result == null
? com.google.cloud.gkebackup.v1.RestoreConfig.ClusterResourceConflictPolicy.UNRECOGNIZED
: result;
}
public static final int NAMESPACED_RESOURCE_RESTORE_MODE_FIELD_NUMBER = 3;
private int namespacedResourceRestoreMode_ = 0;
/**
*
*
*
* Optional. Defines the behavior for handling the situation where sets of
* namespaced resources being restored already exist in the target cluster.
* This MUST be set to a value other than
* NAMESPACED_RESOURCE_RESTORE_MODE_UNSPECIFIED.
*
*
*
* .google.cloud.gkebackup.v1.RestoreConfig.NamespacedResourceRestoreMode namespaced_resource_restore_mode = 3 [(.google.api.field_behavior) = OPTIONAL];
*
*
* @return The enum numeric value on the wire for namespacedResourceRestoreMode.
*/
@java.lang.Override
public int getNamespacedResourceRestoreModeValue() {
return namespacedResourceRestoreMode_;
}
/**
*
*
*
* Optional. Defines the behavior for handling the situation where sets of
* namespaced resources being restored already exist in the target cluster.
* This MUST be set to a value other than
* NAMESPACED_RESOURCE_RESTORE_MODE_UNSPECIFIED.
*
*
*
* .google.cloud.gkebackup.v1.RestoreConfig.NamespacedResourceRestoreMode namespaced_resource_restore_mode = 3 [(.google.api.field_behavior) = OPTIONAL];
*
*
* @return The namespacedResourceRestoreMode.
*/
@java.lang.Override
public com.google.cloud.gkebackup.v1.RestoreConfig.NamespacedResourceRestoreMode
getNamespacedResourceRestoreMode() {
com.google.cloud.gkebackup.v1.RestoreConfig.NamespacedResourceRestoreMode result =
com.google.cloud.gkebackup.v1.RestoreConfig.NamespacedResourceRestoreMode.forNumber(
namespacedResourceRestoreMode_);
return result == null
? com.google.cloud.gkebackup.v1.RestoreConfig.NamespacedResourceRestoreMode.UNRECOGNIZED
: result;
}
public static final int CLUSTER_RESOURCE_RESTORE_SCOPE_FIELD_NUMBER = 4;
private com.google.cloud.gkebackup.v1.RestoreConfig.ClusterResourceRestoreScope
clusterResourceRestoreScope_;
/**
*
*
*
* Optional. Identifies the cluster-scoped resources to restore from the
* Backup. Not specifying it means NO cluster resource will be restored.
*
*
*
* .google.cloud.gkebackup.v1.RestoreConfig.ClusterResourceRestoreScope cluster_resource_restore_scope = 4 [(.google.api.field_behavior) = OPTIONAL];
*
*
* @return Whether the clusterResourceRestoreScope field is set.
*/
@java.lang.Override
public boolean hasClusterResourceRestoreScope() {
return ((bitField0_ & 0x00000001) != 0);
}
/**
*
*
*
* Optional. Identifies the cluster-scoped resources to restore from the
* Backup. Not specifying it means NO cluster resource will be restored.
*
*
*
* .google.cloud.gkebackup.v1.RestoreConfig.ClusterResourceRestoreScope cluster_resource_restore_scope = 4 [(.google.api.field_behavior) = OPTIONAL];
*
*
* @return The clusterResourceRestoreScope.
*/
@java.lang.Override
public com.google.cloud.gkebackup.v1.RestoreConfig.ClusterResourceRestoreScope
getClusterResourceRestoreScope() {
return clusterResourceRestoreScope_ == null
? com.google.cloud.gkebackup.v1.RestoreConfig.ClusterResourceRestoreScope
.getDefaultInstance()
: clusterResourceRestoreScope_;
}
/**
*
*
*
* Optional. Identifies the cluster-scoped resources to restore from the
* Backup. Not specifying it means NO cluster resource will be restored.
*
*
*
* .google.cloud.gkebackup.v1.RestoreConfig.ClusterResourceRestoreScope cluster_resource_restore_scope = 4 [(.google.api.field_behavior) = OPTIONAL];
*
*/
@java.lang.Override
public com.google.cloud.gkebackup.v1.RestoreConfig.ClusterResourceRestoreScopeOrBuilder
getClusterResourceRestoreScopeOrBuilder() {
return clusterResourceRestoreScope_ == null
? com.google.cloud.gkebackup.v1.RestoreConfig.ClusterResourceRestoreScope
.getDefaultInstance()
: clusterResourceRestoreScope_;
}
public static final int ALL_NAMESPACES_FIELD_NUMBER = 5;
/**
*
*
*
* Restore all namespaced resources in the Backup if set to "True".
* Specifying this field to "False" is an error.
*
*
* bool all_namespaces = 5;
*
* @return Whether the allNamespaces field is set.
*/
@java.lang.Override
public boolean hasAllNamespaces() {
return namespacedResourceRestoreScopeCase_ == 5;
}
/**
*
*
*
* Restore all namespaced resources in the Backup if set to "True".
* Specifying this field to "False" is an error.
*
*
* bool all_namespaces = 5;
*
* @return The allNamespaces.
*/
@java.lang.Override
public boolean getAllNamespaces() {
if (namespacedResourceRestoreScopeCase_ == 5) {
return (java.lang.Boolean) namespacedResourceRestoreScope_;
}
return false;
}
public static final int SELECTED_NAMESPACES_FIELD_NUMBER = 6;
/**
*
*
*
* A list of selected Namespaces to restore from the Backup. The listed
* Namespaces and all resources contained in them will be restored.
*
*
* .google.cloud.gkebackup.v1.Namespaces selected_namespaces = 6;
*
* @return Whether the selectedNamespaces field is set.
*/
@java.lang.Override
public boolean hasSelectedNamespaces() {
return namespacedResourceRestoreScopeCase_ == 6;
}
/**
*
*
*
* A list of selected Namespaces to restore from the Backup. The listed
* Namespaces and all resources contained in them will be restored.
*
*
* .google.cloud.gkebackup.v1.Namespaces selected_namespaces = 6;
*
* @return The selectedNamespaces.
*/
@java.lang.Override
public com.google.cloud.gkebackup.v1.Namespaces getSelectedNamespaces() {
if (namespacedResourceRestoreScopeCase_ == 6) {
return (com.google.cloud.gkebackup.v1.Namespaces) namespacedResourceRestoreScope_;
}
return com.google.cloud.gkebackup.v1.Namespaces.getDefaultInstance();
}
/**
*
*
*
* A list of selected Namespaces to restore from the Backup. The listed
* Namespaces and all resources contained in them will be restored.
*
*
* .google.cloud.gkebackup.v1.Namespaces selected_namespaces = 6;
*/
@java.lang.Override
public com.google.cloud.gkebackup.v1.NamespacesOrBuilder getSelectedNamespacesOrBuilder() {
if (namespacedResourceRestoreScopeCase_ == 6) {
return (com.google.cloud.gkebackup.v1.Namespaces) namespacedResourceRestoreScope_;
}
return com.google.cloud.gkebackup.v1.Namespaces.getDefaultInstance();
}
public static final int SELECTED_APPLICATIONS_FIELD_NUMBER = 7;
/**
*
*
*
* A list of selected ProtectedApplications to restore. The listed
* ProtectedApplications and all the resources to which they refer will be
* restored.
*
*
* .google.cloud.gkebackup.v1.NamespacedNames selected_applications = 7;
*
* @return Whether the selectedApplications field is set.
*/
@java.lang.Override
public boolean hasSelectedApplications() {
return namespacedResourceRestoreScopeCase_ == 7;
}
/**
*
*
*
* A list of selected ProtectedApplications to restore. The listed
* ProtectedApplications and all the resources to which they refer will be
* restored.
*
*
* .google.cloud.gkebackup.v1.NamespacedNames selected_applications = 7;
*
* @return The selectedApplications.
*/
@java.lang.Override
public com.google.cloud.gkebackup.v1.NamespacedNames getSelectedApplications() {
if (namespacedResourceRestoreScopeCase_ == 7) {
return (com.google.cloud.gkebackup.v1.NamespacedNames) namespacedResourceRestoreScope_;
}
return com.google.cloud.gkebackup.v1.NamespacedNames.getDefaultInstance();
}
/**
*
*
*
* A list of selected ProtectedApplications to restore. The listed
* ProtectedApplications and all the resources to which they refer will be
* restored.
*
*
* .google.cloud.gkebackup.v1.NamespacedNames selected_applications = 7;
*/
@java.lang.Override
public com.google.cloud.gkebackup.v1.NamespacedNamesOrBuilder getSelectedApplicationsOrBuilder() {
if (namespacedResourceRestoreScopeCase_ == 7) {
return (com.google.cloud.gkebackup.v1.NamespacedNames) namespacedResourceRestoreScope_;
}
return com.google.cloud.gkebackup.v1.NamespacedNames.getDefaultInstance();
}
public static final int NO_NAMESPACES_FIELD_NUMBER = 9;
/**
*
*
*
* Do not restore any namespaced resources if set to "True".
* Specifying this field to "False" is not allowed.
*
*
* bool no_namespaces = 9;
*
* @return Whether the noNamespaces field is set.
*/
@java.lang.Override
public boolean hasNoNamespaces() {
return namespacedResourceRestoreScopeCase_ == 9;
}
/**
*
*
*
* Do not restore any namespaced resources if set to "True".
* Specifying this field to "False" is not allowed.
*
*
* bool no_namespaces = 9;
*
* @return The noNamespaces.
*/
@java.lang.Override
public boolean getNoNamespaces() {
if (namespacedResourceRestoreScopeCase_ == 9) {
return (java.lang.Boolean) namespacedResourceRestoreScope_;
}
return false;
}
public static final int EXCLUDED_NAMESPACES_FIELD_NUMBER = 10;
/**
*
*
*
* A list of selected namespaces excluded from restoration. All
* namespaces except those in this list will be restored.
*
*
* .google.cloud.gkebackup.v1.Namespaces excluded_namespaces = 10;
*
* @return Whether the excludedNamespaces field is set.
*/
@java.lang.Override
public boolean hasExcludedNamespaces() {
return namespacedResourceRestoreScopeCase_ == 10;
}
/**
*
*
*
* A list of selected namespaces excluded from restoration. All
* namespaces except those in this list will be restored.
*
*
* .google.cloud.gkebackup.v1.Namespaces excluded_namespaces = 10;
*
* @return The excludedNamespaces.
*/
@java.lang.Override
public com.google.cloud.gkebackup.v1.Namespaces getExcludedNamespaces() {
if (namespacedResourceRestoreScopeCase_ == 10) {
return (com.google.cloud.gkebackup.v1.Namespaces) namespacedResourceRestoreScope_;
}
return com.google.cloud.gkebackup.v1.Namespaces.getDefaultInstance();
}
/**
*
*
*
* A list of selected namespaces excluded from restoration. All
* namespaces except those in this list will be restored.
*
*
* .google.cloud.gkebackup.v1.Namespaces excluded_namespaces = 10;
*/
@java.lang.Override
public com.google.cloud.gkebackup.v1.NamespacesOrBuilder getExcludedNamespacesOrBuilder() {
if (namespacedResourceRestoreScopeCase_ == 10) {
return (com.google.cloud.gkebackup.v1.Namespaces) namespacedResourceRestoreScope_;
}
return com.google.cloud.gkebackup.v1.Namespaces.getDefaultInstance();
}
public static final int SUBSTITUTION_RULES_FIELD_NUMBER = 8;
@SuppressWarnings("serial")
private java.util.List
substitutionRules_;
/**
*
*
*
* Optional. A list of transformation rules to be applied against Kubernetes
* resources as they are selected for restoration from a Backup. Rules are
* executed in order defined - this order matters, as changes made by a rule
* may impact the filtering logic of subsequent rules. An empty list means no
* substitution will occur.
*
*
*
* repeated .google.cloud.gkebackup.v1.RestoreConfig.SubstitutionRule substitution_rules = 8 [(.google.api.field_behavior) = OPTIONAL];
*
*/
@java.lang.Override
public java.util.List
getSubstitutionRulesList() {
return substitutionRules_;
}
/**
*
*
*
* Optional. A list of transformation rules to be applied against Kubernetes
* resources as they are selected for restoration from a Backup. Rules are
* executed in order defined - this order matters, as changes made by a rule
* may impact the filtering logic of subsequent rules. An empty list means no
* substitution will occur.
*
*
*
* repeated .google.cloud.gkebackup.v1.RestoreConfig.SubstitutionRule substitution_rules = 8 [(.google.api.field_behavior) = OPTIONAL];
*
*/
@java.lang.Override
public java.util.List<
? extends com.google.cloud.gkebackup.v1.RestoreConfig.SubstitutionRuleOrBuilder>
getSubstitutionRulesOrBuilderList() {
return substitutionRules_;
}
/**
*
*
*
* Optional. A list of transformation rules to be applied against Kubernetes
* resources as they are selected for restoration from a Backup. Rules are
* executed in order defined - this order matters, as changes made by a rule
* may impact the filtering logic of subsequent rules. An empty list means no
* substitution will occur.
*
*
*
* repeated .google.cloud.gkebackup.v1.RestoreConfig.SubstitutionRule substitution_rules = 8 [(.google.api.field_behavior) = OPTIONAL];
*
*/
@java.lang.Override
public int getSubstitutionRulesCount() {
return substitutionRules_.size();
}
/**
*
*
*
* Optional. A list of transformation rules to be applied against Kubernetes
* resources as they are selected for restoration from a Backup. Rules are
* executed in order defined - this order matters, as changes made by a rule
* may impact the filtering logic of subsequent rules. An empty list means no
* substitution will occur.
*
*
*
* repeated .google.cloud.gkebackup.v1.RestoreConfig.SubstitutionRule substitution_rules = 8 [(.google.api.field_behavior) = OPTIONAL];
*
*/
@java.lang.Override
public com.google.cloud.gkebackup.v1.RestoreConfig.SubstitutionRule getSubstitutionRules(
int index) {
return substitutionRules_.get(index);
}
/**
*
*
*
* Optional. A list of transformation rules to be applied against Kubernetes
* resources as they are selected for restoration from a Backup. Rules are
* executed in order defined - this order matters, as changes made by a rule
* may impact the filtering logic of subsequent rules. An empty list means no
* substitution will occur.
*
*
*
* repeated .google.cloud.gkebackup.v1.RestoreConfig.SubstitutionRule substitution_rules = 8 [(.google.api.field_behavior) = OPTIONAL];
*
*/
@java.lang.Override
public com.google.cloud.gkebackup.v1.RestoreConfig.SubstitutionRuleOrBuilder
getSubstitutionRulesOrBuilder(int index) {
return substitutionRules_.get(index);
}
public static final int TRANSFORMATION_RULES_FIELD_NUMBER = 11;
@SuppressWarnings("serial")
private java.util.List
transformationRules_;
/**
*
*
*
* Optional. A list of transformation rules to be applied against Kubernetes
* resources as they are selected for restoration from a Backup. Rules are
* executed in order defined - this order matters, as changes made by a rule
* may impact the filtering logic of subsequent rules. An empty list means no
* transformation will occur.
*
*
*
* repeated .google.cloud.gkebackup.v1.RestoreConfig.TransformationRule transformation_rules = 11 [(.google.api.field_behavior) = OPTIONAL];
*
*/
@java.lang.Override
public java.util.List
getTransformationRulesList() {
return transformationRules_;
}
/**
*
*
*
* Optional. A list of transformation rules to be applied against Kubernetes
* resources as they are selected for restoration from a Backup. Rules are
* executed in order defined - this order matters, as changes made by a rule
* may impact the filtering logic of subsequent rules. An empty list means no
* transformation will occur.
*
*
*
* repeated .google.cloud.gkebackup.v1.RestoreConfig.TransformationRule transformation_rules = 11 [(.google.api.field_behavior) = OPTIONAL];
*
*/
@java.lang.Override
public java.util.List<
? extends com.google.cloud.gkebackup.v1.RestoreConfig.TransformationRuleOrBuilder>
getTransformationRulesOrBuilderList() {
return transformationRules_;
}
/**
*
*
*
* Optional. A list of transformation rules to be applied against Kubernetes
* resources as they are selected for restoration from a Backup. Rules are
* executed in order defined - this order matters, as changes made by a rule
* may impact the filtering logic of subsequent rules. An empty list means no
* transformation will occur.
*
*
*
* repeated .google.cloud.gkebackup.v1.RestoreConfig.TransformationRule transformation_rules = 11 [(.google.api.field_behavior) = OPTIONAL];
*
*/
@java.lang.Override
public int getTransformationRulesCount() {
return transformationRules_.size();
}
/**
*
*
*
* Optional. A list of transformation rules to be applied against Kubernetes
* resources as they are selected for restoration from a Backup. Rules are
* executed in order defined - this order matters, as changes made by a rule
* may impact the filtering logic of subsequent rules. An empty list means no
* transformation will occur.
*
*
*
* repeated .google.cloud.gkebackup.v1.RestoreConfig.TransformationRule transformation_rules = 11 [(.google.api.field_behavior) = OPTIONAL];
*
*/
@java.lang.Override
public com.google.cloud.gkebackup.v1.RestoreConfig.TransformationRule getTransformationRules(
int index) {
return transformationRules_.get(index);
}
/**
*
*
*
* Optional. A list of transformation rules to be applied against Kubernetes
* resources as they are selected for restoration from a Backup. Rules are
* executed in order defined - this order matters, as changes made by a rule
* may impact the filtering logic of subsequent rules. An empty list means no
* transformation will occur.
*
*
*
* repeated .google.cloud.gkebackup.v1.RestoreConfig.TransformationRule transformation_rules = 11 [(.google.api.field_behavior) = OPTIONAL];
*
*/
@java.lang.Override
public com.google.cloud.gkebackup.v1.RestoreConfig.TransformationRuleOrBuilder
getTransformationRulesOrBuilder(int index) {
return transformationRules_.get(index);
}
public static final int VOLUME_DATA_RESTORE_POLICY_BINDINGS_FIELD_NUMBER = 12;
@SuppressWarnings("serial")
private java.util.List
volumeDataRestorePolicyBindings_;
/**
*
*
*
* Optional. A table that binds volumes by their scope to a restore policy.
* Bindings must have a unique scope. Any volumes not scoped in the bindings
* are subject to the policy defined in volume_data_restore_policy.
*
*
*
* repeated .google.cloud.gkebackup.v1.RestoreConfig.VolumeDataRestorePolicyBinding volume_data_restore_policy_bindings = 12 [(.google.api.field_behavior) = OPTIONAL];
*
*/
@java.lang.Override
public java.util.List
getVolumeDataRestorePolicyBindingsList() {
return volumeDataRestorePolicyBindings_;
}
/**
*
*
*
* Optional. A table that binds volumes by their scope to a restore policy.
* Bindings must have a unique scope. Any volumes not scoped in the bindings
* are subject to the policy defined in volume_data_restore_policy.
*
*
*
* repeated .google.cloud.gkebackup.v1.RestoreConfig.VolumeDataRestorePolicyBinding volume_data_restore_policy_bindings = 12 [(.google.api.field_behavior) = OPTIONAL];
*
*/
@java.lang.Override
public java.util.List<
? extends
com.google.cloud.gkebackup.v1.RestoreConfig.VolumeDataRestorePolicyBindingOrBuilder>
getVolumeDataRestorePolicyBindingsOrBuilderList() {
return volumeDataRestorePolicyBindings_;
}
/**
*
*
*
* Optional. A table that binds volumes by their scope to a restore policy.
* Bindings must have a unique scope. Any volumes not scoped in the bindings
* are subject to the policy defined in volume_data_restore_policy.
*
*
*
* repeated .google.cloud.gkebackup.v1.RestoreConfig.VolumeDataRestorePolicyBinding volume_data_restore_policy_bindings = 12 [(.google.api.field_behavior) = OPTIONAL];
*
*/
@java.lang.Override
public int getVolumeDataRestorePolicyBindingsCount() {
return volumeDataRestorePolicyBindings_.size();
}
/**
*
*
*
* Optional. A table that binds volumes by their scope to a restore policy.
* Bindings must have a unique scope. Any volumes not scoped in the bindings
* are subject to the policy defined in volume_data_restore_policy.
*
*
*
* repeated .google.cloud.gkebackup.v1.RestoreConfig.VolumeDataRestorePolicyBinding volume_data_restore_policy_bindings = 12 [(.google.api.field_behavior) = OPTIONAL];
*
*/
@java.lang.Override
public com.google.cloud.gkebackup.v1.RestoreConfig.VolumeDataRestorePolicyBinding
getVolumeDataRestorePolicyBindings(int index) {
return volumeDataRestorePolicyBindings_.get(index);
}
/**
*
*
*
* Optional. A table that binds volumes by their scope to a restore policy.
* Bindings must have a unique scope. Any volumes not scoped in the bindings
* are subject to the policy defined in volume_data_restore_policy.
*
*
*
* repeated .google.cloud.gkebackup.v1.RestoreConfig.VolumeDataRestorePolicyBinding volume_data_restore_policy_bindings = 12 [(.google.api.field_behavior) = OPTIONAL];
*
*/
@java.lang.Override
public com.google.cloud.gkebackup.v1.RestoreConfig.VolumeDataRestorePolicyBindingOrBuilder
getVolumeDataRestorePolicyBindingsOrBuilder(int index) {
return volumeDataRestorePolicyBindings_.get(index);
}
public static final int RESTORE_ORDER_FIELD_NUMBER = 13;
private com.google.cloud.gkebackup.v1.RestoreConfig.RestoreOrder restoreOrder_;
/**
*
*
*
* Optional. RestoreOrder contains custom ordering to use on a Restore.
*
*
*
* .google.cloud.gkebackup.v1.RestoreConfig.RestoreOrder restore_order = 13 [(.google.api.field_behavior) = OPTIONAL];
*
*
* @return Whether the restoreOrder field is set.
*/
@java.lang.Override
public boolean hasRestoreOrder() {
return ((bitField0_ & 0x00000002) != 0);
}
/**
*
*
*
* Optional. RestoreOrder contains custom ordering to use on a Restore.
*
*
*
* .google.cloud.gkebackup.v1.RestoreConfig.RestoreOrder restore_order = 13 [(.google.api.field_behavior) = OPTIONAL];
*
*
* @return The restoreOrder.
*/
@java.lang.Override
public com.google.cloud.gkebackup.v1.RestoreConfig.RestoreOrder getRestoreOrder() {
return restoreOrder_ == null
? com.google.cloud.gkebackup.v1.RestoreConfig.RestoreOrder.getDefaultInstance()
: restoreOrder_;
}
/**
*
*
*
* Optional. RestoreOrder contains custom ordering to use on a Restore.
*
*
*
* .google.cloud.gkebackup.v1.RestoreConfig.RestoreOrder restore_order = 13 [(.google.api.field_behavior) = OPTIONAL];
*
*/
@java.lang.Override
public com.google.cloud.gkebackup.v1.RestoreConfig.RestoreOrderOrBuilder
getRestoreOrderOrBuilder() {
return restoreOrder_ == null
? com.google.cloud.gkebackup.v1.RestoreConfig.RestoreOrder.getDefaultInstance()
: restoreOrder_;
}
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 (volumeDataRestorePolicy_
!= com.google.cloud.gkebackup.v1.RestoreConfig.VolumeDataRestorePolicy
.VOLUME_DATA_RESTORE_POLICY_UNSPECIFIED
.getNumber()) {
output.writeEnum(1, volumeDataRestorePolicy_);
}
if (clusterResourceConflictPolicy_
!= com.google.cloud.gkebackup.v1.RestoreConfig.ClusterResourceConflictPolicy
.CLUSTER_RESOURCE_CONFLICT_POLICY_UNSPECIFIED
.getNumber()) {
output.writeEnum(2, clusterResourceConflictPolicy_);
}
if (namespacedResourceRestoreMode_
!= com.google.cloud.gkebackup.v1.RestoreConfig.NamespacedResourceRestoreMode
.NAMESPACED_RESOURCE_RESTORE_MODE_UNSPECIFIED
.getNumber()) {
output.writeEnum(3, namespacedResourceRestoreMode_);
}
if (((bitField0_ & 0x00000001) != 0)) {
output.writeMessage(4, getClusterResourceRestoreScope());
}
if (namespacedResourceRestoreScopeCase_ == 5) {
output.writeBool(5, (boolean) ((java.lang.Boolean) namespacedResourceRestoreScope_));
}
if (namespacedResourceRestoreScopeCase_ == 6) {
output.writeMessage(
6, (com.google.cloud.gkebackup.v1.Namespaces) namespacedResourceRestoreScope_);
}
if (namespacedResourceRestoreScopeCase_ == 7) {
output.writeMessage(
7, (com.google.cloud.gkebackup.v1.NamespacedNames) namespacedResourceRestoreScope_);
}
for (int i = 0; i < substitutionRules_.size(); i++) {
output.writeMessage(8, substitutionRules_.get(i));
}
if (namespacedResourceRestoreScopeCase_ == 9) {
output.writeBool(9, (boolean) ((java.lang.Boolean) namespacedResourceRestoreScope_));
}
if (namespacedResourceRestoreScopeCase_ == 10) {
output.writeMessage(
10, (com.google.cloud.gkebackup.v1.Namespaces) namespacedResourceRestoreScope_);
}
for (int i = 0; i < transformationRules_.size(); i++) {
output.writeMessage(11, transformationRules_.get(i));
}
for (int i = 0; i < volumeDataRestorePolicyBindings_.size(); i++) {
output.writeMessage(12, volumeDataRestorePolicyBindings_.get(i));
}
if (((bitField0_ & 0x00000002) != 0)) {
output.writeMessage(13, getRestoreOrder());
}
getUnknownFields().writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (volumeDataRestorePolicy_
!= com.google.cloud.gkebackup.v1.RestoreConfig.VolumeDataRestorePolicy
.VOLUME_DATA_RESTORE_POLICY_UNSPECIFIED
.getNumber()) {
size += com.google.protobuf.CodedOutputStream.computeEnumSize(1, volumeDataRestorePolicy_);
}
if (clusterResourceConflictPolicy_
!= com.google.cloud.gkebackup.v1.RestoreConfig.ClusterResourceConflictPolicy
.CLUSTER_RESOURCE_CONFLICT_POLICY_UNSPECIFIED
.getNumber()) {
size +=
com.google.protobuf.CodedOutputStream.computeEnumSize(2, clusterResourceConflictPolicy_);
}
if (namespacedResourceRestoreMode_
!= com.google.cloud.gkebackup.v1.RestoreConfig.NamespacedResourceRestoreMode
.NAMESPACED_RESOURCE_RESTORE_MODE_UNSPECIFIED
.getNumber()) {
size +=
com.google.protobuf.CodedOutputStream.computeEnumSize(3, namespacedResourceRestoreMode_);
}
if (((bitField0_ & 0x00000001) != 0)) {
size +=
com.google.protobuf.CodedOutputStream.computeMessageSize(
4, getClusterResourceRestoreScope());
}
if (namespacedResourceRestoreScopeCase_ == 5) {
size +=
com.google.protobuf.CodedOutputStream.computeBoolSize(
5, (boolean) ((java.lang.Boolean) namespacedResourceRestoreScope_));
}
if (namespacedResourceRestoreScopeCase_ == 6) {
size +=
com.google.protobuf.CodedOutputStream.computeMessageSize(
6, (com.google.cloud.gkebackup.v1.Namespaces) namespacedResourceRestoreScope_);
}
if (namespacedResourceRestoreScopeCase_ == 7) {
size +=
com.google.protobuf.CodedOutputStream.computeMessageSize(
7, (com.google.cloud.gkebackup.v1.NamespacedNames) namespacedResourceRestoreScope_);
}
for (int i = 0; i < substitutionRules_.size(); i++) {
size +=
com.google.protobuf.CodedOutputStream.computeMessageSize(8, substitutionRules_.get(i));
}
if (namespacedResourceRestoreScopeCase_ == 9) {
size +=
com.google.protobuf.CodedOutputStream.computeBoolSize(
9, (boolean) ((java.lang.Boolean) namespacedResourceRestoreScope_));
}
if (namespacedResourceRestoreScopeCase_ == 10) {
size +=
com.google.protobuf.CodedOutputStream.computeMessageSize(
10, (com.google.cloud.gkebackup.v1.Namespaces) namespacedResourceRestoreScope_);
}
for (int i = 0; i < transformationRules_.size(); i++) {
size +=
com.google.protobuf.CodedOutputStream.computeMessageSize(11, transformationRules_.get(i));
}
for (int i = 0; i < volumeDataRestorePolicyBindings_.size(); i++) {
size +=
com.google.protobuf.CodedOutputStream.computeMessageSize(
12, volumeDataRestorePolicyBindings_.get(i));
}
if (((bitField0_ & 0x00000002) != 0)) {
size += com.google.protobuf.CodedOutputStream.computeMessageSize(13, getRestoreOrder());
}
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.RestoreConfig)) {
return super.equals(obj);
}
com.google.cloud.gkebackup.v1.RestoreConfig other =
(com.google.cloud.gkebackup.v1.RestoreConfig) obj;
if (volumeDataRestorePolicy_ != other.volumeDataRestorePolicy_) return false;
if (clusterResourceConflictPolicy_ != other.clusterResourceConflictPolicy_) return false;
if (namespacedResourceRestoreMode_ != other.namespacedResourceRestoreMode_) return false;
if (hasClusterResourceRestoreScope() != other.hasClusterResourceRestoreScope()) return false;
if (hasClusterResourceRestoreScope()) {
if (!getClusterResourceRestoreScope().equals(other.getClusterResourceRestoreScope()))
return false;
}
if (!getSubstitutionRulesList().equals(other.getSubstitutionRulesList())) return false;
if (!getTransformationRulesList().equals(other.getTransformationRulesList())) return false;
if (!getVolumeDataRestorePolicyBindingsList()
.equals(other.getVolumeDataRestorePolicyBindingsList())) return false;
if (hasRestoreOrder() != other.hasRestoreOrder()) return false;
if (hasRestoreOrder()) {
if (!getRestoreOrder().equals(other.getRestoreOrder())) return false;
}
if (!getNamespacedResourceRestoreScopeCase()
.equals(other.getNamespacedResourceRestoreScopeCase())) return false;
switch (namespacedResourceRestoreScopeCase_) {
case 5:
if (getAllNamespaces() != other.getAllNamespaces()) return false;
break;
case 6:
if (!getSelectedNamespaces().equals(other.getSelectedNamespaces())) return false;
break;
case 7:
if (!getSelectedApplications().equals(other.getSelectedApplications())) return false;
break;
case 9:
if (getNoNamespaces() != other.getNoNamespaces()) return false;
break;
case 10:
if (!getExcludedNamespaces().equals(other.getExcludedNamespaces())) 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();
hash = (37 * hash) + VOLUME_DATA_RESTORE_POLICY_FIELD_NUMBER;
hash = (53 * hash) + volumeDataRestorePolicy_;
hash = (37 * hash) + CLUSTER_RESOURCE_CONFLICT_POLICY_FIELD_NUMBER;
hash = (53 * hash) + clusterResourceConflictPolicy_;
hash = (37 * hash) + NAMESPACED_RESOURCE_RESTORE_MODE_FIELD_NUMBER;
hash = (53 * hash) + namespacedResourceRestoreMode_;
if (hasClusterResourceRestoreScope()) {
hash = (37 * hash) + CLUSTER_RESOURCE_RESTORE_SCOPE_FIELD_NUMBER;
hash = (53 * hash) + getClusterResourceRestoreScope().hashCode();
}
if (getSubstitutionRulesCount() > 0) {
hash = (37 * hash) + SUBSTITUTION_RULES_FIELD_NUMBER;
hash = (53 * hash) + getSubstitutionRulesList().hashCode();
}
if (getTransformationRulesCount() > 0) {
hash = (37 * hash) + TRANSFORMATION_RULES_FIELD_NUMBER;
hash = (53 * hash) + getTransformationRulesList().hashCode();
}
if (getVolumeDataRestorePolicyBindingsCount() > 0) {
hash = (37 * hash) + VOLUME_DATA_RESTORE_POLICY_BINDINGS_FIELD_NUMBER;
hash = (53 * hash) + getVolumeDataRestorePolicyBindingsList().hashCode();
}
if (hasRestoreOrder()) {
hash = (37 * hash) + RESTORE_ORDER_FIELD_NUMBER;
hash = (53 * hash) + getRestoreOrder().hashCode();
}
switch (namespacedResourceRestoreScopeCase_) {
case 5:
hash = (37 * hash) + ALL_NAMESPACES_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getAllNamespaces());
break;
case 6:
hash = (37 * hash) + SELECTED_NAMESPACES_FIELD_NUMBER;
hash = (53 * hash) + getSelectedNamespaces().hashCode();
break;
case 7:
hash = (37 * hash) + SELECTED_APPLICATIONS_FIELD_NUMBER;
hash = (53 * hash) + getSelectedApplications().hashCode();
break;
case 9:
hash = (37 * hash) + NO_NAMESPACES_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getNoNamespaces());
break;
case 10:
hash = (37 * hash) + EXCLUDED_NAMESPACES_FIELD_NUMBER;
hash = (53 * hash) + getExcludedNamespaces().hashCode();
break;
case 0:
default:
}
hash = (29 * hash) + getUnknownFields().hashCode();
memoizedHashCode = hash;
return hash;
}
public static com.google.cloud.gkebackup.v1.RestoreConfig parseFrom(java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.cloud.gkebackup.v1.RestoreConfig 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.RestoreConfig parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.cloud.gkebackup.v1.RestoreConfig 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.RestoreConfig parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.cloud.gkebackup.v1.RestoreConfig 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.RestoreConfig parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
}
public static com.google.cloud.gkebackup.v1.RestoreConfig 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.RestoreConfig parseDelimitedFrom(
java.io.InputStream input) throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input);
}
public static com.google.cloud.gkebackup.v1.RestoreConfig 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.RestoreConfig 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.RestoreConfig 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.RestoreConfig 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;
}
/**
*
*
*
* Configuration of a restore.
*
*
* Protobuf type {@code google.cloud.gkebackup.v1.RestoreConfig}
*/
public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder
implements
// @@protoc_insertion_point(builder_implements:google.cloud.gkebackup.v1.RestoreConfig)
com.google.cloud.gkebackup.v1.RestoreConfigOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
return com.google.cloud.gkebackup.v1.RestoreProto
.internal_static_google_cloud_gkebackup_v1_RestoreConfig_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.google.cloud.gkebackup.v1.RestoreProto
.internal_static_google_cloud_gkebackup_v1_RestoreConfig_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.google.cloud.gkebackup.v1.RestoreConfig.class,
com.google.cloud.gkebackup.v1.RestoreConfig.Builder.class);
}
// Construct using com.google.cloud.gkebackup.v1.RestoreConfig.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {
getClusterResourceRestoreScopeFieldBuilder();
getSubstitutionRulesFieldBuilder();
getTransformationRulesFieldBuilder();
getVolumeDataRestorePolicyBindingsFieldBuilder();
getRestoreOrderFieldBuilder();
}
}
@java.lang.Override
public Builder clear() {
super.clear();
bitField0_ = 0;
volumeDataRestorePolicy_ = 0;
clusterResourceConflictPolicy_ = 0;
namespacedResourceRestoreMode_ = 0;
clusterResourceRestoreScope_ = null;
if (clusterResourceRestoreScopeBuilder_ != null) {
clusterResourceRestoreScopeBuilder_.dispose();
clusterResourceRestoreScopeBuilder_ = null;
}
if (selectedNamespacesBuilder_ != null) {
selectedNamespacesBuilder_.clear();
}
if (selectedApplicationsBuilder_ != null) {
selectedApplicationsBuilder_.clear();
}
if (excludedNamespacesBuilder_ != null) {
excludedNamespacesBuilder_.clear();
}
if (substitutionRulesBuilder_ == null) {
substitutionRules_ = java.util.Collections.emptyList();
} else {
substitutionRules_ = null;
substitutionRulesBuilder_.clear();
}
bitField0_ = (bitField0_ & ~0x00000200);
if (transformationRulesBuilder_ == null) {
transformationRules_ = java.util.Collections.emptyList();
} else {
transformationRules_ = null;
transformationRulesBuilder_.clear();
}
bitField0_ = (bitField0_ & ~0x00000400);
if (volumeDataRestorePolicyBindingsBuilder_ == null) {
volumeDataRestorePolicyBindings_ = java.util.Collections.emptyList();
} else {
volumeDataRestorePolicyBindings_ = null;
volumeDataRestorePolicyBindingsBuilder_.clear();
}
bitField0_ = (bitField0_ & ~0x00000800);
restoreOrder_ = null;
if (restoreOrderBuilder_ != null) {
restoreOrderBuilder_.dispose();
restoreOrderBuilder_ = null;
}
namespacedResourceRestoreScopeCase_ = 0;
namespacedResourceRestoreScope_ = null;
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() {
return com.google.cloud.gkebackup.v1.RestoreProto
.internal_static_google_cloud_gkebackup_v1_RestoreConfig_descriptor;
}
@java.lang.Override
public com.google.cloud.gkebackup.v1.RestoreConfig getDefaultInstanceForType() {
return com.google.cloud.gkebackup.v1.RestoreConfig.getDefaultInstance();
}
@java.lang.Override
public com.google.cloud.gkebackup.v1.RestoreConfig build() {
com.google.cloud.gkebackup.v1.RestoreConfig result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public com.google.cloud.gkebackup.v1.RestoreConfig buildPartial() {
com.google.cloud.gkebackup.v1.RestoreConfig result =
new com.google.cloud.gkebackup.v1.RestoreConfig(this);
buildPartialRepeatedFields(result);
if (bitField0_ != 0) {
buildPartial0(result);
}
buildPartialOneofs(result);
onBuilt();
return result;
}
private void buildPartialRepeatedFields(com.google.cloud.gkebackup.v1.RestoreConfig result) {
if (substitutionRulesBuilder_ == null) {
if (((bitField0_ & 0x00000200) != 0)) {
substitutionRules_ = java.util.Collections.unmodifiableList(substitutionRules_);
bitField0_ = (bitField0_ & ~0x00000200);
}
result.substitutionRules_ = substitutionRules_;
} else {
result.substitutionRules_ = substitutionRulesBuilder_.build();
}
if (transformationRulesBuilder_ == null) {
if (((bitField0_ & 0x00000400) != 0)) {
transformationRules_ = java.util.Collections.unmodifiableList(transformationRules_);
bitField0_ = (bitField0_ & ~0x00000400);
}
result.transformationRules_ = transformationRules_;
} else {
result.transformationRules_ = transformationRulesBuilder_.build();
}
if (volumeDataRestorePolicyBindingsBuilder_ == null) {
if (((bitField0_ & 0x00000800) != 0)) {
volumeDataRestorePolicyBindings_ =
java.util.Collections.unmodifiableList(volumeDataRestorePolicyBindings_);
bitField0_ = (bitField0_ & ~0x00000800);
}
result.volumeDataRestorePolicyBindings_ = volumeDataRestorePolicyBindings_;
} else {
result.volumeDataRestorePolicyBindings_ = volumeDataRestorePolicyBindingsBuilder_.build();
}
}
private void buildPartial0(com.google.cloud.gkebackup.v1.RestoreConfig result) {
int from_bitField0_ = bitField0_;
if (((from_bitField0_ & 0x00000001) != 0)) {
result.volumeDataRestorePolicy_ = volumeDataRestorePolicy_;
}
if (((from_bitField0_ & 0x00000002) != 0)) {
result.clusterResourceConflictPolicy_ = clusterResourceConflictPolicy_;
}
if (((from_bitField0_ & 0x00000004) != 0)) {
result.namespacedResourceRestoreMode_ = namespacedResourceRestoreMode_;
}
int to_bitField0_ = 0;
if (((from_bitField0_ & 0x00000008) != 0)) {
result.clusterResourceRestoreScope_ =
clusterResourceRestoreScopeBuilder_ == null
? clusterResourceRestoreScope_
: clusterResourceRestoreScopeBuilder_.build();
to_bitField0_ |= 0x00000001;
}
if (((from_bitField0_ & 0x00001000) != 0)) {
result.restoreOrder_ =
restoreOrderBuilder_ == null ? restoreOrder_ : restoreOrderBuilder_.build();
to_bitField0_ |= 0x00000002;
}
result.bitField0_ |= to_bitField0_;
}
private void buildPartialOneofs(com.google.cloud.gkebackup.v1.RestoreConfig result) {
result.namespacedResourceRestoreScopeCase_ = namespacedResourceRestoreScopeCase_;
result.namespacedResourceRestoreScope_ = this.namespacedResourceRestoreScope_;
if (namespacedResourceRestoreScopeCase_ == 6 && selectedNamespacesBuilder_ != null) {
result.namespacedResourceRestoreScope_ = selectedNamespacesBuilder_.build();
}
if (namespacedResourceRestoreScopeCase_ == 7 && selectedApplicationsBuilder_ != null) {
result.namespacedResourceRestoreScope_ = selectedApplicationsBuilder_.build();
}
if (namespacedResourceRestoreScopeCase_ == 10 && excludedNamespacesBuilder_ != null) {
result.namespacedResourceRestoreScope_ = excludedNamespacesBuilder_.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.RestoreConfig) {
return mergeFrom((com.google.cloud.gkebackup.v1.RestoreConfig) other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(com.google.cloud.gkebackup.v1.RestoreConfig other) {
if (other == com.google.cloud.gkebackup.v1.RestoreConfig.getDefaultInstance()) return this;
if (other.volumeDataRestorePolicy_ != 0) {
setVolumeDataRestorePolicyValue(other.getVolumeDataRestorePolicyValue());
}
if (other.clusterResourceConflictPolicy_ != 0) {
setClusterResourceConflictPolicyValue(other.getClusterResourceConflictPolicyValue());
}
if (other.namespacedResourceRestoreMode_ != 0) {
setNamespacedResourceRestoreModeValue(other.getNamespacedResourceRestoreModeValue());
}
if (other.hasClusterResourceRestoreScope()) {
mergeClusterResourceRestoreScope(other.getClusterResourceRestoreScope());
}
if (substitutionRulesBuilder_ == null) {
if (!other.substitutionRules_.isEmpty()) {
if (substitutionRules_.isEmpty()) {
substitutionRules_ = other.substitutionRules_;
bitField0_ = (bitField0_ & ~0x00000200);
} else {
ensureSubstitutionRulesIsMutable();
substitutionRules_.addAll(other.substitutionRules_);
}
onChanged();
}
} else {
if (!other.substitutionRules_.isEmpty()) {
if (substitutionRulesBuilder_.isEmpty()) {
substitutionRulesBuilder_.dispose();
substitutionRulesBuilder_ = null;
substitutionRules_ = other.substitutionRules_;
bitField0_ = (bitField0_ & ~0x00000200);
substitutionRulesBuilder_ =
com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders
? getSubstitutionRulesFieldBuilder()
: null;
} else {
substitutionRulesBuilder_.addAllMessages(other.substitutionRules_);
}
}
}
if (transformationRulesBuilder_ == null) {
if (!other.transformationRules_.isEmpty()) {
if (transformationRules_.isEmpty()) {
transformationRules_ = other.transformationRules_;
bitField0_ = (bitField0_ & ~0x00000400);
} else {
ensureTransformationRulesIsMutable();
transformationRules_.addAll(other.transformationRules_);
}
onChanged();
}
} else {
if (!other.transformationRules_.isEmpty()) {
if (transformationRulesBuilder_.isEmpty()) {
transformationRulesBuilder_.dispose();
transformationRulesBuilder_ = null;
transformationRules_ = other.transformationRules_;
bitField0_ = (bitField0_ & ~0x00000400);
transformationRulesBuilder_ =
com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders
? getTransformationRulesFieldBuilder()
: null;
} else {
transformationRulesBuilder_.addAllMessages(other.transformationRules_);
}
}
}
if (volumeDataRestorePolicyBindingsBuilder_ == null) {
if (!other.volumeDataRestorePolicyBindings_.isEmpty()) {
if (volumeDataRestorePolicyBindings_.isEmpty()) {
volumeDataRestorePolicyBindings_ = other.volumeDataRestorePolicyBindings_;
bitField0_ = (bitField0_ & ~0x00000800);
} else {
ensureVolumeDataRestorePolicyBindingsIsMutable();
volumeDataRestorePolicyBindings_.addAll(other.volumeDataRestorePolicyBindings_);
}
onChanged();
}
} else {
if (!other.volumeDataRestorePolicyBindings_.isEmpty()) {
if (volumeDataRestorePolicyBindingsBuilder_.isEmpty()) {
volumeDataRestorePolicyBindingsBuilder_.dispose();
volumeDataRestorePolicyBindingsBuilder_ = null;
volumeDataRestorePolicyBindings_ = other.volumeDataRestorePolicyBindings_;
bitField0_ = (bitField0_ & ~0x00000800);
volumeDataRestorePolicyBindingsBuilder_ =
com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders
? getVolumeDataRestorePolicyBindingsFieldBuilder()
: null;
} else {
volumeDataRestorePolicyBindingsBuilder_.addAllMessages(
other.volumeDataRestorePolicyBindings_);
}
}
}
if (other.hasRestoreOrder()) {
mergeRestoreOrder(other.getRestoreOrder());
}
switch (other.getNamespacedResourceRestoreScopeCase()) {
case ALL_NAMESPACES:
{
setAllNamespaces(other.getAllNamespaces());
break;
}
case SELECTED_NAMESPACES:
{
mergeSelectedNamespaces(other.getSelectedNamespaces());
break;
}
case SELECTED_APPLICATIONS:
{
mergeSelectedApplications(other.getSelectedApplications());
break;
}
case NO_NAMESPACES:
{
setNoNamespaces(other.getNoNamespaces());
break;
}
case EXCLUDED_NAMESPACES:
{
mergeExcludedNamespaces(other.getExcludedNamespaces());
break;
}
case NAMESPACEDRESOURCERESTORESCOPE_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 8:
{
volumeDataRestorePolicy_ = input.readEnum();
bitField0_ |= 0x00000001;
break;
} // case 8
case 16:
{
clusterResourceConflictPolicy_ = input.readEnum();
bitField0_ |= 0x00000002;
break;
} // case 16
case 24:
{
namespacedResourceRestoreMode_ = input.readEnum();
bitField0_ |= 0x00000004;
break;
} // case 24
case 34:
{
input.readMessage(
getClusterResourceRestoreScopeFieldBuilder().getBuilder(), extensionRegistry);
bitField0_ |= 0x00000008;
break;
} // case 34
case 40:
{
namespacedResourceRestoreScope_ = input.readBool();
namespacedResourceRestoreScopeCase_ = 5;
break;
} // case 40
case 50:
{
input.readMessage(
getSelectedNamespacesFieldBuilder().getBuilder(), extensionRegistry);
namespacedResourceRestoreScopeCase_ = 6;
break;
} // case 50
case 58:
{
input.readMessage(
getSelectedApplicationsFieldBuilder().getBuilder(), extensionRegistry);
namespacedResourceRestoreScopeCase_ = 7;
break;
} // case 58
case 66:
{
com.google.cloud.gkebackup.v1.RestoreConfig.SubstitutionRule m =
input.readMessage(
com.google.cloud.gkebackup.v1.RestoreConfig.SubstitutionRule.parser(),
extensionRegistry);
if (substitutionRulesBuilder_ == null) {
ensureSubstitutionRulesIsMutable();
substitutionRules_.add(m);
} else {
substitutionRulesBuilder_.addMessage(m);
}
break;
} // case 66
case 72:
{
namespacedResourceRestoreScope_ = input.readBool();
namespacedResourceRestoreScopeCase_ = 9;
break;
} // case 72
case 82:
{
input.readMessage(
getExcludedNamespacesFieldBuilder().getBuilder(), extensionRegistry);
namespacedResourceRestoreScopeCase_ = 10;
break;
} // case 82
case 90:
{
com.google.cloud.gkebackup.v1.RestoreConfig.TransformationRule m =
input.readMessage(
com.google.cloud.gkebackup.v1.RestoreConfig.TransformationRule.parser(),
extensionRegistry);
if (transformationRulesBuilder_ == null) {
ensureTransformationRulesIsMutable();
transformationRules_.add(m);
} else {
transformationRulesBuilder_.addMessage(m);
}
break;
} // case 90
case 98:
{
com.google.cloud.gkebackup.v1.RestoreConfig.VolumeDataRestorePolicyBinding m =
input.readMessage(
com.google.cloud.gkebackup.v1.RestoreConfig.VolumeDataRestorePolicyBinding
.parser(),
extensionRegistry);
if (volumeDataRestorePolicyBindingsBuilder_ == null) {
ensureVolumeDataRestorePolicyBindingsIsMutable();
volumeDataRestorePolicyBindings_.add(m);
} else {
volumeDataRestorePolicyBindingsBuilder_.addMessage(m);
}
break;
} // case 98
case 106:
{
input.readMessage(getRestoreOrderFieldBuilder().getBuilder(), extensionRegistry);
bitField0_ |= 0x00001000;
break;
} // case 106
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 namespacedResourceRestoreScopeCase_ = 0;
private java.lang.Object namespacedResourceRestoreScope_;
public NamespacedResourceRestoreScopeCase getNamespacedResourceRestoreScopeCase() {
return NamespacedResourceRestoreScopeCase.forNumber(namespacedResourceRestoreScopeCase_);
}
public Builder clearNamespacedResourceRestoreScope() {
namespacedResourceRestoreScopeCase_ = 0;
namespacedResourceRestoreScope_ = null;
onChanged();
return this;
}
private int bitField0_;
private int volumeDataRestorePolicy_ = 0;
/**
*
*
*
* Optional. Specifies the mechanism to be used to restore volume data.
* Default: VOLUME_DATA_RESTORE_POLICY_UNSPECIFIED (will be treated as
* NO_VOLUME_DATA_RESTORATION).
*
*
*
* .google.cloud.gkebackup.v1.RestoreConfig.VolumeDataRestorePolicy volume_data_restore_policy = 1 [(.google.api.field_behavior) = OPTIONAL];
*
*
* @return The enum numeric value on the wire for volumeDataRestorePolicy.
*/
@java.lang.Override
public int getVolumeDataRestorePolicyValue() {
return volumeDataRestorePolicy_;
}
/**
*
*
*
* Optional. Specifies the mechanism to be used to restore volume data.
* Default: VOLUME_DATA_RESTORE_POLICY_UNSPECIFIED (will be treated as
* NO_VOLUME_DATA_RESTORATION).
*
*
*
* .google.cloud.gkebackup.v1.RestoreConfig.VolumeDataRestorePolicy volume_data_restore_policy = 1 [(.google.api.field_behavior) = OPTIONAL];
*
*
* @param value The enum numeric value on the wire for volumeDataRestorePolicy to set.
* @return This builder for chaining.
*/
public Builder setVolumeDataRestorePolicyValue(int value) {
volumeDataRestorePolicy_ = value;
bitField0_ |= 0x00000001;
onChanged();
return this;
}
/**
*
*
*
* Optional. Specifies the mechanism to be used to restore volume data.
* Default: VOLUME_DATA_RESTORE_POLICY_UNSPECIFIED (will be treated as
* NO_VOLUME_DATA_RESTORATION).
*
*
*
* .google.cloud.gkebackup.v1.RestoreConfig.VolumeDataRestorePolicy volume_data_restore_policy = 1 [(.google.api.field_behavior) = OPTIONAL];
*
*
* @return The volumeDataRestorePolicy.
*/
@java.lang.Override
public com.google.cloud.gkebackup.v1.RestoreConfig.VolumeDataRestorePolicy
getVolumeDataRestorePolicy() {
com.google.cloud.gkebackup.v1.RestoreConfig.VolumeDataRestorePolicy result =
com.google.cloud.gkebackup.v1.RestoreConfig.VolumeDataRestorePolicy.forNumber(
volumeDataRestorePolicy_);
return result == null
? com.google.cloud.gkebackup.v1.RestoreConfig.VolumeDataRestorePolicy.UNRECOGNIZED
: result;
}
/**
*
*
*
* Optional. Specifies the mechanism to be used to restore volume data.
* Default: VOLUME_DATA_RESTORE_POLICY_UNSPECIFIED (will be treated as
* NO_VOLUME_DATA_RESTORATION).
*
*
*
* .google.cloud.gkebackup.v1.RestoreConfig.VolumeDataRestorePolicy volume_data_restore_policy = 1 [(.google.api.field_behavior) = OPTIONAL];
*
*
* @param value The volumeDataRestorePolicy to set.
* @return This builder for chaining.
*/
public Builder setVolumeDataRestorePolicy(
com.google.cloud.gkebackup.v1.RestoreConfig.VolumeDataRestorePolicy value) {
if (value == null) {
throw new NullPointerException();
}
bitField0_ |= 0x00000001;
volumeDataRestorePolicy_ = value.getNumber();
onChanged();
return this;
}
/**
*
*
*
* Optional. Specifies the mechanism to be used to restore volume data.
* Default: VOLUME_DATA_RESTORE_POLICY_UNSPECIFIED (will be treated as
* NO_VOLUME_DATA_RESTORATION).
*
*
*
* .google.cloud.gkebackup.v1.RestoreConfig.VolumeDataRestorePolicy volume_data_restore_policy = 1 [(.google.api.field_behavior) = OPTIONAL];
*
*
* @return This builder for chaining.
*/
public Builder clearVolumeDataRestorePolicy() {
bitField0_ = (bitField0_ & ~0x00000001);
volumeDataRestorePolicy_ = 0;
onChanged();
return this;
}
private int clusterResourceConflictPolicy_ = 0;
/**
*
*
*
* Optional. Defines the behavior for handling the situation where
* cluster-scoped resources being restored already exist in the target
* cluster. This MUST be set to a value other than
* CLUSTER_RESOURCE_CONFLICT_POLICY_UNSPECIFIED if
* [cluster_resource_restore_scope][google.cloud.gkebackup.v1.RestoreConfig.cluster_resource_restore_scope]
* is not empty.
*
*
*
* .google.cloud.gkebackup.v1.RestoreConfig.ClusterResourceConflictPolicy cluster_resource_conflict_policy = 2 [(.google.api.field_behavior) = OPTIONAL];
*
*
* @return The enum numeric value on the wire for clusterResourceConflictPolicy.
*/
@java.lang.Override
public int getClusterResourceConflictPolicyValue() {
return clusterResourceConflictPolicy_;
}
/**
*
*
*
* Optional. Defines the behavior for handling the situation where
* cluster-scoped resources being restored already exist in the target
* cluster. This MUST be set to a value other than
* CLUSTER_RESOURCE_CONFLICT_POLICY_UNSPECIFIED if
* [cluster_resource_restore_scope][google.cloud.gkebackup.v1.RestoreConfig.cluster_resource_restore_scope]
* is not empty.
*
*
*
* .google.cloud.gkebackup.v1.RestoreConfig.ClusterResourceConflictPolicy cluster_resource_conflict_policy = 2 [(.google.api.field_behavior) = OPTIONAL];
*
*
* @param value The enum numeric value on the wire for clusterResourceConflictPolicy to set.
* @return This builder for chaining.
*/
public Builder setClusterResourceConflictPolicyValue(int value) {
clusterResourceConflictPolicy_ = value;
bitField0_ |= 0x00000002;
onChanged();
return this;
}
/**
*
*
*
* Optional. Defines the behavior for handling the situation where
* cluster-scoped resources being restored already exist in the target
* cluster. This MUST be set to a value other than
* CLUSTER_RESOURCE_CONFLICT_POLICY_UNSPECIFIED if
* [cluster_resource_restore_scope][google.cloud.gkebackup.v1.RestoreConfig.cluster_resource_restore_scope]
* is not empty.
*
*
*
* .google.cloud.gkebackup.v1.RestoreConfig.ClusterResourceConflictPolicy cluster_resource_conflict_policy = 2 [(.google.api.field_behavior) = OPTIONAL];
*
*
* @return The clusterResourceConflictPolicy.
*/
@java.lang.Override
public com.google.cloud.gkebackup.v1.RestoreConfig.ClusterResourceConflictPolicy
getClusterResourceConflictPolicy() {
com.google.cloud.gkebackup.v1.RestoreConfig.ClusterResourceConflictPolicy result =
com.google.cloud.gkebackup.v1.RestoreConfig.ClusterResourceConflictPolicy.forNumber(
clusterResourceConflictPolicy_);
return result == null
? com.google.cloud.gkebackup.v1.RestoreConfig.ClusterResourceConflictPolicy.UNRECOGNIZED
: result;
}
/**
*
*
*
* Optional. Defines the behavior for handling the situation where
* cluster-scoped resources being restored already exist in the target
* cluster. This MUST be set to a value other than
* CLUSTER_RESOURCE_CONFLICT_POLICY_UNSPECIFIED if
* [cluster_resource_restore_scope][google.cloud.gkebackup.v1.RestoreConfig.cluster_resource_restore_scope]
* is not empty.
*
*
*
* .google.cloud.gkebackup.v1.RestoreConfig.ClusterResourceConflictPolicy cluster_resource_conflict_policy = 2 [(.google.api.field_behavior) = OPTIONAL];
*
*
* @param value The clusterResourceConflictPolicy to set.
* @return This builder for chaining.
*/
public Builder setClusterResourceConflictPolicy(
com.google.cloud.gkebackup.v1.RestoreConfig.ClusterResourceConflictPolicy value) {
if (value == null) {
throw new NullPointerException();
}
bitField0_ |= 0x00000002;
clusterResourceConflictPolicy_ = value.getNumber();
onChanged();
return this;
}
/**
*
*
*
* Optional. Defines the behavior for handling the situation where
* cluster-scoped resources being restored already exist in the target
* cluster. This MUST be set to a value other than
* CLUSTER_RESOURCE_CONFLICT_POLICY_UNSPECIFIED if
* [cluster_resource_restore_scope][google.cloud.gkebackup.v1.RestoreConfig.cluster_resource_restore_scope]
* is not empty.
*
*
*
* .google.cloud.gkebackup.v1.RestoreConfig.ClusterResourceConflictPolicy cluster_resource_conflict_policy = 2 [(.google.api.field_behavior) = OPTIONAL];
*
*
* @return This builder for chaining.
*/
public Builder clearClusterResourceConflictPolicy() {
bitField0_ = (bitField0_ & ~0x00000002);
clusterResourceConflictPolicy_ = 0;
onChanged();
return this;
}
private int namespacedResourceRestoreMode_ = 0;
/**
*
*
*
* Optional. Defines the behavior for handling the situation where sets of
* namespaced resources being restored already exist in the target cluster.
* This MUST be set to a value other than
* NAMESPACED_RESOURCE_RESTORE_MODE_UNSPECIFIED.
*
*
*
* .google.cloud.gkebackup.v1.RestoreConfig.NamespacedResourceRestoreMode namespaced_resource_restore_mode = 3 [(.google.api.field_behavior) = OPTIONAL];
*
*
* @return The enum numeric value on the wire for namespacedResourceRestoreMode.
*/
@java.lang.Override
public int getNamespacedResourceRestoreModeValue() {
return namespacedResourceRestoreMode_;
}
/**
*
*
*
* Optional. Defines the behavior for handling the situation where sets of
* namespaced resources being restored already exist in the target cluster.
* This MUST be set to a value other than
* NAMESPACED_RESOURCE_RESTORE_MODE_UNSPECIFIED.
*
*
*
* .google.cloud.gkebackup.v1.RestoreConfig.NamespacedResourceRestoreMode namespaced_resource_restore_mode = 3 [(.google.api.field_behavior) = OPTIONAL];
*
*
* @param value The enum numeric value on the wire for namespacedResourceRestoreMode to set.
* @return This builder for chaining.
*/
public Builder setNamespacedResourceRestoreModeValue(int value) {
namespacedResourceRestoreMode_ = value;
bitField0_ |= 0x00000004;
onChanged();
return this;
}
/**
*
*
*
* Optional. Defines the behavior for handling the situation where sets of
* namespaced resources being restored already exist in the target cluster.
* This MUST be set to a value other than
* NAMESPACED_RESOURCE_RESTORE_MODE_UNSPECIFIED.
*
*
*
* .google.cloud.gkebackup.v1.RestoreConfig.NamespacedResourceRestoreMode namespaced_resource_restore_mode = 3 [(.google.api.field_behavior) = OPTIONAL];
*
*
* @return The namespacedResourceRestoreMode.
*/
@java.lang.Override
public com.google.cloud.gkebackup.v1.RestoreConfig.NamespacedResourceRestoreMode
getNamespacedResourceRestoreMode() {
com.google.cloud.gkebackup.v1.RestoreConfig.NamespacedResourceRestoreMode result =
com.google.cloud.gkebackup.v1.RestoreConfig.NamespacedResourceRestoreMode.forNumber(
namespacedResourceRestoreMode_);
return result == null
? com.google.cloud.gkebackup.v1.RestoreConfig.NamespacedResourceRestoreMode.UNRECOGNIZED
: result;
}
/**
*
*
*
* Optional. Defines the behavior for handling the situation where sets of
* namespaced resources being restored already exist in the target cluster.
* This MUST be set to a value other than
* NAMESPACED_RESOURCE_RESTORE_MODE_UNSPECIFIED.
*
*
*
* .google.cloud.gkebackup.v1.RestoreConfig.NamespacedResourceRestoreMode namespaced_resource_restore_mode = 3 [(.google.api.field_behavior) = OPTIONAL];
*
*
* @param value The namespacedResourceRestoreMode to set.
* @return This builder for chaining.
*/
public Builder setNamespacedResourceRestoreMode(
com.google.cloud.gkebackup.v1.RestoreConfig.NamespacedResourceRestoreMode value) {
if (value == null) {
throw new NullPointerException();
}
bitField0_ |= 0x00000004;
namespacedResourceRestoreMode_ = value.getNumber();
onChanged();
return this;
}
/**
*
*
*
* Optional. Defines the behavior for handling the situation where sets of
* namespaced resources being restored already exist in the target cluster.
* This MUST be set to a value other than
* NAMESPACED_RESOURCE_RESTORE_MODE_UNSPECIFIED.
*
*
*
* .google.cloud.gkebackup.v1.RestoreConfig.NamespacedResourceRestoreMode namespaced_resource_restore_mode = 3 [(.google.api.field_behavior) = OPTIONAL];
*
*
* @return This builder for chaining.
*/
public Builder clearNamespacedResourceRestoreMode() {
bitField0_ = (bitField0_ & ~0x00000004);
namespacedResourceRestoreMode_ = 0;
onChanged();
return this;
}
private com.google.cloud.gkebackup.v1.RestoreConfig.ClusterResourceRestoreScope
clusterResourceRestoreScope_;
private com.google.protobuf.SingleFieldBuilderV3<
com.google.cloud.gkebackup.v1.RestoreConfig.ClusterResourceRestoreScope,
com.google.cloud.gkebackup.v1.RestoreConfig.ClusterResourceRestoreScope.Builder,
com.google.cloud.gkebackup.v1.RestoreConfig.ClusterResourceRestoreScopeOrBuilder>
clusterResourceRestoreScopeBuilder_;
/**
*
*
*
* Optional. Identifies the cluster-scoped resources to restore from the
* Backup. Not specifying it means NO cluster resource will be restored.
*
*
*
* .google.cloud.gkebackup.v1.RestoreConfig.ClusterResourceRestoreScope cluster_resource_restore_scope = 4 [(.google.api.field_behavior) = OPTIONAL];
*
*
* @return Whether the clusterResourceRestoreScope field is set.
*/
public boolean hasClusterResourceRestoreScope() {
return ((bitField0_ & 0x00000008) != 0);
}
/**
*
*
*
* Optional. Identifies the cluster-scoped resources to restore from the
* Backup. Not specifying it means NO cluster resource will be restored.
*
*
*
* .google.cloud.gkebackup.v1.RestoreConfig.ClusterResourceRestoreScope cluster_resource_restore_scope = 4 [(.google.api.field_behavior) = OPTIONAL];
*
*
* @return The clusterResourceRestoreScope.
*/
public com.google.cloud.gkebackup.v1.RestoreConfig.ClusterResourceRestoreScope
getClusterResourceRestoreScope() {
if (clusterResourceRestoreScopeBuilder_ == null) {
return clusterResourceRestoreScope_ == null
? com.google.cloud.gkebackup.v1.RestoreConfig.ClusterResourceRestoreScope
.getDefaultInstance()
: clusterResourceRestoreScope_;
} else {
return clusterResourceRestoreScopeBuilder_.getMessage();
}
}
/**
*
*
*
* Optional. Identifies the cluster-scoped resources to restore from the
* Backup. Not specifying it means NO cluster resource will be restored.
*
*
*
* .google.cloud.gkebackup.v1.RestoreConfig.ClusterResourceRestoreScope cluster_resource_restore_scope = 4 [(.google.api.field_behavior) = OPTIONAL];
*
*/
public Builder setClusterResourceRestoreScope(
com.google.cloud.gkebackup.v1.RestoreConfig.ClusterResourceRestoreScope value) {
if (clusterResourceRestoreScopeBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
clusterResourceRestoreScope_ = value;
} else {
clusterResourceRestoreScopeBuilder_.setMessage(value);
}
bitField0_ |= 0x00000008;
onChanged();
return this;
}
/**
*
*
*
* Optional. Identifies the cluster-scoped resources to restore from the
* Backup. Not specifying it means NO cluster resource will be restored.
*
*
*
* .google.cloud.gkebackup.v1.RestoreConfig.ClusterResourceRestoreScope cluster_resource_restore_scope = 4 [(.google.api.field_behavior) = OPTIONAL];
*
*/
public Builder setClusterResourceRestoreScope(
com.google.cloud.gkebackup.v1.RestoreConfig.ClusterResourceRestoreScope.Builder
builderForValue) {
if (clusterResourceRestoreScopeBuilder_ == null) {
clusterResourceRestoreScope_ = builderForValue.build();
} else {
clusterResourceRestoreScopeBuilder_.setMessage(builderForValue.build());
}
bitField0_ |= 0x00000008;
onChanged();
return this;
}
/**
*
*
*
* Optional. Identifies the cluster-scoped resources to restore from the
* Backup. Not specifying it means NO cluster resource will be restored.
*
*
*
* .google.cloud.gkebackup.v1.RestoreConfig.ClusterResourceRestoreScope cluster_resource_restore_scope = 4 [(.google.api.field_behavior) = OPTIONAL];
*
*/
public Builder mergeClusterResourceRestoreScope(
com.google.cloud.gkebackup.v1.RestoreConfig.ClusterResourceRestoreScope value) {
if (clusterResourceRestoreScopeBuilder_ == null) {
if (((bitField0_ & 0x00000008) != 0)
&& clusterResourceRestoreScope_ != null
&& clusterResourceRestoreScope_
!= com.google.cloud.gkebackup.v1.RestoreConfig.ClusterResourceRestoreScope
.getDefaultInstance()) {
getClusterResourceRestoreScopeBuilder().mergeFrom(value);
} else {
clusterResourceRestoreScope_ = value;
}
} else {
clusterResourceRestoreScopeBuilder_.mergeFrom(value);
}
if (clusterResourceRestoreScope_ != null) {
bitField0_ |= 0x00000008;
onChanged();
}
return this;
}
/**
*
*
*
* Optional. Identifies the cluster-scoped resources to restore from the
* Backup. Not specifying it means NO cluster resource will be restored.
*
*
*
* .google.cloud.gkebackup.v1.RestoreConfig.ClusterResourceRestoreScope cluster_resource_restore_scope = 4 [(.google.api.field_behavior) = OPTIONAL];
*
*/
public Builder clearClusterResourceRestoreScope() {
bitField0_ = (bitField0_ & ~0x00000008);
clusterResourceRestoreScope_ = null;
if (clusterResourceRestoreScopeBuilder_ != null) {
clusterResourceRestoreScopeBuilder_.dispose();
clusterResourceRestoreScopeBuilder_ = null;
}
onChanged();
return this;
}
/**
*
*
*
* Optional. Identifies the cluster-scoped resources to restore from the
* Backup. Not specifying it means NO cluster resource will be restored.
*
*
*
* .google.cloud.gkebackup.v1.RestoreConfig.ClusterResourceRestoreScope cluster_resource_restore_scope = 4 [(.google.api.field_behavior) = OPTIONAL];
*
*/
public com.google.cloud.gkebackup.v1.RestoreConfig.ClusterResourceRestoreScope.Builder
getClusterResourceRestoreScopeBuilder() {
bitField0_ |= 0x00000008;
onChanged();
return getClusterResourceRestoreScopeFieldBuilder().getBuilder();
}
/**
*
*
*
* Optional. Identifies the cluster-scoped resources to restore from the
* Backup. Not specifying it means NO cluster resource will be restored.
*
*
*
* .google.cloud.gkebackup.v1.RestoreConfig.ClusterResourceRestoreScope cluster_resource_restore_scope = 4 [(.google.api.field_behavior) = OPTIONAL];
*
*/
public com.google.cloud.gkebackup.v1.RestoreConfig.ClusterResourceRestoreScopeOrBuilder
getClusterResourceRestoreScopeOrBuilder() {
if (clusterResourceRestoreScopeBuilder_ != null) {
return clusterResourceRestoreScopeBuilder_.getMessageOrBuilder();
} else {
return clusterResourceRestoreScope_ == null
? com.google.cloud.gkebackup.v1.RestoreConfig.ClusterResourceRestoreScope
.getDefaultInstance()
: clusterResourceRestoreScope_;
}
}
/**
*
*
*
* Optional. Identifies the cluster-scoped resources to restore from the
* Backup. Not specifying it means NO cluster resource will be restored.
*
*
*
* .google.cloud.gkebackup.v1.RestoreConfig.ClusterResourceRestoreScope cluster_resource_restore_scope = 4 [(.google.api.field_behavior) = OPTIONAL];
*
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.google.cloud.gkebackup.v1.RestoreConfig.ClusterResourceRestoreScope,
com.google.cloud.gkebackup.v1.RestoreConfig.ClusterResourceRestoreScope.Builder,
com.google.cloud.gkebackup.v1.RestoreConfig.ClusterResourceRestoreScopeOrBuilder>
getClusterResourceRestoreScopeFieldBuilder() {
if (clusterResourceRestoreScopeBuilder_ == null) {
clusterResourceRestoreScopeBuilder_ =
new com.google.protobuf.SingleFieldBuilderV3<
com.google.cloud.gkebackup.v1.RestoreConfig.ClusterResourceRestoreScope,
com.google.cloud.gkebackup.v1.RestoreConfig.ClusterResourceRestoreScope.Builder,
com.google.cloud.gkebackup.v1.RestoreConfig.ClusterResourceRestoreScopeOrBuilder>(
getClusterResourceRestoreScope(), getParentForChildren(), isClean());
clusterResourceRestoreScope_ = null;
}
return clusterResourceRestoreScopeBuilder_;
}
/**
*
*
*
* Restore all namespaced resources in the Backup if set to "True".
* Specifying this field to "False" is an error.
*
*
* bool all_namespaces = 5;
*
* @return Whether the allNamespaces field is set.
*/
public boolean hasAllNamespaces() {
return namespacedResourceRestoreScopeCase_ == 5;
}
/**
*
*
*
* Restore all namespaced resources in the Backup if set to "True".
* Specifying this field to "False" is an error.
*
*
* bool all_namespaces = 5;
*
* @return The allNamespaces.
*/
public boolean getAllNamespaces() {
if (namespacedResourceRestoreScopeCase_ == 5) {
return (java.lang.Boolean) namespacedResourceRestoreScope_;
}
return false;
}
/**
*
*
*
* Restore all namespaced resources in the Backup if set to "True".
* Specifying this field to "False" is an error.
*
*
* bool all_namespaces = 5;
*
* @param value The allNamespaces to set.
* @return This builder for chaining.
*/
public Builder setAllNamespaces(boolean value) {
namespacedResourceRestoreScopeCase_ = 5;
namespacedResourceRestoreScope_ = value;
onChanged();
return this;
}
/**
*
*
*
* Restore all namespaced resources in the Backup if set to "True".
* Specifying this field to "False" is an error.
*
*
* bool all_namespaces = 5;
*
* @return This builder for chaining.
*/
public Builder clearAllNamespaces() {
if (namespacedResourceRestoreScopeCase_ == 5) {
namespacedResourceRestoreScopeCase_ = 0;
namespacedResourceRestoreScope_ = null;
onChanged();
}
return this;
}
private com.google.protobuf.SingleFieldBuilderV3<
com.google.cloud.gkebackup.v1.Namespaces,
com.google.cloud.gkebackup.v1.Namespaces.Builder,
com.google.cloud.gkebackup.v1.NamespacesOrBuilder>
selectedNamespacesBuilder_;
/**
*
*
*
* A list of selected Namespaces to restore from the Backup. The listed
* Namespaces and all resources contained in them will be restored.
*
*
* .google.cloud.gkebackup.v1.Namespaces selected_namespaces = 6;
*
* @return Whether the selectedNamespaces field is set.
*/
@java.lang.Override
public boolean hasSelectedNamespaces() {
return namespacedResourceRestoreScopeCase_ == 6;
}
/**
*
*
*
* A list of selected Namespaces to restore from the Backup. The listed
* Namespaces and all resources contained in them will be restored.
*
*
* .google.cloud.gkebackup.v1.Namespaces selected_namespaces = 6;
*
* @return The selectedNamespaces.
*/
@java.lang.Override
public com.google.cloud.gkebackup.v1.Namespaces getSelectedNamespaces() {
if (selectedNamespacesBuilder_ == null) {
if (namespacedResourceRestoreScopeCase_ == 6) {
return (com.google.cloud.gkebackup.v1.Namespaces) namespacedResourceRestoreScope_;
}
return com.google.cloud.gkebackup.v1.Namespaces.getDefaultInstance();
} else {
if (namespacedResourceRestoreScopeCase_ == 6) {
return selectedNamespacesBuilder_.getMessage();
}
return com.google.cloud.gkebackup.v1.Namespaces.getDefaultInstance();
}
}
/**
*
*
*
* A list of selected Namespaces to restore from the Backup. The listed
* Namespaces and all resources contained in them will be restored.
*
*
* .google.cloud.gkebackup.v1.Namespaces selected_namespaces = 6;
*/
public Builder setSelectedNamespaces(com.google.cloud.gkebackup.v1.Namespaces value) {
if (selectedNamespacesBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
namespacedResourceRestoreScope_ = value;
onChanged();
} else {
selectedNamespacesBuilder_.setMessage(value);
}
namespacedResourceRestoreScopeCase_ = 6;
return this;
}
/**
*
*
*
* A list of selected Namespaces to restore from the Backup. The listed
* Namespaces and all resources contained in them will be restored.
*
*
* .google.cloud.gkebackup.v1.Namespaces selected_namespaces = 6;
*/
public Builder setSelectedNamespaces(
com.google.cloud.gkebackup.v1.Namespaces.Builder builderForValue) {
if (selectedNamespacesBuilder_ == null) {
namespacedResourceRestoreScope_ = builderForValue.build();
onChanged();
} else {
selectedNamespacesBuilder_.setMessage(builderForValue.build());
}
namespacedResourceRestoreScopeCase_ = 6;
return this;
}
/**
*
*
*
* A list of selected Namespaces to restore from the Backup. The listed
* Namespaces and all resources contained in them will be restored.
*
*
* .google.cloud.gkebackup.v1.Namespaces selected_namespaces = 6;
*/
public Builder mergeSelectedNamespaces(com.google.cloud.gkebackup.v1.Namespaces value) {
if (selectedNamespacesBuilder_ == null) {
if (namespacedResourceRestoreScopeCase_ == 6
&& namespacedResourceRestoreScope_
!= com.google.cloud.gkebackup.v1.Namespaces.getDefaultInstance()) {
namespacedResourceRestoreScope_ =
com.google.cloud.gkebackup.v1.Namespaces.newBuilder(
(com.google.cloud.gkebackup.v1.Namespaces) namespacedResourceRestoreScope_)
.mergeFrom(value)
.buildPartial();
} else {
namespacedResourceRestoreScope_ = value;
}
onChanged();
} else {
if (namespacedResourceRestoreScopeCase_ == 6) {
selectedNamespacesBuilder_.mergeFrom(value);
} else {
selectedNamespacesBuilder_.setMessage(value);
}
}
namespacedResourceRestoreScopeCase_ = 6;
return this;
}
/**
*
*
*
* A list of selected Namespaces to restore from the Backup. The listed
* Namespaces and all resources contained in them will be restored.
*
*
* .google.cloud.gkebackup.v1.Namespaces selected_namespaces = 6;
*/
public Builder clearSelectedNamespaces() {
if (selectedNamespacesBuilder_ == null) {
if (namespacedResourceRestoreScopeCase_ == 6) {
namespacedResourceRestoreScopeCase_ = 0;
namespacedResourceRestoreScope_ = null;
onChanged();
}
} else {
if (namespacedResourceRestoreScopeCase_ == 6) {
namespacedResourceRestoreScopeCase_ = 0;
namespacedResourceRestoreScope_ = null;
}
selectedNamespacesBuilder_.clear();
}
return this;
}
/**
*
*
*
* A list of selected Namespaces to restore from the Backup. The listed
* Namespaces and all resources contained in them will be restored.
*
*
* .google.cloud.gkebackup.v1.Namespaces selected_namespaces = 6;
*/
public com.google.cloud.gkebackup.v1.Namespaces.Builder getSelectedNamespacesBuilder() {
return getSelectedNamespacesFieldBuilder().getBuilder();
}
/**
*
*
*
* A list of selected Namespaces to restore from the Backup. The listed
* Namespaces and all resources contained in them will be restored.
*
*
* .google.cloud.gkebackup.v1.Namespaces selected_namespaces = 6;
*/
@java.lang.Override
public com.google.cloud.gkebackup.v1.NamespacesOrBuilder getSelectedNamespacesOrBuilder() {
if ((namespacedResourceRestoreScopeCase_ == 6) && (selectedNamespacesBuilder_ != null)) {
return selectedNamespacesBuilder_.getMessageOrBuilder();
} else {
if (namespacedResourceRestoreScopeCase_ == 6) {
return (com.google.cloud.gkebackup.v1.Namespaces) namespacedResourceRestoreScope_;
}
return com.google.cloud.gkebackup.v1.Namespaces.getDefaultInstance();
}
}
/**
*
*
*
* A list of selected Namespaces to restore from the Backup. The listed
* Namespaces and all resources contained in them will be restored.
*
*
* .google.cloud.gkebackup.v1.Namespaces selected_namespaces = 6;
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.google.cloud.gkebackup.v1.Namespaces,
com.google.cloud.gkebackup.v1.Namespaces.Builder,
com.google.cloud.gkebackup.v1.NamespacesOrBuilder>
getSelectedNamespacesFieldBuilder() {
if (selectedNamespacesBuilder_ == null) {
if (!(namespacedResourceRestoreScopeCase_ == 6)) {
namespacedResourceRestoreScope_ =
com.google.cloud.gkebackup.v1.Namespaces.getDefaultInstance();
}
selectedNamespacesBuilder_ =
new com.google.protobuf.SingleFieldBuilderV3<
com.google.cloud.gkebackup.v1.Namespaces,
com.google.cloud.gkebackup.v1.Namespaces.Builder,
com.google.cloud.gkebackup.v1.NamespacesOrBuilder>(
(com.google.cloud.gkebackup.v1.Namespaces) namespacedResourceRestoreScope_,
getParentForChildren(),
isClean());
namespacedResourceRestoreScope_ = null;
}
namespacedResourceRestoreScopeCase_ = 6;
onChanged();
return selectedNamespacesBuilder_;
}
private com.google.protobuf.SingleFieldBuilderV3<
com.google.cloud.gkebackup.v1.NamespacedNames,
com.google.cloud.gkebackup.v1.NamespacedNames.Builder,
com.google.cloud.gkebackup.v1.NamespacedNamesOrBuilder>
selectedApplicationsBuilder_;
/**
*
*
*
* A list of selected ProtectedApplications to restore. The listed
* ProtectedApplications and all the resources to which they refer will be
* restored.
*
*
* .google.cloud.gkebackup.v1.NamespacedNames selected_applications = 7;
*
* @return Whether the selectedApplications field is set.
*/
@java.lang.Override
public boolean hasSelectedApplications() {
return namespacedResourceRestoreScopeCase_ == 7;
}
/**
*
*
*
* A list of selected ProtectedApplications to restore. The listed
* ProtectedApplications and all the resources to which they refer will be
* restored.
*
*
* .google.cloud.gkebackup.v1.NamespacedNames selected_applications = 7;
*
* @return The selectedApplications.
*/
@java.lang.Override
public com.google.cloud.gkebackup.v1.NamespacedNames getSelectedApplications() {
if (selectedApplicationsBuilder_ == null) {
if (namespacedResourceRestoreScopeCase_ == 7) {
return (com.google.cloud.gkebackup.v1.NamespacedNames) namespacedResourceRestoreScope_;
}
return com.google.cloud.gkebackup.v1.NamespacedNames.getDefaultInstance();
} else {
if (namespacedResourceRestoreScopeCase_ == 7) {
return selectedApplicationsBuilder_.getMessage();
}
return com.google.cloud.gkebackup.v1.NamespacedNames.getDefaultInstance();
}
}
/**
*
*
*
* A list of selected ProtectedApplications to restore. The listed
* ProtectedApplications and all the resources to which they refer will be
* restored.
*
*
* .google.cloud.gkebackup.v1.NamespacedNames selected_applications = 7;
*/
public Builder setSelectedApplications(com.google.cloud.gkebackup.v1.NamespacedNames value) {
if (selectedApplicationsBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
namespacedResourceRestoreScope_ = value;
onChanged();
} else {
selectedApplicationsBuilder_.setMessage(value);
}
namespacedResourceRestoreScopeCase_ = 7;
return this;
}
/**
*
*
*
* A list of selected ProtectedApplications to restore. The listed
* ProtectedApplications and all the resources to which they refer will be
* restored.
*
*
* .google.cloud.gkebackup.v1.NamespacedNames selected_applications = 7;
*/
public Builder setSelectedApplications(
com.google.cloud.gkebackup.v1.NamespacedNames.Builder builderForValue) {
if (selectedApplicationsBuilder_ == null) {
namespacedResourceRestoreScope_ = builderForValue.build();
onChanged();
} else {
selectedApplicationsBuilder_.setMessage(builderForValue.build());
}
namespacedResourceRestoreScopeCase_ = 7;
return this;
}
/**
*
*
*
* A list of selected ProtectedApplications to restore. The listed
* ProtectedApplications and all the resources to which they refer will be
* restored.
*
*
* .google.cloud.gkebackup.v1.NamespacedNames selected_applications = 7;
*/
public Builder mergeSelectedApplications(com.google.cloud.gkebackup.v1.NamespacedNames value) {
if (selectedApplicationsBuilder_ == null) {
if (namespacedResourceRestoreScopeCase_ == 7
&& namespacedResourceRestoreScope_
!= com.google.cloud.gkebackup.v1.NamespacedNames.getDefaultInstance()) {
namespacedResourceRestoreScope_ =
com.google.cloud.gkebackup.v1.NamespacedNames.newBuilder(
(com.google.cloud.gkebackup.v1.NamespacedNames)
namespacedResourceRestoreScope_)
.mergeFrom(value)
.buildPartial();
} else {
namespacedResourceRestoreScope_ = value;
}
onChanged();
} else {
if (namespacedResourceRestoreScopeCase_ == 7) {
selectedApplicationsBuilder_.mergeFrom(value);
} else {
selectedApplicationsBuilder_.setMessage(value);
}
}
namespacedResourceRestoreScopeCase_ = 7;
return this;
}
/**
*
*
*
* A list of selected ProtectedApplications to restore. The listed
* ProtectedApplications and all the resources to which they refer will be
* restored.
*
*
* .google.cloud.gkebackup.v1.NamespacedNames selected_applications = 7;
*/
public Builder clearSelectedApplications() {
if (selectedApplicationsBuilder_ == null) {
if (namespacedResourceRestoreScopeCase_ == 7) {
namespacedResourceRestoreScopeCase_ = 0;
namespacedResourceRestoreScope_ = null;
onChanged();
}
} else {
if (namespacedResourceRestoreScopeCase_ == 7) {
namespacedResourceRestoreScopeCase_ = 0;
namespacedResourceRestoreScope_ = null;
}
selectedApplicationsBuilder_.clear();
}
return this;
}
/**
*
*
*
* A list of selected ProtectedApplications to restore. The listed
* ProtectedApplications and all the resources to which they refer will be
* restored.
*
*
* .google.cloud.gkebackup.v1.NamespacedNames selected_applications = 7;
*/
public com.google.cloud.gkebackup.v1.NamespacedNames.Builder getSelectedApplicationsBuilder() {
return getSelectedApplicationsFieldBuilder().getBuilder();
}
/**
*
*
*
* A list of selected ProtectedApplications to restore. The listed
* ProtectedApplications and all the resources to which they refer will be
* restored.
*
*
* .google.cloud.gkebackup.v1.NamespacedNames selected_applications = 7;
*/
@java.lang.Override
public com.google.cloud.gkebackup.v1.NamespacedNamesOrBuilder
getSelectedApplicationsOrBuilder() {
if ((namespacedResourceRestoreScopeCase_ == 7) && (selectedApplicationsBuilder_ != null)) {
return selectedApplicationsBuilder_.getMessageOrBuilder();
} else {
if (namespacedResourceRestoreScopeCase_ == 7) {
return (com.google.cloud.gkebackup.v1.NamespacedNames) namespacedResourceRestoreScope_;
}
return com.google.cloud.gkebackup.v1.NamespacedNames.getDefaultInstance();
}
}
/**
*
*
*
* A list of selected ProtectedApplications to restore. The listed
* ProtectedApplications and all the resources to which they refer will be
* restored.
*
*
* .google.cloud.gkebackup.v1.NamespacedNames selected_applications = 7;
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.google.cloud.gkebackup.v1.NamespacedNames,
com.google.cloud.gkebackup.v1.NamespacedNames.Builder,
com.google.cloud.gkebackup.v1.NamespacedNamesOrBuilder>
getSelectedApplicationsFieldBuilder() {
if (selectedApplicationsBuilder_ == null) {
if (!(namespacedResourceRestoreScopeCase_ == 7)) {
namespacedResourceRestoreScope_ =
com.google.cloud.gkebackup.v1.NamespacedNames.getDefaultInstance();
}
selectedApplicationsBuilder_ =
new com.google.protobuf.SingleFieldBuilderV3<
com.google.cloud.gkebackup.v1.NamespacedNames,
com.google.cloud.gkebackup.v1.NamespacedNames.Builder,
com.google.cloud.gkebackup.v1.NamespacedNamesOrBuilder>(
(com.google.cloud.gkebackup.v1.NamespacedNames) namespacedResourceRestoreScope_,
getParentForChildren(),
isClean());
namespacedResourceRestoreScope_ = null;
}
namespacedResourceRestoreScopeCase_ = 7;
onChanged();
return selectedApplicationsBuilder_;
}
/**
*
*
*
* Do not restore any namespaced resources if set to "True".
* Specifying this field to "False" is not allowed.
*
*
* bool no_namespaces = 9;
*
* @return Whether the noNamespaces field is set.
*/
public boolean hasNoNamespaces() {
return namespacedResourceRestoreScopeCase_ == 9;
}
/**
*
*
*
* Do not restore any namespaced resources if set to "True".
* Specifying this field to "False" is not allowed.
*
*
* bool no_namespaces = 9;
*
* @return The noNamespaces.
*/
public boolean getNoNamespaces() {
if (namespacedResourceRestoreScopeCase_ == 9) {
return (java.lang.Boolean) namespacedResourceRestoreScope_;
}
return false;
}
/**
*
*
*
* Do not restore any namespaced resources if set to "True".
* Specifying this field to "False" is not allowed.
*
*
* bool no_namespaces = 9;
*
* @param value The noNamespaces to set.
* @return This builder for chaining.
*/
public Builder setNoNamespaces(boolean value) {
namespacedResourceRestoreScopeCase_ = 9;
namespacedResourceRestoreScope_ = value;
onChanged();
return this;
}
/**
*
*
*
* Do not restore any namespaced resources if set to "True".
* Specifying this field to "False" is not allowed.
*
*
* bool no_namespaces = 9;
*
* @return This builder for chaining.
*/
public Builder clearNoNamespaces() {
if (namespacedResourceRestoreScopeCase_ == 9) {
namespacedResourceRestoreScopeCase_ = 0;
namespacedResourceRestoreScope_ = null;
onChanged();
}
return this;
}
private com.google.protobuf.SingleFieldBuilderV3<
com.google.cloud.gkebackup.v1.Namespaces,
com.google.cloud.gkebackup.v1.Namespaces.Builder,
com.google.cloud.gkebackup.v1.NamespacesOrBuilder>
excludedNamespacesBuilder_;
/**
*
*
*
* A list of selected namespaces excluded from restoration. All
* namespaces except those in this list will be restored.
*
*
* .google.cloud.gkebackup.v1.Namespaces excluded_namespaces = 10;
*
* @return Whether the excludedNamespaces field is set.
*/
@java.lang.Override
public boolean hasExcludedNamespaces() {
return namespacedResourceRestoreScopeCase_ == 10;
}
/**
*
*
*
* A list of selected namespaces excluded from restoration. All
* namespaces except those in this list will be restored.
*
*
* .google.cloud.gkebackup.v1.Namespaces excluded_namespaces = 10;
*
* @return The excludedNamespaces.
*/
@java.lang.Override
public com.google.cloud.gkebackup.v1.Namespaces getExcludedNamespaces() {
if (excludedNamespacesBuilder_ == null) {
if (namespacedResourceRestoreScopeCase_ == 10) {
return (com.google.cloud.gkebackup.v1.Namespaces) namespacedResourceRestoreScope_;
}
return com.google.cloud.gkebackup.v1.Namespaces.getDefaultInstance();
} else {
if (namespacedResourceRestoreScopeCase_ == 10) {
return excludedNamespacesBuilder_.getMessage();
}
return com.google.cloud.gkebackup.v1.Namespaces.getDefaultInstance();
}
}
/**
*
*
*
* A list of selected namespaces excluded from restoration. All
* namespaces except those in this list will be restored.
*
*
* .google.cloud.gkebackup.v1.Namespaces excluded_namespaces = 10;
*/
public Builder setExcludedNamespaces(com.google.cloud.gkebackup.v1.Namespaces value) {
if (excludedNamespacesBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
namespacedResourceRestoreScope_ = value;
onChanged();
} else {
excludedNamespacesBuilder_.setMessage(value);
}
namespacedResourceRestoreScopeCase_ = 10;
return this;
}
/**
*
*
*
* A list of selected namespaces excluded from restoration. All
* namespaces except those in this list will be restored.
*
*
* .google.cloud.gkebackup.v1.Namespaces excluded_namespaces = 10;
*/
public Builder setExcludedNamespaces(
com.google.cloud.gkebackup.v1.Namespaces.Builder builderForValue) {
if (excludedNamespacesBuilder_ == null) {
namespacedResourceRestoreScope_ = builderForValue.build();
onChanged();
} else {
excludedNamespacesBuilder_.setMessage(builderForValue.build());
}
namespacedResourceRestoreScopeCase_ = 10;
return this;
}
/**
*
*
*
* A list of selected namespaces excluded from restoration. All
* namespaces except those in this list will be restored.
*
*
* .google.cloud.gkebackup.v1.Namespaces excluded_namespaces = 10;
*/
public Builder mergeExcludedNamespaces(com.google.cloud.gkebackup.v1.Namespaces value) {
if (excludedNamespacesBuilder_ == null) {
if (namespacedResourceRestoreScopeCase_ == 10
&& namespacedResourceRestoreScope_
!= com.google.cloud.gkebackup.v1.Namespaces.getDefaultInstance()) {
namespacedResourceRestoreScope_ =
com.google.cloud.gkebackup.v1.Namespaces.newBuilder(
(com.google.cloud.gkebackup.v1.Namespaces) namespacedResourceRestoreScope_)
.mergeFrom(value)
.buildPartial();
} else {
namespacedResourceRestoreScope_ = value;
}
onChanged();
} else {
if (namespacedResourceRestoreScopeCase_ == 10) {
excludedNamespacesBuilder_.mergeFrom(value);
} else {
excludedNamespacesBuilder_.setMessage(value);
}
}
namespacedResourceRestoreScopeCase_ = 10;
return this;
}
/**
*
*
*
* A list of selected namespaces excluded from restoration. All
* namespaces except those in this list will be restored.
*
*
* .google.cloud.gkebackup.v1.Namespaces excluded_namespaces = 10;
*/
public Builder clearExcludedNamespaces() {
if (excludedNamespacesBuilder_ == null) {
if (namespacedResourceRestoreScopeCase_ == 10) {
namespacedResourceRestoreScopeCase_ = 0;
namespacedResourceRestoreScope_ = null;
onChanged();
}
} else {
if (namespacedResourceRestoreScopeCase_ == 10) {
namespacedResourceRestoreScopeCase_ = 0;
namespacedResourceRestoreScope_ = null;
}
excludedNamespacesBuilder_.clear();
}
return this;
}
/**
*
*
*
* A list of selected namespaces excluded from restoration. All
* namespaces except those in this list will be restored.
*
*
* .google.cloud.gkebackup.v1.Namespaces excluded_namespaces = 10;
*/
public com.google.cloud.gkebackup.v1.Namespaces.Builder getExcludedNamespacesBuilder() {
return getExcludedNamespacesFieldBuilder().getBuilder();
}
/**
*
*
*
* A list of selected namespaces excluded from restoration. All
* namespaces except those in this list will be restored.
*
*
* .google.cloud.gkebackup.v1.Namespaces excluded_namespaces = 10;
*/
@java.lang.Override
public com.google.cloud.gkebackup.v1.NamespacesOrBuilder getExcludedNamespacesOrBuilder() {
if ((namespacedResourceRestoreScopeCase_ == 10) && (excludedNamespacesBuilder_ != null)) {
return excludedNamespacesBuilder_.getMessageOrBuilder();
} else {
if (namespacedResourceRestoreScopeCase_ == 10) {
return (com.google.cloud.gkebackup.v1.Namespaces) namespacedResourceRestoreScope_;
}
return com.google.cloud.gkebackup.v1.Namespaces.getDefaultInstance();
}
}
/**
*
*
*
* A list of selected namespaces excluded from restoration. All
* namespaces except those in this list will be restored.
*
*
* .google.cloud.gkebackup.v1.Namespaces excluded_namespaces = 10;
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.google.cloud.gkebackup.v1.Namespaces,
com.google.cloud.gkebackup.v1.Namespaces.Builder,
com.google.cloud.gkebackup.v1.NamespacesOrBuilder>
getExcludedNamespacesFieldBuilder() {
if (excludedNamespacesBuilder_ == null) {
if (!(namespacedResourceRestoreScopeCase_ == 10)) {
namespacedResourceRestoreScope_ =
com.google.cloud.gkebackup.v1.Namespaces.getDefaultInstance();
}
excludedNamespacesBuilder_ =
new com.google.protobuf.SingleFieldBuilderV3<
com.google.cloud.gkebackup.v1.Namespaces,
com.google.cloud.gkebackup.v1.Namespaces.Builder,
com.google.cloud.gkebackup.v1.NamespacesOrBuilder>(
(com.google.cloud.gkebackup.v1.Namespaces) namespacedResourceRestoreScope_,
getParentForChildren(),
isClean());
namespacedResourceRestoreScope_ = null;
}
namespacedResourceRestoreScopeCase_ = 10;
onChanged();
return excludedNamespacesBuilder_;
}
private java.util.List
substitutionRules_ = java.util.Collections.emptyList();
private void ensureSubstitutionRulesIsMutable() {
if (!((bitField0_ & 0x00000200) != 0)) {
substitutionRules_ =
new java.util.ArrayList(
substitutionRules_);
bitField0_ |= 0x00000200;
}
}
private com.google.protobuf.RepeatedFieldBuilderV3<
com.google.cloud.gkebackup.v1.RestoreConfig.SubstitutionRule,
com.google.cloud.gkebackup.v1.RestoreConfig.SubstitutionRule.Builder,
com.google.cloud.gkebackup.v1.RestoreConfig.SubstitutionRuleOrBuilder>
substitutionRulesBuilder_;
/**
*
*
*
* Optional. A list of transformation rules to be applied against Kubernetes
* resources as they are selected for restoration from a Backup. Rules are
* executed in order defined - this order matters, as changes made by a rule
* may impact the filtering logic of subsequent rules. An empty list means no
* substitution will occur.
*
*
*
* repeated .google.cloud.gkebackup.v1.RestoreConfig.SubstitutionRule substitution_rules = 8 [(.google.api.field_behavior) = OPTIONAL];
*
*/
public java.util.List
getSubstitutionRulesList() {
if (substitutionRulesBuilder_ == null) {
return java.util.Collections.unmodifiableList(substitutionRules_);
} else {
return substitutionRulesBuilder_.getMessageList();
}
}
/**
*
*
*
* Optional. A list of transformation rules to be applied against Kubernetes
* resources as they are selected for restoration from a Backup. Rules are
* executed in order defined - this order matters, as changes made by a rule
* may impact the filtering logic of subsequent rules. An empty list means no
* substitution will occur.
*
*
*
* repeated .google.cloud.gkebackup.v1.RestoreConfig.SubstitutionRule substitution_rules = 8 [(.google.api.field_behavior) = OPTIONAL];
*
*/
public int getSubstitutionRulesCount() {
if (substitutionRulesBuilder_ == null) {
return substitutionRules_.size();
} else {
return substitutionRulesBuilder_.getCount();
}
}
/**
*
*
*
* Optional. A list of transformation rules to be applied against Kubernetes
* resources as they are selected for restoration from a Backup. Rules are
* executed in order defined - this order matters, as changes made by a rule
* may impact the filtering logic of subsequent rules. An empty list means no
* substitution will occur.
*
*
*
* repeated .google.cloud.gkebackup.v1.RestoreConfig.SubstitutionRule substitution_rules = 8 [(.google.api.field_behavior) = OPTIONAL];
*
*/
public com.google.cloud.gkebackup.v1.RestoreConfig.SubstitutionRule getSubstitutionRules(
int index) {
if (substitutionRulesBuilder_ == null) {
return substitutionRules_.get(index);
} else {
return substitutionRulesBuilder_.getMessage(index);
}
}
/**
*
*
*
* Optional. A list of transformation rules to be applied against Kubernetes
* resources as they are selected for restoration from a Backup. Rules are
* executed in order defined - this order matters, as changes made by a rule
* may impact the filtering logic of subsequent rules. An empty list means no
* substitution will occur.
*
*
*
* repeated .google.cloud.gkebackup.v1.RestoreConfig.SubstitutionRule substitution_rules = 8 [(.google.api.field_behavior) = OPTIONAL];
*
*/
public Builder setSubstitutionRules(
int index, com.google.cloud.gkebackup.v1.RestoreConfig.SubstitutionRule value) {
if (substitutionRulesBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureSubstitutionRulesIsMutable();
substitutionRules_.set(index, value);
onChanged();
} else {
substitutionRulesBuilder_.setMessage(index, value);
}
return this;
}
/**
*
*
*
* Optional. A list of transformation rules to be applied against Kubernetes
* resources as they are selected for restoration from a Backup. Rules are
* executed in order defined - this order matters, as changes made by a rule
* may impact the filtering logic of subsequent rules. An empty list means no
* substitution will occur.
*
*
*
* repeated .google.cloud.gkebackup.v1.RestoreConfig.SubstitutionRule substitution_rules = 8 [(.google.api.field_behavior) = OPTIONAL];
*
*/
public Builder setSubstitutionRules(
int index,
com.google.cloud.gkebackup.v1.RestoreConfig.SubstitutionRule.Builder builderForValue) {
if (substitutionRulesBuilder_ == null) {
ensureSubstitutionRulesIsMutable();
substitutionRules_.set(index, builderForValue.build());
onChanged();
} else {
substitutionRulesBuilder_.setMessage(index, builderForValue.build());
}
return this;
}
/**
*
*
*
* Optional. A list of transformation rules to be applied against Kubernetes
* resources as they are selected for restoration from a Backup. Rules are
* executed in order defined - this order matters, as changes made by a rule
* may impact the filtering logic of subsequent rules. An empty list means no
* substitution will occur.
*
*
*
* repeated .google.cloud.gkebackup.v1.RestoreConfig.SubstitutionRule substitution_rules = 8 [(.google.api.field_behavior) = OPTIONAL];
*
*/
public Builder addSubstitutionRules(
com.google.cloud.gkebackup.v1.RestoreConfig.SubstitutionRule value) {
if (substitutionRulesBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureSubstitutionRulesIsMutable();
substitutionRules_.add(value);
onChanged();
} else {
substitutionRulesBuilder_.addMessage(value);
}
return this;
}
/**
*
*
*
* Optional. A list of transformation rules to be applied against Kubernetes
* resources as they are selected for restoration from a Backup. Rules are
* executed in order defined - this order matters, as changes made by a rule
* may impact the filtering logic of subsequent rules. An empty list means no
* substitution will occur.
*
*
*
* repeated .google.cloud.gkebackup.v1.RestoreConfig.SubstitutionRule substitution_rules = 8 [(.google.api.field_behavior) = OPTIONAL];
*
*/
public Builder addSubstitutionRules(
int index, com.google.cloud.gkebackup.v1.RestoreConfig.SubstitutionRule value) {
if (substitutionRulesBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureSubstitutionRulesIsMutable();
substitutionRules_.add(index, value);
onChanged();
} else {
substitutionRulesBuilder_.addMessage(index, value);
}
return this;
}
/**
*
*
*
* Optional. A list of transformation rules to be applied against Kubernetes
* resources as they are selected for restoration from a Backup. Rules are
* executed in order defined - this order matters, as changes made by a rule
* may impact the filtering logic of subsequent rules. An empty list means no
* substitution will occur.
*
*
*
* repeated .google.cloud.gkebackup.v1.RestoreConfig.SubstitutionRule substitution_rules = 8 [(.google.api.field_behavior) = OPTIONAL];
*
*/
public Builder addSubstitutionRules(
com.google.cloud.gkebackup.v1.RestoreConfig.SubstitutionRule.Builder builderForValue) {
if (substitutionRulesBuilder_ == null) {
ensureSubstitutionRulesIsMutable();
substitutionRules_.add(builderForValue.build());
onChanged();
} else {
substitutionRulesBuilder_.addMessage(builderForValue.build());
}
return this;
}
/**
*
*
*
* Optional. A list of transformation rules to be applied against Kubernetes
* resources as they are selected for restoration from a Backup. Rules are
* executed in order defined - this order matters, as changes made by a rule
* may impact the filtering logic of subsequent rules. An empty list means no
* substitution will occur.
*
*
*
* repeated .google.cloud.gkebackup.v1.RestoreConfig.SubstitutionRule substitution_rules = 8 [(.google.api.field_behavior) = OPTIONAL];
*
*/
public Builder addSubstitutionRules(
int index,
com.google.cloud.gkebackup.v1.RestoreConfig.SubstitutionRule.Builder builderForValue) {
if (substitutionRulesBuilder_ == null) {
ensureSubstitutionRulesIsMutable();
substitutionRules_.add(index, builderForValue.build());
onChanged();
} else {
substitutionRulesBuilder_.addMessage(index, builderForValue.build());
}
return this;
}
/**
*
*
*
* Optional. A list of transformation rules to be applied against Kubernetes
* resources as they are selected for restoration from a Backup. Rules are
* executed in order defined - this order matters, as changes made by a rule
* may impact the filtering logic of subsequent rules. An empty list means no
* substitution will occur.
*
*
*
* repeated .google.cloud.gkebackup.v1.RestoreConfig.SubstitutionRule substitution_rules = 8 [(.google.api.field_behavior) = OPTIONAL];
*
*/
public Builder addAllSubstitutionRules(
java.lang.Iterable extends com.google.cloud.gkebackup.v1.RestoreConfig.SubstitutionRule>
values) {
if (substitutionRulesBuilder_ == null) {
ensureSubstitutionRulesIsMutable();
com.google.protobuf.AbstractMessageLite.Builder.addAll(values, substitutionRules_);
onChanged();
} else {
substitutionRulesBuilder_.addAllMessages(values);
}
return this;
}
/**
*
*
*
* Optional. A list of transformation rules to be applied against Kubernetes
* resources as they are selected for restoration from a Backup. Rules are
* executed in order defined - this order matters, as changes made by a rule
* may impact the filtering logic of subsequent rules. An empty list means no
* substitution will occur.
*
*
*
* repeated .google.cloud.gkebackup.v1.RestoreConfig.SubstitutionRule substitution_rules = 8 [(.google.api.field_behavior) = OPTIONAL];
*
*/
public Builder clearSubstitutionRules() {
if (substitutionRulesBuilder_ == null) {
substitutionRules_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000200);
onChanged();
} else {
substitutionRulesBuilder_.clear();
}
return this;
}
/**
*
*
*
* Optional. A list of transformation rules to be applied against Kubernetes
* resources as they are selected for restoration from a Backup. Rules are
* executed in order defined - this order matters, as changes made by a rule
* may impact the filtering logic of subsequent rules. An empty list means no
* substitution will occur.
*
*
*
* repeated .google.cloud.gkebackup.v1.RestoreConfig.SubstitutionRule substitution_rules = 8 [(.google.api.field_behavior) = OPTIONAL];
*
*/
public Builder removeSubstitutionRules(int index) {
if (substitutionRulesBuilder_ == null) {
ensureSubstitutionRulesIsMutable();
substitutionRules_.remove(index);
onChanged();
} else {
substitutionRulesBuilder_.remove(index);
}
return this;
}
/**
*
*
*
* Optional. A list of transformation rules to be applied against Kubernetes
* resources as they are selected for restoration from a Backup. Rules are
* executed in order defined - this order matters, as changes made by a rule
* may impact the filtering logic of subsequent rules. An empty list means no
* substitution will occur.
*
*
*
* repeated .google.cloud.gkebackup.v1.RestoreConfig.SubstitutionRule substitution_rules = 8 [(.google.api.field_behavior) = OPTIONAL];
*
*/
public com.google.cloud.gkebackup.v1.RestoreConfig.SubstitutionRule.Builder
getSubstitutionRulesBuilder(int index) {
return getSubstitutionRulesFieldBuilder().getBuilder(index);
}
/**
*
*
*
* Optional. A list of transformation rules to be applied against Kubernetes
* resources as they are selected for restoration from a Backup. Rules are
* executed in order defined - this order matters, as changes made by a rule
* may impact the filtering logic of subsequent rules. An empty list means no
* substitution will occur.
*
*
*
* repeated .google.cloud.gkebackup.v1.RestoreConfig.SubstitutionRule substitution_rules = 8 [(.google.api.field_behavior) = OPTIONAL];
*
*/
public com.google.cloud.gkebackup.v1.RestoreConfig.SubstitutionRuleOrBuilder
getSubstitutionRulesOrBuilder(int index) {
if (substitutionRulesBuilder_ == null) {
return substitutionRules_.get(index);
} else {
return substitutionRulesBuilder_.getMessageOrBuilder(index);
}
}
/**
*
*
*
* Optional. A list of transformation rules to be applied against Kubernetes
* resources as they are selected for restoration from a Backup. Rules are
* executed in order defined - this order matters, as changes made by a rule
* may impact the filtering logic of subsequent rules. An empty list means no
* substitution will occur.
*
*
*
* repeated .google.cloud.gkebackup.v1.RestoreConfig.SubstitutionRule substitution_rules = 8 [(.google.api.field_behavior) = OPTIONAL];
*
*/
public java.util.List<
? extends com.google.cloud.gkebackup.v1.RestoreConfig.SubstitutionRuleOrBuilder>
getSubstitutionRulesOrBuilderList() {
if (substitutionRulesBuilder_ != null) {
return substitutionRulesBuilder_.getMessageOrBuilderList();
} else {
return java.util.Collections.unmodifiableList(substitutionRules_);
}
}
/**
*
*
*
* Optional. A list of transformation rules to be applied against Kubernetes
* resources as they are selected for restoration from a Backup. Rules are
* executed in order defined - this order matters, as changes made by a rule
* may impact the filtering logic of subsequent rules. An empty list means no
* substitution will occur.
*
*
*
* repeated .google.cloud.gkebackup.v1.RestoreConfig.SubstitutionRule substitution_rules = 8 [(.google.api.field_behavior) = OPTIONAL];
*
*/
public com.google.cloud.gkebackup.v1.RestoreConfig.SubstitutionRule.Builder
addSubstitutionRulesBuilder() {
return getSubstitutionRulesFieldBuilder()
.addBuilder(
com.google.cloud.gkebackup.v1.RestoreConfig.SubstitutionRule.getDefaultInstance());
}
/**
*
*
*
* Optional. A list of transformation rules to be applied against Kubernetes
* resources as they are selected for restoration from a Backup. Rules are
* executed in order defined - this order matters, as changes made by a rule
* may impact the filtering logic of subsequent rules. An empty list means no
* substitution will occur.
*
*
*
* repeated .google.cloud.gkebackup.v1.RestoreConfig.SubstitutionRule substitution_rules = 8 [(.google.api.field_behavior) = OPTIONAL];
*
*/
public com.google.cloud.gkebackup.v1.RestoreConfig.SubstitutionRule.Builder
addSubstitutionRulesBuilder(int index) {
return getSubstitutionRulesFieldBuilder()
.addBuilder(
index,
com.google.cloud.gkebackup.v1.RestoreConfig.SubstitutionRule.getDefaultInstance());
}
/**
*
*
*
* Optional. A list of transformation rules to be applied against Kubernetes
* resources as they are selected for restoration from a Backup. Rules are
* executed in order defined - this order matters, as changes made by a rule
* may impact the filtering logic of subsequent rules. An empty list means no
* substitution will occur.
*
*
*
* repeated .google.cloud.gkebackup.v1.RestoreConfig.SubstitutionRule substitution_rules = 8 [(.google.api.field_behavior) = OPTIONAL];
*
*/
public java.util.List
getSubstitutionRulesBuilderList() {
return getSubstitutionRulesFieldBuilder().getBuilderList();
}
private com.google.protobuf.RepeatedFieldBuilderV3<
com.google.cloud.gkebackup.v1.RestoreConfig.SubstitutionRule,
com.google.cloud.gkebackup.v1.RestoreConfig.SubstitutionRule.Builder,
com.google.cloud.gkebackup.v1.RestoreConfig.SubstitutionRuleOrBuilder>
getSubstitutionRulesFieldBuilder() {
if (substitutionRulesBuilder_ == null) {
substitutionRulesBuilder_ =
new com.google.protobuf.RepeatedFieldBuilderV3<
com.google.cloud.gkebackup.v1.RestoreConfig.SubstitutionRule,
com.google.cloud.gkebackup.v1.RestoreConfig.SubstitutionRule.Builder,
com.google.cloud.gkebackup.v1.RestoreConfig.SubstitutionRuleOrBuilder>(
substitutionRules_,
((bitField0_ & 0x00000200) != 0),
getParentForChildren(),
isClean());
substitutionRules_ = null;
}
return substitutionRulesBuilder_;
}
private java.util.List
transformationRules_ = java.util.Collections.emptyList();
private void ensureTransformationRulesIsMutable() {
if (!((bitField0_ & 0x00000400) != 0)) {
transformationRules_ =
new java.util.ArrayList(
transformationRules_);
bitField0_ |= 0x00000400;
}
}
private com.google.protobuf.RepeatedFieldBuilderV3<
com.google.cloud.gkebackup.v1.RestoreConfig.TransformationRule,
com.google.cloud.gkebackup.v1.RestoreConfig.TransformationRule.Builder,
com.google.cloud.gkebackup.v1.RestoreConfig.TransformationRuleOrBuilder>
transformationRulesBuilder_;
/**
*
*
*
* Optional. A list of transformation rules to be applied against Kubernetes
* resources as they are selected for restoration from a Backup. Rules are
* executed in order defined - this order matters, as changes made by a rule
* may impact the filtering logic of subsequent rules. An empty list means no
* transformation will occur.
*
*
*
* repeated .google.cloud.gkebackup.v1.RestoreConfig.TransformationRule transformation_rules = 11 [(.google.api.field_behavior) = OPTIONAL];
*
*/
public java.util.List
getTransformationRulesList() {
if (transformationRulesBuilder_ == null) {
return java.util.Collections.unmodifiableList(transformationRules_);
} else {
return transformationRulesBuilder_.getMessageList();
}
}
/**
*
*
*
* Optional. A list of transformation rules to be applied against Kubernetes
* resources as they are selected for restoration from a Backup. Rules are
* executed in order defined - this order matters, as changes made by a rule
* may impact the filtering logic of subsequent rules. An empty list means no
* transformation will occur.
*
*
*
* repeated .google.cloud.gkebackup.v1.RestoreConfig.TransformationRule transformation_rules = 11 [(.google.api.field_behavior) = OPTIONAL];
*
*/
public int getTransformationRulesCount() {
if (transformationRulesBuilder_ == null) {
return transformationRules_.size();
} else {
return transformationRulesBuilder_.getCount();
}
}
/**
*
*
*
* Optional. A list of transformation rules to be applied against Kubernetes
* resources as they are selected for restoration from a Backup. Rules are
* executed in order defined - this order matters, as changes made by a rule
* may impact the filtering logic of subsequent rules. An empty list means no
* transformation will occur.
*
*
*
* repeated .google.cloud.gkebackup.v1.RestoreConfig.TransformationRule transformation_rules = 11 [(.google.api.field_behavior) = OPTIONAL];
*
*/
public com.google.cloud.gkebackup.v1.RestoreConfig.TransformationRule getTransformationRules(
int index) {
if (transformationRulesBuilder_ == null) {
return transformationRules_.get(index);
} else {
return transformationRulesBuilder_.getMessage(index);
}
}
/**
*
*
*
* Optional. A list of transformation rules to be applied against Kubernetes
* resources as they are selected for restoration from a Backup. Rules are
* executed in order defined - this order matters, as changes made by a rule
* may impact the filtering logic of subsequent rules. An empty list means no
* transformation will occur.
*
*
*
* repeated .google.cloud.gkebackup.v1.RestoreConfig.TransformationRule transformation_rules = 11 [(.google.api.field_behavior) = OPTIONAL];
*
*/
public Builder setTransformationRules(
int index, com.google.cloud.gkebackup.v1.RestoreConfig.TransformationRule value) {
if (transformationRulesBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureTransformationRulesIsMutable();
transformationRules_.set(index, value);
onChanged();
} else {
transformationRulesBuilder_.setMessage(index, value);
}
return this;
}
/**
*
*
*
* Optional. A list of transformation rules to be applied against Kubernetes
* resources as they are selected for restoration from a Backup. Rules are
* executed in order defined - this order matters, as changes made by a rule
* may impact the filtering logic of subsequent rules. An empty list means no
* transformation will occur.
*
*
*
* repeated .google.cloud.gkebackup.v1.RestoreConfig.TransformationRule transformation_rules = 11 [(.google.api.field_behavior) = OPTIONAL];
*
*/
public Builder setTransformationRules(
int index,
com.google.cloud.gkebackup.v1.RestoreConfig.TransformationRule.Builder builderForValue) {
if (transformationRulesBuilder_ == null) {
ensureTransformationRulesIsMutable();
transformationRules_.set(index, builderForValue.build());
onChanged();
} else {
transformationRulesBuilder_.setMessage(index, builderForValue.build());
}
return this;
}
/**
*
*
*
* Optional. A list of transformation rules to be applied against Kubernetes
* resources as they are selected for restoration from a Backup. Rules are
* executed in order defined - this order matters, as changes made by a rule
* may impact the filtering logic of subsequent rules. An empty list means no
* transformation will occur.
*
*
*
* repeated .google.cloud.gkebackup.v1.RestoreConfig.TransformationRule transformation_rules = 11 [(.google.api.field_behavior) = OPTIONAL];
*
*/
public Builder addTransformationRules(
com.google.cloud.gkebackup.v1.RestoreConfig.TransformationRule value) {
if (transformationRulesBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureTransformationRulesIsMutable();
transformationRules_.add(value);
onChanged();
} else {
transformationRulesBuilder_.addMessage(value);
}
return this;
}
/**
*
*
*
* Optional. A list of transformation rules to be applied against Kubernetes
* resources as they are selected for restoration from a Backup. Rules are
* executed in order defined - this order matters, as changes made by a rule
* may impact the filtering logic of subsequent rules. An empty list means no
* transformation will occur.
*
*
*
* repeated .google.cloud.gkebackup.v1.RestoreConfig.TransformationRule transformation_rules = 11 [(.google.api.field_behavior) = OPTIONAL];
*
*/
public Builder addTransformationRules(
int index, com.google.cloud.gkebackup.v1.RestoreConfig.TransformationRule value) {
if (transformationRulesBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureTransformationRulesIsMutable();
transformationRules_.add(index, value);
onChanged();
} else {
transformationRulesBuilder_.addMessage(index, value);
}
return this;
}
/**
*
*
*
* Optional. A list of transformation rules to be applied against Kubernetes
* resources as they are selected for restoration from a Backup. Rules are
* executed in order defined - this order matters, as changes made by a rule
* may impact the filtering logic of subsequent rules. An empty list means no
* transformation will occur.
*
*
*
* repeated .google.cloud.gkebackup.v1.RestoreConfig.TransformationRule transformation_rules = 11 [(.google.api.field_behavior) = OPTIONAL];
*
*/
public Builder addTransformationRules(
com.google.cloud.gkebackup.v1.RestoreConfig.TransformationRule.Builder builderForValue) {
if (transformationRulesBuilder_ == null) {
ensureTransformationRulesIsMutable();
transformationRules_.add(builderForValue.build());
onChanged();
} else {
transformationRulesBuilder_.addMessage(builderForValue.build());
}
return this;
}
/**
*
*
*
* Optional. A list of transformation rules to be applied against Kubernetes
* resources as they are selected for restoration from a Backup. Rules are
* executed in order defined - this order matters, as changes made by a rule
* may impact the filtering logic of subsequent rules. An empty list means no
* transformation will occur.
*
*
*
* repeated .google.cloud.gkebackup.v1.RestoreConfig.TransformationRule transformation_rules = 11 [(.google.api.field_behavior) = OPTIONAL];
*
*/
public Builder addTransformationRules(
int index,
com.google.cloud.gkebackup.v1.RestoreConfig.TransformationRule.Builder builderForValue) {
if (transformationRulesBuilder_ == null) {
ensureTransformationRulesIsMutable();
transformationRules_.add(index, builderForValue.build());
onChanged();
} else {
transformationRulesBuilder_.addMessage(index, builderForValue.build());
}
return this;
}
/**
*
*
*
* Optional. A list of transformation rules to be applied against Kubernetes
* resources as they are selected for restoration from a Backup. Rules are
* executed in order defined - this order matters, as changes made by a rule
* may impact the filtering logic of subsequent rules. An empty list means no
* transformation will occur.
*
*
*
* repeated .google.cloud.gkebackup.v1.RestoreConfig.TransformationRule transformation_rules = 11 [(.google.api.field_behavior) = OPTIONAL];
*
*/
public Builder addAllTransformationRules(
java.lang.Iterable extends com.google.cloud.gkebackup.v1.RestoreConfig.TransformationRule>
values) {
if (transformationRulesBuilder_ == null) {
ensureTransformationRulesIsMutable();
com.google.protobuf.AbstractMessageLite.Builder.addAll(values, transformationRules_);
onChanged();
} else {
transformationRulesBuilder_.addAllMessages(values);
}
return this;
}
/**
*
*
*
* Optional. A list of transformation rules to be applied against Kubernetes
* resources as they are selected for restoration from a Backup. Rules are
* executed in order defined - this order matters, as changes made by a rule
* may impact the filtering logic of subsequent rules. An empty list means no
* transformation will occur.
*
*
*
* repeated .google.cloud.gkebackup.v1.RestoreConfig.TransformationRule transformation_rules = 11 [(.google.api.field_behavior) = OPTIONAL];
*
*/
public Builder clearTransformationRules() {
if (transformationRulesBuilder_ == null) {
transformationRules_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000400);
onChanged();
} else {
transformationRulesBuilder_.clear();
}
return this;
}
/**
*
*
*
* Optional. A list of transformation rules to be applied against Kubernetes
* resources as they are selected for restoration from a Backup. Rules are
* executed in order defined - this order matters, as changes made by a rule
* may impact the filtering logic of subsequent rules. An empty list means no
* transformation will occur.
*
*
*
* repeated .google.cloud.gkebackup.v1.RestoreConfig.TransformationRule transformation_rules = 11 [(.google.api.field_behavior) = OPTIONAL];
*
*/
public Builder removeTransformationRules(int index) {
if (transformationRulesBuilder_ == null) {
ensureTransformationRulesIsMutable();
transformationRules_.remove(index);
onChanged();
} else {
transformationRulesBuilder_.remove(index);
}
return this;
}
/**
*
*
*
* Optional. A list of transformation rules to be applied against Kubernetes
* resources as they are selected for restoration from a Backup. Rules are
* executed in order defined - this order matters, as changes made by a rule
* may impact the filtering logic of subsequent rules. An empty list means no
* transformation will occur.
*
*
*
* repeated .google.cloud.gkebackup.v1.RestoreConfig.TransformationRule transformation_rules = 11 [(.google.api.field_behavior) = OPTIONAL];
*
*/
public com.google.cloud.gkebackup.v1.RestoreConfig.TransformationRule.Builder
getTransformationRulesBuilder(int index) {
return getTransformationRulesFieldBuilder().getBuilder(index);
}
/**
*
*
*
* Optional. A list of transformation rules to be applied against Kubernetes
* resources as they are selected for restoration from a Backup. Rules are
* executed in order defined - this order matters, as changes made by a rule
* may impact the filtering logic of subsequent rules. An empty list means no
* transformation will occur.
*
*
*
* repeated .google.cloud.gkebackup.v1.RestoreConfig.TransformationRule transformation_rules = 11 [(.google.api.field_behavior) = OPTIONAL];
*
*/
public com.google.cloud.gkebackup.v1.RestoreConfig.TransformationRuleOrBuilder
getTransformationRulesOrBuilder(int index) {
if (transformationRulesBuilder_ == null) {
return transformationRules_.get(index);
} else {
return transformationRulesBuilder_.getMessageOrBuilder(index);
}
}
/**
*
*
*
* Optional. A list of transformation rules to be applied against Kubernetes
* resources as they are selected for restoration from a Backup. Rules are
* executed in order defined - this order matters, as changes made by a rule
* may impact the filtering logic of subsequent rules. An empty list means no
* transformation will occur.
*
*
*
* repeated .google.cloud.gkebackup.v1.RestoreConfig.TransformationRule transformation_rules = 11 [(.google.api.field_behavior) = OPTIONAL];
*
*/
public java.util.List<
? extends com.google.cloud.gkebackup.v1.RestoreConfig.TransformationRuleOrBuilder>
getTransformationRulesOrBuilderList() {
if (transformationRulesBuilder_ != null) {
return transformationRulesBuilder_.getMessageOrBuilderList();
} else {
return java.util.Collections.unmodifiableList(transformationRules_);
}
}
/**
*
*
*
* Optional. A list of transformation rules to be applied against Kubernetes
* resources as they are selected for restoration from a Backup. Rules are
* executed in order defined - this order matters, as changes made by a rule
* may impact the filtering logic of subsequent rules. An empty list means no
* transformation will occur.
*
*
*
* repeated .google.cloud.gkebackup.v1.RestoreConfig.TransformationRule transformation_rules = 11 [(.google.api.field_behavior) = OPTIONAL];
*
*/
public com.google.cloud.gkebackup.v1.RestoreConfig.TransformationRule.Builder
addTransformationRulesBuilder() {
return getTransformationRulesFieldBuilder()
.addBuilder(
com.google.cloud.gkebackup.v1.RestoreConfig.TransformationRule.getDefaultInstance());
}
/**
*
*
*
* Optional. A list of transformation rules to be applied against Kubernetes
* resources as they are selected for restoration from a Backup. Rules are
* executed in order defined - this order matters, as changes made by a rule
* may impact the filtering logic of subsequent rules. An empty list means no
* transformation will occur.
*
*
*
* repeated .google.cloud.gkebackup.v1.RestoreConfig.TransformationRule transformation_rules = 11 [(.google.api.field_behavior) = OPTIONAL];
*
*/
public com.google.cloud.gkebackup.v1.RestoreConfig.TransformationRule.Builder
addTransformationRulesBuilder(int index) {
return getTransformationRulesFieldBuilder()
.addBuilder(
index,
com.google.cloud.gkebackup.v1.RestoreConfig.TransformationRule.getDefaultInstance());
}
/**
*
*
*
* Optional. A list of transformation rules to be applied against Kubernetes
* resources as they are selected for restoration from a Backup. Rules are
* executed in order defined - this order matters, as changes made by a rule
* may impact the filtering logic of subsequent rules. An empty list means no
* transformation will occur.
*
*
*
* repeated .google.cloud.gkebackup.v1.RestoreConfig.TransformationRule transformation_rules = 11 [(.google.api.field_behavior) = OPTIONAL];
*
*/
public java.util.List
getTransformationRulesBuilderList() {
return getTransformationRulesFieldBuilder().getBuilderList();
}
private com.google.protobuf.RepeatedFieldBuilderV3<
com.google.cloud.gkebackup.v1.RestoreConfig.TransformationRule,
com.google.cloud.gkebackup.v1.RestoreConfig.TransformationRule.Builder,
com.google.cloud.gkebackup.v1.RestoreConfig.TransformationRuleOrBuilder>
getTransformationRulesFieldBuilder() {
if (transformationRulesBuilder_ == null) {
transformationRulesBuilder_ =
new com.google.protobuf.RepeatedFieldBuilderV3<
com.google.cloud.gkebackup.v1.RestoreConfig.TransformationRule,
com.google.cloud.gkebackup.v1.RestoreConfig.TransformationRule.Builder,
com.google.cloud.gkebackup.v1.RestoreConfig.TransformationRuleOrBuilder>(
transformationRules_,
((bitField0_ & 0x00000400) != 0),
getParentForChildren(),
isClean());
transformationRules_ = null;
}
return transformationRulesBuilder_;
}
private java.util.List<
com.google.cloud.gkebackup.v1.RestoreConfig.VolumeDataRestorePolicyBinding>
volumeDataRestorePolicyBindings_ = java.util.Collections.emptyList();
private void ensureVolumeDataRestorePolicyBindingsIsMutable() {
if (!((bitField0_ & 0x00000800) != 0)) {
volumeDataRestorePolicyBindings_ =
new java.util.ArrayList<
com.google.cloud.gkebackup.v1.RestoreConfig.VolumeDataRestorePolicyBinding>(
volumeDataRestorePolicyBindings_);
bitField0_ |= 0x00000800;
}
}
private com.google.protobuf.RepeatedFieldBuilderV3<
com.google.cloud.gkebackup.v1.RestoreConfig.VolumeDataRestorePolicyBinding,
com.google.cloud.gkebackup.v1.RestoreConfig.VolumeDataRestorePolicyBinding.Builder,
com.google.cloud.gkebackup.v1.RestoreConfig.VolumeDataRestorePolicyBindingOrBuilder>
volumeDataRestorePolicyBindingsBuilder_;
/**
*
*
*
* Optional. A table that binds volumes by their scope to a restore policy.
* Bindings must have a unique scope. Any volumes not scoped in the bindings
* are subject to the policy defined in volume_data_restore_policy.
*
*
*
* repeated .google.cloud.gkebackup.v1.RestoreConfig.VolumeDataRestorePolicyBinding volume_data_restore_policy_bindings = 12 [(.google.api.field_behavior) = OPTIONAL];
*
*/
public java.util.List<
com.google.cloud.gkebackup.v1.RestoreConfig.VolumeDataRestorePolicyBinding>
getVolumeDataRestorePolicyBindingsList() {
if (volumeDataRestorePolicyBindingsBuilder_ == null) {
return java.util.Collections.unmodifiableList(volumeDataRestorePolicyBindings_);
} else {
return volumeDataRestorePolicyBindingsBuilder_.getMessageList();
}
}
/**
*
*
*
* Optional. A table that binds volumes by their scope to a restore policy.
* Bindings must have a unique scope. Any volumes not scoped in the bindings
* are subject to the policy defined in volume_data_restore_policy.
*
*
*
* repeated .google.cloud.gkebackup.v1.RestoreConfig.VolumeDataRestorePolicyBinding volume_data_restore_policy_bindings = 12 [(.google.api.field_behavior) = OPTIONAL];
*
*/
public int getVolumeDataRestorePolicyBindingsCount() {
if (volumeDataRestorePolicyBindingsBuilder_ == null) {
return volumeDataRestorePolicyBindings_.size();
} else {
return volumeDataRestorePolicyBindingsBuilder_.getCount();
}
}
/**
*
*
*
* Optional. A table that binds volumes by their scope to a restore policy.
* Bindings must have a unique scope. Any volumes not scoped in the bindings
* are subject to the policy defined in volume_data_restore_policy.
*
*
*
* repeated .google.cloud.gkebackup.v1.RestoreConfig.VolumeDataRestorePolicyBinding volume_data_restore_policy_bindings = 12 [(.google.api.field_behavior) = OPTIONAL];
*
*/
public com.google.cloud.gkebackup.v1.RestoreConfig.VolumeDataRestorePolicyBinding
getVolumeDataRestorePolicyBindings(int index) {
if (volumeDataRestorePolicyBindingsBuilder_ == null) {
return volumeDataRestorePolicyBindings_.get(index);
} else {
return volumeDataRestorePolicyBindingsBuilder_.getMessage(index);
}
}
/**
*
*
*
* Optional. A table that binds volumes by their scope to a restore policy.
* Bindings must have a unique scope. Any volumes not scoped in the bindings
* are subject to the policy defined in volume_data_restore_policy.
*
*
*
* repeated .google.cloud.gkebackup.v1.RestoreConfig.VolumeDataRestorePolicyBinding volume_data_restore_policy_bindings = 12 [(.google.api.field_behavior) = OPTIONAL];
*
*/
public Builder setVolumeDataRestorePolicyBindings(
int index,
com.google.cloud.gkebackup.v1.RestoreConfig.VolumeDataRestorePolicyBinding value) {
if (volumeDataRestorePolicyBindingsBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureVolumeDataRestorePolicyBindingsIsMutable();
volumeDataRestorePolicyBindings_.set(index, value);
onChanged();
} else {
volumeDataRestorePolicyBindingsBuilder_.setMessage(index, value);
}
return this;
}
/**
*
*
*
* Optional. A table that binds volumes by their scope to a restore policy.
* Bindings must have a unique scope. Any volumes not scoped in the bindings
* are subject to the policy defined in volume_data_restore_policy.
*
*
*
* repeated .google.cloud.gkebackup.v1.RestoreConfig.VolumeDataRestorePolicyBinding volume_data_restore_policy_bindings = 12 [(.google.api.field_behavior) = OPTIONAL];
*
*/
public Builder setVolumeDataRestorePolicyBindings(
int index,
com.google.cloud.gkebackup.v1.RestoreConfig.VolumeDataRestorePolicyBinding.Builder
builderForValue) {
if (volumeDataRestorePolicyBindingsBuilder_ == null) {
ensureVolumeDataRestorePolicyBindingsIsMutable();
volumeDataRestorePolicyBindings_.set(index, builderForValue.build());
onChanged();
} else {
volumeDataRestorePolicyBindingsBuilder_.setMessage(index, builderForValue.build());
}
return this;
}
/**
*
*
*
* Optional. A table that binds volumes by their scope to a restore policy.
* Bindings must have a unique scope. Any volumes not scoped in the bindings
* are subject to the policy defined in volume_data_restore_policy.
*
*
*
* repeated .google.cloud.gkebackup.v1.RestoreConfig.VolumeDataRestorePolicyBinding volume_data_restore_policy_bindings = 12 [(.google.api.field_behavior) = OPTIONAL];
*
*/
public Builder addVolumeDataRestorePolicyBindings(
com.google.cloud.gkebackup.v1.RestoreConfig.VolumeDataRestorePolicyBinding value) {
if (volumeDataRestorePolicyBindingsBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureVolumeDataRestorePolicyBindingsIsMutable();
volumeDataRestorePolicyBindings_.add(value);
onChanged();
} else {
volumeDataRestorePolicyBindingsBuilder_.addMessage(value);
}
return this;
}
/**
*
*
*
* Optional. A table that binds volumes by their scope to a restore policy.
* Bindings must have a unique scope. Any volumes not scoped in the bindings
* are subject to the policy defined in volume_data_restore_policy.
*
*
*
* repeated .google.cloud.gkebackup.v1.RestoreConfig.VolumeDataRestorePolicyBinding volume_data_restore_policy_bindings = 12 [(.google.api.field_behavior) = OPTIONAL];
*
*/
public Builder addVolumeDataRestorePolicyBindings(
int index,
com.google.cloud.gkebackup.v1.RestoreConfig.VolumeDataRestorePolicyBinding value) {
if (volumeDataRestorePolicyBindingsBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureVolumeDataRestorePolicyBindingsIsMutable();
volumeDataRestorePolicyBindings_.add(index, value);
onChanged();
} else {
volumeDataRestorePolicyBindingsBuilder_.addMessage(index, value);
}
return this;
}
/**
*
*
*
* Optional. A table that binds volumes by their scope to a restore policy.
* Bindings must have a unique scope. Any volumes not scoped in the bindings
* are subject to the policy defined in volume_data_restore_policy.
*
*
*
* repeated .google.cloud.gkebackup.v1.RestoreConfig.VolumeDataRestorePolicyBinding volume_data_restore_policy_bindings = 12 [(.google.api.field_behavior) = OPTIONAL];
*
*/
public Builder addVolumeDataRestorePolicyBindings(
com.google.cloud.gkebackup.v1.RestoreConfig.VolumeDataRestorePolicyBinding.Builder
builderForValue) {
if (volumeDataRestorePolicyBindingsBuilder_ == null) {
ensureVolumeDataRestorePolicyBindingsIsMutable();
volumeDataRestorePolicyBindings_.add(builderForValue.build());
onChanged();
} else {
volumeDataRestorePolicyBindingsBuilder_.addMessage(builderForValue.build());
}
return this;
}
/**
*
*
*
* Optional. A table that binds volumes by their scope to a restore policy.
* Bindings must have a unique scope. Any volumes not scoped in the bindings
* are subject to the policy defined in volume_data_restore_policy.
*
*
*
* repeated .google.cloud.gkebackup.v1.RestoreConfig.VolumeDataRestorePolicyBinding volume_data_restore_policy_bindings = 12 [(.google.api.field_behavior) = OPTIONAL];
*
*/
public Builder addVolumeDataRestorePolicyBindings(
int index,
com.google.cloud.gkebackup.v1.RestoreConfig.VolumeDataRestorePolicyBinding.Builder
builderForValue) {
if (volumeDataRestorePolicyBindingsBuilder_ == null) {
ensureVolumeDataRestorePolicyBindingsIsMutable();
volumeDataRestorePolicyBindings_.add(index, builderForValue.build());
onChanged();
} else {
volumeDataRestorePolicyBindingsBuilder_.addMessage(index, builderForValue.build());
}
return this;
}
/**
*
*
*
* Optional. A table that binds volumes by their scope to a restore policy.
* Bindings must have a unique scope. Any volumes not scoped in the bindings
* are subject to the policy defined in volume_data_restore_policy.
*
*
*
* repeated .google.cloud.gkebackup.v1.RestoreConfig.VolumeDataRestorePolicyBinding volume_data_restore_policy_bindings = 12 [(.google.api.field_behavior) = OPTIONAL];
*
*/
public Builder addAllVolumeDataRestorePolicyBindings(
java.lang.Iterable<
? extends
com.google.cloud.gkebackup.v1.RestoreConfig.VolumeDataRestorePolicyBinding>
values) {
if (volumeDataRestorePolicyBindingsBuilder_ == null) {
ensureVolumeDataRestorePolicyBindingsIsMutable();
com.google.protobuf.AbstractMessageLite.Builder.addAll(
values, volumeDataRestorePolicyBindings_);
onChanged();
} else {
volumeDataRestorePolicyBindingsBuilder_.addAllMessages(values);
}
return this;
}
/**
*
*
*
* Optional. A table that binds volumes by their scope to a restore policy.
* Bindings must have a unique scope. Any volumes not scoped in the bindings
* are subject to the policy defined in volume_data_restore_policy.
*
*
*
* repeated .google.cloud.gkebackup.v1.RestoreConfig.VolumeDataRestorePolicyBinding volume_data_restore_policy_bindings = 12 [(.google.api.field_behavior) = OPTIONAL];
*
*/
public Builder clearVolumeDataRestorePolicyBindings() {
if (volumeDataRestorePolicyBindingsBuilder_ == null) {
volumeDataRestorePolicyBindings_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000800);
onChanged();
} else {
volumeDataRestorePolicyBindingsBuilder_.clear();
}
return this;
}
/**
*
*
*
* Optional. A table that binds volumes by their scope to a restore policy.
* Bindings must have a unique scope. Any volumes not scoped in the bindings
* are subject to the policy defined in volume_data_restore_policy.
*
*
*
* repeated .google.cloud.gkebackup.v1.RestoreConfig.VolumeDataRestorePolicyBinding volume_data_restore_policy_bindings = 12 [(.google.api.field_behavior) = OPTIONAL];
*
*/
public Builder removeVolumeDataRestorePolicyBindings(int index) {
if (volumeDataRestorePolicyBindingsBuilder_ == null) {
ensureVolumeDataRestorePolicyBindingsIsMutable();
volumeDataRestorePolicyBindings_.remove(index);
onChanged();
} else {
volumeDataRestorePolicyBindingsBuilder_.remove(index);
}
return this;
}
/**
*
*
*
* Optional. A table that binds volumes by their scope to a restore policy.
* Bindings must have a unique scope. Any volumes not scoped in the bindings
* are subject to the policy defined in volume_data_restore_policy.
*
*
*
* repeated .google.cloud.gkebackup.v1.RestoreConfig.VolumeDataRestorePolicyBinding volume_data_restore_policy_bindings = 12 [(.google.api.field_behavior) = OPTIONAL];
*
*/
public com.google.cloud.gkebackup.v1.RestoreConfig.VolumeDataRestorePolicyBinding.Builder
getVolumeDataRestorePolicyBindingsBuilder(int index) {
return getVolumeDataRestorePolicyBindingsFieldBuilder().getBuilder(index);
}
/**
*
*
*
* Optional. A table that binds volumes by their scope to a restore policy.
* Bindings must have a unique scope. Any volumes not scoped in the bindings
* are subject to the policy defined in volume_data_restore_policy.
*
*
*
* repeated .google.cloud.gkebackup.v1.RestoreConfig.VolumeDataRestorePolicyBinding volume_data_restore_policy_bindings = 12 [(.google.api.field_behavior) = OPTIONAL];
*
*/
public com.google.cloud.gkebackup.v1.RestoreConfig.VolumeDataRestorePolicyBindingOrBuilder
getVolumeDataRestorePolicyBindingsOrBuilder(int index) {
if (volumeDataRestorePolicyBindingsBuilder_ == null) {
return volumeDataRestorePolicyBindings_.get(index);
} else {
return volumeDataRestorePolicyBindingsBuilder_.getMessageOrBuilder(index);
}
}
/**
*
*
*
* Optional. A table that binds volumes by their scope to a restore policy.
* Bindings must have a unique scope. Any volumes not scoped in the bindings
* are subject to the policy defined in volume_data_restore_policy.
*
*
*
* repeated .google.cloud.gkebackup.v1.RestoreConfig.VolumeDataRestorePolicyBinding volume_data_restore_policy_bindings = 12 [(.google.api.field_behavior) = OPTIONAL];
*
*/
public java.util.List<
? extends
com.google.cloud.gkebackup.v1.RestoreConfig.VolumeDataRestorePolicyBindingOrBuilder>
getVolumeDataRestorePolicyBindingsOrBuilderList() {
if (volumeDataRestorePolicyBindingsBuilder_ != null) {
return volumeDataRestorePolicyBindingsBuilder_.getMessageOrBuilderList();
} else {
return java.util.Collections.unmodifiableList(volumeDataRestorePolicyBindings_);
}
}
/**
*
*
*
* Optional. A table that binds volumes by their scope to a restore policy.
* Bindings must have a unique scope. Any volumes not scoped in the bindings
* are subject to the policy defined in volume_data_restore_policy.
*
*
*
* repeated .google.cloud.gkebackup.v1.RestoreConfig.VolumeDataRestorePolicyBinding volume_data_restore_policy_bindings = 12 [(.google.api.field_behavior) = OPTIONAL];
*
*/
public com.google.cloud.gkebackup.v1.RestoreConfig.VolumeDataRestorePolicyBinding.Builder
addVolumeDataRestorePolicyBindingsBuilder() {
return getVolumeDataRestorePolicyBindingsFieldBuilder()
.addBuilder(
com.google.cloud.gkebackup.v1.RestoreConfig.VolumeDataRestorePolicyBinding
.getDefaultInstance());
}
/**
*
*
*
* Optional. A table that binds volumes by their scope to a restore policy.
* Bindings must have a unique scope. Any volumes not scoped in the bindings
* are subject to the policy defined in volume_data_restore_policy.
*
*
*
* repeated .google.cloud.gkebackup.v1.RestoreConfig.VolumeDataRestorePolicyBinding volume_data_restore_policy_bindings = 12 [(.google.api.field_behavior) = OPTIONAL];
*
*/
public com.google.cloud.gkebackup.v1.RestoreConfig.VolumeDataRestorePolicyBinding.Builder
addVolumeDataRestorePolicyBindingsBuilder(int index) {
return getVolumeDataRestorePolicyBindingsFieldBuilder()
.addBuilder(
index,
com.google.cloud.gkebackup.v1.RestoreConfig.VolumeDataRestorePolicyBinding
.getDefaultInstance());
}
/**
*
*
*
* Optional. A table that binds volumes by their scope to a restore policy.
* Bindings must have a unique scope. Any volumes not scoped in the bindings
* are subject to the policy defined in volume_data_restore_policy.
*
*
*
* repeated .google.cloud.gkebackup.v1.RestoreConfig.VolumeDataRestorePolicyBinding volume_data_restore_policy_bindings = 12 [(.google.api.field_behavior) = OPTIONAL];
*
*/
public java.util.List<
com.google.cloud.gkebackup.v1.RestoreConfig.VolumeDataRestorePolicyBinding.Builder>
getVolumeDataRestorePolicyBindingsBuilderList() {
return getVolumeDataRestorePolicyBindingsFieldBuilder().getBuilderList();
}
private com.google.protobuf.RepeatedFieldBuilderV3<
com.google.cloud.gkebackup.v1.RestoreConfig.VolumeDataRestorePolicyBinding,
com.google.cloud.gkebackup.v1.RestoreConfig.VolumeDataRestorePolicyBinding.Builder,
com.google.cloud.gkebackup.v1.RestoreConfig.VolumeDataRestorePolicyBindingOrBuilder>
getVolumeDataRestorePolicyBindingsFieldBuilder() {
if (volumeDataRestorePolicyBindingsBuilder_ == null) {
volumeDataRestorePolicyBindingsBuilder_ =
new com.google.protobuf.RepeatedFieldBuilderV3<
com.google.cloud.gkebackup.v1.RestoreConfig.VolumeDataRestorePolicyBinding,
com.google.cloud.gkebackup.v1.RestoreConfig.VolumeDataRestorePolicyBinding.Builder,
com.google.cloud.gkebackup.v1.RestoreConfig
.VolumeDataRestorePolicyBindingOrBuilder>(
volumeDataRestorePolicyBindings_,
((bitField0_ & 0x00000800) != 0),
getParentForChildren(),
isClean());
volumeDataRestorePolicyBindings_ = null;
}
return volumeDataRestorePolicyBindingsBuilder_;
}
private com.google.cloud.gkebackup.v1.RestoreConfig.RestoreOrder restoreOrder_;
private com.google.protobuf.SingleFieldBuilderV3<
com.google.cloud.gkebackup.v1.RestoreConfig.RestoreOrder,
com.google.cloud.gkebackup.v1.RestoreConfig.RestoreOrder.Builder,
com.google.cloud.gkebackup.v1.RestoreConfig.RestoreOrderOrBuilder>
restoreOrderBuilder_;
/**
*
*
*
* Optional. RestoreOrder contains custom ordering to use on a Restore.
*
*
*
* .google.cloud.gkebackup.v1.RestoreConfig.RestoreOrder restore_order = 13 [(.google.api.field_behavior) = OPTIONAL];
*
*
* @return Whether the restoreOrder field is set.
*/
public boolean hasRestoreOrder() {
return ((bitField0_ & 0x00001000) != 0);
}
/**
*
*
*
* Optional. RestoreOrder contains custom ordering to use on a Restore.
*
*
*
* .google.cloud.gkebackup.v1.RestoreConfig.RestoreOrder restore_order = 13 [(.google.api.field_behavior) = OPTIONAL];
*
*
* @return The restoreOrder.
*/
public com.google.cloud.gkebackup.v1.RestoreConfig.RestoreOrder getRestoreOrder() {
if (restoreOrderBuilder_ == null) {
return restoreOrder_ == null
? com.google.cloud.gkebackup.v1.RestoreConfig.RestoreOrder.getDefaultInstance()
: restoreOrder_;
} else {
return restoreOrderBuilder_.getMessage();
}
}
/**
*
*
*
* Optional. RestoreOrder contains custom ordering to use on a Restore.
*
*
*
* .google.cloud.gkebackup.v1.RestoreConfig.RestoreOrder restore_order = 13 [(.google.api.field_behavior) = OPTIONAL];
*
*/
public Builder setRestoreOrder(com.google.cloud.gkebackup.v1.RestoreConfig.RestoreOrder value) {
if (restoreOrderBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
restoreOrder_ = value;
} else {
restoreOrderBuilder_.setMessage(value);
}
bitField0_ |= 0x00001000;
onChanged();
return this;
}
/**
*
*
*
* Optional. RestoreOrder contains custom ordering to use on a Restore.
*
*
*
* .google.cloud.gkebackup.v1.RestoreConfig.RestoreOrder restore_order = 13 [(.google.api.field_behavior) = OPTIONAL];
*
*/
public Builder setRestoreOrder(
com.google.cloud.gkebackup.v1.RestoreConfig.RestoreOrder.Builder builderForValue) {
if (restoreOrderBuilder_ == null) {
restoreOrder_ = builderForValue.build();
} else {
restoreOrderBuilder_.setMessage(builderForValue.build());
}
bitField0_ |= 0x00001000;
onChanged();
return this;
}
/**
*
*
*
* Optional. RestoreOrder contains custom ordering to use on a Restore.
*
*
*
* .google.cloud.gkebackup.v1.RestoreConfig.RestoreOrder restore_order = 13 [(.google.api.field_behavior) = OPTIONAL];
*
*/
public Builder mergeRestoreOrder(
com.google.cloud.gkebackup.v1.RestoreConfig.RestoreOrder value) {
if (restoreOrderBuilder_ == null) {
if (((bitField0_ & 0x00001000) != 0)
&& restoreOrder_ != null
&& restoreOrder_
!= com.google.cloud.gkebackup.v1.RestoreConfig.RestoreOrder.getDefaultInstance()) {
getRestoreOrderBuilder().mergeFrom(value);
} else {
restoreOrder_ = value;
}
} else {
restoreOrderBuilder_.mergeFrom(value);
}
if (restoreOrder_ != null) {
bitField0_ |= 0x00001000;
onChanged();
}
return this;
}
/**
*
*
*
* Optional. RestoreOrder contains custom ordering to use on a Restore.
*
*
*
* .google.cloud.gkebackup.v1.RestoreConfig.RestoreOrder restore_order = 13 [(.google.api.field_behavior) = OPTIONAL];
*
*/
public Builder clearRestoreOrder() {
bitField0_ = (bitField0_ & ~0x00001000);
restoreOrder_ = null;
if (restoreOrderBuilder_ != null) {
restoreOrderBuilder_.dispose();
restoreOrderBuilder_ = null;
}
onChanged();
return this;
}
/**
*
*
*
* Optional. RestoreOrder contains custom ordering to use on a Restore.
*
*
*
* .google.cloud.gkebackup.v1.RestoreConfig.RestoreOrder restore_order = 13 [(.google.api.field_behavior) = OPTIONAL];
*
*/
public com.google.cloud.gkebackup.v1.RestoreConfig.RestoreOrder.Builder
getRestoreOrderBuilder() {
bitField0_ |= 0x00001000;
onChanged();
return getRestoreOrderFieldBuilder().getBuilder();
}
/**
*
*
*
* Optional. RestoreOrder contains custom ordering to use on a Restore.
*
*
*
* .google.cloud.gkebackup.v1.RestoreConfig.RestoreOrder restore_order = 13 [(.google.api.field_behavior) = OPTIONAL];
*
*/
public com.google.cloud.gkebackup.v1.RestoreConfig.RestoreOrderOrBuilder
getRestoreOrderOrBuilder() {
if (restoreOrderBuilder_ != null) {
return restoreOrderBuilder_.getMessageOrBuilder();
} else {
return restoreOrder_ == null
? com.google.cloud.gkebackup.v1.RestoreConfig.RestoreOrder.getDefaultInstance()
: restoreOrder_;
}
}
/**
*
*
*
* Optional. RestoreOrder contains custom ordering to use on a Restore.
*
*
*
* .google.cloud.gkebackup.v1.RestoreConfig.RestoreOrder restore_order = 13 [(.google.api.field_behavior) = OPTIONAL];
*
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.google.cloud.gkebackup.v1.RestoreConfig.RestoreOrder,
com.google.cloud.gkebackup.v1.RestoreConfig.RestoreOrder.Builder,
com.google.cloud.gkebackup.v1.RestoreConfig.RestoreOrderOrBuilder>
getRestoreOrderFieldBuilder() {
if (restoreOrderBuilder_ == null) {
restoreOrderBuilder_ =
new com.google.protobuf.SingleFieldBuilderV3<
com.google.cloud.gkebackup.v1.RestoreConfig.RestoreOrder,
com.google.cloud.gkebackup.v1.RestoreConfig.RestoreOrder.Builder,
com.google.cloud.gkebackup.v1.RestoreConfig.RestoreOrderOrBuilder>(
getRestoreOrder(), getParentForChildren(), isClean());
restoreOrder_ = null;
}
return restoreOrderBuilder_;
}
@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.RestoreConfig)
}
// @@protoc_insertion_point(class_scope:google.cloud.gkebackup.v1.RestoreConfig)
private static final com.google.cloud.gkebackup.v1.RestoreConfig DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new com.google.cloud.gkebackup.v1.RestoreConfig();
}
public static com.google.cloud.gkebackup.v1.RestoreConfig getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser PARSER =
new com.google.protobuf.AbstractParser() {
@java.lang.Override
public RestoreConfig 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.RestoreConfig getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}