Package com.google.cloud.apihub.v1
The interfaces provided are listed below, along with usage samples.
======================= ApiHubClient =======================
Service Description: This service provides all methods related to the API hub.
Sample for ApiHubClient:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (ApiHubClient apiHubClient = ApiHubClient.create()) {
LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
Api api = Api.newBuilder().build();
String apiId = "apiId93021397";
Api response = apiHubClient.createApi(parent, api, apiId);
}
======================= ApiHubDependenciesClient =======================
Service Description: This service provides methods for various operations related to a [Dependency][google.cloud.apihub.v1.Dependency] in the API hub.
Sample for ApiHubDependenciesClient:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (ApiHubDependenciesClient apiHubDependenciesClient = ApiHubDependenciesClient.create()) {
LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
Dependency dependency = Dependency.newBuilder().build();
String dependencyId = "dependencyId503788998";
Dependency response =
apiHubDependenciesClient.createDependency(parent, dependency, dependencyId);
}
======================= ApiHubCollectClient =======================
Service Description: This service exposes methods used for collecting various types of data from different first party and third party sources and push it to Hub's collect layer.
Sample for ApiHubCollectClient:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (ApiHubCollectClient apiHubCollectClient = ApiHubCollectClient.create()) {
GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build();
Location response = apiHubCollectClient.getLocation(request);
}
======================= ApiHubCurateClient =======================
Service Description: This service is used for managing curations for processing API data consumed from collect layer.
Sample for ApiHubCurateClient:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (ApiHubCurateClient apiHubCurateClient = ApiHubCurateClient.create()) {
LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
Curation curation = Curation.newBuilder().build();
String curationId = "curationId1428017328";
Curation response = apiHubCurateClient.createCuration(parent, curation, curationId);
}
======================= ApiHubDiscoveryClient =======================
Service Description: This service exposes methods used to manage DiscoveredApiObservations and DiscoveredApiOperations.
Sample for ApiHubDiscoveryClient:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (ApiHubDiscoveryClient apiHubDiscoveryClient = ApiHubDiscoveryClient.create()) {
DiscoveredApiObservationName name =
DiscoveredApiObservationName.of(
"[PROJECT]", "[LOCATION]", "[DISCOVERED_API_OBSERVATION]");
DiscoveredApiObservation response = apiHubDiscoveryClient.getDiscoveredApiObservation(name);
}
======================= HostProjectRegistrationServiceClient =======================
Service Description: This service is used for managing the host project registrations.
Sample for HostProjectRegistrationServiceClient:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (HostProjectRegistrationServiceClient hostProjectRegistrationServiceClient =
HostProjectRegistrationServiceClient.create()) {
LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
HostProjectRegistration hostProjectRegistration =
HostProjectRegistration.newBuilder().build();
String hostProjectRegistrationId = "hostProjectRegistrationId1352651365";
HostProjectRegistration response =
hostProjectRegistrationServiceClient.createHostProjectRegistration(
parent, hostProjectRegistration, hostProjectRegistrationId);
}
======================= LintingServiceClient =======================
Service Description: This service provides all methods related to the 1p Linter.
Sample for LintingServiceClient:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (LintingServiceClient lintingServiceClient = LintingServiceClient.create()) {
StyleGuideName name = StyleGuideName.of("[PROJECT]", "[LOCATION]", "[PLUGIN]");
StyleGuide response = lintingServiceClient.getStyleGuide(name);
}
======================= ApiHubPluginClient =======================
Service Description: This service is used for managing plugins inside the API Hub.
Sample for ApiHubPluginClient:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (ApiHubPluginClient apiHubPluginClient = ApiHubPluginClient.create()) {
PluginName name = PluginName.of("[PROJECT]", "[LOCATION]", "[PLUGIN]");
Plugin response = apiHubPluginClient.getPlugin(name);
}
======================= ProvisioningClient =======================
Service Description: This service is used for managing the data plane provisioning of the API hub.
Sample for ProvisioningClient:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (ProvisioningClient provisioningClient = ProvisioningClient.create()) {
ApiHubInstanceName name =
ApiHubInstanceName.of("[PROJECT]", "[LOCATION]", "[API_HUB_INSTANCE]");
ApiHubInstance response = provisioningClient.getApiHubInstance(name);
}
======================= RuntimeProjectAttachmentServiceClient =======================
Service Description: This service is used for managing the runtime project attachments.
Sample for RuntimeProjectAttachmentServiceClient:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (RuntimeProjectAttachmentServiceClient runtimeProjectAttachmentServiceClient =
RuntimeProjectAttachmentServiceClient.create()) {
LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
RuntimeProjectAttachment runtimeProjectAttachment =
RuntimeProjectAttachment.newBuilder().build();
String runtimeProjectAttachmentId = "runtimeProjectAttachmentId-753213345";
RuntimeProjectAttachment response =
runtimeProjectAttachmentServiceClient.createRuntimeProjectAttachment(
parent, runtimeProjectAttachment, runtimeProjectAttachmentId);
}
-
ClassesClassDescriptionService Description: This service provides all methods related to the API hub.Service Description: This service exposes methods used for collecting various types of data from different first party and third party sources and push it to Hub's collect layer.Settings class to configure an instance of
ApiHubCollectClient.Builder for ApiHubCollectSettings.Service Description: This service is used for managing curations for processing API data consumed from collect layer.Settings class to configure an instance ofApiHubCurateClient.Builder for ApiHubCurateSettings.Service Description: This service provides methods for various operations related to a [Dependency][google.cloud.apihub.v1.Dependency] in the API hub.Settings class to configure an instance ofApiHubDependenciesClient.Builder for ApiHubDependenciesSettings.Service Description: This service exposes methods used to manage DiscoveredApiObservations and DiscoveredApiOperations.Settings class to configure an instance ofApiHubDiscoveryClient.Builder for ApiHubDiscoverySettings.Service Description: This service is used for managing plugins inside the API Hub.Settings class to configure an instance ofApiHubPluginClient.Builder for ApiHubPluginSettings.Settings class to configure an instance ofApiHubClient.Builder for ApiHubSettings.Service Description: This service is used for managing the host project registrations.Settings class to configure an instance ofHostProjectRegistrationServiceClient.Builder for HostProjectRegistrationServiceSettings.Service Description: This service provides all methods related to the 1p Linter.Settings class to configure an instance ofLintingServiceClient.Builder for LintingServiceSettings.Service Description: This service is used for managing the data plane provisioning of the API hub.Settings class to configure an instance ofProvisioningClient.Builder for ProvisioningSettings.Service Description: This service is used for managing the runtime project attachments.Settings class to configure an instance ofRuntimeProjectAttachmentServiceClient.Builder for RuntimeProjectAttachmentServiceSettings.