Class CrontabSpec (6.85.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
TypeDescription
int

TEXT_FIELD_NUMBER

public static final int TEXT_FIELD_NUMBER
Field Value
TypeDescription
int

TIME_ZONE_FIELD_NUMBER

public static final int TIME_ZONE_FIELD_NUMBER
Field Value
TypeDescription
int

Static Methods

getDefaultInstance()

public static CrontabSpec getDefaultInstance()
Returns
TypeDescription
CrontabSpec

getDescriptor()

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

newBuilder()

public static CrontabSpec.Builder newBuilder()
Returns
TypeDescription
CrontabSpec.Builder

newBuilder(CrontabSpec )

public static CrontabSpec.Builder newBuilder(CrontabSpec )
Parameter
NameDescription
CrontabSpec
Returns
TypeDescription
CrontabSpec.Builder

parseDelimitedFrom(InputStream input)

public static CrontabSpec parseDelimitedFrom(InputStream input)
Parameter
NameDescription
inputInputStream
Returns
TypeDescription
CrontabSpec
Exceptions
TypeDescription
IOException

parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

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

parseFrom(byte[] data)

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

parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)

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

parseFrom(ByteString data)

public static CrontabSpec parseFrom(ByteString data)
Parameter
NameDescription
dataByteString
Returns
TypeDescription
CrontabSpec
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)

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

parseFrom(CodedInputStream input)

public static CrontabSpec parseFrom(CodedInputStream input)
Parameter
NameDescription
inputCodedInputStream
Returns
TypeDescription
CrontabSpec
Exceptions
TypeDescription
IOException

parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

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

parseFrom(InputStream input)

public static CrontabSpec parseFrom(InputStream input)
Parameter
NameDescription
inputInputStream
Returns
TypeDescription
CrontabSpec
Exceptions
TypeDescription
IOException

parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

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

parseFrom(ByteBuffer data)

public static CrontabSpec parseFrom(ByteBuffer data)
Parameter
NameDescription
dataByteBuffer
Returns
TypeDescription
CrontabSpec
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)

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

parser()

public static Parser<CrontabSpec> parser()
Returns
TypeDescription
Parser<CrontabSpec>

Methods

equals(Object obj)

public boolean equals(Object obj)
Parameter
NameDescription
objObject
Returns
TypeDescription
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
TypeDescription
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
TypeDescription
DurationOrBuilder

getDefaultInstanceForType()

public CrontabSpec getDefaultInstanceForType()
Returns
TypeDescription
CrontabSpec

getParserForType()

public Parser<CrontabSpec> getParserForType()
Returns
TypeDescription
Parser<CrontabSpec>
Overrides

getSerializedSize()

public int getSerializedSize()
Returns
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
boolean

Whether the creationWindow field is set.

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 CrontabSpec.Builder newBuilderForType()
Returns
TypeDescription
CrontabSpec.Builder

newBuilderForType(GeneratedMessageV3.BuilderParent parent)

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

newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)

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

toBuilder()

public CrontabSpec.Builder toBuilder()
Returns
TypeDescription
CrontabSpec.Builder

writeTo(CodedOutputStream output)

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