From 239e339b711a5150df3274f5eb6b98b8300b2bd5 Mon Sep 17 00:00:00 2001 From: yoshi-automation Date: Wed, 3 Feb 2021 15:54:41 -0800 Subject: [PATCH 1/2] feat: Add state field in resources docs: Minor changes PiperOrigin-RevId: 355488930 Source-Author: Google APIs Source-Date: Wed Feb 3 14:55:32 2021 -0800 Source-Repo: googleapis/googleapis Source-Sha: 5e27c5cafe0952f50ff81552526b3e3d333ef2c3 Source-Link: https://github.com/googleapis/googleapis/commit/5e27c5cafe0952f50ff81552526b3e3d333ef2c3 --- .../v1alpha1/HubServiceClient.java | 4 +- .../v1alpha1/package-info.java | 4 +- .../v1alpha1/HubServiceGrpc.java | 35 ++- .../networkconnectivity/v1alpha1/Hub.java | 186 ++++++++++- .../v1alpha1/HubOrBuilder.java | 29 ++ .../v1alpha1/HubProto.java | 292 +++++++++--------- .../networkconnectivity/v1alpha1/Spoke.java | 170 ++++++++++ .../v1alpha1/SpokeOrBuilder.java | 29 ++ .../networkconnectivity/v1alpha1/State.java | 201 ++++++++++++ .../networkconnectivity/v1alpha1/hub.proto | 37 ++- synth.metadata | 7 +- 11 files changed, 818 insertions(+), 176 deletions(-) create mode 100644 proto-google-cloud-networkconnectivity-v1alpha1/src/main/java/com/google/cloud/networkconnectivity/v1alpha1/State.java diff --git a/google-cloud-networkconnectivity/src/main/java/com/google/cloud/networkconnectivity/v1alpha1/HubServiceClient.java b/google-cloud-networkconnectivity/src/main/java/com/google/cloud/networkconnectivity/v1alpha1/HubServiceClient.java index cdff2369..4f0434e7 100644 --- a/google-cloud-networkconnectivity/src/main/java/com/google/cloud/networkconnectivity/v1alpha1/HubServiceClient.java +++ b/google-cloud-networkconnectivity/src/main/java/com/google/cloud/networkconnectivity/v1alpha1/HubServiceClient.java @@ -42,8 +42,8 @@ // AUTO-GENERATED DOCUMENTATION AND CLASS. /** - * Service Description: Connectivity Hub is a hub-and-spoke abstraction for network connectivity - * management in Google Cloud. The Hub aims to reduce operational complexity through a simple, + * Service Description: Network Connectivity Center is a hub-and-spoke abstraction for network + * connectivity management in Google Cloud. It reduces operational complexity through a simple, * centralized connectivity management model. * *

This class provides the ability to make remote calls to the backing service through method diff --git a/google-cloud-networkconnectivity/src/main/java/com/google/cloud/networkconnectivity/v1alpha1/package-info.java b/google-cloud-networkconnectivity/src/main/java/com/google/cloud/networkconnectivity/v1alpha1/package-info.java index 2b2e5cea..3e65abe4 100644 --- a/google-cloud-networkconnectivity/src/main/java/com/google/cloud/networkconnectivity/v1alpha1/package-info.java +++ b/google-cloud-networkconnectivity/src/main/java/com/google/cloud/networkconnectivity/v1alpha1/package-info.java @@ -19,8 +19,8 @@ * *

======================= HubServiceClient ======================= * - *

Service Description: Connectivity Hub is a hub-and-spoke abstraction for network connectivity - * management in Google Cloud. The Hub aims to reduce operational complexity through a simple, + *

Service Description: Network Connectivity Center is a hub-and-spoke abstraction for network + * connectivity management in Google Cloud. It reduces operational complexity through a simple, * centralized connectivity management model. * *

Sample for HubServiceClient: diff --git a/grpc-google-cloud-networkconnectivity-v1alpha1/src/main/java/com/google/cloud/networkconnectivity/v1alpha1/HubServiceGrpc.java b/grpc-google-cloud-networkconnectivity-v1alpha1/src/main/java/com/google/cloud/networkconnectivity/v1alpha1/HubServiceGrpc.java index fe1286a5..186eb06b 100644 --- a/grpc-google-cloud-networkconnectivity-v1alpha1/src/main/java/com/google/cloud/networkconnectivity/v1alpha1/HubServiceGrpc.java +++ b/grpc-google-cloud-networkconnectivity-v1alpha1/src/main/java/com/google/cloud/networkconnectivity/v1alpha1/HubServiceGrpc.java @@ -26,9 +26,10 @@ * * *

- * Connectivity Hub is a hub-and-spoke abstraction for network connectivity
- * management in Google Cloud. The Hub aims to reduce operational complexity
- * through a simple, centralized connectivity management model.
+ * Network Connectivity Center is a hub-and-spoke abstraction for
+ * network connectivity management in Google Cloud. It reduces
+ * operational complexity through a simple, centralized connectivity management
+ * model.
  * 
