public final class Backup extends GeneratedMessageV3 implements BackupOrBuilder
A backup of a Cloud Spanner database.
Protobuf type google.spanner.admin.database.v1.Backup
Fields
CREATE_TIME_FIELD_NUMBER
public static final int CREATE_TIME_FIELD_NUMBER
Field Value
DATABASE_FIELD_NUMBER
public static final int DATABASE_FIELD_NUMBER
Field Value
ENCRYPTION_INFO_FIELD_NUMBER
public static final int ENCRYPTION_INFO_FIELD_NUMBER
Field Value
EXPIRE_TIME_FIELD_NUMBER
public static final int EXPIRE_TIME_FIELD_NUMBER
Field Value
NAME_FIELD_NUMBER
public static final int NAME_FIELD_NUMBER
Field Value
REFERENCING_DATABASES_FIELD_NUMBER
public static final int REFERENCING_DATABASES_FIELD_NUMBER
Field Value
SIZE_BYTES_FIELD_NUMBER
public static final int SIZE_BYTES_FIELD_NUMBER
Field Value
STATE_FIELD_NUMBER
public static final int STATE_FIELD_NUMBER
Field Value
VERSION_TIME_FIELD_NUMBER
public static final int VERSION_TIME_FIELD_NUMBER
Field Value
Methods
equals(Object obj)
public boolean equals(Object obj)
Parameter
Returns
Overrides
getCreateTime()
public Timestamp getCreateTime()
Output only. The time the CreateBackup
request is received. If the request does not specify version_time
, the
version_time
of the backup will be equivalent to the create_time
.
.google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];
Returns
getCreateTimeOrBuilder()
public TimestampOrBuilder getCreateTimeOrBuilder()
Output only. The time the CreateBackup
request is received. If the request does not specify version_time
, the
version_time
of the backup will be equivalent to the create_time
.
.google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];
Returns
getDatabase()
public String getDatabase()
Required for the CreateBackup operation.
Name of the database from which this backup was
created. This needs to be in the same instance as the backup.
Values are of the form
projects/<project>/instances/<instance>/databases/<database>
.
string database = 2 [(.google.api.resource_reference) = { ... }
Returns
Type | Description |
String | The database.
|
getDatabaseBytes()
public ByteString getDatabaseBytes()
Required for the CreateBackup operation.
Name of the database from which this backup was
created. This needs to be in the same instance as the backup.
Values are of the form
projects/<project>/instances/<instance>/databases/<database>
.
string database = 2 [(.google.api.resource_reference) = { ... }
Returns
getDefaultInstance()
public static Backup getDefaultInstance()
Returns
getDefaultInstanceForType()
public Backup getDefaultInstanceForType()
Returns
getDescriptor()
public static final Descriptors.Descriptor getDescriptor()
Returns
getEncryptionInfo()
public EncryptionInfo getEncryptionInfo()
Output only. The encryption information for the backup.
.google.spanner.admin.database.v1.EncryptionInfo encryption_info = 8 [(.google.api.field_behavior) = OUTPUT_ONLY];
Returns
getEncryptionInfoOrBuilder()
public EncryptionInfoOrBuilder getEncryptionInfoOrBuilder()
Output only. The encryption information for the backup.
.google.spanner.admin.database.v1.EncryptionInfo encryption_info = 8 [(.google.api.field_behavior) = OUTPUT_ONLY];
Returns
getExpireTime()
public Timestamp getExpireTime()
Required for the CreateBackup
operation. The expiration time of the backup, with microseconds
granularity that must be at least 6 hours and at most 366 days
from the time the CreateBackup request is processed. Once the expire_time
has passed, the backup is eligible to be automatically deleted by Cloud
Spanner to free the resources used by the backup.
.google.protobuf.Timestamp expire_time = 3;
Returns
getExpireTimeOrBuilder()
public TimestampOrBuilder getExpireTimeOrBuilder()
Required for the CreateBackup
operation. The expiration time of the backup, with microseconds
granularity that must be at least 6 hours and at most 366 days
from the time the CreateBackup request is processed. Once the expire_time
has passed, the backup is eligible to be automatically deleted by Cloud
Spanner to free the resources used by the backup.
.google.protobuf.Timestamp expire_time = 3;
Returns
getName()
Output only for the CreateBackup operation.
Required for the UpdateBackup operation.
A globally unique identifier for the backup which cannot be
changed. Values are of the form
projects/<project>/instances/<instance>/backups/a-z*[a-z0-9]
The final segment of the name must be between 2 and 60 characters
in length.
The backup is stored in the location(s) specified in the instance
configuration of the instance containing the backup, identified
by the prefix of the backup name of the form
projects/<project>/instances/<instance>
.
string name = 1;
Returns
Type | Description |
String | The name.
|
getNameBytes()
public ByteString getNameBytes()
Output only for the CreateBackup operation.
Required for the UpdateBackup operation.
A globally unique identifier for the backup which cannot be
changed. Values are of the form
projects/<project>/instances/<instance>/backups/a-z*[a-z0-9]
The final segment of the name must be between 2 and 60 characters
in length.
The backup is stored in the location(s) specified in the instance
configuration of the instance containing the backup, identified
by the prefix of the backup name of the form
projects/<project>/instances/<instance>
.
string name = 1;
Returns
getParserForType()
public Parser<Backup> getParserForType()
Returns
Overrides
getReferencingDatabases(int index)
public String getReferencingDatabases(int index)
Output only. The names of the restored databases that reference the backup.
The database names are of
the form projects/<project>/instances/<instance>/databases/<database>
.
Referencing databases may exist in different instances. The existence of
any referencing database prevents the backup from being deleted. When a
restored database from the backup enters the READY
state, the reference
to the backup is removed.
repeated string referencing_databases = 7 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... }
Parameter
Name | Description |
index | int
The index of the element to return.
|
Returns
Type | Description |
String | The referencingDatabases at the given index.
|
getReferencingDatabasesBytes(int index)
public ByteString getReferencingDatabasesBytes(int index)
Output only. The names of the restored databases that reference the backup.
The database names are of
the form projects/<project>/instances/<instance>/databases/<database>
.
Referencing databases may exist in different instances. The existence of
any referencing database prevents the backup from being deleted. When a
restored database from the backup enters the READY
state, the reference
to the backup is removed.
repeated string referencing_databases = 7 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... }
Parameter
Name | Description |
index | int
The index of the value to return.
|
Returns
Type | Description |
ByteString | The bytes of the referencingDatabases at the given index.
|
getReferencingDatabasesCount()
public int getReferencingDatabasesCount()
Output only. The names of the restored databases that reference the backup.
The database names are of
the form projects/<project>/instances/<instance>/databases/<database>
.
Referencing databases may exist in different instances. The existence of
any referencing database prevents the backup from being deleted. When a
restored database from the backup enters the READY
state, the reference
to the backup is removed.
repeated string referencing_databases = 7 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... }
Returns
Type | Description |
int | The count of referencingDatabases.
|
getReferencingDatabasesList()
public ProtocolStringList getReferencingDatabasesList()
Output only. The names of the restored databases that reference the backup.
The database names are of
the form projects/<project>/instances/<instance>/databases/<database>
.
Referencing databases may exist in different instances. The existence of
any referencing database prevents the backup from being deleted. When a
restored database from the backup enters the READY
state, the reference
to the backup is removed.
repeated string referencing_databases = 7 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... }
Returns
getSerializedSize()
public int getSerializedSize()
Returns
Overrides
getSizeBytes()
public long getSizeBytes()
Output only. Size of the backup in bytes.
int64 size_bytes = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
Returns
Type | Description |
long | The sizeBytes.
|
getState()
public Backup.State getState()
Output only. The current state of the backup.
.google.spanner.admin.database.v1.Backup.State state = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];
Returns
getStateValue()
public int getStateValue()
Output only. The current state of the backup.
.google.spanner.admin.database.v1.Backup.State state = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];
Returns
Type | Description |
int | The enum numeric value on the wire for state.
|
getUnknownFields()
public final UnknownFieldSet getUnknownFields()
Returns
Overrides
getVersionTime()
public Timestamp getVersionTime()
The backup will contain an externally consistent copy of the database at
the timestamp specified by version_time
. If version_time
is not
specified, the system will set version_time
to the create_time
of the
backup.
.google.protobuf.Timestamp version_time = 9;
Returns
getVersionTimeOrBuilder()
public TimestampOrBuilder getVersionTimeOrBuilder()
The backup will contain an externally consistent copy of the database at
the timestamp specified by version_time
. If version_time
is not
specified, the system will set version_time
to the create_time
of the
backup.
.google.protobuf.Timestamp version_time = 9;
Returns
hasCreateTime()
public boolean hasCreateTime()
Output only. The time the CreateBackup
request is received. If the request does not specify version_time
, the
version_time
of the backup will be equivalent to the create_time
.
.google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];
Returns
Type | Description |
boolean | Whether the createTime field is set.
|
hasEncryptionInfo()
public boolean hasEncryptionInfo()
Output only. The encryption information for the backup.
.google.spanner.admin.database.v1.EncryptionInfo encryption_info = 8 [(.google.api.field_behavior) = OUTPUT_ONLY];
Returns
Type | Description |
boolean | Whether the encryptionInfo field is set.
|
hasExpireTime()
public boolean hasExpireTime()
Required for the CreateBackup
operation. The expiration time of the backup, with microseconds
granularity that must be at least 6 hours and at most 366 days
from the time the CreateBackup request is processed. Once the expire_time
has passed, the backup is eligible to be automatically deleted by Cloud
Spanner to free the resources used by the backup.
.google.protobuf.Timestamp expire_time = 3;
Returns
Type | Description |
boolean | Whether the expireTime field is set.
|
hasVersionTime()
public boolean hasVersionTime()
The backup will contain an externally consistent copy of the database at
the timestamp specified by version_time
. If version_time
is not
specified, the system will set version_time
to the create_time
of the
backup.
.google.protobuf.Timestamp version_time = 9;
Returns
Type | Description |
boolean | Whether the versionTime field is set.
|
hashCode()
Returns
Overrides
internalGetFieldAccessorTable()
protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
Overrides
isInitialized()
public final boolean isInitialized()
Returns
Overrides
newBuilder()
public static Backup.Builder newBuilder()
Returns
newBuilder(Backup prototype)
public static Backup.Builder newBuilder(Backup prototype)
Parameter
Name | Description |
prototype | Backup
|
Returns
newBuilderForType()
public Backup.Builder newBuilderForType()
Returns
newBuilderForType(GeneratedMessageV3.BuilderParent parent)
protected Backup.Builder newBuilderForType(GeneratedMessageV3.BuilderParent parent)
Parameter
Returns
Overrides
newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
protected Object newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
Parameter
Returns
Overrides
public static Backup parseDelimitedFrom(InputStream input)
Parameter
Returns
Exceptions
public static Backup parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Returns
Exceptions
parseFrom(byte[] data)
public static Backup parseFrom(byte[] data)
Parameter
Name | Description |
data | byte[]
|
Returns
Exceptions
parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
public static Backup parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
Parameters
Returns
Exceptions
parseFrom(ByteString data)
public static Backup parseFrom(ByteString data)
Parameter
Returns
Exceptions
parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
public static Backup parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
Parameters
Returns
Exceptions
public static Backup parseFrom(CodedInputStream input)
Parameter
Returns
Exceptions
public static Backup parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Returns
Exceptions
public static Backup parseFrom(InputStream input)
Parameter
Returns
Exceptions
public static Backup parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Returns
Exceptions
parseFrom(ByteBuffer data)
public static Backup parseFrom(ByteBuffer data)
Parameter
Returns
Exceptions
parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
public static Backup parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
Parameters
Returns
Exceptions
parser()
public static Parser<Backup> parser()
Returns
toBuilder()
public Backup.Builder toBuilder()
Returns
writeTo(CodedOutputStream output)
public void writeTo(CodedOutputStream output)
Parameter
Overrides
Exceptions