Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: [networkconnectivity] add Network Connectivity Center APIs related to VPC spokes #9927

Merged
merged 4 commits into from Oct 10, 2023
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.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion java-networkconnectivity/README.md
Expand Up @@ -195,7 +195,7 @@ Java is a registered trademark of Oracle and/or its affiliates.
[kokoro-badge-link-5]: http://storage.googleapis.com/cloud-devrel-public/java/badges/google-cloud-java/java11.html
[stability-image]: https://img.shields.io/badge/stability-stable-green
[maven-version-image]: https://img.shields.io/maven-central/v/com.google.cloud/google-cloud-networkconnectivity.svg
[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-networkconnectivity/1.23.0
[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-networkconnectivity/1.26.0
[authentication]: https://github.com/googleapis/google-cloud-java#authentication
[auth-scopes]: https://developers.google.com/identity/protocols/oauth2/scopes
[predefined-iam-roles]: https://cloud.google.com/iam/docs/understanding-roles#predefined_roles
Expand Down
Expand Up @@ -65,6 +65,18 @@
<groupId>org.threeten</groupId>
<artifactId>threetenbp</artifactId>
</dependency>
<dependency>
<groupId>com.google.api.grpc</groupId>
<artifactId>proto-google-iam-v1</artifactId>
</dependency>
<dependency>
<groupId>com.google.api.grpc</groupId>
<artifactId>grpc-google-iam-v1</artifactId>
</dependency>
<dependency>
<groupId>com.google.api.grpc</groupId>
<artifactId>grpc-google-common-protos</artifactId>
</dependency>

<!-- Test dependencies -->
<dependency>
Expand Down

Large diffs are not rendered by default.

Expand Up @@ -16,7 +16,12 @@

package com.google.cloud.networkconnectivity.v1;

import static com.google.cloud.networkconnectivity.v1.HubServiceClient.ListGroupsPagedResponse;
import static com.google.cloud.networkconnectivity.v1.HubServiceClient.ListHubSpokesPagedResponse;
import static com.google.cloud.networkconnectivity.v1.HubServiceClient.ListHubsPagedResponse;
import static com.google.cloud.networkconnectivity.v1.HubServiceClient.ListLocationsPagedResponse;
import static com.google.cloud.networkconnectivity.v1.HubServiceClient.ListRouteTablesPagedResponse;
import static com.google.cloud.networkconnectivity.v1.HubServiceClient.ListRoutesPagedResponse;
import static com.google.cloud.networkconnectivity.v1.HubServiceClient.ListSpokesPagedResponse;

import com.google.api.core.ApiFunction;
Expand All @@ -31,7 +36,16 @@
import com.google.api.gax.rpc.PagedCallSettings;
import com.google.api.gax.rpc.TransportChannelProvider;
import com.google.api.gax.rpc.UnaryCallSettings;
import com.google.cloud.location.GetLocationRequest;
import com.google.cloud.location.ListLocationsRequest;
import com.google.cloud.location.ListLocationsResponse;
import com.google.cloud.location.Location;
import com.google.cloud.networkconnectivity.v1.stub.HubServiceStubSettings;
import com.google.iam.v1.GetIamPolicyRequest;
import com.google.iam.v1.Policy;
import com.google.iam.v1.SetIamPolicyRequest;
import com.google.iam.v1.TestIamPermissionsRequest;
import com.google.iam.v1.TestIamPermissionsResponse;
import com.google.longrunning.Operation;
import com.google.protobuf.Empty;
import java.io.IOException;
Expand Down Expand Up @@ -122,6 +136,12 @@ public UnaryCallSettings<DeleteHubRequest, Operation> deleteHubSettings() {
return ((HubServiceStubSettings) getStubSettings()).deleteHubOperationSettings();
}

/** Returns the object with the settings used for calls to listHubSpokes. */
public PagedCallSettings<ListHubSpokesRequest, ListHubSpokesResponse, ListHubSpokesPagedResponse>
listHubSpokesSettings() {
return ((HubServiceStubSettings) getStubSettings()).listHubSpokesSettings();
}

/** Returns the object with the settings used for calls to listSpokes. */
public PagedCallSettings<ListSpokesRequest, ListSpokesResponse, ListSpokesPagedResponse>
listSpokesSettings() {
Expand Down Expand Up @@ -155,6 +175,28 @@ public UnaryCallSettings<UpdateSpokeRequest, Operation> updateSpokeSettings() {
return ((HubServiceStubSettings) getStubSettings()).updateSpokeOperationSettings();
}

/** Returns the object with the settings used for calls to rejectHubSpoke. */
public UnaryCallSettings<RejectHubSpokeRequest, Operation> rejectHubSpokeSettings() {
return ((HubServiceStubSettings) getStubSettings()).rejectHubSpokeSettings();
}

/** Returns the object with the settings used for calls to rejectHubSpoke. */
public OperationCallSettings<RejectHubSpokeRequest, RejectHubSpokeResponse, OperationMetadata>
rejectHubSpokeOperationSettings() {
return ((HubServiceStubSettings) getStubSettings()).rejectHubSpokeOperationSettings();
}

/** Returns the object with the settings used for calls to acceptHubSpoke. */
public UnaryCallSettings<AcceptHubSpokeRequest, Operation> acceptHubSpokeSettings() {
return ((HubServiceStubSettings) getStubSettings()).acceptHubSpokeSettings();
}

/** Returns the object with the settings used for calls to acceptHubSpoke. */
public OperationCallSettings<AcceptHubSpokeRequest, AcceptHubSpokeResponse, OperationMetadata>
acceptHubSpokeOperationSettings() {
return ((HubServiceStubSettings) getStubSettings()).acceptHubSpokeOperationSettings();
}

/** Returns the object with the settings used for calls to deleteSpoke. */
public UnaryCallSettings<DeleteSpokeRequest, Operation> deleteSpokeSettings() {
return ((HubServiceStubSettings) getStubSettings()).deleteSpokeSettings();
Expand All @@ -166,6 +208,67 @@ public UnaryCallSettings<DeleteSpokeRequest, Operation> deleteSpokeSettings() {
return ((HubServiceStubSettings) getStubSettings()).deleteSpokeOperationSettings();
}

/** Returns the object with the settings used for calls to getRouteTable. */
public UnaryCallSettings<GetRouteTableRequest, RouteTable> getRouteTableSettings() {
return ((HubServiceStubSettings) getStubSettings()).getRouteTableSettings();
}

/** Returns the object with the settings used for calls to getRoute. */
public UnaryCallSettings<GetRouteRequest, Route> getRouteSettings() {
return ((HubServiceStubSettings) getStubSettings()).getRouteSettings();
}

/** Returns the object with the settings used for calls to listRoutes. */
public PagedCallSettings<ListRoutesRequest, ListRoutesResponse, ListRoutesPagedResponse>
listRoutesSettings() {
return ((HubServiceStubSettings) getStubSettings()).listRoutesSettings();
}

/** Returns the object with the settings used for calls to listRouteTables. */
public PagedCallSettings<
ListRouteTablesRequest, ListRouteTablesResponse, ListRouteTablesPagedResponse>
listRouteTablesSettings() {
return ((HubServiceStubSettings) getStubSettings()).listRouteTablesSettings();
}

/** Returns the object with the settings used for calls to getGroup. */
public UnaryCallSettings<GetGroupRequest, Group> getGroupSettings() {
return ((HubServiceStubSettings) getStubSettings()).getGroupSettings();
}

/** Returns the object with the settings used for calls to listGroups. */
public PagedCallSettings<ListGroupsRequest, ListGroupsResponse, ListGroupsPagedResponse>
listGroupsSettings() {
return ((HubServiceStubSettings) getStubSettings()).listGroupsSettings();
}

/** Returns the object with the settings used for calls to listLocations. */
public PagedCallSettings<ListLocationsRequest, ListLocationsResponse, ListLocationsPagedResponse>
listLocationsSettings() {
return ((HubServiceStubSettings) getStubSettings()).listLocationsSettings();
}

/** Returns the object with the settings used for calls to getLocation. */
public UnaryCallSettings<GetLocationRequest, Location> getLocationSettings() {
return ((HubServiceStubSettings) getStubSettings()).getLocationSettings();
}

/** Returns the object with the settings used for calls to setIamPolicy. */
public UnaryCallSettings<SetIamPolicyRequest, Policy> setIamPolicySettings() {
return ((HubServiceStubSettings) getStubSettings()).setIamPolicySettings();
}

/** Returns the object with the settings used for calls to getIamPolicy. */
public UnaryCallSettings<GetIamPolicyRequest, Policy> getIamPolicySettings() {
return ((HubServiceStubSettings) getStubSettings()).getIamPolicySettings();
}

/** Returns the object with the settings used for calls to testIamPermissions. */
public UnaryCallSettings<TestIamPermissionsRequest, TestIamPermissionsResponse>
testIamPermissionsSettings() {
return ((HubServiceStubSettings) getStubSettings()).testIamPermissionsSettings();
}

public static final HubServiceSettings create(HubServiceStubSettings stub) throws IOException {
return new HubServiceSettings.Builder(stub.toBuilder()).build();
}
Expand Down Expand Up @@ -306,6 +409,13 @@ public UnaryCallSettings.Builder<DeleteHubRequest, Operation> deleteHubSettings(
return getStubSettingsBuilder().deleteHubOperationSettings();
}

/** Returns the builder for the settings used for calls to listHubSpokes. */
public PagedCallSettings.Builder<
ListHubSpokesRequest, ListHubSpokesResponse, ListHubSpokesPagedResponse>
listHubSpokesSettings() {
return getStubSettingsBuilder().listHubSpokesSettings();
}

/** Returns the builder for the settings used for calls to listSpokes. */
public PagedCallSettings.Builder<ListSpokesRequest, ListSpokesResponse, ListSpokesPagedResponse>
listSpokesSettings() {
Expand Down Expand Up @@ -339,6 +449,30 @@ public UnaryCallSettings.Builder<UpdateSpokeRequest, Operation> updateSpokeSetti
return getStubSettingsBuilder().updateSpokeOperationSettings();
}

/** Returns the builder for the settings used for calls to rejectHubSpoke. */
public UnaryCallSettings.Builder<RejectHubSpokeRequest, Operation> rejectHubSpokeSettings() {
return getStubSettingsBuilder().rejectHubSpokeSettings();
}

/** Returns the builder for the settings used for calls to rejectHubSpoke. */
public OperationCallSettings.Builder<
RejectHubSpokeRequest, RejectHubSpokeResponse, OperationMetadata>
rejectHubSpokeOperationSettings() {
return getStubSettingsBuilder().rejectHubSpokeOperationSettings();
}

/** Returns the builder for the settings used for calls to acceptHubSpoke. */
public UnaryCallSettings.Builder<AcceptHubSpokeRequest, Operation> acceptHubSpokeSettings() {
return getStubSettingsBuilder().acceptHubSpokeSettings();
}

/** Returns the builder for the settings used for calls to acceptHubSpoke. */
public OperationCallSettings.Builder<
AcceptHubSpokeRequest, AcceptHubSpokeResponse, OperationMetadata>
acceptHubSpokeOperationSettings() {
return getStubSettingsBuilder().acceptHubSpokeOperationSettings();
}

/** Returns the builder for the settings used for calls to deleteSpoke. */
public UnaryCallSettings.Builder<DeleteSpokeRequest, Operation> deleteSpokeSettings() {
return getStubSettingsBuilder().deleteSpokeSettings();
Expand All @@ -350,6 +484,68 @@ public UnaryCallSettings.Builder<DeleteSpokeRequest, Operation> deleteSpokeSetti
return getStubSettingsBuilder().deleteSpokeOperationSettings();
}

/** Returns the builder for the settings used for calls to getRouteTable. */
public UnaryCallSettings.Builder<GetRouteTableRequest, RouteTable> getRouteTableSettings() {
return getStubSettingsBuilder().getRouteTableSettings();
}

/** Returns the builder for the settings used for calls to getRoute. */
public UnaryCallSettings.Builder<GetRouteRequest, Route> getRouteSettings() {
return getStubSettingsBuilder().getRouteSettings();
}

/** Returns the builder for the settings used for calls to listRoutes. */
public PagedCallSettings.Builder<ListRoutesRequest, ListRoutesResponse, ListRoutesPagedResponse>
listRoutesSettings() {
return getStubSettingsBuilder().listRoutesSettings();
}

/** Returns the builder for the settings used for calls to listRouteTables. */
public PagedCallSettings.Builder<
ListRouteTablesRequest, ListRouteTablesResponse, ListRouteTablesPagedResponse>
listRouteTablesSettings() {
return getStubSettingsBuilder().listRouteTablesSettings();
}

/** Returns the builder for the settings used for calls to getGroup. */
public UnaryCallSettings.Builder<GetGroupRequest, Group> getGroupSettings() {
return getStubSettingsBuilder().getGroupSettings();
}

/** Returns the builder for the settings used for calls to listGroups. */
public PagedCallSettings.Builder<ListGroupsRequest, ListGroupsResponse, ListGroupsPagedResponse>
listGroupsSettings() {
return getStubSettingsBuilder().listGroupsSettings();
}

/** Returns the builder for the settings used for calls to listLocations. */
public PagedCallSettings.Builder<
ListLocationsRequest, ListLocationsResponse, ListLocationsPagedResponse>
listLocationsSettings() {
return getStubSettingsBuilder().listLocationsSettings();
}

/** Returns the builder for the settings used for calls to getLocation. */
public UnaryCallSettings.Builder<GetLocationRequest, Location> getLocationSettings() {
return getStubSettingsBuilder().getLocationSettings();
}

/** Returns the builder for the settings used for calls to setIamPolicy. */
public UnaryCallSettings.Builder<SetIamPolicyRequest, Policy> setIamPolicySettings() {
return getStubSettingsBuilder().setIamPolicySettings();
}

/** Returns the builder for the settings used for calls to getIamPolicy. */
public UnaryCallSettings.Builder<GetIamPolicyRequest, Policy> getIamPolicySettings() {
return getStubSettingsBuilder().getIamPolicySettings();
}

/** Returns the builder for the settings used for calls to testIamPermissions. */
public UnaryCallSettings.Builder<TestIamPermissionsRequest, TestIamPermissionsResponse>
testIamPermissionsSettings() {
return getStubSettingsBuilder().testIamPermissionsSettings();
}

@Override
public HubServiceSettings build() throws IOException {
return new HubServiceSettings(this);
Expand Down