diff --git a/java-advisorynotifications/google-cloud-advisorynotifications/src/test/java/com/google/cloud/advisorynotifications/v1/AdvisoryNotificationsServiceClientHttpJsonTest.java b/java-advisorynotifications/google-cloud-advisorynotifications/src/test/java/com/google/cloud/advisorynotifications/v1/AdvisoryNotificationsServiceClientHttpJsonTest.java index 4775ac8560a3..4652f22a0ec3 100644 --- a/java-advisorynotifications/google-cloud-advisorynotifications/src/test/java/com/google/cloud/advisorynotifications/v1/AdvisoryNotificationsServiceClientHttpJsonTest.java +++ b/java-advisorynotifications/google-cloud-advisorynotifications/src/test/java/com/google/cloud/advisorynotifications/v1/AdvisoryNotificationsServiceClientHttpJsonTest.java @@ -186,6 +186,7 @@ public void getNotificationTest() throws Exception { .setSubject(Subject.newBuilder().build()) .addAllMessages(new ArrayList()) .setCreateTime(Timestamp.newBuilder().build()) + .setNotificationType(NotificationType.forNumber(0)) .build(); mockService.addResponse(expectedResponse); @@ -234,6 +235,7 @@ public void getNotificationTest2() throws Exception { .setSubject(Subject.newBuilder().build()) .addAllMessages(new ArrayList()) .setCreateTime(Timestamp.newBuilder().build()) + .setNotificationType(NotificationType.forNumber(0)) .build(); mockService.addResponse(expectedResponse); diff --git a/java-advisorynotifications/google-cloud-advisorynotifications/src/test/java/com/google/cloud/advisorynotifications/v1/AdvisoryNotificationsServiceClientTest.java b/java-advisorynotifications/google-cloud-advisorynotifications/src/test/java/com/google/cloud/advisorynotifications/v1/AdvisoryNotificationsServiceClientTest.java index 6911b357a98c..4a6fd1aa045f 100644 --- a/java-advisorynotifications/google-cloud-advisorynotifications/src/test/java/com/google/cloud/advisorynotifications/v1/AdvisoryNotificationsServiceClientTest.java +++ b/java-advisorynotifications/google-cloud-advisorynotifications/src/test/java/com/google/cloud/advisorynotifications/v1/AdvisoryNotificationsServiceClientTest.java @@ -178,6 +178,7 @@ public void getNotificationTest() throws Exception { .setSubject(Subject.newBuilder().build()) .addAllMessages(new ArrayList()) .setCreateTime(Timestamp.newBuilder().build()) + .setNotificationType(NotificationType.forNumber(0)) .build(); mockAdvisoryNotificationsService.addResponse(expectedResponse); @@ -220,6 +221,7 @@ public void getNotificationTest2() throws Exception { .setSubject(Subject.newBuilder().build()) .addAllMessages(new ArrayList()) .setCreateTime(Timestamp.newBuilder().build()) + .setNotificationType(NotificationType.forNumber(0)) .build(); mockAdvisoryNotificationsService.addResponse(expectedResponse); diff --git a/java-advisorynotifications/proto-google-cloud-advisorynotifications-v1/src/main/java/com/google/cloud/advisorynotifications/v1/Notification.java b/java-advisorynotifications/proto-google-cloud-advisorynotifications-v1/src/main/java/com/google/cloud/advisorynotifications/v1/Notification.java index 2a7fd0da2caf..640eace92de3 100644 --- a/java-advisorynotifications/proto-google-cloud-advisorynotifications-v1/src/main/java/com/google/cloud/advisorynotifications/v1/Notification.java +++ b/java-advisorynotifications/proto-google-cloud-advisorynotifications-v1/src/main/java/com/google/cloud/advisorynotifications/v1/Notification.java @@ -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 @@ -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; + /** + * + * + *
+   * Type of notification
+   * 
+ * + * .google.cloud.advisorynotifications.v1.NotificationType notification_type = 12; + * + * @return The enum numeric value on the wire for notificationType. + */ + @java.lang.Override + public int getNotificationTypeValue() { + return notificationType_; + } + /** + * + * + *
+   * Type of notification
+   * 
+ * + * .google.cloud.advisorynotifications.v1.NotificationType notification_type = 12; + * + * @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 @@ -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); } @@ -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; @@ -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; } @@ -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; @@ -552,6 +603,7 @@ public Builder clear() { createTimeBuilder_.dispose(); createTimeBuilder_ = null; } + notificationType_ = 0; return this; } @@ -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 @@ -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; @@ -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)) { @@ -1628,6 +1692,99 @@ public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { return createTimeBuilder_; } + private int notificationType_ = 0; + /** + * + * + *
+     * Type of notification
+     * 
+ * + * .google.cloud.advisorynotifications.v1.NotificationType notification_type = 12; + * + * @return The enum numeric value on the wire for notificationType. + */ + @java.lang.Override + public int getNotificationTypeValue() { + return notificationType_; + } + /** + * + * + *
+     * Type of notification
+     * 
+ * + * .google.cloud.advisorynotifications.v1.NotificationType notification_type = 12; + * + * @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; + } + /** + * + * + *
+     * Type of notification
+     * 
+ * + * .google.cloud.advisorynotifications.v1.NotificationType notification_type = 12; + * + * @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; + } + /** + * + * + *
+     * Type of notification
+     * 
+ * + * .google.cloud.advisorynotifications.v1.NotificationType notification_type = 12; + * + * @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; + } + /** + * + * + *
+     * Type of notification
+     * 
+ * + * .google.cloud.advisorynotifications.v1.NotificationType notification_type = 12; + * + * @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); diff --git a/java-advisorynotifications/proto-google-cloud-advisorynotifications-v1/src/main/java/com/google/cloud/advisorynotifications/v1/NotificationOrBuilder.java b/java-advisorynotifications/proto-google-cloud-advisorynotifications-v1/src/main/java/com/google/cloud/advisorynotifications/v1/NotificationOrBuilder.java index b48c2188fbf0..1b67ca39a72b 100644 --- a/java-advisorynotifications/proto-google-cloud-advisorynotifications-v1/src/main/java/com/google/cloud/advisorynotifications/v1/NotificationOrBuilder.java +++ b/java-advisorynotifications/proto-google-cloud-advisorynotifications-v1/src/main/java/com/google/cloud/advisorynotifications/v1/NotificationOrBuilder.java @@ -176,4 +176,29 @@ public interface NotificationOrBuilder * */ com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder(); + + /** + * + * + *
+   * Type of notification
+   * 
+ * + * .google.cloud.advisorynotifications.v1.NotificationType notification_type = 12; + * + * @return The enum numeric value on the wire for notificationType. + */ + int getNotificationTypeValue(); + /** + * + * + *
+   * Type of notification
+   * 
+ * + * .google.cloud.advisorynotifications.v1.NotificationType notification_type = 12; + * + * @return The notificationType. + */ + com.google.cloud.advisorynotifications.v1.NotificationType getNotificationType(); } diff --git a/java-advisorynotifications/proto-google-cloud-advisorynotifications-v1/src/main/java/com/google/cloud/advisorynotifications/v1/NotificationType.java b/java-advisorynotifications/proto-google-cloud-advisorynotifications-v1/src/main/java/com/google/cloud/advisorynotifications/v1/NotificationType.java new file mode 100644 index 000000000000..9cd319498bcc --- /dev/null +++ b/java-advisorynotifications/proto-google-cloud-advisorynotifications-v1/src/main/java/com/google/cloud/advisorynotifications/v1/NotificationType.java @@ -0,0 +1,178 @@ +/* + * Copyright 2020 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/cloud/advisorynotifications/v1/service.proto + +package com.google.cloud.advisorynotifications.v1; + +/** + * + * + *
+ * Type of notification
+ * 
+ * + * Protobuf enum {@code google.cloud.advisorynotifications.v1.NotificationType} + */ +public enum NotificationType implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+   * Default type
+   * 
+ * + * NOTIFICATION_TYPE_UNSPECIFIED = 0; + */ + NOTIFICATION_TYPE_UNSPECIFIED(0), + /** + * + * + *
+   * Security and privacy advisory notifications
+   * 
+ * + * NOTIFICATION_TYPE_SECURITY_PRIVACY_ADVISORY = 1; + */ + NOTIFICATION_TYPE_SECURITY_PRIVACY_ADVISORY(1), + /** + * + * + *
+   * Sensitive action notifications
+   * 
+ * + * NOTIFICATION_TYPE_SENSITIVE_ACTIONS = 2; + */ + NOTIFICATION_TYPE_SENSITIVE_ACTIONS(2), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+   * Default type
+   * 
+ * + * NOTIFICATION_TYPE_UNSPECIFIED = 0; + */ + public static final int NOTIFICATION_TYPE_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+   * Security and privacy advisory notifications
+   * 
+ * + * NOTIFICATION_TYPE_SECURITY_PRIVACY_ADVISORY = 1; + */ + public static final int NOTIFICATION_TYPE_SECURITY_PRIVACY_ADVISORY_VALUE = 1; + /** + * + * + *
+   * Sensitive action notifications
+   * 
+ * + * NOTIFICATION_TYPE_SENSITIVE_ACTIONS = 2; + */ + public static final int NOTIFICATION_TYPE_SENSITIVE_ACTIONS_VALUE = 2; + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static NotificationType valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static NotificationType forNumber(int value) { + switch (value) { + case 0: + return NOTIFICATION_TYPE_UNSPECIFIED; + case 1: + return NOTIFICATION_TYPE_SECURITY_PRIVACY_ADVISORY; + case 2: + return NOTIFICATION_TYPE_SENSITIVE_ACTIONS; + default: + return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { + return internalValueMap; + } + + private static final com.google.protobuf.Internal.EnumLiteMap internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public NotificationType findValueByNumber(int number) { + return NotificationType.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.cloud.advisorynotifications.v1.ServiceProto.getDescriptor() + .getEnumTypes() + .get(2); + } + + private static final NotificationType[] VALUES = values(); + + public static NotificationType valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private NotificationType(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.advisorynotifications.v1.NotificationType) +} diff --git a/java-advisorynotifications/proto-google-cloud-advisorynotifications-v1/src/main/java/com/google/cloud/advisorynotifications/v1/ServiceProto.java b/java-advisorynotifications/proto-google-cloud-advisorynotifications-v1/src/main/java/com/google/cloud/advisorynotifications/v1/ServiceProto.java index 7acef0c634ba..5d9fb5de9cc2 100644 --- a/java-advisorynotifications/proto-google-cloud-advisorynotifications-v1/src/main/java/com/google/cloud/advisorynotifications/v1/ServiceProto.java +++ b/java-advisorynotifications/proto-google-cloud-advisorynotifications-v1/src/main/java/com/google/cloud/advisorynotifications/v1/ServiceProto.java @@ -86,77 +86,82 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "to\032\027google/api/client.proto\032\037google/api/" + "field_behavior.proto\032\031google/api/resourc" + "e.proto\032\037google/protobuf/timestamp.proto" - + "\"\337\002\n\014Notification\022\014\n\004name\030\001 \001(\t\022?\n\007subje" + + "\"\263\003\n\014Notification\022\014\n\004name\030\001 \001(\t\022?\n\007subje" + "ct\030\002 \001(\0132..google.cloud.advisorynotifica" + "tions.v1.Subject\022@\n\010messages\030\003 \003(\0132..goo" + "gle.cloud.advisorynotifications.v1.Messa" + "ge\0224\n\013create_time\030\004 \001(\0132\032.google.protobu" - + "f.TimestampB\003\340A\003:\207\001\352A\203\001\n1advisorynotific" - + "ations.googleapis.com/Notification\022Norga" - + "nizations/{organization}/locations/{loca" - + "tion}/notifications/{notification}\"\205\001\n\004T" - + "ext\022\017\n\007en_text\030\001 \001(\t\022\026\n\016localized_text\030\002" - + " \001(\t\022T\n\022localization_state\030\003 \001(\01628.googl" - + "e.cloud.advisorynotifications.v1.Localiz" - + "ationState\"D\n\007Subject\0229\n\004text\030\001 \001(\0132+.go" - + "ogle.cloud.advisorynotifications.v1.Text" - + "\"\277\002\n\007Message\022A\n\004body\030\001 \001(\01323.google.clou" - + "d.advisorynotifications.v1.Message.Body\022" - + "F\n\013attachments\030\002 \003(\01321.google.cloud.advi" - + "sorynotifications.v1.Attachment\022/\n\013creat" - + "e_time\030\003 \001(\0132\032.google.protobuf.Timestamp" - + "\0225\n\021localization_time\030\004 \001(\0132\032.google.pro" - + "tobuf.Timestamp\032A\n\004Body\0229\n\004text\030\001 \001(\0132+." - + "google.cloud.advisorynotifications.v1.Te" - + "xt\"e\n\nAttachment\0229\n\003csv\030\002 \001(\0132*.google.c" - + "loud.advisorynotifications.v1.CsvH\000\022\024\n\014d" - + "isplay_name\030\001 \001(\tB\006\n\004data\"w\n\003Csv\022\017\n\007head" - + "ers\030\001 \003(\t\022D\n\tdata_rows\030\002 \003(\01321.google.cl" - + "oud.advisorynotifications.v1.Csv.CsvRow\032" - + "\031\n\006CsvRow\022\017\n\007entries\030\001 \003(\t\"\352\001\n\030ListNotif" - + "icationsRequest\022I\n\006parent\030\001 \001(\tB9\340A\002\372A3\022" - + "1advisorynotifications.googleapis.com/No" - + "tification\022\021\n\tpage_size\030\002 \001(\005\022\022\n\npage_to" - + "ken\030\003 \001(\t\022E\n\004view\030\004 \001(\01627.google.cloud.a" - + "dvisorynotifications.v1.NotificationView" - + "\022\025\n\rlanguage_code\030\005 \001(\t\"\224\001\n\031ListNotifica" - + "tionsResponse\022J\n\rnotifications\030\001 \003(\01323.g" - + "oogle.cloud.advisorynotifications.v1.Not" - + "ification\022\027\n\017next_page_token\030\002 \001(\t\022\022\n\nto" - + "tal_size\030\003 \001(\005\"x\n\026GetNotificationRequest" - + "\022G\n\004name\030\001 \001(\tB9\340A\002\372A3\n1advisorynotifica" - + "tions.googleapis.com/Notification\022\025\n\rlan" - + "guage_code\030\005 \001(\t*J\n\020NotificationView\022!\n\035" - + "NOTIFICATION_VIEW_UNSPECIFIED\020\000\022\t\n\005BASIC" - + "\020\001\022\010\n\004FULL\020\002*\240\001\n\021LocalizationState\022\"\n\036LO" - + "CALIZATION_STATE_UNSPECIFIED\020\000\022%\n!LOCALI" - + "ZATION_STATE_NOT_APPLICABLE\020\001\022\036\n\032LOCALIZ" - + "ATION_STATE_PENDING\020\002\022 \n\034LOCALIZATION_ST" - + "ATE_COMPLETED\020\0032\251\004\n\034AdvisoryNotification" - + "sService\022\337\001\n\021ListNotifications\022?.google." - + "cloud.advisorynotifications.v1.ListNotif" - + "icationsRequest\032@.google.cloud.advisoryn" - + "otifications.v1.ListNotificationsRespons" - + "e\"G\202\323\344\223\0028\0226/v1/{parent=organizations/*/l" - + "ocations/*}/notifications\332A\006parent\022\314\001\n\017G" - + "etNotification\022=.google.cloud.advisoryno" - + "tifications.v1.GetNotificationRequest\0323." - + "google.cloud.advisorynotifications.v1.No" - + "tification\"E\202\323\344\223\0028\0226/v1/{name=organizati" - + "ons/*/locations/*/notifications/*}\332A\004nam" - + "e\032X\312A$advisorynotifications.googleapis.c" - + "om\322A.https://www.googleapis.com/auth/clo" - + "ud-platformB\374\002\n)com.google.cloud.advisor" - + "ynotifications.v1B\014ServiceProtoP\001Z_cloud" - + ".google.com/go/advisorynotifications/api" - + "v1/advisorynotificationspb;advisorynotif" - + "icationspb\252\002%Google.Cloud.AdvisoryNotifi" - + "cations.V1\312\002%Google\\Cloud\\AdvisoryNotifi" - + "cations\\V1\352\002(Google::Cloud::AdvisoryNoti" - + "fications::V1\352Ab\n-advisorynotifications." - + "googleapis.com/Location\0221organizations/{" - + "organization}/locations/{location}b\006prot" - + "o3" + + "f.TimestampB\003\340A\003\022R\n\021notification_type\030\014 " + + "\001(\01627.google.cloud.advisorynotifications" + + ".v1.NotificationType:\207\001\352A\203\001\n1advisorynot" + + "ifications.googleapis.com/Notification\022N" + + "organizations/{organization}/locations/{" + + "location}/notifications/{notification}\"\205" + + "\001\n\004Text\022\017\n\007en_text\030\001 \001(\t\022\026\n\016localized_te" + + "xt\030\002 \001(\t\022T\n\022localization_state\030\003 \001(\01628.g" + + "oogle.cloud.advisorynotifications.v1.Loc" + + "alizationState\"D\n\007Subject\0229\n\004text\030\001 \001(\0132" + + "+.google.cloud.advisorynotifications.v1." + + "Text\"\277\002\n\007Message\022A\n\004body\030\001 \001(\01323.google." + + "cloud.advisorynotifications.v1.Message.B" + + "ody\022F\n\013attachments\030\002 \003(\01321.google.cloud." + + "advisorynotifications.v1.Attachment\022/\n\013c" + + "reate_time\030\003 \001(\0132\032.google.protobuf.Times" + + "tamp\0225\n\021localization_time\030\004 \001(\0132\032.google" + + ".protobuf.Timestamp\032A\n\004Body\0229\n\004text\030\001 \001(" + + "\0132+.google.cloud.advisorynotifications.v" + + "1.Text\"e\n\nAttachment\0229\n\003csv\030\002 \001(\0132*.goog" + + "le.cloud.advisorynotifications.v1.CsvH\000\022" + + "\024\n\014display_name\030\001 \001(\tB\006\n\004data\"w\n\003Csv\022\017\n\007" + + "headers\030\001 \003(\t\022D\n\tdata_rows\030\002 \003(\01321.googl" + + "e.cloud.advisorynotifications.v1.Csv.Csv" + + "Row\032\031\n\006CsvRow\022\017\n\007entries\030\001 \003(\t\"\352\001\n\030ListN" + + "otificationsRequest\022I\n\006parent\030\001 \001(\tB9\340A\002" + + "\372A3\0221advisorynotifications.googleapis.co" + + "m/Notification\022\021\n\tpage_size\030\002 \001(\005\022\022\n\npag" + + "e_token\030\003 \001(\t\022E\n\004view\030\004 \001(\01627.google.clo" + + "ud.advisorynotifications.v1.Notification" + + "View\022\025\n\rlanguage_code\030\005 \001(\t\"\224\001\n\031ListNoti" + + "ficationsResponse\022J\n\rnotifications\030\001 \003(\013" + + "23.google.cloud.advisorynotifications.v1" + + ".Notification\022\027\n\017next_page_token\030\002 \001(\t\022\022" + + "\n\ntotal_size\030\003 \001(\005\"x\n\026GetNotificationReq" + + "uest\022G\n\004name\030\001 \001(\tB9\340A\002\372A3\n1advisorynoti" + + "fications.googleapis.com/Notification\022\025\n" + + "\rlanguage_code\030\005 \001(\t*J\n\020NotificationView" + + "\022!\n\035NOTIFICATION_VIEW_UNSPECIFIED\020\000\022\t\n\005B" + + "ASIC\020\001\022\010\n\004FULL\020\002*\240\001\n\021LocalizationState\022\"" + + "\n\036LOCALIZATION_STATE_UNSPECIFIED\020\000\022%\n!LO" + + "CALIZATION_STATE_NOT_APPLICABLE\020\001\022\036\n\032LOC" + + "ALIZATION_STATE_PENDING\020\002\022 \n\034LOCALIZATIO" + + "N_STATE_COMPLETED\020\003*\217\001\n\020NotificationType" + + "\022!\n\035NOTIFICATION_TYPE_UNSPECIFIED\020\000\022/\n+N" + + "OTIFICATION_TYPE_SECURITY_PRIVACY_ADVISO" + + "RY\020\001\022\'\n#NOTIFICATION_TYPE_SENSITIVE_ACTI" + + "ONS\020\0022\251\004\n\034AdvisoryNotificationsService\022\337" + + "\001\n\021ListNotifications\022?.google.cloud.advi" + + "sorynotifications.v1.ListNotificationsRe" + + "quest\032@.google.cloud.advisorynotificatio" + + "ns.v1.ListNotificationsResponse\"G\202\323\344\223\0028\022" + + "6/v1/{parent=organizations/*/locations/*" + + "}/notifications\332A\006parent\022\314\001\n\017GetNotifica" + + "tion\022=.google.cloud.advisorynotification" + + "s.v1.GetNotificationRequest\0323.google.clo" + + "ud.advisorynotifications.v1.Notification" + + "\"E\202\323\344\223\0028\0226/v1/{name=organizations/*/loca" + + "tions/*/notifications/*}\332A\004name\032X\312A$advi" + + "sorynotifications.googleapis.com\322A.https" + + "://www.googleapis.com/auth/cloud-platfor" + + "mB\374\002\n)com.google.cloud.advisorynotificat" + + "ions.v1B\014ServiceProtoP\001Z_cloud.google.co" + + "m/go/advisorynotifications/apiv1/advisor" + + "ynotificationspb;advisorynotificationspb" + + "\252\002%Google.Cloud.AdvisoryNotifications.V1" + + "\312\002%Google\\Cloud\\AdvisoryNotifications\\V1" + + "\352\002(Google::Cloud::AdvisoryNotifications:" + + ":V1\352Ab\n-advisorynotifications.googleapis" + + ".com/Location\0221organizations/{organizati" + + "on}/locations/{location}b\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( @@ -174,7 +179,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_advisorynotifications_v1_Notification_descriptor, new java.lang.String[] { - "Name", "Subject", "Messages", "CreateTime", + "Name", "Subject", "Messages", "CreateTime", "NotificationType", }); internal_static_google_cloud_advisorynotifications_v1_Text_descriptor = getDescriptor().getMessageTypes().get(1); diff --git a/java-advisorynotifications/proto-google-cloud-advisorynotifications-v1/src/main/proto/google/cloud/advisorynotifications/v1/service.proto b/java-advisorynotifications/proto-google-cloud-advisorynotifications-v1/src/main/proto/google/cloud/advisorynotifications/v1/service.proto index 05b53b394329..6c9bc375b3fd 100644 --- a/java-advisorynotifications/proto-google-cloud-advisorynotifications-v1/src/main/proto/google/cloud/advisorynotifications/v1/service.proto +++ b/java-advisorynotifications/proto-google-cloud-advisorynotifications-v1/src/main/proto/google/cloud/advisorynotifications/v1/service.proto @@ -1,4 +1,4 @@ -// Copyright 2022 Google LLC +// Copyright 2023 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -24,11 +24,11 @@ import "google/protobuf/timestamp.proto"; option csharp_namespace = "Google.Cloud.AdvisoryNotifications.V1"; option go_package = "cloud.google.com/go/advisorynotifications/apiv1/advisorynotificationspb;advisorynotificationspb"; -option php_namespace = "Google\\Cloud\\AdvisoryNotifications\\V1"; -option ruby_package = "Google::Cloud::AdvisoryNotifications::V1"; option java_multiple_files = true; option java_outer_classname = "ServiceProto"; option java_package = "com.google.cloud.advisorynotifications.v1"; +option php_namespace = "Google\\Cloud\\AdvisoryNotifications\\V1"; +option ruby_package = "Google::Cloud::AdvisoryNotifications::V1"; option (google.api.resource_definition) = { type: "advisorynotifications.googleapis.com/Location" pattern: "organizations/{organization}/locations/{location}" @@ -92,6 +92,18 @@ enum LocalizationState { LOCALIZATION_STATE_COMPLETED = 3; } +// Type of notification +enum NotificationType { + // Default type + NOTIFICATION_TYPE_UNSPECIFIED = 0; + + // Security and privacy advisory notifications + NOTIFICATION_TYPE_SECURITY_PRIVACY_ADVISORY = 1; + + // Sensitive action notifications + NOTIFICATION_TYPE_SENSITIVE_ACTIONS = 2; +} + // A notification object for notifying customers about security and privacy // issues. message Notification { @@ -114,6 +126,9 @@ message Notification { // Output only. Time the notification was created. google.protobuf.Timestamp create_time = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Type of notification + NotificationType notification_type = 12; } // A text object containing the English text and its localized copies.