Class RestoreConfig.SubstitutionRule (0.36.0)

public static final class RestoreConfig.SubstitutionRule extends GeneratedMessageV3 implements RestoreConfig.SubstitutionRuleOrBuilder

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 google.cloud.gkebackup.v1.RestoreConfig.SubstitutionRule

Inheritance

Object > AbstractMessageLite<MessageType,BuilderType> > AbstractMessage > GeneratedMessageV3 > RestoreConfig.SubstitutionRule

Static Fields

NEW_VALUE_FIELD_NUMBER

public static final int NEW_VALUE_FIELD_NUMBER
Field Value
TypeDescription
int

ORIGINAL_VALUE_PATTERN_FIELD_NUMBER

public static final int ORIGINAL_VALUE_PATTERN_FIELD_NUMBER
Field Value
TypeDescription
int

TARGET_GROUP_KINDS_FIELD_NUMBER

public static final int TARGET_GROUP_KINDS_FIELD_NUMBER
Field Value
TypeDescription
int

TARGET_JSON_PATH_FIELD_NUMBER

public static final int TARGET_JSON_PATH_FIELD_NUMBER
Field Value
TypeDescription
int

TARGET_NAMESPACES_FIELD_NUMBER

public static final int TARGET_NAMESPACES_FIELD_NUMBER
Field Value
TypeDescription
int

Static Methods

getDefaultInstance()

public static RestoreConfig.SubstitutionRule getDefaultInstance()
Returns
TypeDescription
RestoreConfig.SubstitutionRule

getDescriptor()

public static final Descriptors.Descriptor getDescriptor()
Returns
TypeDescription
Descriptor

newBuilder()

public static RestoreConfig.SubstitutionRule.Builder newBuilder()
Returns
TypeDescription
RestoreConfig.SubstitutionRule.Builder

newBuilder(RestoreConfig.SubstitutionRule prototype)

public static RestoreConfig.SubstitutionRule.Builder newBuilder(RestoreConfig.SubstitutionRule prototype)
Parameter
NameDescription
prototypeRestoreConfig.SubstitutionRule
Returns
TypeDescription
RestoreConfig.SubstitutionRule.Builder

parseDelimitedFrom(InputStream input)

public static RestoreConfig.SubstitutionRule parseDelimitedFrom(InputStream input)
Parameter
NameDescription
inputInputStream
Returns
TypeDescription
RestoreConfig.SubstitutionRule
Exceptions
TypeDescription
IOException

parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static RestoreConfig.SubstitutionRule parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
RestoreConfig.SubstitutionRule
Exceptions
TypeDescription
IOException

parseFrom(byte[] data)

public static RestoreConfig.SubstitutionRule parseFrom(byte[] data)
Parameter
NameDescription
databyte[]
Returns
TypeDescription
RestoreConfig.SubstitutionRule
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)

public static RestoreConfig.SubstitutionRule parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
databyte[]
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
RestoreConfig.SubstitutionRule
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(ByteString data)

public static RestoreConfig.SubstitutionRule parseFrom(ByteString data)
Parameter
NameDescription
dataByteString
Returns
TypeDescription
RestoreConfig.SubstitutionRule
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)

public static RestoreConfig.SubstitutionRule parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
dataByteString
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
RestoreConfig.SubstitutionRule
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(CodedInputStream input)

public static RestoreConfig.SubstitutionRule parseFrom(CodedInputStream input)
Parameter
NameDescription
inputCodedInputStream
Returns
TypeDescription
RestoreConfig.SubstitutionRule
Exceptions
TypeDescription
IOException

parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public static RestoreConfig.SubstitutionRule parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputCodedInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
RestoreConfig.SubstitutionRule
Exceptions
TypeDescription
IOException

parseFrom(InputStream input)

public static RestoreConfig.SubstitutionRule parseFrom(InputStream input)
Parameter
NameDescription
inputInputStream
Returns
TypeDescription
RestoreConfig.SubstitutionRule
Exceptions
TypeDescription
IOException

parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static RestoreConfig.SubstitutionRule parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
RestoreConfig.SubstitutionRule
Exceptions
TypeDescription
IOException

parseFrom(ByteBuffer data)

public static RestoreConfig.SubstitutionRule parseFrom(ByteBuffer data)
Parameter
NameDescription
dataByteBuffer
Returns
TypeDescription
RestoreConfig.SubstitutionRule
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)

public static RestoreConfig.SubstitutionRule parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
dataByteBuffer
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
RestoreConfig.SubstitutionRule
Exceptions
TypeDescription
InvalidProtocolBufferException

parser()

