com.google.shopping.merchant.accounts.v1beta.WarehouseCutoffTime Maven / Gradle / Ivy
/*
* Copyright 2024 Google LLC
*
* 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
*
* https://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: google/shopping/merchant/accounts/v1beta/shippingsettings.proto
// Protobuf Java Version: 3.25.5
package com.google.shopping.merchant.accounts.v1beta;
/**
*
*
*
* The latest time of day that an order can be accepted and begin processing.
* Later orders will be processed in the next day. The time is based on the
* warehouse postal code.
*
*
* Protobuf type {@code google.shopping.merchant.accounts.v1beta.WarehouseCutoffTime}
*/
public final class WarehouseCutoffTime extends com.google.protobuf.GeneratedMessageV3
implements
// @@protoc_insertion_point(message_implements:google.shopping.merchant.accounts.v1beta.WarehouseCutoffTime)
WarehouseCutoffTimeOrBuilder {
private static final long serialVersionUID = 0L;
// Use WarehouseCutoffTime.newBuilder() to construct.
private WarehouseCutoffTime(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private WarehouseCutoffTime() {}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(UnusedPrivateParameter unused) {
return new WarehouseCutoffTime();
}
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
return com.google.shopping.merchant.accounts.v1beta.ShippingSettingsProto
.internal_static_google_shopping_merchant_accounts_v1beta_WarehouseCutoffTime_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.google.shopping.merchant.accounts.v1beta.ShippingSettingsProto
.internal_static_google_shopping_merchant_accounts_v1beta_WarehouseCutoffTime_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.google.shopping.merchant.accounts.v1beta.WarehouseCutoffTime.class,
com.google.shopping.merchant.accounts.v1beta.WarehouseCutoffTime.Builder.class);
}
private int bitField0_;
public static final int HOUR_FIELD_NUMBER = 1;
private int hour_ = 0;
/**
*
*
*
* Required. Hour of the cutoff time until which an order has to be placed to
* be processed in the same day by the warehouse. Hour is based on the
* timezone of warehouse.
*
*
* optional int32 hour = 1 [(.google.api.field_behavior) = REQUIRED];
*
* @return Whether the hour field is set.
*/
@java.lang.Override
public boolean hasHour() {
return ((bitField0_ & 0x00000001) != 0);
}
/**
*
*
*
* Required. Hour of the cutoff time until which an order has to be placed to
* be processed in the same day by the warehouse. Hour is based on the
* timezone of warehouse.
*
*
* optional int32 hour = 1 [(.google.api.field_behavior) = REQUIRED];
*
* @return The hour.
*/
@java.lang.Override
public int getHour() {
return hour_;
}
public static final int MINUTE_FIELD_NUMBER = 2;
private int minute_ = 0;
/**
*
*
*
* Required. Minute of the cutoff time until which an order has to be placed
* to be processed in the same day by the warehouse. Minute is based on the
* timezone of warehouse.
*
*
* optional int32 minute = 2 [(.google.api.field_behavior) = REQUIRED];
*
* @return Whether the minute field is set.
*/
@java.lang.Override
public boolean hasMinute() {
return ((bitField0_ & 0x00000002) != 0);
}
/**
*
*
*
* Required. Minute of the cutoff time until which an order has to be placed
* to be processed in the same day by the warehouse. Minute is based on the
* timezone of warehouse.
*
*
* optional int32 minute = 2 [(.google.api.field_behavior) = REQUIRED];
*
* @return The minute.
*/
@java.lang.Override
public int getMinute() {
return minute_;
}
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 (((bitField0_ & 0x00000001) != 0)) {
output.writeInt32(1, hour_);
}
if (((bitField0_ & 0x00000002) != 0)) {
output.writeInt32(2, minute_);
}
getUnknownFields().writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (((bitField0_ & 0x00000001) != 0)) {
size += com.google.protobuf.CodedOutputStream.computeInt32Size(1, hour_);
}
if (((bitField0_ & 0x00000002) != 0)) {
size += com.google.protobuf.CodedOutputStream.computeInt32Size(2, minute_);
}
size += getUnknownFields().getSerializedSize();
memoizedSize = size;
return size;
}
@java.lang.Override
public boolean equals(final java.lang.Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof com.google.shopping.merchant.accounts.v1beta.WarehouseCutoffTime)) {
return super.equals(obj);
}
com.google.shopping.merchant.accounts.v1beta.WarehouseCutoffTime other =
(com.google.shopping.merchant.accounts.v1beta.WarehouseCutoffTime) obj;
if (hasHour() != other.hasHour()) return false;
if (hasHour()) {
if (getHour() != other.getHour()) return false;
}
if (hasMinute() != other.hasMinute()) return false;
if (hasMinute()) {
if (getMinute() != other.getMinute()) return false;
}
if (!getUnknownFields().equals(other.getUnknownFields())) return false;
return true;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptor().hashCode();
if (hasHour()) {
hash = (37 * hash) + HOUR_FIELD_NUMBER;
hash = (53 * hash) + getHour();
}
if (hasMinute()) {
hash = (37 * hash) + MINUTE_FIELD_NUMBER;
hash = (53 * hash) + getMinute();
}
hash = (29 * hash) + getUnknownFields().hashCode();
memoizedHashCode = hash;
return hash;
}
public static com.google.shopping.merchant.accounts.v1beta.WarehouseCutoffTime parseFrom(
java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.shopping.merchant.accounts.v1beta.WarehouseCutoffTime parseFrom(
java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.google.shopping.merchant.accounts.v1beta.WarehouseCutoffTime parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.shopping.merchant.accounts.v1beta.WarehouseCutoffTime parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.google.shopping.merchant.accounts.v1beta.WarehouseCutoffTime parseFrom(
byte[] data) throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.shopping.merchant.accounts.v1beta.WarehouseCutoffTime parseFrom(
byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.google.shopping.merchant.accounts.v1beta.WarehouseCutoffTime parseFrom(
java.io.InputStream input) throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
}
public static com.google.shopping.merchant.accounts.v1beta.WarehouseCutoffTime 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 com.google.shopping.merchant.accounts.v1beta.WarehouseCutoffTime parseDelimitedFrom(
java.io.InputStream input) throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input);
}
public static com.google.shopping.merchant.accounts.v1beta.WarehouseCutoffTime 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 com.google.shopping.merchant.accounts.v1beta.WarehouseCutoffTime parseFrom(
com.google.protobuf.CodedInputStream input) throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
}
public static com.google.shopping.merchant.accounts.v1beta.WarehouseCutoffTime 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(
com.google.shopping.merchant.accounts.v1beta.WarehouseCutoffTime 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;
}
/**
*
*
*
* The latest time of day that an order can be accepted and begin processing.
* Later orders will be processed in the next day. The time is based on the
* warehouse postal code.
*
*
* Protobuf type {@code google.shopping.merchant.accounts.v1beta.WarehouseCutoffTime}
*/
public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder
implements
// @@protoc_insertion_point(builder_implements:google.shopping.merchant.accounts.v1beta.WarehouseCutoffTime)
com.google.shopping.merchant.accounts.v1beta.WarehouseCutoffTimeOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
return com.google.shopping.merchant.accounts.v1beta.ShippingSettingsProto
.internal_static_google_shopping_merchant_accounts_v1beta_WarehouseCutoffTime_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.google.shopping.merchant.accounts.v1beta.ShippingSettingsProto
.internal_static_google_shopping_merchant_accounts_v1beta_WarehouseCutoffTime_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.google.shopping.merchant.accounts.v1beta.WarehouseCutoffTime.class,
com.google.shopping.merchant.accounts.v1beta.WarehouseCutoffTime.Builder.class);
}
// Construct using com.google.shopping.merchant.accounts.v1beta.WarehouseCutoffTime.newBuilder()
private Builder() {}
private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
}
@java.lang.Override
public Builder clear() {
super.clear();
bitField0_ = 0;
hour_ = 0;
minute_ = 0;
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() {
return com.google.shopping.merchant.accounts.v1beta.ShippingSettingsProto
.internal_static_google_shopping_merchant_accounts_v1beta_WarehouseCutoffTime_descriptor;
}
@java.lang.Override
public com.google.shopping.merchant.accounts.v1beta.WarehouseCutoffTime
getDefaultInstanceForType() {
return com.google.shopping.merchant.accounts.v1beta.WarehouseCutoffTime.getDefaultInstance();
}
@java.lang.Override
public com.google.shopping.merchant.accounts.v1beta.WarehouseCutoffTime build() {
com.google.shopping.merchant.accounts.v1beta.WarehouseCutoffTime result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public com.google.shopping.merchant.accounts.v1beta.WarehouseCutoffTime buildPartial() {
com.google.shopping.merchant.accounts.v1beta.WarehouseCutoffTime result =
new com.google.shopping.merchant.accounts.v1beta.WarehouseCutoffTime(this);
if (bitField0_ != 0) {
buildPartial0(result);
}
onBuilt();
return result;
}
private void buildPartial0(
com.google.shopping.merchant.accounts.v1beta.WarehouseCutoffTime result) {
int from_bitField0_ = bitField0_;
int to_bitField0_ = 0;
if (((from_bitField0_ & 0x00000001) != 0)) {
result.hour_ = hour_;
to_bitField0_ |= 0x00000001;
}
if (((from_bitField0_ & 0x00000002) != 0)) {
result.minute_ = minute_;
to_bitField0_ |= 0x00000002;
}
result.bitField0_ |= to_bitField0_;
}
@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.shopping.merchant.accounts.v1beta.WarehouseCutoffTime) {
return mergeFrom((com.google.shopping.merchant.accounts.v1beta.WarehouseCutoffTime) other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(
com.google.shopping.merchant.accounts.v1beta.WarehouseCutoffTime other) {
if (other
== com.google.shopping.merchant.accounts.v1beta.WarehouseCutoffTime.getDefaultInstance())
return this;
if (other.hasHour()) {
setHour(other.getHour());
}
if (other.hasMinute()) {
setMinute(other.getMinute());
}
this.mergeUnknownFields(other.getUnknownFields());
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 {
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
case 8:
{
hour_ = input.readInt32();
bitField0_ |= 0x00000001;
break;
} // case 8
case 16:
{
minute_ = input.readInt32();
bitField0_ |= 0x00000002;
break;
} // case 16
default:
{
if (!super.parseUnknownField(input, extensionRegistry, tag)) {
done = true; // was an endgroup tag
}
break;
} // default:
} // switch (tag)
} // while (!done)
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.unwrapIOException();
} finally {
onChanged();
} // finally
return this;
}
private int bitField0_;
private int hour_;
/**
*
*
*
* Required. Hour of the cutoff time until which an order has to be placed to
* be processed in the same day by the warehouse. Hour is based on the
* timezone of warehouse.
*
*
* optional int32 hour = 1 [(.google.api.field_behavior) = REQUIRED];
*
* @return Whether the hour field is set.
*/
@java.lang.Override
public boolean hasHour() {
return ((bitField0_ & 0x00000001) != 0);
}
/**
*
*
*
* Required. Hour of the cutoff time until which an order has to be placed to
* be processed in the same day by the warehouse. Hour is based on the
* timezone of warehouse.
*
*
* optional int32 hour = 1 [(.google.api.field_behavior) = REQUIRED];
*
* @return The hour.
*/
@java.lang.Override
public int getHour() {
return hour_;
}
/**
*
*
*
* Required. Hour of the cutoff time until which an order has to be placed to
* be processed in the same day by the warehouse. Hour is based on the
* timezone of warehouse.
*
*
* optional int32 hour = 1 [(.google.api.field_behavior) = REQUIRED];
*
* @param value The hour to set.
* @return This builder for chaining.
*/
public Builder setHour(int value) {
hour_ = value;
bitField0_ |= 0x00000001;
onChanged();
return this;
}
/**
*
*
*
* Required. Hour of the cutoff time until which an order has to be placed to
* be processed in the same day by the warehouse. Hour is based on the
* timezone of warehouse.
*
*
* optional int32 hour = 1 [(.google.api.field_behavior) = REQUIRED];
*
* @return This builder for chaining.
*/
public Builder clearHour() {
bitField0_ = (bitField0_ & ~0x00000001);
hour_ = 0;
onChanged();
return this;
}
private int minute_;
/**
*
*
*
* Required. Minute of the cutoff time until which an order has to be placed
* to be processed in the same day by the warehouse. Minute is based on the
* timezone of warehouse.
*
*
* optional int32 minute = 2 [(.google.api.field_behavior) = REQUIRED];
*
* @return Whether the minute field is set.
*/
@java.lang.Override
public boolean hasMinute() {
return ((bitField0_ & 0x00000002) != 0);
}
/**
*
*
*
* Required. Minute of the cutoff time until which an order has to be placed
* to be processed in the same day by the warehouse. Minute is based on the
* timezone of warehouse.
*
*
* optional int32 minute = 2 [(.google.api.field_behavior) = REQUIRED];
*
* @return The minute.
*/
@java.lang.Override
public int getMinute() {
return minute_;
}
/**
*
*
*
* Required. Minute of the cutoff time until which an order has to be placed
* to be processed in the same day by the warehouse. Minute is based on the
* timezone of warehouse.
*
*
* optional int32 minute = 2 [(.google.api.field_behavior) = REQUIRED];
*
* @param value The minute to set.
* @return This builder for chaining.
*/
public Builder setMinute(int value) {
minute_ = value;
bitField0_ |= 0x00000002;
onChanged();
return this;
}
/**
*
*
*
* Required. Minute of the cutoff time until which an order has to be placed
* to be processed in the same day by the warehouse. Minute is based on the
* timezone of warehouse.
*
*
* optional int32 minute = 2 [(.google.api.field_behavior) = REQUIRED];
*
* @return This builder for chaining.
*/
public Builder clearMinute() {
bitField0_ = (bitField0_ & ~0x00000002);
minute_ = 0;
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:google.shopping.merchant.accounts.v1beta.WarehouseCutoffTime)
}
// @@protoc_insertion_point(class_scope:google.shopping.merchant.accounts.v1beta.WarehouseCutoffTime)
private static final com.google.shopping.merchant.accounts.v1beta.WarehouseCutoffTime
DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new com.google.shopping.merchant.accounts.v1beta.WarehouseCutoffTime();
}
public static com.google.shopping.merchant.accounts.v1beta.WarehouseCutoffTime
getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser PARSER =
new com.google.protobuf.AbstractParser() {
@java.lang.Override
public WarehouseCutoffTime parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
Builder builder = newBuilder();
try {
builder.mergeFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(builder.buildPartial());
} catch (com.google.protobuf.UninitializedMessageException e) {
throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(e)
.setUnfinishedMessage(builder.buildPartial());
}
return builder.buildPartial();
}
};
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.shopping.merchant.accounts.v1beta.WarehouseCutoffTime
getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy