Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -186,6 +186,7 @@ public void getNotificationTest() throws Exception {
.setSubject(Subject.newBuilder().build())
.addAllMessages(new ArrayList<Message>())
.setCreateTime(Timestamp.newBuilder().build())
.setNotificationType(NotificationType.forNumber(0))
.build();
mockService.addResponse(expectedResponse);

Expand Down Expand Up @@ -234,6 +235,7 @@ public void getNotificationTest2() throws Exception {
.setSubject(Subject.newBuilder().build())
.addAllMessages(new ArrayList<Message>())
.setCreateTime(Timestamp.newBuilder().build())
.setNotificationType(NotificationType.forNumber(0))
.build();
mockService.addResponse(expectedResponse);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -178,6 +178,7 @@ public void getNotificationTest() throws Exception {
.setSubject(Subject.newBuilder().build())
.addAllMessages(new ArrayList<Message>())
.setCreateTime(Timestamp.newBuilder().build())
.setNotificationType(NotificationType.forNumber(0))
.build();
mockAdvisoryNotificationsService.addResponse(expectedResponse);

Expand Down Expand Up @@ -220,6 +221,7 @@ public void getNotificationTest2() throws Exception {
.setSubject(Subject.newBuilder().build())
.addAllMessages(new ArrayList<Message>())
.setCreateTime(Timestamp.newBuilder().build())
.setNotificationType(NotificationType.forNumber(0))
.build();
mockAdvisoryNotificationsService.addResponse(expectedResponse);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ private Notification(com.google.protobuf.GeneratedMessageV3.Builder<?> builder)
private Notification() {
name_ = "";
messages_ = java.util.Collections.emptyList();
notificationType_ = 0;
}

@java.lang.Override
Expand Down Expand Up @@ -295,6 +296,43 @@ public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() {
return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_;
}

public static final int NOTIFICATION_TYPE_FIELD_NUMBER = 12;
private int notificationType_ = 0;
/**
*
*
* <pre>
* Type of notification
* </pre>
*
* <code>.google.cloud.advisorynotifications.v1.NotificationType notification_type = 12;</code>
*
* @return The enum numeric value on the wire for notificationType.
*/
@java.lang.Override
public int getNotificationTypeValue() {
return notificationType_;
}
/**
*
*
* <pre>
* Type of notification
* </pre>
*
* <code>.google.cloud.advisorynotifications.v1.NotificationType notification_type = 12;</code>
*
* @return The notificationType.
*/
@java.lang.Override
public com.google.cloud.advisorynotifications.v1.NotificationType getNotificationType() {
com.google.cloud.advisorynotifications.v1.NotificationType result =
com.google.cloud.advisorynotifications.v1.NotificationType.forNumber(notificationType_);
return result == null
? com.google.cloud.advisorynotifications.v1.NotificationType.UNRECOGNIZED
: result;
}

private byte memoizedIsInitialized = -1;

@java.lang.Override
Expand All @@ -321,6 +359,11 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io
if (createTime_ != null) {
output.writeMessage(4, getCreateTime());
}
if (notificationType_
!= com.google.cloud.advisorynotifications.v1.NotificationType.NOTIFICATION_TYPE_UNSPECIFIED
.getNumber()) {
output.writeEnum(12, notificationType_);
}
getUnknownFields().writeTo(output);
}

Expand All @@ -342,6 +385,11 @@ public int getSerializedSize() {
if (createTime_ != null) {
size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, getCreateTime());
}
if (notificationType_
!= com.google.cloud.advisorynotifications.v1.NotificationType.NOTIFICATION_TYPE_UNSPECIFIED
.getNumber()) {
size += com.google.protobuf.CodedOutputStream.computeEnumSize(12, notificationType_);
}
size += getUnknownFields().getSerializedSize();
memoizedSize = size;
return size;
Expand All @@ -368,6 +416,7 @@ public boolean equals(final java.lang.Object obj) {
if (hasCreateTime()) {
if (!getCreateTime().equals(other.getCreateTime())) return false;
}
if (notificationType_ != other.notificationType_) return false;
if (!getUnknownFields().equals(other.getUnknownFields())) return false;
return true;
}
Expand All @@ -393,6 +442,8 @@ public int hashCode() {
hash = (37 * hash) + CREATE_TIME_FIELD_NUMBER;
hash = (53 * hash) + getCreateTime().hashCode();
}
hash = (37 * hash) + NOTIFICATION_TYPE_FIELD_NUMBER;
hash = (53 * hash) + notificationType_;
hash = (29 * hash) + getUnknownFields().hashCode();
memoizedHashCode = hash;
return hash;
Expand Down Expand Up @@ -552,6 +603,7 @@ public Builder clear() {
createTimeBuilder_.dispose();
createTimeBuilder_ = null;
}
notificationType_ = 0;
return this;
}

Expand Down Expand Up @@ -611,6 +663,9 @@ private void buildPartial0(com.google.cloud.advisorynotifications.v1.Notificatio
if (((from_bitField0_ & 0x00000008) != 0)) {
result.createTime_ = createTimeBuilder_ == null ? createTime_ : createTimeBuilder_.build();
}
if (((from_bitField0_ & 0x00000010) != 0)) {
result.notificationType_ = notificationType_;
}
}

@java.lang.Override
Expand Down Expand Up @@ -697,6 +752,9 @@ public Builder mergeFrom(com.google.cloud.advisorynotifications.v1.Notification
if (other.hasCreateTime()) {
mergeCreateTime(other.getCreateTime());
}
if (other.notificationType_ != 0) {
setNotificationTypeValue(other.getNotificationTypeValue());
}
this.mergeUnknownFields(other.getUnknownFields());
onChanged();
return this;
Expand Down Expand Up @@ -755,6 +813,12 @@ public Builder mergeFrom(
bitField0_ |= 0x00000008;
break;
} // case 34
case 96:
{
notificationType_ = input.readEnum();
bitField0_ |= 0x00000010;
break;
} // case 96
default:
{
if (!super.parseUnknownField(input, extensionRegistry, tag)) {
Expand Down Expand Up @@ -1628,6 +1692,99 @@ public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() {
return createTimeBuilder_;
}

private int notificationType_ = 0;
/**
*
*
* <pre>
* Type of notification
* </pre>
*
* <code>.google.cloud.advisorynotifications.v1.NotificationType notification_type = 12;</code>
*
* @return The enum numeric value on the wire for notificationType.
*/
@java.lang.Override
public int getNotificationTypeValue() {
return notificationType_;
}
/**
*
*
* <pre>
* Type of notification
* </pre>
*
* <code>.google.cloud.advisorynotifications.v1.NotificationType notification_type = 12;</code>
*
* @param value The enum numeric value on the wire for notificationType to set.
* @return This builder for chaining.
*/
public Builder setNotificationTypeValue(int value) {
notificationType_ = value;
bitField0_ |= 0x00000010;
onChanged();
return this;
}
/**
*
*
* <pre>
* Type of notification
* </pre>
*
* <code>.google.cloud.advisorynotifications.v1.NotificationType notification_type = 12;</code>
*
* @return The notificationType.
*/
@java.lang.Override
public com.google.cloud.advisorynotifications.v1.NotificationType getNotificationType() {
com.google.cloud.advisorynotifications.v1.NotificationType result =
com.google.cloud.advisorynotifications.v1.NotificationType.forNumber(notificationType_);
return result == null
? com.google.cloud.advisorynotifications.v1.NotificationType.UNRECOGNIZED
: result;
}
/**
*
*
* <pre>
* Type of notification
* </pre>
*
* <code>.google.cloud.advisorynotifications.v1.NotificationType notification_type = 12;</code>
*
* @param value The notificationType to set.
* @return This builder for chaining.
*/
public Builder setNotificationType(
com.google.cloud.advisorynotifications.v1.NotificationType value) {
if (value == null) {
throw new NullPointerException();
}
bitField0_ |= 0x00000010;
notificationType_ = value.getNumber();
onChanged();
return this;
}
/**
*
*
* <pre>
* Type of notification
* </pre>
*
* <code>.google.cloud.advisorynotifications.v1.NotificationType notification_type = 12;</code>
*
* @return This builder for chaining.
*/
public Builder clearNotificationType() {
bitField0_ = (bitField0_ & ~0x00000010);
notificationType_ = 0;
onChanged();
return this;
}

@java.lang.Override
public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.setUnknownFields(unknownFields);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -176,4 +176,29 @@ public interface NotificationOrBuilder
* </code>
*/
com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder();

/**
*
*
* <pre>
* Type of notification
* </pre>
*
* <code>.google.cloud.advisorynotifications.v1.NotificationType notification_type = 12;</code>
*
* @return The enum numeric value on the wire for notificationType.
*/
int getNotificationTypeValue();
/**
*
*
* <pre>
* Type of notification
* </pre>
*
* <code>.google.cloud.advisorynotifications.v1.NotificationType notification_type = 12;</code>
*
* @return The notificationType.
*/
com.google.cloud.advisorynotifications.v1.NotificationType getNotificationType();
}
Loading