Class CrontabSpec (6.82.0)

public final class CrontabSpec extends GeneratedMessageV3 implements CrontabSpecOrBuilder

CrontabSpec can be used to specify the version time and frequency at which the backup should be created.

Protobuf type google.spanner.admin.database.v1.CrontabSpec

Static Fields

CREATION_WINDOW_FIELD_NUMBER

public static final int CREATION_WINDOW_FIELD_NUMBER
Field Value
Type Description
int

TEXT_FIELD_NUMBER

public static final int TEXT_FIELD_NUMBER
Field Value
Type Description
int

TIME_ZONE_FIELD_NUMBER

public static final int TIME_ZONE_FIELD_NUMBER
Field Value
Type Description
int

Static Methods

getDefaultInstance()

public static CrontabSpec getDefaultInstance()
Returns
Type Description
CrontabSpec

getDescriptor()

public static final Descriptors.Descriptor getDescriptor()
Returns
Type Description
Descriptor

newBuilder()

public static CrontabSpec.Builder newBuilder()
Returns
Type Description
CrontabSpec.Builder

newBuilder(CrontabSpec prototype)

public static CrontabSpec.Builder newBuilder(CrontabSpec prototype)
Parameter
Name Description
prototype CrontabSpec
Returns
Type Description
CrontabSpec.Builder

parseDelimitedFrom(InputStream input)

public static CrontabSpec parseDelimitedFrom(InputStream input)
Parameter
Name Description
input InputStream
Returns
Type Description
CrontabSpec
Exceptions
Type Description
IOException

parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static CrontabSpec parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input InputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
CrontabSpec
Exceptions
Type Description
IOException

parseFrom(byte[] data)

public static CrontabSpec parseFrom(byte[] data)
Parameter
Name Description
data byte[]
Returns
Type Description
CrontabSpec
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)

public static CrontabSpec parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
data byte[]
extensionRegistry ExtensionRegistryLite
Returns
Type Description
CrontabSpec
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteString data)

public static CrontabSpec parseFrom(ByteString data)
Parameter
Name Description
data ByteString
Returns
Type Description
CrontabSpec
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)

public static CrontabSpec parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
data ByteString
extensionRegistry ExtensionRegistryLite
Returns
Type Description
CrontabSpec
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(CodedInputStream input)

public static CrontabSpec parseFrom(CodedInputStream input)
Parameter
Name Description
input CodedInputStream
Returns
Type Description
CrontabSpec
Exceptions
Type Description
IOException

parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public static CrontabSpec parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input CodedInputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
CrontabSpec
Exceptions
Type Description
IOException

parseFrom(InputStream input)

public static CrontabSpec parseFrom(InputStream input)
Parameter
Name Description
input InputStream
Returns
Type Description
CrontabSpec
Exceptions
Type Description
IOException

parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static CrontabSpec parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input InputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
CrontabSpec
Exceptions
Type Description
IOException

parseFrom(ByteBuffer data)

public static CrontabSpec parseFrom(ByteBuffer data)
Parameter
Name Description
data ByteBuffer
Returns
Type Description
CrontabSpec
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)

public static CrontabSpec parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
data ByteBuffer
extensionRegistry ExtensionRegistryLite
Returns
Type Description
CrontabSpec
Exceptions
Type Description
InvalidProtocolBufferException

parser()

public static Parser<CrontabSpec> parser()
Returns
Type Description
Parser<CrontabSpec>

Methods

equals(Object obj)

public boolean equals(Object obj)
Parameter
Name Description
obj Object
Returns
Type Description
boolean
Overrides

getCreationWindow()

public Duration getCreationWindow()

Output only. Schedule backups will contain an externally consistent copy of the database at the version time specified in schedule_spec.cron_spec. However, Spanner may not initiate the creation of the scheduled backups at that version time. Spanner will initiate the creation of scheduled backups within the time window bounded by the version_time specified in schedule_spec.cron_spec and version_time + creation_window.

.google.protobuf.Duration creation_window = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
Duration

The creationWindow.

getCreationWindowOrBuilder()

public DurationOrBuilder getCreationWindowOrBuilder()