*/ @javax.annotation.Generated( @@ -539,9 +540,10 @@ public HubServiceFutureStub newStub( * * *
-   * Connectivity Hub is a hub-and-spoke abstraction for network connectivity
-   * management in Google Cloud. The Hub aims to reduce operational complexity
-   * through a simple, centralized connectivity management model.
+   * Network Connectivity Center is a hub-and-spoke abstraction for
+   * network connectivity management in Google Cloud. It reduces
+   * operational complexity through a simple, centralized connectivity management
+   * model.
    * 
*/ public abstract static class HubServiceImplBase implements io.grpc.BindableService { @@ -755,9 +757,10 @@ public final io.grpc.ServerServiceDefinition bindService() { * * *
-   * Connectivity Hub is a hub-and-spoke abstraction for network connectivity
-   * management in Google Cloud. The Hub aims to reduce operational complexity
-   * through a simple, centralized connectivity management model.
+   * Network Connectivity Center is a hub-and-spoke abstraction for
+   * network connectivity management in Google Cloud. It reduces
+   * operational complexity through a simple, centralized connectivity management
+   * model.
    * 
*/ public static final class HubServiceStub extends io.grpc.stub.AbstractAsyncStub { @@ -926,9 +929,10 @@ public void deleteSpoke( * * *
-   * Connectivity Hub is a hub-and-spoke abstraction for network connectivity
-   * management in Google Cloud. The Hub aims to reduce operational complexity
-   * through a simple, centralized connectivity management model.
+   * Network Connectivity Center is a hub-and-spoke abstraction for
+   * network connectivity management in Google Cloud. It reduces
+   * operational complexity through a simple, centralized connectivity management
+   * model.
    * 
*/ public static final class HubServiceBlockingStub @@ -1068,9 +1072,10 @@ public com.google.longrunning.Operation deleteSpoke( * * *
-   * Connectivity Hub is a hub-and-spoke abstraction for network connectivity
-   * management in Google Cloud. The Hub aims to reduce operational complexity
-   * through a simple, centralized connectivity management model.
+   * Network Connectivity Center is a hub-and-spoke abstraction for
+   * network connectivity management in Google Cloud. It reduces
+   * operational complexity through a simple, centralized connectivity management
+   * model.
    * 
*/ public static final class HubServiceFutureStub diff --git a/proto-google-cloud-networkconnectivity-v1alpha1/src/main/java/com/google/cloud/networkconnectivity/v1alpha1/Hub.java b/proto-google-cloud-networkconnectivity-v1alpha1/src/main/java/com/google/cloud/networkconnectivity/v1alpha1/Hub.java index 07e479fc..cd11f02c 100644 --- a/proto-google-cloud-networkconnectivity-v1alpha1/src/main/java/com/google/cloud/networkconnectivity/v1alpha1/Hub.java +++ b/proto-google-cloud-networkconnectivity-v1alpha1/src/main/java/com/google/cloud/networkconnectivity/v1alpha1/Hub.java @@ -22,10 +22,10 @@ * * *
- * The Connectivity Hub is a hub-and-spoke abstraction for network connectivity
- * management in Google Cloud. It aims to reduce operational complexity
- * through a simple, centralized connectivity management model. Here is the
- * resource message of a Hub.
+ * Network Connectivity Center is a hub-and-spoke abstraction for
+ * network connectivity management in Google Cloud. It reduces
+ * operational complexity through a simple, centralized connectivity management
+ * model. Following is the resource message of a hub.
  * 
* * Protobuf type {@code google.cloud.networkconnectivity.v1alpha1.Hub} @@ -45,6 +45,7 @@ private Hub() { description_ = ""; spokes_ = com.google.protobuf.LazyStringArrayList.EMPTY; uniqueId_ = ""; + state_ = 0; } @java.lang.Override @@ -151,6 +152,13 @@ private Hub( uniqueId_ = s; break; } + case 72: + { + int rawValue = input.readEnum(); + + state_ = rawValue; + break; + } default: { if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { @@ -609,6 +617,48 @@ public com.google.protobuf.ByteString getUniqueIdBytes() { } } + public static final int STATE_FIELD_NUMBER = 9; + private int state_; + /** + * + * + *
+   * Output only. The current lifecycle state of this Hub.
+   * 
+ * + * + * .google.cloud.networkconnectivity.v1alpha1.State state = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The enum numeric value on the wire for state. + */ + @java.lang.Override + public int getStateValue() { + return state_; + } + /** + * + * + *
+   * Output only. The current lifecycle state of this Hub.
+   * 
+ * + * + * .google.cloud.networkconnectivity.v1alpha1.State state = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The state. + */ + @java.lang.Override + public com.google.cloud.networkconnectivity.v1alpha1.State getState() { + @SuppressWarnings("deprecation") + com.google.cloud.networkconnectivity.v1alpha1.State result = + com.google.cloud.networkconnectivity.v1alpha1.State.valueOf(state_); + return result == null + ? com.google.cloud.networkconnectivity.v1alpha1.State.UNRECOGNIZED + : result; + } + private byte memoizedIsInitialized = -1; @java.lang.Override @@ -643,6 +693,10 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!getUniqueIdBytes().isEmpty()) { com.google.protobuf.GeneratedMessageV3.writeString(output, 8, uniqueId_); } + if (state_ + != com.google.cloud.networkconnectivity.v1alpha1.State.STATE_UNSPECIFIED.getNumber()) { + output.writeEnum(9, state_); + } unknownFields.writeTo(output); } @@ -685,6 +739,10 @@ public int getSerializedSize() { if (!getUniqueIdBytes().isEmpty()) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(8, uniqueId_); } + if (state_ + != com.google.cloud.networkconnectivity.v1alpha1.State.STATE_UNSPECIFIED.getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(9, state_); + } size += unknownFields.getSerializedSize(); memoizedSize = size; return size; @@ -714,6 +772,7 @@ public boolean equals(final java.lang.Object obj) { if (!getDescription().equals(other.getDescription())) return false; if (!getSpokesList().equals(other.getSpokesList())) return false; if (!getUniqueId().equals(other.getUniqueId())) return false; + if (state_ != other.state_) return false; if (!unknownFields.equals(other.unknownFields)) return false; return true; } @@ -747,6 +806,8 @@ public int hashCode() { } hash = (37 * hash) + UNIQUE_ID_FIELD_NUMBER; hash = (53 * hash) + getUniqueId().hashCode(); + hash = (37 * hash) + STATE_FIELD_NUMBER; + hash = (53 * hash) + state_; hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; @@ -851,10 +912,10 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * *
-   * The Connectivity Hub is a hub-and-spoke abstraction for network connectivity
-   * management in Google Cloud. It aims to reduce operational complexity
-   * through a simple, centralized connectivity management model. Here is the
-   * resource message of a Hub.
+   * Network Connectivity Center is a hub-and-spoke abstraction for
+   * network connectivity management in Google Cloud. It reduces
+   * operational complexity through a simple, centralized connectivity management
+   * model. Following is the resource message of a hub.
    * 
* * Protobuf type {@code google.cloud.networkconnectivity.v1alpha1.Hub} @@ -936,6 +997,8 @@ public Builder clear() { bitField0_ = (bitField0_ & ~0x00000002); uniqueId_ = ""; + state_ = 0; + return this; } @@ -984,6 +1047,7 @@ public com.google.cloud.networkconnectivity.v1alpha1.Hub buildPartial() { } result.spokes_ = spokes_; result.uniqueId_ = uniqueId_; + result.state_ = state_; onBuilt(); return result; } @@ -1063,6 +1127,9 @@ public Builder mergeFrom(com.google.cloud.networkconnectivity.v1alpha1.Hub other uniqueId_ = other.uniqueId_; onChanged(); } + if (other.state_ != 0) { + setStateValue(other.getStateValue()); + } this.mergeUnknownFields(other.unknownFields); onChanged(); return this; @@ -2132,6 +2199,109 @@ public Builder setUniqueIdBytes(com.google.protobuf.ByteString value) { return this; } + private int state_ = 0; + /** + * + * + *
+     * Output only. The current lifecycle state of this Hub.
+     * 
+ * + * + * .google.cloud.networkconnectivity.v1alpha1.State state = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The enum numeric value on the wire for state. + */ + @java.lang.Override + public int getStateValue() { + return state_; + } + /** + * + * + *
+     * Output only. The current lifecycle state of this Hub.
+     * 
+ * + * + * .google.cloud.networkconnectivity.v1alpha1.State state = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param value The enum numeric value on the wire for state to set. + * @return This builder for chaining. + */ + public Builder setStateValue(int value) { + + state_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The current lifecycle state of this Hub.
+     * 
+ * + * + * .google.cloud.networkconnectivity.v1alpha1.State state = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The state. + */ + @java.lang.Override + public com.google.cloud.networkconnectivity.v1alpha1.State getState() { + @SuppressWarnings("deprecation") + com.google.cloud.networkconnectivity.v1alpha1.State result = + com.google.cloud.networkconnectivity.v1alpha1.State.valueOf(state_); + return result == null + ? com.google.cloud.networkconnectivity.v1alpha1.State.UNRECOGNIZED + : result; + } + /** + * + * + *
+     * Output only. The current lifecycle state of this Hub.
+     * 
+ * + * + * .google.cloud.networkconnectivity.v1alpha1.State state = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param value The state to set. + * @return This builder for chaining. + */ + public Builder setState(com.google.cloud.networkconnectivity.v1alpha1.State value) { + if (value == null) { + throw new NullPointerException(); + } + + state_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The current lifecycle state of this Hub.
+     * 
+ * + * + * .google.cloud.networkconnectivity.v1alpha1.State state = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return This builder for chaining. + */ + public Builder clearState() { + + state_ = 0; + onChanged(); + return this; + } + @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { return super.setUnknownFields(unknownFields); diff --git a/proto-google-cloud-networkconnectivity-v1alpha1/src/main/java/com/google/cloud/networkconnectivity/v1alpha1/HubOrBuilder.java b/proto-google-cloud-networkconnectivity-v1alpha1/src/main/java/com/google/cloud/networkconnectivity/v1alpha1/HubOrBuilder.java index 2ff52022..312a67fe 100644 --- a/proto-google-cloud-networkconnectivity-v1alpha1/src/main/java/com/google/cloud/networkconnectivity/v1alpha1/HubOrBuilder.java +++ b/proto-google-cloud-networkconnectivity-v1alpha1/src/main/java/com/google/cloud/networkconnectivity/v1alpha1/HubOrBuilder.java @@ -284,4 +284,33 @@ public interface HubOrBuilder * @return The bytes for uniqueId. */ com.google.protobuf.ByteString getUniqueIdBytes(); + + /** + * + * + *
+   * Output only. The current lifecycle state of this Hub.
+   * 
+ * + * + * .google.cloud.networkconnectivity.v1alpha1.State state = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The enum numeric value on the wire for state. + */ + int getStateValue(); + /** + * + * + *
+   * Output only. The current lifecycle state of this Hub.
+   * 
+ * + * + * .google.cloud.networkconnectivity.v1alpha1.State state = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The state. + */ + com.google.cloud.networkconnectivity.v1alpha1.State getState(); } diff --git a/proto-google-cloud-networkconnectivity-v1alpha1/src/main/java/com/google/cloud/networkconnectivity/v1alpha1/HubProto.java b/proto-google-cloud-networkconnectivity-v1alpha1/src/main/java/com/google/cloud/networkconnectivity/v1alpha1/HubProto.java index 0022ee2d..4f2423ff 100644 --- a/proto-google-cloud-networkconnectivity-v1alpha1/src/main/java/com/google/cloud/networkconnectivity/v1alpha1/HubProto.java +++ b/proto-google-cloud-networkconnectivity-v1alpha1/src/main/java/com/google/cloud/networkconnectivity/v1alpha1/HubProto.java @@ -111,7 +111,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "api/field_behavior.proto\032\031google/api/res" + "ource.proto\032#google/longrunning/operatio" + "ns.proto\032 google/protobuf/field_mask.pro" - + "to\032\037google/protobuf/timestamp.proto\"\301\003\n\003" + + "to\032\037google/protobuf/timestamp.proto\"\207\004\n\003" + "Hub\022\021\n\004name\030\001 \001(\tB\003\340A\005\022/\n\013create_time\030\002 " + "\001(\0132\032.google.protobuf.Timestamp\022/\n\013updat" + "e_time\030\003 \001(\0132\032.google.protobuf.Timestamp" @@ -119,145 +119,151 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "onnectivity.v1alpha1.Hub.LabelsEntry\022\023\n\013" + "description\030\005 \001(\t\022@\n\006spokes\030\006 \003(\tB0\340A\003\372A" + "*\n(networkconnectivity.googleapis.com/Sp" - + "oke\022\026\n\tunique_id\030\010 \001(\tB\003\340A\003\032-\n\013LabelsEnt" - + "ry\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001:[\352AX\n" - + "&networkconnectivity.googleapis.com/Hub\022" - + ".projects/{project}/locations/global/hub" - + "s/{hub}\"\326\005\n\005Spoke\022\021\n\004name\030\001 \001(\tB\003\340A\005\022/\n\013" - + "create_time\030\002 \001(\0132\032.google.protobuf.Time" - + "stamp\022/\n\013update_time\030\003 \001(\0132\032.google.prot" - + "obuf.Timestamp\022L\n\006labels\030\004 \003(\0132<.google." - + "cloud.networkconnectivity.v1alpha1.Spoke" - + ".LabelsEntry\022\023\n\013description\030\005 \001(\t\0228\n\003hub" - + "\030\006 \001(\tB+\372A(\n&networkconnectivity.googlea" - + "pis.com/Hub\022A\n\022linked_vpn_tunnels\030\014 \003(\tB" - + "%\372A\"\n compute.googleapis.com/VpnTunnel\022[" - + "\n\037linked_interconnect_attachments\030\r \003(\tB" - + "2\372A/\n-compute.googleapis.com/Interconnec" - + "tAttachment\022m\n!linked_router_appliance_i" - + "nstances\030\016 \003(\0132B.google.cloud.networkcon" - + "nectivity.v1alpha1.RouterApplianceInstan" - + "ce\022\026\n\tunique_id\030\013 \001(\tB\003\340A\003\032-\n\013LabelsEntr" - + "y\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001:e\352Ab\n(" - + "networkconnectivity.googleapis.com/Spoke" - + "\0226projects/{project}/locations/{location" - + "}/spokes/{spoke}\"\225\001\n\017ListHubsRequest\0229\n\006" - + "parent\030\001 \001(\tB)\340A\002\372A#\n!locations.googleap" - + "is.com/Location\022\021\n\tpage_size\030\002 \001(\005\022\022\n\npa" - + "ge_token\030\003 \001(\t\022\016\n\006filter\030\004 \001(\t\022\020\n\010order_" - + "by\030\005 \001(\t\"~\n\020ListHubsResponse\022<\n\004hubs\030\001 \003" - + "(\0132..google.cloud.networkconnectivity.v1" - + "alpha1.Hub\022\027\n\017next_page_token\030\002 \001(\t\022\023\n\013u" - + "nreachable\030\003 \003(\t\"M\n\rGetHubRequest\022<\n\004nam" - + "e\030\001 \001(\tB.\340A\002\372A(\n&networkconnectivity.goo" - + "gleapis.com/Hub\"\275\001\n\020CreateHubRequest\0229\n\006" - + "parent\030\001 \001(\tB)\340A\002\372A#\n!locations.googleap" - + "is.com/Location\022\023\n\006hub_id\030\002 \001(\tB\003\340A\001\022@\n\003" - + "hub\030\003 \001(\0132..google.cloud.networkconnecti" - + "vity.v1alpha1.HubB\003\340A\002\022\027\n\nrequest_id\030\004 \001" - + "(\tB\003\340A\001\"\243\001\n\020UpdateHubRequest\0224\n\013update_m" - + "ask\030\001 \001(\0132\032.google.protobuf.FieldMaskB\003\340" - + "A\001\022@\n\003hub\030\002 \001(\0132..google.cloud.networkco" - + "nnectivity.v1alpha1.HubB\003\340A\002\022\027\n\nrequest_" - + "id\030\003 \001(\tB\003\340A\001\"i\n\020DeleteHubRequest\022<\n\004nam" - + "e\030\001 \001(\tB.\340A\002\372A(\n&networkconnectivity.goo" - + "gleapis.com/Hub\022\027\n\nrequest_id\030\002 \001(\tB\003\340A\001" - + "\"\227\001\n\021ListSpokesRequest\0229\n\006parent\030\001 \001(\tB)" - + "\340A\002\372A#\n!locations.googleapis.com/Locatio" - + "n\022\021\n\tpage_size\030\002 \001(\005\022\022\n\npage_token\030\003 \001(\t" - + "\022\016\n\006filter\030\004 \001(\t\022\020\n\010order_by\030\005 \001(\t\"\204\001\n\022L" - + "istSpokesResponse\022@\n\006spokes\030\001 \003(\01320.goog" - + "le.cloud.networkconnectivity.v1alpha1.Sp" - + "oke\022\027\n\017next_page_token\030\002 \001(\t\022\023\n\013unreacha" - + "ble\030\003 \003(\t\"Q\n\017GetSpokeRequest\022>\n\004name\030\001 \001" - + "(\tB0\340A\002\372A*\n(networkconnectivity.googleap" - + "is.com/Spoke\"\305\001\n\022CreateSpokeRequest\0229\n\006p" - + "arent\030\001 \001(\tB)\340A\002\372A#\n!locations.googleapi" - + "s.com/Location\022\025\n\010spoke_id\030\002 \001(\tB\003\340A\001\022D\n" - + "\005spoke\030\003 \001(\01320.google.cloud.networkconne" - + "ctivity.v1alpha1.SpokeB\003\340A\002\022\027\n\nrequest_i" - + "d\030\004 \001(\tB\003\340A\001\"\251\001\n\022UpdateSpokeRequest\0224\n\013u" - + "pdate_mask\030\001 \001(\0132\032.google.protobuf.Field" - + "MaskB\003\340A\001\022D\n\005spoke\030\002 \001(\01320.google.cloud." - + "networkconnectivity.v1alpha1.SpokeB\003\340A\002\022" - + "\027\n\nrequest_id\030\003 \001(\tB\003\340A\001\"m\n\022DeleteSpokeR" - + "equest\022>\n\004name\030\001 \001(\tB0\340A\002\372A*\n(networkcon" - + "nectivity.googleapis.com/Spoke\022\027\n\nreques" - + "t_id\030\002 \001(\tB\003\340A\001\"\213\001\n\027RouterApplianceInsta" - + "nce\022=\n\017virtual_machine\030\001 \001(\tB$\372A!\n\037compu" - + "te.googleapis.com/Instance\022\022\n\nip_address" - + "\030\003 \001(\t\022\035\n\021network_interface\030\002 \001(\tB\002\030\0012\255\021" - + "\n\nHubService\022\311\001\n\010ListHubs\022:.google.cloud" - + ".networkconnectivity.v1alpha1.ListHubsRe" - + "quest\032;.google.cloud.networkconnectivity" - + ".v1alpha1.ListHubsResponse\"D\202\323\344\223\0025\0223/v1a" - + "lpha1/{parent=projects/*/locations/globa" - + "l}/hubs\332A\006parent\022\266\001\n\006GetHub\0228.google.clo" - + "ud.networkconnectivity.v1alpha1.GetHubRe" - + "quest\032..google.cloud.networkconnectivity" - + ".v1alpha1.Hub\"B\202\323\344\223\0025\0223/v1alpha1/{name=p" - + "rojects/*/locations/global/hubs/*}\332A\004nam" - + "e\022\330\001\n\tCreateHub\022;.google.cloud.networkco" - + "nnectivity.v1alpha1.CreateHubRequest\032\035.g" - + "oogle.longrunning.Operation\"o\202\323\344\223\002:\"3/v1" - + "alpha1/{parent=projects/*/locations/glob" - + "al}/hubs:\003hub\332A\021parent,hub,hub_id\312A\030\n\003Hu" - + "b\022\021OperationMetadata\022\332\001\n\tUpdateHub\022;.goo" - + "gle.cloud.networkconnectivity.v1alpha1.U" - + "pdateHubRequest\032\035.google.longrunning.Ope" - + "ration\"q\202\323\344\223\002>27/v1alpha1/{hub.name=proj" - + "ects/*/locations/global/hubs/*}:\003hub\332A\017h" - + "ub,update_mask\312A\030\n\003Hub\022\021OperationMetadat" - + "a\022\330\001\n\tDeleteHub\022;.google.cloud.networkco" - + "nnectivity.v1alpha1.DeleteHubRequest\032\035.g" - + "oogle.longrunning.Operation\"o\202\323\344\223\0025*3/v1" - + "alpha1/{name=projects/*/locations/global" - + "/hubs/*}\332A\004name\312A*\n\025google.protobuf.Empt" - + "y\022\021OperationMetadata\022\314\001\n\nListSpokes\022<.go" + + "oke\022\026\n\tunique_id\030\010 \001(\tB\003\340A\003\022D\n\005state\030\t \001" + + "(\01620.google.cloud.networkconnectivity.v1" + + "alpha1.StateB\003\340A\003\032-\n\013LabelsEntry\022\013\n\003key\030" + + "\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001:[\352AX\n&networkco" + + "nnectivity.googleapis.com/Hub\022.projects/" + + "{project}/locations/global/hubs/{hub}\"\234\006" + + "\n\005Spoke\022\021\n\004name\030\001 \001(\tB\003\340A\005\022/\n\013create_tim" + + "e\030\002 \001(\0132\032.google.protobuf.Timestamp\022/\n\013u" + + "pdate_time\030\003 \001(\0132\032.google.protobuf.Times" + + "tamp\022L\n\006labels\030\004 \003(\0132<.google.cloud.netw" + + "orkconnectivity.v1alpha1.Spoke.LabelsEnt" + + "ry\022\023\n\013description\030\005 \001(\t\0228\n\003hub\030\006 \001(\tB+\372A" + + "(\n&networkconnectivity.googleapis.com/Hu" + + "b\022A\n\022linked_vpn_tunnels\030\014 \003(\tB%\372A\"\n comp" + + "ute.googleapis.com/VpnTunnel\022[\n\037linked_i" + + "nterconnect_attachments\030\r \003(\tB2\372A/\n-comp" + + "ute.googleapis.com/InterconnectAttachmen" + + "t\022m\n!linked_router_appliance_instances\030\016" + + " \003(\0132B.google.cloud.networkconnectivity." + + "v1alpha1.RouterApplianceInstance\022\026\n\tuniq" + + "ue_id\030\013 \001(\tB\003\340A\003\022D\n\005state\030\017 \001(\01620.google" + + ".cloud.networkconnectivity.v1alpha1.Stat" + + "eB\003\340A\003\032-\n\013LabelsEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005va" + + "lue\030\002 \001(\t:\0028\001:e\352Ab\n(networkconnectivity." + + "googleapis.com/Spoke\0226projects/{project}" + + "/locations/{location}/spokes/{spoke}\"\225\001\n" + + "\017ListHubsRequest\0229\n\006parent\030\001 \001(\tB)\340A\002\372A#" + + "\n!locations.googleapis.com/Location\022\021\n\tp" + + "age_size\030\002 \001(\005\022\022\n\npage_token\030\003 \001(\t\022\016\n\006fi" + + "lter\030\004 \001(\t\022\020\n\010order_by\030\005 \001(\t\"~\n\020ListHubs" + + "Response\022<\n\004hubs\030\001 \003(\0132..google.cloud.ne" + + "tworkconnectivity.v1alpha1.Hub\022\027\n\017next_p" + + "age_token\030\002 \001(\t\022\023\n\013unreachable\030\003 \003(\t\"M\n\r" + + "GetHubRequest\022<\n\004name\030\001 \001(\tB.\340A\002\372A(\n&net" + + "workconnectivity.googleapis.com/Hub\"\275\001\n\020" + + "CreateHubRequest\0229\n\006parent\030\001 \001(\tB)\340A\002\372A#" + + "\n!locations.googleapis.com/Location\022\023\n\006h" + + "ub_id\030\002 \001(\tB\003\340A\001\022@\n\003hub\030\003 \001(\0132..google.c" + + "loud.networkconnectivity.v1alpha1.HubB\003\340" + + "A\002\022\027\n\nrequest_id\030\004 \001(\tB\003\340A\001\"\243\001\n\020UpdateHu" + + "bRequest\0224\n\013update_mask\030\001 \001(\0132\032.google.p" + + "rotobuf.FieldMaskB\003\340A\001\022@\n\003hub\030\002 \001(\0132..go" + "ogle.cloud.networkconnectivity.v1alpha1." - + "ListSpokesRequest\032=.google.cloud.network" - + "connectivity.v1alpha1.ListSpokesResponse" - + "\"A\202\323\344\223\0022\0220/v1alpha1/{parent=projects/*/l" - + "ocations/*}/spokes\332A\006parent\022\271\001\n\010GetSpoke" - + "\022:.google.cloud.networkconnectivity.v1al" - + "pha1.GetSpokeRequest\0320.google.cloud.netw" - + "orkconnectivity.v1alpha1.Spoke\"?\202\323\344\223\0022\0220" - + "/v1alpha1/{name=projects/*/locations/*/s" - + "pokes/*}\332A\004name\022\341\001\n\013CreateSpoke\022=.google" - + ".cloud.networkconnectivity.v1alpha1.Crea" + + "HubB\003\340A\002\022\027\n\nrequest_id\030\003 \001(\tB\003\340A\001\"i\n\020Del" + + "eteHubRequest\022<\n\004name\030\001 \001(\tB.\340A\002\372A(\n&net" + + "workconnectivity.googleapis.com/Hub\022\027\n\nr" + + "equest_id\030\002 \001(\tB\003\340A\001\"\227\001\n\021ListSpokesReque" + + "st\0229\n\006parent\030\001 \001(\tB)\340A\002\372A#\n!locations.go" + + "ogleapis.com/Location\022\021\n\tpage_size\030\002 \001(\005" + + "\022\022\n\npage_token\030\003 \001(\t\022\016\n\006filter\030\004 \001(\t\022\020\n\010" + + "order_by\030\005 \001(\t\"\204\001\n\022ListSpokesResponse\022@\n" + + "\006spokes\030\001 \003(\01320.google.cloud.networkconn" + + "ectivity.v1alpha1.Spoke\022\027\n\017next_page_tok" + + "en\030\002 \001(\t\022\023\n\013unreachable\030\003 \003(\t\"Q\n\017GetSpok" + + "eRequest\022>\n\004name\030\001 \001(\tB0\340A\002\372A*\n(networkc" + + "onnectivity.googleapis.com/Spoke\"\305\001\n\022Cre" + + "ateSpokeRequest\0229\n\006parent\030\001 \001(\tB)\340A\002\372A#\n" + + "!locations.googleapis.com/Location\022\025\n\010sp" + + "oke_id\030\002 \001(\tB\003\340A\001\022D\n\005spoke\030\003 \001(\01320.googl" + + "e.cloud.networkconnectivity.v1alpha1.Spo" + + "keB\003\340A\002\022\027\n\nrequest_id\030\004 \001(\tB\003\340A\001\"\251\001\n\022Upd" + + "ateSpokeRequest\0224\n\013update_mask\030\001 \001(\0132\032.g" + + "oogle.protobuf.FieldMaskB\003\340A\001\022D\n\005spoke\030\002" + + " \001(\01320.google.cloud.networkconnectivity." + + "v1alpha1.SpokeB\003\340A\002\022\027\n\nrequest_id\030\003 \001(\tB" + + "\003\340A\001\"m\n\022DeleteSpokeRequest\022>\n\004name\030\001 \001(\t" + + "B0\340A\002\372A*\n(networkconnectivity.googleapis" + + ".com/Spoke\022\027\n\nrequest_id\030\002 \001(\tB\003\340A\001\"\213\001\n\027" + + "RouterApplianceInstance\022=\n\017virtual_machi" + + "ne\030\001 \001(\tB$\372A!\n\037compute.googleapis.com/In" + + "stance\022\022\n\nip_address\030\003 \001(\t\022\035\n\021network_in" + + "terface\030\002 \001(\tB\002\030\001*F\n\005State\022\025\n\021STATE_UNSP" + + "ECIFIED\020\000\022\014\n\010CREATING\020\001\022\n\n\006ACTIVE\020\002\022\014\n\010D" + + "ELETING\020\0032\255\021\n\nHubService\022\311\001\n\010ListHubs\022:." + + "google.cloud.networkconnectivity.v1alpha" + + "1.ListHubsRequest\032;.google.cloud.network" + + "connectivity.v1alpha1.ListHubsResponse\"D" + + "\202\323\344\223\0025\0223/v1alpha1/{parent=projects/*/loc" + + "ations/global}/hubs\332A\006parent\022\266\001\n\006GetHub\022" + + "8.google.cloud.networkconnectivity.v1alp" + + "ha1.GetHubRequest\032..google.cloud.network" + + "connectivity.v1alpha1.Hub\"B\202\323\344\223\0025\0223/v1al" + + "pha1/{name=projects/*/locations/global/h" + + "ubs/*}\332A\004name\022\330\001\n\tCreateHub\022;.google.clo" + + "ud.networkconnectivity.v1alpha1.CreateHu" + + "bRequest\032\035.google.longrunning.Operation\"" + + "o\202\323\344\223\002:\"3/v1alpha1/{parent=projects/*/lo" + + "cations/global}/hubs:\003hub\332A\021parent,hub,h" + + "ub_id\312A\030\n\003Hub\022\021OperationMetadata\022\332\001\n\tUpd" + + "ateHub\022;.google.cloud.networkconnectivit" + + "y.v1alpha1.UpdateHubRequest\032\035.google.lon" + + "grunning.Operation\"q\202\323\344\223\002>27/v1alpha1/{h" + + "ub.name=projects/*/locations/global/hubs" + + "/*}:\003hub\332A\017hub,update_mask\312A\030\n\003Hub\022\021Oper" + + "ationMetadata\022\330\001\n\tDeleteHub\022;.google.clo" + + "ud.networkconnectivity.v1alpha1.DeleteHu" + + "bRequest\032\035.google.longrunning.Operation\"" + + "o\202\323\344\223\0025*3/v1alpha1/{name=projects/*/loca" + + "tions/global/hubs/*}\332A\004name\312A*\n\025google.p" + + "rotobuf.Empty\022\021OperationMetadata\022\314\001\n\nLis" + + "tSpokes\022<.google.cloud.networkconnectivi" + + "ty.v1alpha1.ListSpokesRequest\032=.google.c" + + "loud.networkconnectivity.v1alpha1.ListSp" + + "okesResponse\"A\202\323\344\223\0022\0220/v1alpha1/{parent=" + + "projects/*/locations/*}/spokes\332A\006parent\022" + + "\271\001\n\010GetSpoke\022:.google.cloud.networkconne" + + "ctivity.v1alpha1.GetSpokeRequest\0320.googl" + + "e.cloud.networkconnectivity.v1alpha1.Spo" + + "ke\"?\202\323\344\223\0022\0220/v1alpha1/{name=projects/*/l" + + "ocations/*/spokes/*}\332A\004name\022\341\001\n\013CreateSp" + + "oke\022=.google.cloud.networkconnectivity.v" + + "1alpha1.CreateSpokeRequest\032\035.google.long" + + "running.Operation\"t\202\323\344\223\0029\"0/v1alpha1/{pa" + + "rent=projects/*/locations/*}/spokes:\005spo" + + "ke\332A\025parent,spoke,spoke_id\312A\032\n\005Spoke\022\021Op" + + "erationMetadata\022\343\001\n\013UpdateSpoke\022=.google" + + ".cloud.networkconnectivity.v1alpha1.Upda" + "teSpokeRequest\032\035.google.longrunning.Oper" - + "ation\"t\202\323\344\223\0029\"0/v1alpha1/{parent=project" - + "s/*/locations/*}/spokes:\005spoke\332A\025parent," - + "spoke,spoke_id\312A\032\n\005Spoke\022\021OperationMetad" - + "ata\022\343\001\n\013UpdateSpoke\022=.google.cloud.netwo" - + "rkconnectivity.v1alpha1.UpdateSpokeReque" - + "st\032\035.google.longrunning.Operation\"v\202\323\344\223\002" - + "?26/v1alpha1/{spoke.name=projects/*/loca" - + "tions/*/spokes/*}:\005spoke\332A\021spoke,update_" - + "mask\312A\032\n\005Spoke\022\021OperationMetadata\022\331\001\n\013De" - + "leteSpoke\022=.google.cloud.networkconnecti" - + "vity.v1alpha1.DeleteSpokeRequest\032\035.googl" - + "e.longrunning.Operation\"l\202\323\344\223\0022*0/v1alph" - + "a1/{name=projects/*/locations/*/spokes/*" - + "}\332A\004name\312A*\n\025google.protobuf.Empty\022\021Oper" - + "ationMetadata\032V\312A\"networkconnectivity.go" - + "ogleapis.com\322A.https://www.googleapis.co" - + "m/auth/cloud-platformB\332\004\n-com.google.clo" - + "ud.networkconnectivity.v1alpha1B\010HubProt" - + "oP\001Z\\google.golang.org/genproto/googleap" - + "is/cloud/networkconnectivity/v1alpha1;ne" - + "tworkconnectivity\252\002)Google.Cloud.Network" - + "Connectivity.V1Alpha1\312\002)Google\\Cloud\\Net" - + "workConnectivity\\V1alpha1\352\002,Google::Clou" - + "d::NetworkConnectivity::V1alpha1\352A`\n com" - + "pute.googleapis.com/VpnTunnel\022 + * Output only. The current lifecycle state of this Hub. + * + * + * + * .google.cloud.networkconnectivity.v1alpha1.State state = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The enum numeric value on the wire for state. + */ + @java.lang.Override + public int getStateValue() { + return state_; + } + /** + * + * + *
+   * Output only. The current lifecycle state of this Hub.
+   * 
+ * + * + * .google.cloud.networkconnectivity.v1alpha1.State state = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The state. + */ + @java.lang.Override + public com.google.cloud.networkconnectivity.v1alpha1.State getState() { + @SuppressWarnings("deprecation") + com.google.cloud.networkconnectivity.v1alpha1.State result = + com.google.cloud.networkconnectivity.v1alpha1.State.valueOf(state_); + return result == null + ? com.google.cloud.networkconnectivity.v1alpha1.State.UNRECOGNIZED + : result; + } + private byte memoizedIsInitialized = -1; @java.lang.Override @@ -892,6 +942,10 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io for (int i = 0; i < linkedRouterApplianceInstances_.size(); i++) { output.writeMessage(14, linkedRouterApplianceInstances_.get(i)); } + if (state_ + != com.google.cloud.networkconnectivity.v1alpha1.State.STATE_UNSPECIFIED.getNumber()) { + output.writeEnum(15, state_); + } unknownFields.writeTo(output); } @@ -950,6 +1004,10 @@ public int getSerializedSize() { com.google.protobuf.CodedOutputStream.computeMessageSize( 14, linkedRouterApplianceInstances_.get(i)); } + if (state_ + != com.google.cloud.networkconnectivity.v1alpha1.State.STATE_UNSPECIFIED.getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(15, state_); + } size += unknownFields.getSerializedSize(); memoizedSize = size; return size; @@ -984,6 +1042,7 @@ public boolean equals(final java.lang.Object obj) { if (!getLinkedRouterApplianceInstancesList() .equals(other.getLinkedRouterApplianceInstancesList())) return false; if (!getUniqueId().equals(other.getUniqueId())) return false; + if (state_ != other.state_) return false; if (!unknownFields.equals(other.unknownFields)) return false; return true; } @@ -1027,6 +1086,8 @@ public int hashCode() { } hash = (37 * hash) + UNIQUE_ID_FIELD_NUMBER; hash = (53 * hash) + getUniqueId().hashCode(); + hash = (37 * hash) + STATE_FIELD_NUMBER; + hash = (53 * hash) + state_; hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; @@ -1227,6 +1288,8 @@ public Builder clear() { } uniqueId_ = ""; + state_ = 0; + return this; } @@ -1291,6 +1354,7 @@ public com.google.cloud.networkconnectivity.v1alpha1.Spoke buildPartial() { result.linkedRouterApplianceInstances_ = linkedRouterApplianceInstancesBuilder_.build(); } result.uniqueId_ = uniqueId_; + result.state_ = state_; onBuilt(); return result; } @@ -1412,6 +1476,9 @@ public Builder mergeFrom(com.google.cloud.networkconnectivity.v1alpha1.Spoke oth uniqueId_ = other.uniqueId_; onChanged(); } + if (other.state_ != 0) { + setStateValue(other.getStateValue()); + } this.mergeUnknownFields(other.unknownFields); onChanged(); return this; @@ -3184,6 +3251,109 @@ public Builder setUniqueIdBytes(com.google.protobuf.ByteString value) { return this; } + private int state_ = 0; + /** + * + * + *
+     * Output only. The current lifecycle state of this Hub.
+     * 
+ * + * + * .google.cloud.networkconnectivity.v1alpha1.State state = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The enum numeric value on the wire for state. + */ + @java.lang.Override + public int getStateValue() { + return state_; + } + /** + * + * + *
+     * Output only. The current lifecycle state of this Hub.
+     * 
+ * + * + * .google.cloud.networkconnectivity.v1alpha1.State state = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param value The enum numeric value on the wire for state to set. + * @return This builder for chaining. + */ + public Builder setStateValue(int value) { + + state_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The current lifecycle state of this Hub.
+     * 
+ * + * + * .google.cloud.networkconnectivity.v1alpha1.State state = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The state. + */ + @java.lang.Override + public com.google.cloud.networkconnectivity.v1alpha1.State getState() { + @SuppressWarnings("deprecation") + com.google.cloud.networkconnectivity.v1alpha1.State result = + com.google.cloud.networkconnectivity.v1alpha1.State.valueOf(state_); + return result == null + ? com.google.cloud.networkconnectivity.v1alpha1.State.UNRECOGNIZED + : result; + } + /** + * + * + *
+     * Output only. The current lifecycle state of this Hub.
+     * 
+ * + * + * .google.cloud.networkconnectivity.v1alpha1.State state = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param value The state to set. + * @return This builder for chaining. + */ + public Builder setState(com.google.cloud.networkconnectivity.v1alpha1.State value) { + if (value == null) { + throw new NullPointerException(); + } + + state_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The current lifecycle state of this Hub.
+     * 
+ * + * + * .google.cloud.networkconnectivity.v1alpha1.State state = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return This builder for chaining. + */ + public Builder clearState() { + + state_ = 0; + onChanged(); + return this; + } + @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { return super.setUnknownFields(unknownFields); diff --git a/proto-google-cloud-networkconnectivity-v1alpha1/src/main/java/com/google/cloud/networkconnectivity/v1alpha1/SpokeOrBuilder.java b/proto-google-cloud-networkconnectivity-v1alpha1/src/main/java/com/google/cloud/networkconnectivity/v1alpha1/SpokeOrBuilder.java index 25f28e75..f5a88672 100644 --- a/proto-google-cloud-networkconnectivity-v1alpha1/src/main/java/com/google/cloud/networkconnectivity/v1alpha1/SpokeOrBuilder.java +++ b/proto-google-cloud-networkconnectivity-v1alpha1/src/main/java/com/google/cloud/networkconnectivity/v1alpha1/SpokeOrBuilder.java @@ -430,4 +430,33 @@ public interface SpokeOrBuilder * @return The bytes for uniqueId. */ com.google.protobuf.ByteString getUniqueIdBytes(); + + /** + * + * + *
+   * Output only. The current lifecycle state of this Hub.
+   * 
+ * + * + * .google.cloud.networkconnectivity.v1alpha1.State state = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The enum numeric value on the wire for state. + */ + int getStateValue(); + /** + * + * + *
+   * Output only. The current lifecycle state of this Hub.
+   * 
+ * + * + * .google.cloud.networkconnectivity.v1alpha1.State state = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The state. + */ + com.google.cloud.networkconnectivity.v1alpha1.State getState(); } diff --git a/proto-google-cloud-networkconnectivity-v1alpha1/src/main/java/com/google/cloud/networkconnectivity/v1alpha1/State.java b/proto-google-cloud-networkconnectivity-v1alpha1/src/main/java/com/google/cloud/networkconnectivity/v1alpha1/State.java new file mode 100644 index 00000000..3b3ebc86 --- /dev/null +++ b/proto-google-cloud-networkconnectivity-v1alpha1/src/main/java/com/google/cloud/networkconnectivity/v1alpha1/State.java @@ -0,0 +1,201 @@ +/* + * 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/networkconnectivity/v1alpha1/hub.proto + +package com.google.cloud.networkconnectivity.v1alpha1; + +/** + * + * + *
+ * The State enum represents the lifecycle of a Network Connectivity Center
+ * resource.
+ * 
+ * + * Protobuf enum {@code google.cloud.networkconnectivity.v1alpha1.State} + */ +public enum State implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+   * No state information available
+   * 
+ * + * STATE_UNSPECIFIED = 0; + */ + STATE_UNSPECIFIED(0), + /** + * + * + *
+   * The resource's create operation is in progress
+   * 
+ * + * CREATING = 1; + */ + CREATING(1), + /** + * + * + *
+   * The resource is active
+   * 
+ * + * ACTIVE = 2; + */ + ACTIVE(2), + /** + * + * + *
+   * The resource's Delete operation is in progress
+   * 
+ * + * DELETING = 3; + */ + DELETING(3), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+   * No state information available
+   * 
+ * + * STATE_UNSPECIFIED = 0; + */ + public static final int STATE_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+   * The resource's create operation is in progress
+   * 
+ * + * CREATING = 1; + */ + public static final int CREATING_VALUE = 1; + /** + * + * + *
+   * The resource is active
+   * 
+ * + * ACTIVE = 2; + */ + public static final int ACTIVE_VALUE = 2; + /** + * + * + *
+   * The resource's Delete operation is in progress
+   * 
+ * + * DELETING = 3; + */ + public static final int DELETING_VALUE = 3; + + 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 State 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 State forNumber(int value) { + switch (value) { + case 0: + return STATE_UNSPECIFIED; + case 1: + return CREATING; + case 2: + return ACTIVE; + case 3: + return DELETING; + 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 State findValueByNumber(int number) { + return State.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.networkconnectivity.v1alpha1.HubProto.getDescriptor() + .getEnumTypes() + .get(0); + } + + private static final State[] VALUES = values(); + + public static State 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 State(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.networkconnectivity.v1alpha1.State) +} diff --git a/proto-google-cloud-networkconnectivity-v1alpha1/src/main/proto/google/cloud/networkconnectivity/v1alpha1/hub.proto b/proto-google-cloud-networkconnectivity-v1alpha1/src/main/proto/google/cloud/networkconnectivity/v1alpha1/hub.proto index 1d2a6f27..6f1b8eed 100644 --- a/proto-google-cloud-networkconnectivity-v1alpha1/src/main/proto/google/cloud/networkconnectivity/v1alpha1/hub.proto +++ b/proto-google-cloud-networkconnectivity-v1alpha1/src/main/proto/google/cloud/networkconnectivity/v1alpha1/hub.proto @@ -44,9 +44,10 @@ option (google.api.resource_definition) = { pattern: "projects/{project}/zones/{zone}/instances/{instance}" }; -// Connectivity Hub is a hub-and-spoke abstraction for network connectivity -// management in Google Cloud. The Hub aims to reduce operational complexity -// through a simple, centralized connectivity management model. +// Network Connectivity Center is a hub-and-spoke abstraction for +// network connectivity management in Google Cloud. It reduces +// operational complexity through a simple, centralized connectivity management +// model. service HubService { option (google.api.default_host) = "networkconnectivity.googleapis.com"; option (google.api.oauth_scopes) = "https://www.googleapis.com/auth/cloud-platform"; @@ -160,10 +161,10 @@ service HubService { } } -// The Connectivity Hub is a hub-and-spoke abstraction for network connectivity -// management in Google Cloud. It aims to reduce operational complexity -// through a simple, centralized connectivity management model. Here is the -// resource message of a Hub. +// Network Connectivity Center is a hub-and-spoke abstraction for +// network connectivity management in Google Cloud. It reduces +// operational complexity through a simple, centralized connectivity management +// model. Following is the resource message of a hub. message Hub { option (google.api.resource) = { type: "networkconnectivity.googleapis.com/Hub" @@ -197,6 +198,9 @@ message Hub { // resources. If a Hub resource is deleted and another with the same name is // created, it gets a different unique_id. string unique_id = 8 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The current lifecycle state of this Hub. + State state = 9 [(google.api.field_behavior) = OUTPUT_ONLY]; } // A Spoke is an abstraction of a network attachment being attached @@ -245,6 +249,9 @@ message Spoke { // resources. If a Spoke resource is deleted and another with the same name is // created, it gets a different unique_id. string unique_id = 11 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The current lifecycle state of this Hub. + State state = 15 [(google.api.field_behavior) = OUTPUT_ONLY]; } // Request for [HubService.ListHubs][google.cloud.networkconnectivity.v1alpha1.HubService.ListHubs] method. @@ -526,3 +533,19 @@ message RouterApplianceInstance { string network_interface = 2 [deprecated = true]; } + +// The State enum represents the lifecycle of a Network Connectivity Center +// resource. +enum State { + // No state information available + STATE_UNSPECIFIED = 0; + + // The resource's create operation is in progress + CREATING = 1; + + // The resource is active + ACTIVE = 2; + + // The resource's Delete operation is in progress + DELETING = 3; +} diff --git a/synth.metadata b/synth.metadata index de32b619..86f1052c 100644 --- a/synth.metadata +++ b/synth.metadata @@ -4,15 +4,15 @@ "git": { "name": ".", "remote": "https://github.com/googleapis/java-networkconnectivity.git", - "sha": "56f65f8ee82e888e3154d70d3911e3d80d972648" + "sha": "1bec5bc4c6aff314bcf824286e73c7b70457d855" } }, { "git": { "name": "googleapis", "remote": "https://github.com/googleapis/googleapis.git", - "sha": "9e209af3c49d23b4169a16948165c3307abeb43a", - "internalRef": "351886920" + "sha": "5e27c5cafe0952f50ff81552526b3e3d333ef2c3", + "internalRef": "355488930" } }, { @@ -149,6 +149,7 @@ "proto-google-cloud-networkconnectivity-v1alpha1/src/main/java/com/google/cloud/networkconnectivity/v1alpha1/Spoke.java", "proto-google-cloud-networkconnectivity-v1alpha1/src/main/java/com/google/cloud/networkconnectivity/v1alpha1/SpokeName.java", "proto-google-cloud-networkconnectivity-v1alpha1/src/main/java/com/google/cloud/networkconnectivity/v1alpha1/SpokeOrBuilder.java", + "proto-google-cloud-networkconnectivity-v1alpha1/src/main/java/com/google/cloud/networkconnectivity/v1alpha1/State.java", "proto-google-cloud-networkconnectivity-v1alpha1/src/main/java/com/google/cloud/networkconnectivity/v1alpha1/UpdateHubRequest.java", "proto-google-cloud-networkconnectivity-v1alpha1/src/main/java/com/google/cloud/networkconnectivity/v1alpha1/UpdateHubRequestOrBuilder.java", "proto-google-cloud-networkconnectivity-v1alpha1/src/main/java/com/google/cloud/networkconnectivity/v1alpha1/UpdateSpokeRequest.java", From d2f400f5f8beb82ebbcfd29ab2f278bff68c6888 Mon Sep 17 00:00:00 2001 From: Neenu1995 Date: Tue, 16 Feb 2021 15:00:22 -0500 Subject: [PATCH 2/2] fix: add clirr-ignored-differences file for breaking changes --- .../clirr-ignored-differences.xml | 34 +++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 proto-google-cloud-networkconnectivity-v1alpha1/clirr-ignored-differences.xml diff --git a/proto-google-cloud-networkconnectivity-v1alpha1/clirr-ignored-differences.xml b/proto-google-cloud-networkconnectivity-v1alpha1/clirr-ignored-differences.xml new file mode 100644 index 00000000..b92c26e2 --- /dev/null +++ b/proto-google-cloud-networkconnectivity-v1alpha1/clirr-ignored-differences.xml @@ -0,0 +1,34 @@ + + + + + + + com/google/cloud/networkconnectivity/v1alpha1/HubOrBuilder + + 7012 + * getState() + + + + com/google/cloud/networkconnectivity/v1alpha1/HubOrBuilder + + 7012 + * getStateValue() + + + + + com/google/cloud/networkconnectivity/v1alpha1/SpokeOrBuilder + + 7012 + * getState() + + + + com/google/cloud/networkconnectivity/v1alpha1/SpokeOrBuilder + + 7012 + * getStateValue() + + \ No newline at end of file