|
54 | 54 | * <pre>
|
55 | 55 | * <code>
|
56 | 56 | * try (ConnectionServiceClient connectionServiceClient = ConnectionServiceClient.create()) {
|
57 |
| - * LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); |
58 |
| - * Connection connection = Connection.newBuilder().build(); |
59 |
| - * String connectionId = ""; |
60 |
| - * Connection response = connectionServiceClient.createConnection(parent, connection, connectionId); |
| 57 | + * ConnectionName name = ConnectionName.of("[PROJECT]", "[LOCATION]", "[CONNECTION]"); |
| 58 | + * connectionServiceClient.deleteConnection(name); |
61 | 59 | * }
|
62 | 60 | * </code>
|
63 | 61 | * </pre>
|
@@ -167,6 +165,96 @@ public ConnectionServiceStub getStub() {
|
167 | 165 | return stub;
|
168 | 166 | }
|
169 | 167 |
|
| 168 | + // AUTO-GENERATED DOCUMENTATION AND METHOD |
| 169 | + /** |
| 170 | + * Deletes connection and associated credential. |
| 171 | + * |
| 172 | + * <p>Sample code: |
| 173 | + * |
| 174 | + * <pre><code> |
| 175 | + * try (ConnectionServiceClient connectionServiceClient = ConnectionServiceClient.create()) { |
| 176 | + * ConnectionName name = ConnectionName.of("[PROJECT]", "[LOCATION]", "[CONNECTION]"); |
| 177 | + * connectionServiceClient.deleteConnection(name); |
| 178 | + * } |
| 179 | + * </code></pre> |
| 180 | + * |
| 181 | + * @param name Required. Name of the deleted connection, for example: |
| 182 | + * `projects/{project_id}/locations/{location_id}/connections/{connection_id}` |
| 183 | + * @throws com.google.api.gax.rpc.ApiException if the remote call fails |
| 184 | + */ |
| 185 | + public final void deleteConnection(ConnectionName name) { |
| 186 | + DeleteConnectionRequest request = |
| 187 | + DeleteConnectionRequest.newBuilder().setName(name == null ? null : name.toString()).build(); |
| 188 | + deleteConnection(request); |
| 189 | + } |
| 190 | + |
| 191 | + // AUTO-GENERATED DOCUMENTATION AND METHOD |
| 192 | + /** |
| 193 | + * Deletes connection and associated credential. |
| 194 | + * |
| 195 | + * <p>Sample code: |
| 196 | + * |
| 197 | + * <pre><code> |
| 198 | + * try (ConnectionServiceClient connectionServiceClient = ConnectionServiceClient.create()) { |
| 199 | + * ConnectionName name = ConnectionName.of("[PROJECT]", "[LOCATION]", "[CONNECTION]"); |
| 200 | + * connectionServiceClient.deleteConnection(name.toString()); |
| 201 | + * } |
| 202 | + * </code></pre> |
| 203 | + * |
| 204 | + * @param name Required. Name of the deleted connection, for example: |
| 205 | + * `projects/{project_id}/locations/{location_id}/connections/{connection_id}` |
| 206 | + * @throws com.google.api.gax.rpc.ApiException if the remote call fails |
| 207 | + */ |
| 208 | + public final void deleteConnection(String name) { |
| 209 | + DeleteConnectionRequest request = DeleteConnectionRequest.newBuilder().setName(name).build(); |
| 210 | + deleteConnection(request); |
| 211 | + } |
| 212 | + |
| 213 | + // AUTO-GENERATED DOCUMENTATION AND METHOD |
| 214 | + /** |
| 215 | + * Deletes connection and associated credential. |
| 216 | + * |
| 217 | + * <p>Sample code: |
| 218 | + * |
| 219 | + * <pre><code> |
| 220 | + * try (ConnectionServiceClient connectionServiceClient = ConnectionServiceClient.create()) { |
| 221 | + * ConnectionName name = ConnectionName.of("[PROJECT]", "[LOCATION]", "[CONNECTION]"); |
| 222 | + * DeleteConnectionRequest request = DeleteConnectionRequest.newBuilder() |
| 223 | + * .setName(name.toString()) |
| 224 | + * .build(); |
| 225 | + * connectionServiceClient.deleteConnection(request); |
| 226 | + * } |
| 227 | + * </code></pre> |
| 228 | + * |
| 229 | + * @param request The request object containing all of the parameters for the API call. |
| 230 | + * @throws com.google.api.gax.rpc.ApiException if the remote call fails |
| 231 | + */ |
| 232 | + public final void deleteConnection(DeleteConnectionRequest request) { |
| 233 | + deleteConnectionCallable().call(request); |
| 234 | + } |
| 235 | + |
| 236 | + // AUTO-GENERATED DOCUMENTATION AND METHOD |
| 237 | + /** |
| 238 | + * Deletes connection and associated credential. |
| 239 | + * |
| 240 | + * <p>Sample code: |
| 241 | + * |
| 242 | + * <pre><code> |
| 243 | + * try (ConnectionServiceClient connectionServiceClient = ConnectionServiceClient.create()) { |
| 244 | + * ConnectionName name = ConnectionName.of("[PROJECT]", "[LOCATION]", "[CONNECTION]"); |
| 245 | + * DeleteConnectionRequest request = DeleteConnectionRequest.newBuilder() |
| 246 | + * .setName(name.toString()) |
| 247 | + * .build(); |
| 248 | + * ApiFuture<Void> future = connectionServiceClient.deleteConnectionCallable().futureCall(request); |
| 249 | + * // Do something |
| 250 | + * future.get(); |
| 251 | + * } |
| 252 | + * </code></pre> |
| 253 | + */ |
| 254 | + public final UnaryCallable<DeleteConnectionRequest, Empty> deleteConnectionCallable() { |
| 255 | + return stub.deleteConnectionCallable(); |
| 256 | + } |
| 257 | + |
170 | 258 | // AUTO-GENERATED DOCUMENTATION AND METHOD
|
171 | 259 | /**
|
172 | 260 | * Creates a new connection.
|
@@ -673,96 +761,6 @@ public final void updateConnectionCredential(UpdateConnectionCredentialRequest r
|
673 | 761 | return stub.updateConnectionCredentialCallable();
|
674 | 762 | }
|
675 | 763 |
|
676 |
| - // AUTO-GENERATED DOCUMENTATION AND METHOD |
677 |
| - /** |
678 |
| - * Deletes connection and associated credential. |
679 |
| - * |
680 |
| - * <p>Sample code: |
681 |
| - * |
682 |
| - * <pre><code> |
683 |
| - * try (ConnectionServiceClient connectionServiceClient = ConnectionServiceClient.create()) { |
684 |
| - * ConnectionName name = ConnectionName.of("[PROJECT]", "[LOCATION]", "[CONNECTION]"); |
685 |
| - * connectionServiceClient.deleteConnection(name); |
686 |
| - * } |
687 |
| - * </code></pre> |
688 |
| - * |
689 |
| - * @param name Required. Name of the deleted connection, for example: |
690 |
| - * `projects/{project_id}/locations/{location_id}/connections/{connection_id}` |
691 |
| - * @throws com.google.api.gax.rpc.ApiException if the remote call fails |
692 |
| - */ |
693 |
| - public final void deleteConnection(ConnectionName name) { |
694 |
| - DeleteConnectionRequest request = |
695 |
| - DeleteConnectionRequest.newBuilder().setName(name == null ? null : name.toString()).build(); |
696 |
| - deleteConnection(request); |
697 |
| - } |
698 |
| - |
699 |
| - // AUTO-GENERATED DOCUMENTATION AND METHOD |
700 |
| - /** |
701 |
| - * Deletes connection and associated credential. |
702 |
| - * |
703 |
| - * <p>Sample code: |
704 |
| - * |
705 |
| - * <pre><code> |
706 |
| - * try (ConnectionServiceClient connectionServiceClient = ConnectionServiceClient.create()) { |
707 |
| - * ConnectionName name = ConnectionName.of("[PROJECT]", "[LOCATION]", "[CONNECTION]"); |
708 |
| - * connectionServiceClient.deleteConnection(name.toString()); |
709 |
| - * } |
710 |
| - * </code></pre> |
711 |
| - * |
712 |
| - * @param name Required. Name of the deleted connection, for example: |
713 |
| - * `projects/{project_id}/locations/{location_id}/connections/{connection_id}` |
714 |
| - * @throws com.google.api.gax.rpc.ApiException if the remote call fails |
715 |
| - */ |
716 |
| - public final void deleteConnection(String name) { |
717 |
| - DeleteConnectionRequest request = DeleteConnectionRequest.newBuilder().setName(name).build(); |
718 |
| - deleteConnection(request); |
719 |
| - } |
720 |
| - |
721 |
| - // AUTO-GENERATED DOCUMENTATION AND METHOD |
722 |
| - /** |
723 |
| - * Deletes connection and associated credential. |
724 |
| - * |
725 |
| - * <p>Sample code: |
726 |
| - * |
727 |
| - * <pre><code> |
728 |
| - * try (ConnectionServiceClient connectionServiceClient = ConnectionServiceClient.create()) { |
729 |
| - * ConnectionName name = ConnectionName.of("[PROJECT]", "[LOCATION]", "[CONNECTION]"); |
730 |
| - * DeleteConnectionRequest request = DeleteConnectionRequest.newBuilder() |
731 |
| - * .setName(name.toString()) |
732 |
| - * .build(); |
733 |
| - * connectionServiceClient.deleteConnection(request); |
734 |
| - * } |
735 |
| - * </code></pre> |
736 |
| - * |
737 |
| - * @param request The request object containing all of the parameters for the API call. |
738 |
| - * @throws com.google.api.gax.rpc.ApiException if the remote call fails |
739 |
| - */ |
740 |
| - public final void deleteConnection(DeleteConnectionRequest request) { |
741 |
| - deleteConnectionCallable().call(request); |
742 |
| - } |
743 |
| - |
744 |
| - // AUTO-GENERATED DOCUMENTATION AND METHOD |
745 |
| - /** |
746 |
| - * Deletes connection and associated credential. |
747 |
| - * |
748 |
| - * <p>Sample code: |
749 |
| - * |
750 |
| - * <pre><code> |
751 |
| - * try (ConnectionServiceClient connectionServiceClient = ConnectionServiceClient.create()) { |
752 |
| - * ConnectionName name = ConnectionName.of("[PROJECT]", "[LOCATION]", "[CONNECTION]"); |
753 |
| - * DeleteConnectionRequest request = DeleteConnectionRequest.newBuilder() |
754 |
| - * .setName(name.toString()) |
755 |
| - * .build(); |
756 |
| - * ApiFuture<Void> future = connectionServiceClient.deleteConnectionCallable().futureCall(request); |
757 |
| - * // Do something |
758 |
| - * future.get(); |
759 |
| - * } |
760 |
| - * </code></pre> |
761 |
| - */ |
762 |
| - public final UnaryCallable<DeleteConnectionRequest, Empty> deleteConnectionCallable() { |
763 |
| - return stub.deleteConnectionCallable(); |
764 |
| - } |
765 |
| - |
766 | 764 | // AUTO-GENERATED DOCUMENTATION AND METHOD
|
767 | 765 | /**
|
768 | 766 | * Gets the access control policy for a resource. Returns an empty policy if the resource exists
|
|
0 commit comments