public static Parser<RestoreConfig.SubstitutionRule> parser()
Returns
TypeDescription
Parser<SubstitutionRule>

Methods

equals(Object obj)

public boolean equals(Object obj)
Parameter
NameDescription
objObject
Returns
TypeDescription
boolean
Overrides

getDefaultInstanceForType()

public RestoreConfig.SubstitutionRule getDefaultInstanceForType()
Returns
TypeDescription
RestoreConfig.SubstitutionRule

getNewValue()

public String getNewValue()

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;

Returns
TypeDescription
String

The newValue.

getNewValueBytes()

public ByteString getNewValueBytes()

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;

Returns
TypeDescription
ByteString

The bytes for newValue.

getOriginalValuePattern()

public String getOriginalValuePattern()

(Filtering parameter) This is a 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;

Returns
TypeDescription
String

The originalValuePattern.

getOriginalValuePatternBytes()

public ByteString getOriginalValuePatternBytes()

(Filtering parameter) This is a 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;

Returns
TypeDescription
ByteString

The bytes for originalValuePattern.

getParserForType()

public Parser<RestoreConfig.SubstitutionRule> getParserForType()
Returns
TypeDescription
Parser<SubstitutionRule>
Overrides

getSerializedSize()

public int getSerializedSize()
Returns
TypeDescription
int
Overrides

getTargetGroupKinds(int index)

public RestoreConfig.GroupKind getTargetGroupKinds(int index)

(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;

Parameter
NameDescription
indexint
Returns
TypeDescription
RestoreConfig.GroupKind

getTargetGroupKindsCount()

public int getTargetGroupKindsCount()

(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;

Returns
TypeDescription
int

getTargetGroupKindsList()

public List<RestoreConfig.GroupKind> getTargetGroupKindsList()

(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;

Returns
TypeDescription
List<GroupKind>

getTargetGroupKindsOrBuilder(int index)

public RestoreConfig.GroupKindOrBuilder getTargetGroupKindsOrBuilder(int index)

(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;

Parameter
NameDescription
indexint
Returns
TypeDescription
RestoreConfig.GroupKindOrBuilder

getTargetGroupKindsOrBuilderList()

public List<? extends RestoreConfig.GroupKindOrBuilder> getTargetGroupKindsOrBuilderList()

(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;

Returns
TypeDescription
List<? extends com.google.cloud.gkebackup.v1.RestoreConfig.GroupKindOrBuilder>

getTargetJsonPath()

public String getTargetJsonPath()

Required. This is a 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];

Returns
TypeDescription
String

The targetJsonPath.

getTargetJsonPathBytes()

public ByteString getTargetJsonPathBytes()

Required. This is a 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];

Returns
TypeDescription
ByteString

The bytes for targetJsonPath.

getTargetNamespaces(int index)

public String getTargetNamespaces(int index)

(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;

Parameter
NameDescription
indexint

The index of the element to return.

Returns
TypeDescription
String

The targetNamespaces at the given index.

getTargetNamespacesBytes(int index)

public ByteString getTargetNamespacesBytes(int index)

(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;

Parameter
NameDescription
indexint

The index of the value to return.

Returns
TypeDescription
ByteString

The bytes of the targetNamespaces at the given index.

getTargetNamespacesCount()

public int getTargetNamespacesCount()

(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;

Returns
TypeDescription
int

The count of targetNamespaces.

getTargetNamespacesList()

public ProtocolStringList getTargetNamespacesList()

(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;

Returns
TypeDescription
ProtocolStringList

A list containing the targetNamespaces.

hashCode()

public int hashCode()
Returns
TypeDescription
int
Overrides

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
TypeDescription
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
TypeDescription
boolean
Overrides

newBuilderForType()

public RestoreConfig.SubstitutionRule.Builder newBuilderForType()
Returns
TypeDescription
RestoreConfig.SubstitutionRule.Builder

newBuilderForType(GeneratedMessageV3.BuilderParent parent)

protected RestoreConfig.SubstitutionRule.Builder newBuilderForType(GeneratedMessageV3.BuilderParent parent)
Parameter
NameDescription
parentBuilderParent
Returns
TypeDescription
RestoreConfig.SubstitutionRule.Builder
Overrides

newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)

protected Object newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
Parameter
NameDescription
unusedUnusedPrivateParameter
Returns
TypeDescription
Object
Overrides

toBuilder()

public RestoreConfig.SubstitutionRule.Builder toBuilder()
Returns
TypeDescription
RestoreConfig.SubstitutionRule.Builder

writeTo(CodedOutputStream output)

public void writeTo(CodedOutputStream output)
Parameter
NameDescription
outputCodedOutputStream
Overrides
Exceptions
TypeDescription
IOException