implements
// @@protoc_insertion_point(builder_implements:google.cloud.dataproc.v1.LifecycleConfig)
com.google.cloud.dataproc.v1.LifecycleConfigOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
return com.google.cloud.dataproc.v1.ClustersProto
.internal_static_google_cloud_dataproc_v1_LifecycleConfig_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.google.cloud.dataproc.v1.ClustersProto
.internal_static_google_cloud_dataproc_v1_LifecycleConfig_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.google.cloud.dataproc.v1.LifecycleConfig.class,
com.google.cloud.dataproc.v1.LifecycleConfig.Builder.class);
}
// Construct using com.google.cloud.dataproc.v1.LifecycleConfig.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {}
}
@java.lang.Override
public Builder clear() {
super.clear();
if (idleDeleteTtlBuilder_ == null) {
idleDeleteTtl_ = null;
} else {
idleDeleteTtl_ = null;
idleDeleteTtlBuilder_ = null;
}
if (idleStartTimeBuilder_ == null) {
idleStartTime_ = null;
} else {
idleStartTime_ = null;
idleStartTimeBuilder_ = null;
}
ttlCase_ = 0;
ttl_ = null;
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() {
return com.google.cloud.dataproc.v1.ClustersProto
.internal_static_google_cloud_dataproc_v1_LifecycleConfig_descriptor;
}
@java.lang.Override
public com.google.cloud.dataproc.v1.LifecycleConfig getDefaultInstanceForType() {
return com.google.cloud.dataproc.v1.LifecycleConfig.getDefaultInstance();
}
@java.lang.Override
public com.google.cloud.dataproc.v1.LifecycleConfig build() {
com.google.cloud.dataproc.v1.LifecycleConfig result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public com.google.cloud.dataproc.v1.LifecycleConfig buildPartial() {
com.google.cloud.dataproc.v1.LifecycleConfig result =
new com.google.cloud.dataproc.v1.LifecycleConfig(this);
if (idleDeleteTtlBuilder_ == null) {
result.idleDeleteTtl_ = idleDeleteTtl_;
} else {
result.idleDeleteTtl_ = idleDeleteTtlBuilder_.build();
}
if (ttlCase_ == 2) {
if (autoDeleteTimeBuilder_ == null) {
result.ttl_ = ttl_;
} else {
result.ttl_ = autoDeleteTimeBuilder_.build();
}
}
if (ttlCase_ == 3) {
if (autoDeleteTtlBuilder_ == null) {
result.ttl_ = ttl_;
} else {
result.ttl_ = autoDeleteTtlBuilder_.build();
}
}
if (idleStartTimeBuilder_ == null) {
result.idleStartTime_ = idleStartTime_;
} else {
result.idleStartTime_ = idleStartTimeBuilder_.build();
}
result.ttlCase_ = ttlCase_;
onBuilt();
return result;
}
@java.lang.Override
public Builder clone() {
return super.clone();
}
@java.lang.Override
public Builder setField(
com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
return super.setField(field, value);
}
@java.lang.Override
public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) {
return super.clearField(field);
}
@java.lang.Override
public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) {
return super.clearOneof(oneof);
}
@java.lang.Override
public Builder setRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) {
return super.setRepeatedField(field, index, value);
}
@java.lang.Override
public Builder addRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
return super.addRepeatedField(field, value);
}
@java.lang.Override
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof com.google.cloud.dataproc.v1.LifecycleConfig) {
return mergeFrom((com.google.cloud.dataproc.v1.LifecycleConfig) other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(com.google.cloud.dataproc.v1.LifecycleConfig other) {
if (other == com.google.cloud.dataproc.v1.LifecycleConfig.getDefaultInstance()) return this;
if (other.hasIdleDeleteTtl()) {
mergeIdleDeleteTtl(other.getIdleDeleteTtl());
}
if (other.hasIdleStartTime()) {
mergeIdleStartTime(other.getIdleStartTime());
}
switch (other.getTtlCase()) {
case AUTO_DELETE_TIME:
{
mergeAutoDeleteTime(other.getAutoDeleteTime());
break;
}
case AUTO_DELETE_TTL:
{
mergeAutoDeleteTtl(other.getAutoDeleteTtl());
break;
}
case TTL_NOT_SET:
{
break;
}
}
this.mergeUnknownFields(other.unknownFields);
onChanged();
return this;
}
@java.lang.Override
public final boolean isInitialized() {
return true;
}
@java.lang.Override
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
com.google.cloud.dataproc.v1.LifecycleConfig parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (com.google.cloud.dataproc.v1.LifecycleConfig) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private int ttlCase_ = 0;
private java.lang.Object ttl_;
public TtlCase getTtlCase() {
return TtlCase.forNumber(ttlCase_);
}
public Builder clearTtl() {
ttlCase_ = 0;
ttl_ = null;
onChanged();
return this;
}
private com.google.protobuf.Duration idleDeleteTtl_;
private com.google.protobuf.SingleFieldBuilderV3<
com.google.protobuf.Duration,
com.google.protobuf.Duration.Builder,
com.google.protobuf.DurationOrBuilder>
idleDeleteTtlBuilder_;
/**
*
*
*
* Optional. The duration to keep the cluster alive while idling (when no jobs
* are running). Passing this threshold will cause the cluster to be
* deleted. Minimum value is 10 minutes; maximum value is 14 days (see JSON
* representation of
* [Duration](https://developers.google.com/protocol-buffers/docs/proto3#json).
*
*
*
* .google.protobuf.Duration idle_delete_ttl = 1 [(.google.api.field_behavior) = OPTIONAL];
*
*
* @return Whether the idleDeleteTtl field is set.
*/
public boolean hasIdleDeleteTtl() {
return idleDeleteTtlBuilder_ != null || idleDeleteTtl_ != null;
}
/**
*
*
*
* Optional. The duration to keep the cluster alive while idling (when no jobs
* are running). Passing this threshold will cause the cluster to be
* deleted. Minimum value is 10 minutes; maximum value is 14 days (see JSON
* representation of
* [Duration](https://developers.google.com/protocol-buffers/docs/proto3#json).
*
*
*
* .google.protobuf.Duration idle_delete_ttl = 1 [(.google.api.field_behavior) = OPTIONAL];
*
*
* @return The idleDeleteTtl.
*/
public com.google.protobuf.Duration getIdleDeleteTtl() {
if (idleDeleteTtlBuilder_ == null) {
return idleDeleteTtl_ == null
? com.google.protobuf.Duration.getDefaultInstance()
: idleDeleteTtl_;
} else {
return idleDeleteTtlBuilder_.getMessage();
}
}
/**
*
*
*
* Optional. The duration to keep the cluster alive while idling (when no jobs
* are running). Passing this threshold will cause the cluster to be
* deleted. Minimum value is 10 minutes; maximum value is 14 days (see JSON
* representation of
* [Duration](https://developers.google.com/protocol-buffers/docs/proto3#json).
*
*
*
* .google.protobuf.Duration idle_delete_ttl = 1 [(.google.api.field_behavior) = OPTIONAL];
*
*/
public Builder setIdleDeleteTtl(com.google.protobuf.Duration value) {
if (idleDeleteTtlBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
idleDeleteTtl_ = value;
onChanged();
} else {
idleDeleteTtlBuilder_.setMessage(value);
}
return this;
}
/**
*
*
*
* Optional. The duration to keep the cluster alive while idling (when no jobs
* are running). Passing this threshold will cause the cluster to be
* deleted. Minimum value is 10 minutes; maximum value is 14 days (see JSON
* representation of
* [Duration](https://developers.google.com/protocol-buffers/docs/proto3#json).
*
*
*
* .google.protobuf.Duration idle_delete_ttl = 1 [(.google.api.field_behavior) = OPTIONAL];
*
*/
public Builder setIdleDeleteTtl(com.google.protobuf.Duration.Builder builderForValue) {
if (idleDeleteTtlBuilder_ == null) {
idleDeleteTtl_ = builderForValue.build();
onChanged();
} else {
idleDeleteTtlBuilder_.setMessage(builderForValue.build());
}
return this;
}
/**
*
*
*
* Optional. The duration to keep the cluster alive while idling (when no jobs
* are running). Passing this threshold will cause the cluster to be
* deleted. Minimum value is 10 minutes; maximum value is 14 days (see JSON
* representation of
* [Duration](https://developers.google.com/protocol-buffers/docs/proto3#json).
*
*
*
* .google.protobuf.Duration idle_delete_ttl = 1 [(.google.api.field_behavior) = OPTIONAL];
*
*/
public Builder mergeIdleDeleteTtl(com.google.protobuf.Duration value) {
if (idleDeleteTtlBuilder_ == null) {
if (idleDeleteTtl_ != null) {
idleDeleteTtl_ =
com.google.protobuf.Duration.newBuilder(idleDeleteTtl_)
.mergeFrom(value)
.buildPartial();
} else {
idleDeleteTtl_ = value;
}
onChanged();
} else {
idleDeleteTtlBuilder_.mergeFrom(value);
}
return this;
}
/**
*
*
*
* Optional. The duration to keep the cluster alive while idling (when no jobs
* are running). Passing this threshold will cause the cluster to be
* deleted. Minimum value is 10 minutes; maximum value is 14 days (see JSON
* representation of
* [Duration](https://developers.google.com/protocol-buffers/docs/proto3#json).
*
*
*
* .google.protobuf.Duration idle_delete_ttl = 1 [(.google.api.field_behavior) = OPTIONAL];
*
*/
public Builder clearIdleDeleteTtl() {
if (idleDeleteTtlBuilder_ == null) {
idleDeleteTtl_ = null;
onChanged();
} else {
idleDeleteTtl_ = null;
idleDeleteTtlBuilder_ = null;
}
return this;
}
/**
*
*
*
* Optional. The duration to keep the cluster alive while idling (when no jobs
* are running). Passing this threshold will cause the cluster to be
* deleted. Minimum value is 10 minutes; maximum value is 14 days (see JSON
* representation of
* [Duration](https://developers.google.com/protocol-buffers/docs/proto3#json).
*
*
*
* .google.protobuf.Duration idle_delete_ttl = 1 [(.google.api.field_behavior) = OPTIONAL];
*
*/
public com.google.protobuf.Duration.Builder getIdleDeleteTtlBuilder() {
onChanged();
return getIdleDeleteTtlFieldBuilder().getBuilder();
}
/**
*
*
*
* Optional. The duration to keep the cluster alive while idling (when no jobs
* are running). Passing this threshold will cause the cluster to be
* deleted. Minimum value is 10 minutes; maximum value is 14 days (see JSON
* representation of
* [Duration](https://developers.google.com/protocol-buffers/docs/proto3#json).
*
*
*
* .google.protobuf.Duration idle_delete_ttl = 1 [(.google.api.field_behavior) = OPTIONAL];
*
*/
public com.google.protobuf.DurationOrBuilder getIdleDeleteTtlOrBuilder() {
if (idleDeleteTtlBuilder_ != null) {
return idleDeleteTtlBuilder_.getMessageOrBuilder();
} else {
return idleDeleteTtl_ == null
? com.google.protobuf.Duration.getDefaultInstance()
: idleDeleteTtl_;
}
}
/**
*
*
*
* Optional. The duration to keep the cluster alive while idling (when no jobs
* are running). Passing this threshold will cause the cluster to be
* deleted. Minimum value is 10 minutes; maximum value is 14 days (see JSON
* representation of
* [Duration](https://developers.google.com/protocol-buffers/docs/proto3#json).
*
*
*
* .google.protobuf.Duration idle_delete_ttl = 1 [(.google.api.field_behavior) = OPTIONAL];
*
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.google.protobuf.Duration,
com.google.protobuf.Duration.Builder,
com.google.protobuf.DurationOrBuilder>
getIdleDeleteTtlFieldBuilder() {
if (idleDeleteTtlBuilder_ == null) {
idleDeleteTtlBuilder_ =
new com.google.protobuf.SingleFieldBuilderV3<
com.google.protobuf.Duration,
com.google.protobuf.Duration.Builder,
com.google.protobuf.DurationOrBuilder>(
getIdleDeleteTtl(), getParentForChildren(), isClean());
idleDeleteTtl_ = null;
}
return idleDeleteTtlBuilder_;
}
private com.google.protobuf.SingleFieldBuilderV3<
com.google.protobuf.Timestamp,
com.google.protobuf.Timestamp.Builder,
com.google.protobuf.TimestampOrBuilder>
autoDeleteTimeBuilder_;
/**
*
*
*
* Optional. The time when cluster will be auto-deleted (see JSON representation of
* [Timestamp](https://developers.google.com/protocol-buffers/docs/proto3#json)).
*
*
*
* .google.protobuf.Timestamp auto_delete_time = 2 [(.google.api.field_behavior) = OPTIONAL];
*
*
* @return Whether the autoDeleteTime field is set.
*/
@java.lang.Override
public boolean hasAutoDeleteTime() {
return ttlCase_ == 2;
}
/**
*
*
*
* Optional. The time when cluster will be auto-deleted (see JSON representation of
* [Timestamp](https://developers.google.com/protocol-buffers/docs/proto3#json)).
*
*
*
* .google.protobuf.Timestamp auto_delete_time = 2 [(.google.api.field_behavior) = OPTIONAL];
*
*
* @return The autoDeleteTime.
*/
@java.lang.Override
public com.google.protobuf.Timestamp getAutoDeleteTime() {
if (autoDeleteTimeBuilder_ == null) {
if (ttlCase_ == 2) {
return (com.google.protobuf.Timestamp) ttl_;
}
return com.google.protobuf.Timestamp.getDefaultInstance();
} else {
if (ttlCase_ == 2) {
return autoDeleteTimeBuilder_.getMessage();
}
return com.google.protobuf.Timestamp.getDefaultInstance();
}
}
/**
*
*
*
* Optional. The time when cluster will be auto-deleted (see JSON representation of
* [Timestamp](https://developers.google.com/protocol-buffers/docs/proto3#json)).
*
*
*
* .google.protobuf.Timestamp auto_delete_time = 2 [(.google.api.field_behavior) = OPTIONAL];
*
*/
public Builder setAutoDeleteTime(com.google.protobuf.Timestamp value) {
if (autoDeleteTimeBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ttl_ = value;
onChanged();
} else {
autoDeleteTimeBuilder_.setMessage(value);
}
ttlCase_ = 2;
return this;
}
/**
*
*
*
* Optional. The time when cluster will be auto-deleted (see JSON representation of
* [Timestamp](https://developers.google.com/protocol-buffers/docs/proto3#json)).
*
*
*
* .google.protobuf.Timestamp auto_delete_time = 2 [(.google.api.field_behavior) = OPTIONAL];
*
*/
public Builder setAutoDeleteTime(com.google.protobuf.Timestamp.Builder builderForValue) {
if (autoDeleteTimeBuilder_ == null) {
ttl_ = builderForValue.build();
onChanged();
} else {
autoDeleteTimeBuilder_.setMessage(builderForValue.build());
}
ttlCase_ = 2;
return this;
}
/**
*
*
*
* Optional. The time when cluster will be auto-deleted (see JSON representation of
* [Timestamp](https://developers.google.com/protocol-buffers/docs/proto3#json)).
*
*
*
* .google.protobuf.Timestamp auto_delete_time = 2 [(.google.api.field_behavior) = OPTIONAL];
*
*/
public Builder mergeAutoDeleteTime(com.google.protobuf.Timestamp value) {
if (autoDeleteTimeBuilder_ == null) {
if (ttlCase_ == 2 && ttl_ != com.google.protobuf.Timestamp.getDefaultInstance()) {
ttl_ =
com.google.protobuf.Timestamp.newBuilder((com.google.protobuf.Timestamp) ttl_)
.mergeFrom(value)
.buildPartial();
} else {
ttl_ = value;
}
onChanged();
} else {
if (ttlCase_ == 2) {
autoDeleteTimeBuilder_.mergeFrom(value);
}
autoDeleteTimeBuilder_.setMessage(value);
}
ttlCase_ = 2;
return this;
}
/**
*
*
*
* Optional. The time when cluster will be auto-deleted (see JSON representation of
* [Timestamp](https://developers.google.com/protocol-buffers/docs/proto3#json)).
*
*
*
* .google.protobuf.Timestamp auto_delete_time = 2 [(.google.api.field_behavior) = OPTIONAL];
*
*/
public Builder clearAutoDeleteTime() {
if (autoDeleteTimeBuilder_ == null) {
if (ttlCase_ == 2) {
ttlCase_ = 0;
ttl_ = null;
onChanged();
}
} else {
if (ttlCase_ == 2) {
ttlCase_ = 0;
ttl_ = null;
}
autoDeleteTimeBuilder_.clear();
}
return this;
}
/**
*
*
*
* Optional. The time when cluster will be auto-deleted (see JSON representation of
* [Timestamp](https://developers.google.com/protocol-buffers/docs/proto3#json)).
*
*
*
* .google.protobuf.Timestamp auto_delete_time = 2 [(.google.api.field_behavior) = OPTIONAL];
*
*/
public com.google.protobuf.Timestamp.Builder getAutoDeleteTimeBuilder() {
return getAutoDeleteTimeFieldBuilder().getBuilder();
}
/**
*
*
*
* Optional. The time when cluster will be auto-deleted (see JSON representation of
* [Timestamp](https://developers.google.com/protocol-buffers/docs/proto3#json)).
*
*
*
* .google.protobuf.Timestamp auto_delete_time = 2 [(.google.api.field_behavior) = OPTIONAL];
*
*/
@java.lang.Override
public com.google.protobuf.TimestampOrBuilder getAutoDeleteTimeOrBuilder() {
if ((ttlCase_ == 2) && (autoDeleteTimeBuilder_ != null)) {
return autoDeleteTimeBuilder_.getMessageOrBuilder();
} else {
if (ttlCase_ == 2) {
return (com.google.protobuf.Timestamp) ttl_;
}
return com.google.protobuf.Timestamp.getDefaultInstance();
}
}
/**
*
*
*
* Optional. The time when cluster will be auto-deleted (see JSON representation of
* [Timestamp](https://developers.google.com/protocol-buffers/docs/proto3#json)).
*
*
*
* .google.protobuf.Timestamp auto_delete_time = 2 [(.google.api.field_behavior) = OPTIONAL];
*
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.google.protobuf.Timestamp,
com.google.protobuf.Timestamp.Builder,
com.google.protobuf.TimestampOrBuilder>
getAutoDeleteTimeFieldBuilder() {
if (autoDeleteTimeBuilder_ == null) {
if (!(ttlCase_ == 2)) {
ttl_ = com.google.protobuf.Timestamp.getDefaultInstance();
}
autoDeleteTimeBuilder_ =
new com.google.protobuf.SingleFieldBuilderV3<
com.google.protobuf.Timestamp,
com.google.protobuf.Timestamp.Builder,
com.google.protobuf.TimestampOrBuilder>(
(com.google.protobuf.Timestamp) ttl_, getParentForChildren(), isClean());
ttl_ = null;
}
ttlCase_ = 2;
onChanged();
;
return autoDeleteTimeBuilder_;
}
private com.google.protobuf.SingleFieldBuilderV3<
com.google.protobuf.Duration,
com.google.protobuf.Duration.Builder,
com.google.protobuf.DurationOrBuilder>
autoDeleteTtlBuilder_;
/**
*
*
*
* Optional. The lifetime duration of cluster. The cluster will be
* auto-deleted at the end of this period. Minimum value is 10 minutes;
* maximum value is 14 days (see JSON representation of
* [Duration](https://developers.google.com/protocol-buffers/docs/proto3#json)).
*
*
*
* .google.protobuf.Duration auto_delete_ttl = 3 [(.google.api.field_behavior) = OPTIONAL];
*
*
* @return Whether the autoDeleteTtl field is set.
*/
@java.lang.Override
public boolean hasAutoDeleteTtl() {
return ttlCase_ == 3;
}
/**
*
*
*
* Optional. The lifetime duration of cluster. The cluster will be
* auto-deleted at the end of this period. Minimum value is 10 minutes;
* maximum value is 14 days (see JSON representation of
* [Duration](https://developers.google.com/protocol-buffers/docs/proto3#json)).
*
*
*
* .google.protobuf.Duration auto_delete_ttl = 3 [(.google.api.field_behavior) = OPTIONAL];
*
*
* @return The autoDeleteTtl.
*/
@java.lang.Override
public com.google.protobuf.Duration getAutoDeleteTtl() {
if (autoDeleteTtlBuilder_ == null) {
if (ttlCase_ == 3) {
return (com.google.protobuf.Duration) ttl_;
}
return com.google.protobuf.Duration.getDefaultInstance();
} else {
if (ttlCase_ == 3) {
return autoDeleteTtlBuilder_.getMessage();
}
return com.google.protobuf.Duration.getDefaultInstance();
}
}
/**
*
*
*
* Optional. The lifetime duration of cluster. The cluster will be
* auto-deleted at the end of this period. Minimum value is 10 minutes;
* maximum value is 14 days (see JSON representation of
* [Duration](https://developers.google.com/protocol-buffers/docs/proto3#json)).
*
*
*
* .google.protobuf.Duration auto_delete_ttl = 3 [(.google.api.field_behavior) = OPTIONAL];
*
*/
public Builder setAutoDeleteTtl(com.google.protobuf.Duration value) {
if (autoDeleteTtlBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ttl_ = value;
onChanged();
} else {
autoDeleteTtlBuilder_.setMessage(value);
}
ttlCase_ = 3;
return this;
}
/**
*
*
*
* Optional. The lifetime duration of cluster. The cluster will be
* auto-deleted at the end of this period. Minimum value is 10 minutes;
* maximum value is 14 days (see JSON representation of
* [Duration](https://developers.google.com/protocol-buffers/docs/proto3#json)).
*
*
*
* .google.protobuf.Duration auto_delete_ttl = 3 [(.google.api.field_behavior) = OPTIONAL];
*
*/
public Builder setAutoDeleteTtl(com.google.protobuf.Duration.Builder builderForValue) {
if (autoDeleteTtlBuilder_ == null) {
ttl_ = builderForValue.build();
onChanged();
} else {
autoDeleteTtlBuilder_.setMessage(builderForValue.build());
}
ttlCase_ = 3;
return this;
}
/**
*
*
*
* Optional. The lifetime duration of cluster. The cluster will be
* auto-deleted at the end of this period. Minimum value is 10 minutes;
* maximum value is 14 days (see JSON representation of
* [Duration](https://developers.google.com/protocol-buffers/docs/proto3#json)).
*
*
*
* .google.protobuf.Duration auto_delete_ttl = 3 [(.google.api.field_behavior) = OPTIONAL];
*
*/
public Builder mergeAutoDeleteTtl(com.google.protobuf.Duration value) {
if (autoDeleteTtlBuilder_ == null) {
if (ttlCase_ == 3 && ttl_ != com.google.protobuf.Duration.getDefaultInstance()) {
ttl_ =
com.google.protobuf.Duration.newBuilder((com.google.protobuf.Duration) ttl_)
.mergeFrom(value)
.buildPartial();
} else {
ttl_ = value;
}
onChanged();
} else {
if (ttlCase_ == 3) {
autoDeleteTtlBuilder_.mergeFrom(value);
}
autoDeleteTtlBuilder_.setMessage(value);
}
ttlCase_ = 3;
return this;
}
/**
*
*
*
* Optional. The lifetime duration of cluster. The cluster will be
* auto-deleted at the end of this period. Minimum value is 10 minutes;
* maximum value is 14 days (see JSON representation of
* [Duration](https://developers.google.com/protocol-buffers/docs/proto3#json)).
*
*
*
* .google.protobuf.Duration auto_delete_ttl = 3 [(.google.api.field_behavior) = OPTIONAL];
*
*/
public Builder clearAutoDeleteTtl() {
if (autoDeleteTtlBuilder_ == null) {
if (ttlCase_ == 3) {
ttlCase_ = 0;
ttl_ = null;
onChanged();
}
} else {
if (ttlCase_ == 3) {
ttlCase_ = 0;
ttl_ = null;
}
autoDeleteTtlBuilder_.clear();
}
return this;
}
/**
*
*
*
* Optional. The lifetime duration of cluster. The cluster will be
* auto-deleted at the end of this period. Minimum value is 10 minutes;
* maximum value is 14 days (see JSON representation of
* [Duration](https://developers.google.com/protocol-buffers/docs/proto3#json)).
*
*
*
* .google.protobuf.Duration auto_delete_ttl = 3 [(.google.api.field_behavior) = OPTIONAL];
*
*/
public com.google.protobuf.Duration.Builder getAutoDeleteTtlBuilder() {
return getAutoDeleteTtlFieldBuilder().getBuilder();
}
/**
*
*
*
* Optional. The lifetime duration of cluster. The cluster will be
* auto-deleted at the end of this period. Minimum value is 10 minutes;
* maximum value is 14 days (see JSON representation of
* [Duration](https://developers.google.com/protocol-buffers/docs/proto3#json)).
*
*
*
* .google.protobuf.Duration auto_delete_ttl = 3 [(.google.api.field_behavior) = OPTIONAL];
*
*/
@java.lang.Override
public com.google.protobuf.DurationOrBuilder getAutoDeleteTtlOrBuilder() {
if ((ttlCase_ == 3) && (autoDeleteTtlBuilder_ != null)) {
return autoDeleteTtlBuilder_.getMessageOrBuilder();
} else {
if (ttlCase_ == 3) {
return (com.google.protobuf.Duration) ttl_;
}
return com.google.protobuf.Duration.getDefaultInstance();
}
}
/**
*
*
*
* Optional. The lifetime duration of cluster. The cluster will be
* auto-deleted at the end of this period. Minimum value is 10 minutes;
* maximum value is 14 days (see JSON representation of
* [Duration](https://developers.google.com/protocol-buffers/docs/proto3#json)).
*
*
*
* .google.protobuf.Duration auto_delete_ttl = 3 [(.google.api.field_behavior) = OPTIONAL];
*
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.google.protobuf.Duration,
com.google.protobuf.Duration.Builder,
com.google.protobuf.DurationOrBuilder>
getAutoDeleteTtlFieldBuilder() {
if (autoDeleteTtlBuilder_ == null) {
if (!(ttlCase_ == 3)) {
ttl_ = com.google.protobuf.Duration.getDefaultInstance();
}
autoDeleteTtlBuilder_ =
new com.google.protobuf.SingleFieldBuilderV3<
com.google.protobuf.Duration,
com.google.protobuf.Duration.Builder,
com.google.protobuf.DurationOrBuilder>(
(com.google.protobuf.Duration) ttl_, getParentForChildren(), isClean());
ttl_ = null;
}
ttlCase_ = 3;
onChanged();
;
return autoDeleteTtlBuilder_;
}
private com.google.protobuf.Timestamp idleStartTime_;
private com.google.protobuf.SingleFieldBuilderV3<
com.google.protobuf.Timestamp,
com.google.protobuf.Timestamp.Builder,
com.google.protobuf.TimestampOrBuilder>
idleStartTimeBuilder_;
/**
*
*
*
* Output only. The time when cluster became idle (most recent job finished)
* and became eligible for deletion due to idleness (see JSON representation
* of
* [Timestamp](https://developers.google.com/protocol-buffers/docs/proto3#json)).
*
*
*
* .google.protobuf.Timestamp idle_start_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
*
* @return Whether the idleStartTime field is set.
*/
public boolean hasIdleStartTime() {
return idleStartTimeBuilder_ != null || idleStartTime_ != null;
}
/**
*
*
*
* Output only. The time when cluster became idle (most recent job finished)
* and became eligible for deletion due to idleness (see JSON representation
* of
* [Timestamp](https://developers.google.com/protocol-buffers/docs/proto3#json)).
*
*
*
* .google.protobuf.Timestamp idle_start_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
*
* @return The idleStartTime.
*/
public com.google.protobuf.Timestamp getIdleStartTime() {
if (idleStartTimeBuilder_ == null) {
return idleStartTime_ == null
? com.google.protobuf.Timestamp.getDefaultInstance()
: idleStartTime_;
} else {
return idleStartTimeBuilder_.getMessage();
}
}
/**
*
*
*
* Output only. The time when cluster became idle (most recent job finished)
* and became eligible for deletion due to idleness (see JSON representation
* of
* [Timestamp](https://developers.google.com/protocol-buffers/docs/proto3#json)).
*
*
*
* .google.protobuf.Timestamp idle_start_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
*/
public Builder setIdleStartTime(com.google.protobuf.Timestamp value) {
if (idleStartTimeBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
idleStartTime_ = value;
onChanged();
} else {
idleStartTimeBuilder_.setMessage(value);
}
return this;
}
/**
*
*
*
* Output only. The time when cluster became idle (most recent job finished)
* and became eligible for deletion due to idleness (see JSON representation
* of
* [Timestamp](https://developers.google.com/protocol-buffers/docs/proto3#json)).
*
*
*
* .google.protobuf.Timestamp idle_start_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
*/
public Builder setIdleStartTime(com.google.protobuf.Timestamp.Builder builderForValue) {
if (idleStartTimeBuilder_ == null) {
idleStartTime_ = builderForValue.build();
onChanged();
} else {
idleStartTimeBuilder_.setMessage(builderForValue.build());
}
return this;
}
/**
*
*
*
* Output only. The time when cluster became idle (most recent job finished)
* and became eligible for deletion due to idleness (see JSON representation
* of
* [Timestamp](https://developers.google.com/protocol-buffers/docs/proto3#json)).
*
*
*
* .google.protobuf.Timestamp idle_start_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
*/
public Builder mergeIdleStartTime(com.google.protobuf.Timestamp value) {
if (idleStartTimeBuilder_ == null) {
if (idleStartTime_ != null) {
idleStartTime_ =
com.google.protobuf.Timestamp.newBuilder(idleStartTime_)
.mergeFrom(value)
.buildPartial();
} else {
idleStartTime_ = value;
}
onChanged();
} else {
idleStartTimeBuilder_.mergeFrom(value);
}
return this;
}
/**
*
*
*
* Output only. The time when cluster became idle (most recent job finished)
* and became eligible for deletion due to idleness (see JSON representation
* of
* [Timestamp](https://developers.google.com/protocol-buffers/docs/proto3#json)).
*
*
*
* .google.protobuf.Timestamp idle_start_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
*/
public Builder clearIdleStartTime() {
if (idleStartTimeBuilder_ == null) {
idleStartTime_ = null;
onChanged();
} else {
idleStartTime_ = null;
idleStartTimeBuilder_ = null;
}
return this;
}
/**
*
*
*
* Output only. The time when cluster became idle (most recent job finished)
* and became eligible for deletion due to idleness (see JSON representation
* of
* [Timestamp](https://developers.google.com/protocol-buffers/docs/proto3#json)).
*
*
*
* .google.protobuf.Timestamp idle_start_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
*/
public com.google.protobuf.Timestamp.Builder getIdleStartTimeBuilder() {
onChanged();
return getIdleStartTimeFieldBuilder().getBuilder();
}
/**
*
*
*
* Output only. The time when cluster became idle (most recent job finished)
* and became eligible for deletion due to idleness (see JSON representation
* of
* [Timestamp](https://developers.google.com/protocol-buffers/docs/proto3#json)).
*
*
*
* .google.protobuf.Timestamp idle_start_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
*/
public com.google.protobuf.TimestampOrBuilder getIdleStartTimeOrBuilder() {
if (idleStartTimeBuilder_ != null) {
return idleStartTimeBuilder_.getMessageOrBuilder();
} else {
return idleStartTime_ == null
? com.google.protobuf.Timestamp.getDefaultInstance()
: idleStartTime_;
}
}
/**
*
*
*
* Output only. The time when cluster became idle (most recent job finished)
* and became eligible for deletion due to idleness (see JSON representation
* of
* [Timestamp](https://developers.google.com/protocol-buffers/docs/proto3#json)).
*
*
*
* .google.protobuf.Timestamp idle_start_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.google.protobuf.Timestamp,
com.google.protobuf.Timestamp.Builder,
com.google.protobuf.TimestampOrBuilder>
getIdleStartTimeFieldBuilder() {
if (idleStartTimeBuilder_ == null) {
idleStartTimeBuilder_ =
new com.google.protobuf.SingleFieldBuilderV3<
com.google.protobuf.Timestamp,
com.google.protobuf.Timestamp.Builder,
com.google.protobuf.TimestampOrBuilder>(
getIdleStartTime(), getParentForChildren(), isClean());
idleStartTime_ = null;
}
return idleStartTimeBuilder_;
}
@java.lang.Override
public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.setUnknownFields(unknownFields);
}
@java.lang.Override
public final Builder mergeUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.mergeUnknownFields(unknownFields);
}
// @@protoc_insertion_point(builder_scope:google.cloud.dataproc.v1.LifecycleConfig)
}
// @@protoc_insertion_point(class_scope:google.cloud.dataproc.v1.LifecycleConfig)
private static final com.google.cloud.dataproc.v1.LifecycleConfig DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new com.google.cloud.dataproc.v1.LifecycleConfig();
}
public static com.google.cloud.dataproc.v1.LifecycleConfig getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser PARSER =
new com.google.protobuf.AbstractParser() {
@java.lang.Override
public LifecycleConfig parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new LifecycleConfig(input, extensionRegistry);
}
};
public static com.google.protobuf.Parser parser() {
return PARSER;
}
@java.lang.Override
public com.google.protobuf.Parser getParserForType() {
return PARSER;
}
@java.lang.Override
public com.google.cloud.dataproc.v1.LifecycleConfig getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}