io.opencannabis.schema.temporal.TemporalSchedule Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of java-client Show documentation
Show all versions of java-client Show documentation
Java RPCAPI client for the Bloombox Cloud.
The newest version!
/*
* Copyright 2019, Momentum Ideas Co.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: temporal/Schedule.proto
package io.opencannabis.schema.temporal;
public final class TemporalSchedule {
private TemporalSchedule() {}
public static void registerAllExtensions(
com.google.protobuf.ExtensionRegistryLite registry) {
}
public static void registerAllExtensions(
com.google.protobuf.ExtensionRegistry registry) {
registerAllExtensions(
(com.google.protobuf.ExtensionRegistryLite) registry);
}
public interface ScheduleOrBuilder extends
// @@protoc_insertion_point(interface_extends:opencannabis.temporal.Schedule)
com.google.protobuf.MessageOrBuilder {
/**
*
* Specifies an absolute instant for the schedule.
*
*
* .opencannabis.temporal.Instant absolute = 1;
*/
boolean hasAbsolute();
/**
*
* Specifies an absolute instant for the schedule.
*
*
* .opencannabis.temporal.Instant absolute = 1;
*/
io.opencannabis.schema.temporal.TemporalInstant.Instant getAbsolute();
/**
*
* Specifies an absolute instant for the schedule.
*
*
* .opencannabis.temporal.Instant absolute = 1;
*/
io.opencannabis.schema.temporal.TemporalInstant.InstantOrBuilder getAbsoluteOrBuilder();
/**
*
* Specifies a relative time as a schedule.
*
*
* .opencannabis.temporal.Time time = 2;
*/
boolean hasTime();
/**
*
* Specifies a relative time as a schedule.
*
*
* .opencannabis.temporal.Time time = 2;
*/
io.opencannabis.schema.temporal.TemporalTime.Time getTime();
/**
*
* Specifies a relative time as a schedule.
*
*
* .opencannabis.temporal.Time time = 2;
*/
io.opencannabis.schema.temporal.TemporalTime.TimeOrBuilder getTimeOrBuilder();
/**
*
* Specifies an interval schedule.
*
*
* .opencannabis.temporal.Interval interval = 3;
*/
int getIntervalValue();
/**
*
* Specifies an interval schedule.
*
*
* .opencannabis.temporal.Interval interval = 3;
*/
io.opencannabis.schema.temporal.TemporalInterval.Interval getInterval();
public io.opencannabis.schema.temporal.TemporalSchedule.Schedule.SpecCase getSpecCase();
}
/**
*
* Specifies a schedule for something.
*
*
* Protobuf type {@code opencannabis.temporal.Schedule}
*/
public static final class Schedule extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:opencannabis.temporal.Schedule)
ScheduleOrBuilder {
private static final long serialVersionUID = 0L;
// Use Schedule.newBuilder() to construct.
private Schedule(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private Schedule() {
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private Schedule(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
this();
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
int mutable_bitField0_ = 0;
com.google.protobuf.UnknownFieldSet.Builder unknownFields =
com.google.protobuf.UnknownFieldSet.newBuilder();
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
case 10: {
io.opencannabis.schema.temporal.TemporalInstant.Instant.Builder subBuilder = null;
if (specCase_ == 1) {
subBuilder = ((io.opencannabis.schema.temporal.TemporalInstant.Instant) spec_).toBuilder();
}
spec_ =
input.readMessage(io.opencannabis.schema.temporal.TemporalInstant.Instant.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom((io.opencannabis.schema.temporal.TemporalInstant.Instant) spec_);
spec_ = subBuilder.buildPartial();
}
specCase_ = 1;
break;
}
case 18: {
io.opencannabis.schema.temporal.TemporalTime.Time.Builder subBuilder = null;
if (specCase_ == 2) {
subBuilder = ((io.opencannabis.schema.temporal.TemporalTime.Time) spec_).toBuilder();
}
spec_ =
input.readMessage(io.opencannabis.schema.temporal.TemporalTime.Time.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom((io.opencannabis.schema.temporal.TemporalTime.Time) spec_);
spec_ = subBuilder.buildPartial();
}
specCase_ = 2;
break;
}
case 24: {
int rawValue = input.readEnum();
specCase_ = 3;
spec_ = rawValue;
break;
}
default: {
if (!parseUnknownField(
input, unknownFields, extensionRegistry, tag)) {
done = true;
}
break;
}
}
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(
e).setUnfinishedMessage(this);
} finally {
this.unknownFields = unknownFields.build();
makeExtensionsImmutable();
}
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return io.opencannabis.schema.temporal.TemporalSchedule.internal_static_opencannabis_temporal_Schedule_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return io.opencannabis.schema.temporal.TemporalSchedule.internal_static_opencannabis_temporal_Schedule_fieldAccessorTable
.ensureFieldAccessorsInitialized(
io.opencannabis.schema.temporal.TemporalSchedule.Schedule.class, io.opencannabis.schema.temporal.TemporalSchedule.Schedule.Builder.class);
}
private int specCase_ = 0;
private java.lang.Object spec_;
public enum SpecCase
implements com.google.protobuf.Internal.EnumLite {
ABSOLUTE(1),
TIME(2),
INTERVAL(3),
SPEC_NOT_SET(0);
private final int value;
private SpecCase(int value) {
this.value = value;
}
/**
* @deprecated Use {@link #forNumber(int)} instead.
*/
@java.lang.Deprecated
public static SpecCase valueOf(int value) {
return forNumber(value);
}
public static SpecCase forNumber(int value) {
switch (value) {
case 1: return ABSOLUTE;
case 2: return TIME;
case 3: return INTERVAL;
case 0: return SPEC_NOT_SET;
default: return null;
}
}
public int getNumber() {
return this.value;
}
};
public SpecCase
getSpecCase() {
return SpecCase.forNumber(
specCase_);
}
public static final int ABSOLUTE_FIELD_NUMBER = 1;
/**
*
* Specifies an absolute instant for the schedule.
*
*
* .opencannabis.temporal.Instant absolute = 1;
*/
public boolean hasAbsolute() {
return specCase_ == 1;
}
/**
*
* Specifies an absolute instant for the schedule.
*
*
* .opencannabis.temporal.Instant absolute = 1;
*/
public io.opencannabis.schema.temporal.TemporalInstant.Instant getAbsolute() {
if (specCase_ == 1) {
return (io.opencannabis.schema.temporal.TemporalInstant.Instant) spec_;
}
return io.opencannabis.schema.temporal.TemporalInstant.Instant.getDefaultInstance();
}
/**
*
* Specifies an absolute instant for the schedule.
*
*
* .opencannabis.temporal.Instant absolute = 1;
*/
public io.opencannabis.schema.temporal.TemporalInstant.InstantOrBuilder getAbsoluteOrBuilder() {
if (specCase_ == 1) {
return (io.opencannabis.schema.temporal.TemporalInstant.Instant) spec_;
}
return io.opencannabis.schema.temporal.TemporalInstant.Instant.getDefaultInstance();
}
public static final int TIME_FIELD_NUMBER = 2;
/**
*
* Specifies a relative time as a schedule.
*
*
* .opencannabis.temporal.Time time = 2;
*/
public boolean hasTime() {
return specCase_ == 2;
}
/**
*
* Specifies a relative time as a schedule.
*
*
* .opencannabis.temporal.Time time = 2;
*/
public io.opencannabis.schema.temporal.TemporalTime.Time getTime() {
if (specCase_ == 2) {
return (io.opencannabis.schema.temporal.TemporalTime.Time) spec_;
}
return io.opencannabis.schema.temporal.TemporalTime.Time.getDefaultInstance();
}
/**
*
* Specifies a relative time as a schedule.
*
*
* .opencannabis.temporal.Time time = 2;
*/
public io.opencannabis.schema.temporal.TemporalTime.TimeOrBuilder getTimeOrBuilder() {
if (specCase_ == 2) {
return (io.opencannabis.schema.temporal.TemporalTime.Time) spec_;
}
return io.opencannabis.schema.temporal.TemporalTime.Time.getDefaultInstance();
}
public static final int INTERVAL_FIELD_NUMBER = 3;
/**
*
* Specifies an interval schedule.
*
*
* .opencannabis.temporal.Interval interval = 3;
*/
public int getIntervalValue() {
if (specCase_ == 3) {
return (java.lang.Integer) spec_;
}
return 0;
}
/**
*
* Specifies an interval schedule.
*
*
* .opencannabis.temporal.Interval interval = 3;
*/
public io.opencannabis.schema.temporal.TemporalInterval.Interval getInterval() {
if (specCase_ == 3) {
@SuppressWarnings("deprecation")
io.opencannabis.schema.temporal.TemporalInterval.Interval result = io.opencannabis.schema.temporal.TemporalInterval.Interval.valueOf(
(java.lang.Integer) spec_);
return result == null ? io.opencannabis.schema.temporal.TemporalInterval.Interval.UNRECOGNIZED : result;
}
return io.opencannabis.schema.temporal.TemporalInterval.Interval.MINUTELY;
}
private byte memoizedIsInitialized = -1;
@java.lang.Override
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
if (isInitialized == 0) return false;
memoizedIsInitialized = 1;
return true;
}
@java.lang.Override
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
if (specCase_ == 1) {
output.writeMessage(1, (io.opencannabis.schema.temporal.TemporalInstant.Instant) spec_);
}
if (specCase_ == 2) {
output.writeMessage(2, (io.opencannabis.schema.temporal.TemporalTime.Time) spec_);
}
if (specCase_ == 3) {
output.writeEnum(3, ((java.lang.Integer) spec_));
}
unknownFields.writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (specCase_ == 1) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(1, (io.opencannabis.schema.temporal.TemporalInstant.Instant) spec_);
}
if (specCase_ == 2) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(2, (io.opencannabis.schema.temporal.TemporalTime.Time) spec_);
}
if (specCase_ == 3) {
size += com.google.protobuf.CodedOutputStream
.computeEnumSize(3, ((java.lang.Integer) spec_));
}
size += unknownFields.getSerializedSize();
memoizedSize = size;
return size;
}
@java.lang.Override
public boolean equals(final java.lang.Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof io.opencannabis.schema.temporal.TemporalSchedule.Schedule)) {
return super.equals(obj);
}
io.opencannabis.schema.temporal.TemporalSchedule.Schedule other = (io.opencannabis.schema.temporal.TemporalSchedule.Schedule) obj;
if (!getSpecCase().equals(other.getSpecCase())) return false;
switch (specCase_) {
case 1:
if (!getAbsolute()
.equals(other.getAbsolute())) return false;
break;
case 2:
if (!getTime()
.equals(other.getTime())) return false;
break;
case 3:
if (getIntervalValue()
!= other.getIntervalValue()) return false;
break;
case 0:
default:
}
if (!unknownFields.equals(other.unknownFields)) return false;
return true;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptor().hashCode();
switch (specCase_) {
case 1:
hash = (37 * hash) + ABSOLUTE_FIELD_NUMBER;
hash = (53 * hash) + getAbsolute().hashCode();
break;
case 2:
hash = (37 * hash) + TIME_FIELD_NUMBER;
hash = (53 * hash) + getTime().hashCode();
break;
case 3:
hash = (37 * hash) + INTERVAL_FIELD_NUMBER;
hash = (53 * hash) + getIntervalValue();
break;
case 0:
default:
}
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static io.opencannabis.schema.temporal.TemporalSchedule.Schedule parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static io.opencannabis.schema.temporal.TemporalSchedule.Schedule parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static io.opencannabis.schema.temporal.TemporalSchedule.Schedule parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static io.opencannabis.schema.temporal.TemporalSchedule.Schedule parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static io.opencannabis.schema.temporal.TemporalSchedule.Schedule parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static io.opencannabis.schema.temporal.TemporalSchedule.Schedule parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static io.opencannabis.schema.temporal.TemporalSchedule.Schedule parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static io.opencannabis.schema.temporal.TemporalSchedule.Schedule parseFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
public static io.opencannabis.schema.temporal.TemporalSchedule.Schedule parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static io.opencannabis.schema.temporal.TemporalSchedule.Schedule parseDelimitedFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input, extensionRegistry);
}
public static io.opencannabis.schema.temporal.TemporalSchedule.Schedule parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static io.opencannabis.schema.temporal.TemporalSchedule.Schedule parseFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
@java.lang.Override
public Builder newBuilderForType() { return newBuilder(); }
public static Builder newBuilder() {
return DEFAULT_INSTANCE.toBuilder();
}
public static Builder newBuilder(io.opencannabis.schema.temporal.TemporalSchedule.Schedule prototype) {
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
}
@java.lang.Override
public Builder toBuilder() {
return this == DEFAULT_INSTANCE
? new Builder() : new Builder().mergeFrom(this);
}
@java.lang.Override
protected Builder newBuilderForType(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
Builder builder = new Builder(parent);
return builder;
}
/**
*
* Specifies a schedule for something.
*
*
* Protobuf type {@code opencannabis.temporal.Schedule}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:opencannabis.temporal.Schedule)
io.opencannabis.schema.temporal.TemporalSchedule.ScheduleOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return io.opencannabis.schema.temporal.TemporalSchedule.internal_static_opencannabis_temporal_Schedule_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return io.opencannabis.schema.temporal.TemporalSchedule.internal_static_opencannabis_temporal_Schedule_fieldAccessorTable
.ensureFieldAccessorsInitialized(
io.opencannabis.schema.temporal.TemporalSchedule.Schedule.class, io.opencannabis.schema.temporal.TemporalSchedule.Schedule.Builder.class);
}
// Construct using io.opencannabis.schema.temporal.TemporalSchedule.Schedule.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();
specCase_ = 0;
spec_ = null;
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return io.opencannabis.schema.temporal.TemporalSchedule.internal_static_opencannabis_temporal_Schedule_descriptor;
}
@java.lang.Override
public io.opencannabis.schema.temporal.TemporalSchedule.Schedule getDefaultInstanceForType() {
return io.opencannabis.schema.temporal.TemporalSchedule.Schedule.getDefaultInstance();
}
@java.lang.Override
public io.opencannabis.schema.temporal.TemporalSchedule.Schedule build() {
io.opencannabis.schema.temporal.TemporalSchedule.Schedule result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public io.opencannabis.schema.temporal.TemporalSchedule.Schedule buildPartial() {
io.opencannabis.schema.temporal.TemporalSchedule.Schedule result = new io.opencannabis.schema.temporal.TemporalSchedule.Schedule(this);
if (specCase_ == 1) {
if (absoluteBuilder_ == null) {
result.spec_ = spec_;
} else {
result.spec_ = absoluteBuilder_.build();
}
}
if (specCase_ == 2) {
if (timeBuilder_ == null) {
result.spec_ = spec_;
} else {
result.spec_ = timeBuilder_.build();
}
}
if (specCase_ == 3) {
result.spec_ = spec_;
}
result.specCase_ = specCase_;
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 io.opencannabis.schema.temporal.TemporalSchedule.Schedule) {
return mergeFrom((io.opencannabis.schema.temporal.TemporalSchedule.Schedule)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(io.opencannabis.schema.temporal.TemporalSchedule.Schedule other) {
if (other == io.opencannabis.schema.temporal.TemporalSchedule.Schedule.getDefaultInstance()) return this;
switch (other.getSpecCase()) {
case ABSOLUTE: {
mergeAbsolute(other.getAbsolute());
break;
}
case TIME: {
mergeTime(other.getTime());
break;
}
case INTERVAL: {
setIntervalValue(other.getIntervalValue());
break;
}
case SPEC_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 {
io.opencannabis.schema.temporal.TemporalSchedule.Schedule parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (io.opencannabis.schema.temporal.TemporalSchedule.Schedule) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private int specCase_ = 0;
private java.lang.Object spec_;
public SpecCase
getSpecCase() {
return SpecCase.forNumber(
specCase_);
}
public Builder clearSpec() {
specCase_ = 0;
spec_ = null;
onChanged();
return this;
}
private com.google.protobuf.SingleFieldBuilderV3<
io.opencannabis.schema.temporal.TemporalInstant.Instant, io.opencannabis.schema.temporal.TemporalInstant.Instant.Builder, io.opencannabis.schema.temporal.TemporalInstant.InstantOrBuilder> absoluteBuilder_;
/**
*
* Specifies an absolute instant for the schedule.
*
*
* .opencannabis.temporal.Instant absolute = 1;
*/
public boolean hasAbsolute() {
return specCase_ == 1;
}
/**
*
* Specifies an absolute instant for the schedule.
*
*
* .opencannabis.temporal.Instant absolute = 1;
*/
public io.opencannabis.schema.temporal.TemporalInstant.Instant getAbsolute() {
if (absoluteBuilder_ == null) {
if (specCase_ == 1) {
return (io.opencannabis.schema.temporal.TemporalInstant.Instant) spec_;
}
return io.opencannabis.schema.temporal.TemporalInstant.Instant.getDefaultInstance();
} else {
if (specCase_ == 1) {
return absoluteBuilder_.getMessage();
}
return io.opencannabis.schema.temporal.TemporalInstant.Instant.getDefaultInstance();
}
}
/**
*
* Specifies an absolute instant for the schedule.
*
*
* .opencannabis.temporal.Instant absolute = 1;
*/
public Builder setAbsolute(io.opencannabis.schema.temporal.TemporalInstant.Instant value) {
if (absoluteBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
spec_ = value;
onChanged();
} else {
absoluteBuilder_.setMessage(value);
}
specCase_ = 1;
return this;
}
/**
*
* Specifies an absolute instant for the schedule.
*
*
* .opencannabis.temporal.Instant absolute = 1;
*/
public Builder setAbsolute(
io.opencannabis.schema.temporal.TemporalInstant.Instant.Builder builderForValue) {
if (absoluteBuilder_ == null) {
spec_ = builderForValue.build();
onChanged();
} else {
absoluteBuilder_.setMessage(builderForValue.build());
}
specCase_ = 1;
return this;
}
/**
*
* Specifies an absolute instant for the schedule.
*
*
* .opencannabis.temporal.Instant absolute = 1;
*/
public Builder mergeAbsolute(io.opencannabis.schema.temporal.TemporalInstant.Instant value) {
if (absoluteBuilder_ == null) {
if (specCase_ == 1 &&
spec_ != io.opencannabis.schema.temporal.TemporalInstant.Instant.getDefaultInstance()) {
spec_ = io.opencannabis.schema.temporal.TemporalInstant.Instant.newBuilder((io.opencannabis.schema.temporal.TemporalInstant.Instant) spec_)
.mergeFrom(value).buildPartial();
} else {
spec_ = value;
}
onChanged();
} else {
if (specCase_ == 1) {
absoluteBuilder_.mergeFrom(value);
}
absoluteBuilder_.setMessage(value);
}
specCase_ = 1;
return this;
}
/**
*
* Specifies an absolute instant for the schedule.
*
*
* .opencannabis.temporal.Instant absolute = 1;
*/
public Builder clearAbsolute() {
if (absoluteBuilder_ == null) {
if (specCase_ == 1) {
specCase_ = 0;
spec_ = null;
onChanged();
}
} else {
if (specCase_ == 1) {
specCase_ = 0;
spec_ = null;
}
absoluteBuilder_.clear();
}
return this;
}
/**
*
* Specifies an absolute instant for the schedule.
*
*
* .opencannabis.temporal.Instant absolute = 1;
*/
public io.opencannabis.schema.temporal.TemporalInstant.Instant.Builder getAbsoluteBuilder() {
return getAbsoluteFieldBuilder().getBuilder();
}
/**
*
* Specifies an absolute instant for the schedule.
*
*
* .opencannabis.temporal.Instant absolute = 1;
*/
public io.opencannabis.schema.temporal.TemporalInstant.InstantOrBuilder getAbsoluteOrBuilder() {
if ((specCase_ == 1) && (absoluteBuilder_ != null)) {
return absoluteBuilder_.getMessageOrBuilder();
} else {
if (specCase_ == 1) {
return (io.opencannabis.schema.temporal.TemporalInstant.Instant) spec_;
}
return io.opencannabis.schema.temporal.TemporalInstant.Instant.getDefaultInstance();
}
}
/**
*
* Specifies an absolute instant for the schedule.
*
*
* .opencannabis.temporal.Instant absolute = 1;
*/
private com.google.protobuf.SingleFieldBuilderV3<
io.opencannabis.schema.temporal.TemporalInstant.Instant, io.opencannabis.schema.temporal.TemporalInstant.Instant.Builder, io.opencannabis.schema.temporal.TemporalInstant.InstantOrBuilder>
getAbsoluteFieldBuilder() {
if (absoluteBuilder_ == null) {
if (!(specCase_ == 1)) {
spec_ = io.opencannabis.schema.temporal.TemporalInstant.Instant.getDefaultInstance();
}
absoluteBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
io.opencannabis.schema.temporal.TemporalInstant.Instant, io.opencannabis.schema.temporal.TemporalInstant.Instant.Builder, io.opencannabis.schema.temporal.TemporalInstant.InstantOrBuilder>(
(io.opencannabis.schema.temporal.TemporalInstant.Instant) spec_,
getParentForChildren(),
isClean());
spec_ = null;
}
specCase_ = 1;
onChanged();;
return absoluteBuilder_;
}
private com.google.protobuf.SingleFieldBuilderV3<
io.opencannabis.schema.temporal.TemporalTime.Time, io.opencannabis.schema.temporal.TemporalTime.Time.Builder, io.opencannabis.schema.temporal.TemporalTime.TimeOrBuilder> timeBuilder_;
/**
*
* Specifies a relative time as a schedule.
*
*
* .opencannabis.temporal.Time time = 2;
*/
public boolean hasTime() {
return specCase_ == 2;
}
/**
*
* Specifies a relative time as a schedule.
*
*
* .opencannabis.temporal.Time time = 2;
*/
public io.opencannabis.schema.temporal.TemporalTime.Time getTime() {
if (timeBuilder_ == null) {
if (specCase_ == 2) {
return (io.opencannabis.schema.temporal.TemporalTime.Time) spec_;
}
return io.opencannabis.schema.temporal.TemporalTime.Time.getDefaultInstance();
} else {
if (specCase_ == 2) {
return timeBuilder_.getMessage();
}
return io.opencannabis.schema.temporal.TemporalTime.Time.getDefaultInstance();
}
}
/**
*
* Specifies a relative time as a schedule.
*
*
* .opencannabis.temporal.Time time = 2;
*/
public Builder setTime(io.opencannabis.schema.temporal.TemporalTime.Time value) {
if (timeBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
spec_ = value;
onChanged();
} else {
timeBuilder_.setMessage(value);
}
specCase_ = 2;
return this;
}
/**
*
* Specifies a relative time as a schedule.
*
*
* .opencannabis.temporal.Time time = 2;
*/
public Builder setTime(
io.opencannabis.schema.temporal.TemporalTime.Time.Builder builderForValue) {
if (timeBuilder_ == null) {
spec_ = builderForValue.build();
onChanged();
} else {
timeBuilder_.setMessage(builderForValue.build());
}
specCase_ = 2;
return this;
}
/**
*
* Specifies a relative time as a schedule.
*
*
* .opencannabis.temporal.Time time = 2;
*/
public Builder mergeTime(io.opencannabis.schema.temporal.TemporalTime.Time value) {
if (timeBuilder_ == null) {
if (specCase_ == 2 &&
spec_ != io.opencannabis.schema.temporal.TemporalTime.Time.getDefaultInstance()) {
spec_ = io.opencannabis.schema.temporal.TemporalTime.Time.newBuilder((io.opencannabis.schema.temporal.TemporalTime.Time) spec_)
.mergeFrom(value).buildPartial();
} else {
spec_ = value;
}
onChanged();
} else {
if (specCase_ == 2) {
timeBuilder_.mergeFrom(value);
}
timeBuilder_.setMessage(value);
}
specCase_ = 2;
return this;
}
/**
*
* Specifies a relative time as a schedule.
*
*
* .opencannabis.temporal.Time time = 2;
*/
public Builder clearTime() {
if (timeBuilder_ == null) {
if (specCase_ == 2) {
specCase_ = 0;
spec_ = null;
onChanged();
}
} else {
if (specCase_ == 2) {
specCase_ = 0;
spec_ = null;
}
timeBuilder_.clear();
}
return this;
}
/**
*
* Specifies a relative time as a schedule.
*
*
* .opencannabis.temporal.Time time = 2;
*/
public io.opencannabis.schema.temporal.TemporalTime.Time.Builder getTimeBuilder() {
return getTimeFieldBuilder().getBuilder();
}
/**
*
* Specifies a relative time as a schedule.
*
*
* .opencannabis.temporal.Time time = 2;
*/
public io.opencannabis.schema.temporal.TemporalTime.TimeOrBuilder getTimeOrBuilder() {
if ((specCase_ == 2) && (timeBuilder_ != null)) {
return timeBuilder_.getMessageOrBuilder();
} else {
if (specCase_ == 2) {
return (io.opencannabis.schema.temporal.TemporalTime.Time) spec_;
}
return io.opencannabis.schema.temporal.TemporalTime.Time.getDefaultInstance();
}
}
/**
*
* Specifies a relative time as a schedule.
*
*
* .opencannabis.temporal.Time time = 2;
*/
private com.google.protobuf.SingleFieldBuilderV3<
io.opencannabis.schema.temporal.TemporalTime.Time, io.opencannabis.schema.temporal.TemporalTime.Time.Builder, io.opencannabis.schema.temporal.TemporalTime.TimeOrBuilder>
getTimeFieldBuilder() {
if (timeBuilder_ == null) {
if (!(specCase_ == 2)) {
spec_ = io.opencannabis.schema.temporal.TemporalTime.Time.getDefaultInstance();
}
timeBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
io.opencannabis.schema.temporal.TemporalTime.Time, io.opencannabis.schema.temporal.TemporalTime.Time.Builder, io.opencannabis.schema.temporal.TemporalTime.TimeOrBuilder>(
(io.opencannabis.schema.temporal.TemporalTime.Time) spec_,
getParentForChildren(),
isClean());
spec_ = null;
}
specCase_ = 2;
onChanged();;
return timeBuilder_;
}
/**
*
* Specifies an interval schedule.
*
*
* .opencannabis.temporal.Interval interval = 3;
*/
public int getIntervalValue() {
if (specCase_ == 3) {
return ((java.lang.Integer) spec_).intValue();
}
return 0;
}
/**
*
* Specifies an interval schedule.
*
*
* .opencannabis.temporal.Interval interval = 3;
*/
public Builder setIntervalValue(int value) {
specCase_ = 3;
spec_ = value;
onChanged();
return this;
}
/**
*
* Specifies an interval schedule.
*
*
* .opencannabis.temporal.Interval interval = 3;
*/
public io.opencannabis.schema.temporal.TemporalInterval.Interval getInterval() {
if (specCase_ == 3) {
@SuppressWarnings("deprecation")
io.opencannabis.schema.temporal.TemporalInterval.Interval result = io.opencannabis.schema.temporal.TemporalInterval.Interval.valueOf(
(java.lang.Integer) spec_);
return result == null ? io.opencannabis.schema.temporal.TemporalInterval.Interval.UNRECOGNIZED : result;
}
return io.opencannabis.schema.temporal.TemporalInterval.Interval.MINUTELY;
}
/**
*
* Specifies an interval schedule.
*
*
* .opencannabis.temporal.Interval interval = 3;
*/
public Builder setInterval(io.opencannabis.schema.temporal.TemporalInterval.Interval value) {
if (value == null) {
throw new NullPointerException();
}
specCase_ = 3;
spec_ = value.getNumber();
onChanged();
return this;
}
/**
*
* Specifies an interval schedule.
*
*
* .opencannabis.temporal.Interval interval = 3;
*/
public Builder clearInterval() {
if (specCase_ == 3) {
specCase_ = 0;
spec_ = null;
onChanged();
}
return this;
}
@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:opencannabis.temporal.Schedule)
}
// @@protoc_insertion_point(class_scope:opencannabis.temporal.Schedule)
private static final io.opencannabis.schema.temporal.TemporalSchedule.Schedule DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new io.opencannabis.schema.temporal.TemporalSchedule.Schedule();
}
public static io.opencannabis.schema.temporal.TemporalSchedule.Schedule getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
@java.lang.Override
public Schedule parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new Schedule(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 io.opencannabis.schema.temporal.TemporalSchedule.Schedule getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
private static final com.google.protobuf.Descriptors.Descriptor
internal_static_opencannabis_temporal_Schedule_descriptor;
private static final
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internal_static_opencannabis_temporal_Schedule_fieldAccessorTable;
public static com.google.protobuf.Descriptors.FileDescriptor
getDescriptor() {
return descriptor;
}
private static com.google.protobuf.Descriptors.FileDescriptor
descriptor;
static {
java.lang.String[] descriptorData = {
"\n\027temporal/Schedule.proto\022\025opencannabis." +
"temporal\032\016bq_field.proto\032\023temporal/Time." +
"proto\032\026temporal/Instant.proto\032\027temporal/" +
"Interval.proto\"\250\001\n\010Schedule\0222\n\010absolute\030" +
"\001 \001(\0132\036.opencannabis.temporal.InstantH\000\022" +
"+\n\004time\030\002 \001(\0132\033.opencannabis.temporal.Ti" +
"meH\000\0223\n\010interval\030\003 \001(\0162\037.opencannabis.te" +
"mporal.IntervalH\000B\006\n\004specB=\n\037io.opencann" +
"abis.schema.temporalB\020TemporalScheduleH\001" +
"P\000\242\002\003OCSb\006proto3"
};
com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner =
new com.google.protobuf.Descriptors.FileDescriptor. InternalDescriptorAssigner() {
public com.google.protobuf.ExtensionRegistry assignDescriptors(
com.google.protobuf.Descriptors.FileDescriptor root) {
descriptor = root;
return null;
}
};
com.google.protobuf.Descriptors.FileDescriptor
.internalBuildGeneratedFileFrom(descriptorData,
new com.google.protobuf.Descriptors.FileDescriptor[] {
gen_bq_schema.BqField.getDescriptor(),
io.opencannabis.schema.temporal.TemporalTime.getDescriptor(),
io.opencannabis.schema.temporal.TemporalInstant.getDescriptor(),
io.opencannabis.schema.temporal.TemporalInterval.getDescriptor(),
}, assigner);
internal_static_opencannabis_temporal_Schedule_descriptor =
getDescriptor().getMessageTypes().get(0);
internal_static_opencannabis_temporal_Schedule_fieldAccessorTable = new
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
internal_static_opencannabis_temporal_Schedule_descriptor,
new java.lang.String[] { "Absolute", "Time", "Interval", "Spec", });
gen_bq_schema.BqField.getDescriptor();
io.opencannabis.schema.temporal.TemporalTime.getDescriptor();
io.opencannabis.schema.temporal.TemporalInstant.getDescriptor();
io.opencannabis.schema.temporal.TemporalInterval.getDescriptor();
}
// @@protoc_insertion_point(outer_class_scope)
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy