Class RestoreConfig.ClusterResourceRestoreScope.Builder

  • All Implemented Interfaces:
    RestoreConfig.ClusterResourceRestoreScopeOrBuilder, com.google.protobuf.Message.Builder, com.google.protobuf.MessageLite.Builder, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, Cloneable
    Enclosing class:
    RestoreConfig.ClusterResourceRestoreScope

    public static final class RestoreConfig.ClusterResourceRestoreScope.Builder
    extends com.google.protobuf.GeneratedMessageV3.Builder<RestoreConfig.ClusterResourceRestoreScope.Builder>
    implements RestoreConfig.ClusterResourceRestoreScopeOrBuilder
     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 google.cloud.gkebackup.v1.RestoreConfig.ClusterResourceRestoreScope
    • Method Detail

      • getDescriptor

        public static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
      • internalGetFieldAccessorTable

        protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
        Specified by:
        internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessageV3.Builder<RestoreConfig.ClusterResourceRestoreScope.Builder>
      • getDescriptorForType

        public com.google.protobuf.Descriptors.Descriptor getDescriptorForType()
        Specified by:
        getDescriptorForType in interface com.google.protobuf.Message.Builder
        Specified by:
        getDescriptorForType in interface com.google.protobuf.MessageOrBuilder
        Overrides:
        getDescriptorForType in class com.google.protobuf.GeneratedMessageV3.Builder<RestoreConfig.ClusterResourceRestoreScope.Builder>
      • getDefaultInstanceForType

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

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

        public RestoreConfig.ClusterResourceRestoreScope buildPartial()
        Specified by:
        buildPartial in interface com.google.protobuf.Message.Builder
        Specified by:
        buildPartial in interface com.google.protobuf.MessageLite.Builder
      • isInitialized

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

        public int getSelectedGroupKindsCount()
         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;
        Specified by:
        getSelectedGroupKindsCount in interface RestoreConfig.ClusterResourceRestoreScopeOrBuilder
      • setSelectedGroupKinds

        public RestoreConfig.ClusterResourceRestoreScope.Builder setSelectedGroupKinds​(int index,
                                                                                       RestoreConfig.GroupKind value)
         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;
      • setSelectedGroupKinds

        public RestoreConfig.ClusterResourceRestoreScope.Builder setSelectedGroupKinds​(int index,
                                                                                       RestoreConfig.GroupKind.Builder builderForValue)
         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;
      • addSelectedGroupKinds

        public RestoreConfig.ClusterResourceRestoreScope.Builder addSelectedGroupKinds​(RestoreConfig.GroupKind value)
         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;
      • addSelectedGroupKinds

        public RestoreConfig.ClusterResourceRestoreScope.Builder addSelectedGroupKinds​(int index,
                                                                                       RestoreConfig.GroupKind value)
         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;
      • addSelectedGroupKinds

        public RestoreConfig.ClusterResourceRestoreScope.Builder addSelectedGroupKinds​(RestoreConfig.GroupKind.Builder builderForValue)
         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;
      • addSelectedGroupKinds

        public RestoreConfig.ClusterResourceRestoreScope.Builder addSelectedGroupKinds​(int index,
                                                                                       RestoreConfig.GroupKind.Builder builderForValue)
         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;
      • addAllSelectedGroupKinds

        public RestoreConfig.ClusterResourceRestoreScope.Builder addAllSelectedGroupKinds​(Iterable<? extends RestoreConfig.GroupKind> values)
         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;
      • clearSelectedGroupKinds

        public RestoreConfig.ClusterResourceRestoreScope.Builder clearSelectedGroupKinds()
         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;
      • removeSelectedGroupKinds

        public RestoreConfig.ClusterResourceRestoreScope.Builder removeSelectedGroupKinds​(int index)
         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;
      • getSelectedGroupKindsBuilder

        public RestoreConfig.GroupKind.Builder getSelectedGroupKindsBuilder​(int index)
         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;
      • addSelectedGroupKindsBuilder

        public RestoreConfig.GroupKind.Builder addSelectedGroupKindsBuilder()
         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;
      • addSelectedGroupKindsBuilder

        public RestoreConfig.GroupKind.Builder addSelectedGroupKindsBuilder​(int index)
         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;
      • getSelectedGroupKindsBuilderList

        public List<RestoreConfig.GroupKind.Builder> getSelectedGroupKindsBuilderList()
         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;
      • getExcludedGroupKindsList

        public List<RestoreConfig.GroupKind> getExcludedGroupKindsList()
         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;
        Specified by:
        getExcludedGroupKindsList in interface RestoreConfig.ClusterResourceRestoreScopeOrBuilder
      • getExcludedGroupKindsCount

        public int getExcludedGroupKindsCount()
         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;
        Specified by:
        getExcludedGroupKindsCount in interface RestoreConfig.ClusterResourceRestoreScopeOrBuilder
      • getExcludedGroupKinds

        public RestoreConfig.GroupKind getExcludedGroupKinds​(int index)
         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;
        Specified by:
        getExcludedGroupKinds in interface RestoreConfig.ClusterResourceRestoreScopeOrBuilder
      • setExcludedGroupKinds

        public RestoreConfig.ClusterResourceRestoreScope.Builder setExcludedGroupKinds​(int index,
                                                                                       RestoreConfig.GroupKind value)
         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;
      • setExcludedGroupKinds

        public RestoreConfig.ClusterResourceRestoreScope.Builder setExcludedGroupKinds​(int index,
                                                                                       RestoreConfig.GroupKind.Builder builderForValue)
         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;
      • addExcludedGroupKinds

        public RestoreConfig.ClusterResourceRestoreScope.Builder addExcludedGroupKinds​(RestoreConfig.GroupKind value)
         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;
      • addExcludedGroupKinds

        public RestoreConfig.ClusterResourceRestoreScope.Builder addExcludedGroupKinds​(int index,
                                                                                       RestoreConfig.GroupKind value)
         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;
      • addExcludedGroupKinds

        public RestoreConfig.ClusterResourceRestoreScope.Builder addExcludedGroupKinds​(RestoreConfig.GroupKind.Builder builderForValue)
         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;
      • addExcludedGroupKinds

        public RestoreConfig.ClusterResourceRestoreScope.Builder addExcludedGroupKinds​(int index,
                                                                                       RestoreConfig.GroupKind.Builder builderForValue)
         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;
      • addAllExcludedGroupKinds

        public RestoreConfig.ClusterResourceRestoreScope.Builder addAllExcludedGroupKinds​(Iterable<? extends RestoreConfig.GroupKind> values)
         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;
      • clearExcludedGroupKinds

        public RestoreConfig.ClusterResourceRestoreScope.Builder clearExcludedGroupKinds()
         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;
      • removeExcludedGroupKinds

        public RestoreConfig.ClusterResourceRestoreScope.Builder removeExcludedGroupKinds​(int index)
         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;
      • getExcludedGroupKindsBuilder

        public RestoreConfig.GroupKind.Builder getExcludedGroupKindsBuilder​(int index)
         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;
      • addExcludedGroupKindsBuilder

        public RestoreConfig.GroupKind.Builder addExcludedGroupKindsBuilder()
         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;
      • addExcludedGroupKindsBuilder

        public RestoreConfig.GroupKind.Builder addExcludedGroupKindsBuilder​(int index)
         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;
      • getExcludedGroupKindsBuilderList

        public List<RestoreConfig.GroupKind.Builder> getExcludedGroupKindsBuilderList()
         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;
      • setAllGroupKinds

        public RestoreConfig.ClusterResourceRestoreScope.Builder setAllGroupKinds​(boolean value)
         If True, all valid cluster-scoped resources will be restored.
         Mutually exclusive to any other field in the message.
         
        bool all_group_kinds = 3;
        Parameters:
        value - The allGroupKinds to set.
        Returns:
        This builder for chaining.
      • clearAllGroupKinds

        public RestoreConfig.ClusterResourceRestoreScope.Builder clearAllGroupKinds()
         If True, all valid cluster-scoped resources will be restored.
         Mutually exclusive to any other field in the message.
         
        bool all_group_kinds = 3;
        Returns:
        This builder for chaining.
      • getNoGroupKinds

        public boolean getNoGroupKinds()
         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;
        Specified by:
        getNoGroupKinds in interface RestoreConfig.ClusterResourceRestoreScopeOrBuilder
        Returns:
        The noGroupKinds.
      • setNoGroupKinds

        public RestoreConfig.ClusterResourceRestoreScope.Builder setNoGroupKinds​(boolean value)
         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;
        Parameters:
        value - The noGroupKinds to set.
        Returns:
        This builder for chaining.
      • clearNoGroupKinds

        public RestoreConfig.ClusterResourceRestoreScope.Builder clearNoGroupKinds()
         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;
        Returns:
        This builder for chaining.