Output only. Schedule backups will contain an externally consistent copy of the database at the version time specified in schedule_spec.cron_spec. However, Spanner may not initiate the creation of the scheduled backups at that version time. Spanner will initiate the creation of scheduled backups within the time window bounded by the version_time specified in schedule_spec.cron_spec and version_time + creation_window.

.google.protobuf.Duration creation_window = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
DurationOrBuilder

getDefaultInstanceForType()

public CrontabSpec getDefaultInstanceForType()
Returns
Type Description
CrontabSpec

getParserForType()

public Parser<CrontabSpec> getParserForType()
Returns
Type Description
Parser<CrontabSpec>
Overrides

getSerializedSize()

public int getSerializedSize()
Returns
Type Description
int
Overrides

getText()

public String getText()

Required. Textual representation of the crontab. User can customize the backup frequency and the backup version time using the cron expression. The version time must be in UTC timzeone.

The backup will contain an externally consistent copy of the database at the version time. Allowed frequencies are 12 hour, 1 day, 1 week and 1 month. Examples of valid cron specifications:

  • 0 2/12 * * * : every 12 hours at (2, 14) hours past midnight in UTC.
  • 0 2,14 * * * : every 12 hours at (2,14) hours past midnight in UTC.
  • 0 2 * * * : once a day at 2 past midnight in UTC.
  • 0 2 * * 0 : once a week every Sunday at 2 past midnight in UTC.
  • 0 2 8 * * : once a month on 8th day at 2 past midnight in UTC.

string text = 1 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
String

The text.

getTextBytes()

public ByteString getTextBytes()

Required. Textual representation of the crontab. User can customize the backup frequency and the backup version time using the cron expression. The version time must be in UTC timzeone.

The backup will contain an externally consistent copy of the database at the version time. Allowed frequencies are 12 hour, 1 day, 1 week and 1 month. Examples of valid cron specifications:

  • 0 2/12 * * * : every 12 hours at (2, 14) hours past midnight in UTC.
  • 0 2,14 * * * : every 12 hours at (2,14) hours past midnight in UTC.
  • 0 2 * * * : once a day at 2 past midnight in UTC.
  • 0 2 * * 0 : once a week every Sunday at 2 past midnight in UTC.
  • 0 2 8 * * : once a month on 8th day at 2 past midnight in UTC.

string text = 1 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
ByteString

The bytes for text.

getTimeZone()

public String getTimeZone()

Output only. The time zone of the times in CrontabSpec.text. Currently only UTC is supported.

string time_zone = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
String

The timeZone.

getTimeZoneBytes()

public ByteString getTimeZoneBytes()

Output only. The time zone of the times in CrontabSpec.text. Currently only UTC is supported.

string time_zone = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
ByteString

The bytes for timeZone.

hasCreationWindow()

public boolean hasCreationWindow()

Output only. Schedule backups will contain an externally consistent copy of the database at the version time specified in schedule_spec.cron_spec. However, Spanner may not initiate the creation of the scheduled backups at that version time. Spanner will initiate the creation of scheduled backups within the time window bounded by the version_time specified in schedule_spec.cron_spec and version_time + creation_window.

.google.protobuf.Duration creation_window = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
boolean

Whether the creationWindow field is set.

hashCode()

public int hashCode()
Returns
Type Description
int
Overrides

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
Type Description
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

newBuilderForType()

public CrontabSpec.Builder newBuilderForType()
Returns
Type Description
CrontabSpec.Builder

newBuilderForType(GeneratedMessageV3.BuilderParent parent)

protected CrontabSpec.Builder newBuilderForType(GeneratedMessageV3.BuilderParent parent)
Parameter
Name Description
parent BuilderParent
Returns
Type Description
CrontabSpec.Builder
Overrides

newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)

protected Object newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
Parameter
Name Description
unused UnusedPrivateParameter
Returns
Type Description
Object
Overrides

toBuilder()

public CrontabSpec.Builder toBuilder()
Returns
Type Description
CrontabSpec.Builder

writeTo(CodedOutputStream output)

public void writeTo(CodedOutputStream output)
Parameter
Name Description
output CodedOutputStream
Overrides
Exceptions
Type Description
IOException