Skip to content
This repository has been archived by the owner on Oct 2, 2023. It is now read-only.

Commit

Permalink
feat: generate sample code in the Java microgenerator
Browse files Browse the repository at this point in the history
Committer: @miraleung
PiperOrigin-RevId: 356341083

Source-Author: Google APIs <noreply@google.com>
Source-Date: Mon Feb 8 13:33:28 2021 -0800
Source-Repo: googleapis/googleapis
Source-Sha: 8d8c008e56f1af31d57f75561e0f1848ffb29eeb
Source-Link: googleapis/googleapis@8d8c008
  • Loading branch information
yoshi-automation committed Feb 9, 2021
1 parent 7e18498 commit c53c8ab
Show file tree
Hide file tree
Showing 8 changed files with 3,118 additions and 3 deletions.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,14 @@
*
* <p>Sample for AlertPolicyServiceClient:
*
* <pre>{@code
* try (AlertPolicyServiceClient alertPolicyServiceClient = AlertPolicyServiceClient.create()) {
* AlertPolicyName name =
* AlertPolicyName.ofProjectAlertPolicyName("[PROJECT]", "[ALERT_POLICY]");
* AlertPolicy response = alertPolicyServiceClient.getAlertPolicy(name);
* }
* }</pre>
*
* <p>======================= GroupServiceClient =======================
*
* <p>Service Description: The Group API lets you inspect and manage your
Expand All @@ -42,20 +50,48 @@
*
* <p>Sample for GroupServiceClient:
*
* <pre>{@code
* try (GroupServiceClient groupServiceClient = GroupServiceClient.create()) {
* GroupName name = GroupName.ofProjectGroupName("[PROJECT]", "[GROUP]");
* Group response = groupServiceClient.getGroup(name);
* }
* }</pre>
*
* <p>======================= MetricServiceClient =======================
*
* <p>Service Description: Manages metric descriptors, monitored resource descriptors, and time
* series data.
*
* <p>Sample for MetricServiceClient:
*
* <pre>{@code
* try (MetricServiceClient metricServiceClient = MetricServiceClient.create()) {
* MonitoredResourceDescriptorName name =
* MonitoredResourceDescriptorName.ofProjectMonitoredResourceDescriptorName(
* "[PROJECT]", "[MONITORED_RESOURCE_DESCRIPTOR]");
* MonitoredResourceDescriptor response =
* metricServiceClient.getMonitoredResourceDescriptor(name);
* }
* }</pre>
*
* <p>======================= NotificationChannelServiceClient =======================
*
* <p>Service Description: The Notification Channel API provides access to configuration that
* controls how messages related to incidents are sent.
*
* <p>Sample for NotificationChannelServiceClient:
*
* <pre>{@code
* try (NotificationChannelServiceClient notificationChannelServiceClient =
* NotificationChannelServiceClient.create()) {
* NotificationChannelDescriptorName name =
* NotificationChannelDescriptorName.ofProjectChannelDescriptorName(
* "[PROJECT]", "[CHANNEL_DESCRIPTOR]");
* NotificationChannelDescriptor response =
* notificationChannelServiceClient.getNotificationChannelDescriptor(name);
* }
* }</pre>
*
* <p>======================= ServiceMonitoringServiceClient =======================
*
* <p>Service Description: The Cloud Monitoring Service-Oriented Monitoring API has endpoints for
Expand All @@ -64,6 +100,15 @@
*
* <p>Sample for ServiceMonitoringServiceClient:
*
* <pre>{@code
* try (ServiceMonitoringServiceClient serviceMonitoringServiceClient =
* ServiceMonitoringServiceClient.create()) {
* FolderName parent = FolderName.of("[FOLDER]");
* Service service = Service.newBuilder().build();
* Service response = serviceMonitoringServiceClient.createService(parent, service);
* }
* }</pre>
*
* <p>======================= UptimeCheckServiceClient =======================
*
* <p>Service Description: The UptimeCheckService API is used to manage (list, create, delete, edit)
Expand All @@ -74,6 +119,15 @@
* the left-hand side to navigate to Stackdriver, and then clicking on "Uptime".
*
* <p>Sample for UptimeCheckServiceClient:
*
* <pre>{@code
* try (UptimeCheckServiceClient uptimeCheckServiceClient = UptimeCheckServiceClient.create()) {
* UptimeCheckConfigName name =
* UptimeCheckConfigName.ofProjectUptimeCheckConfigName(
* "[PROJECT]", "[UPTIME_CHECK_CONFIG]");
* UptimeCheckConfig response = uptimeCheckServiceClient.getUptimeCheckConfig(name);
* }
* }</pre>
*/
@Generated("by gapic-generator-java")
package com.google.cloud.monitoring.v3;
Expand Down
6 changes: 3 additions & 3 deletions synth.metadata
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,15 @@
"git": {
"name": ".",
"remote": "https://github.com/googleapis/java-monitoring.git",
"sha": "e3cb4e23d62434a80f87ca603e6fb1df0646c9d4"
"sha": "7e18498926d3c87d5f67b2db5c41be61f0d55084"
}
},
{
"git": {
"name": "googleapis",
"remote": "https://github.com/googleapis/googleapis.git",
"sha": "ceaaf31b3d13badab7cf9d3b570f5639db5593d9",
"internalRef": "352816749"
"sha": "8d8c008e56f1af31d57f75561e0f1848ffb29eeb",
"internalRef": "356341083"
}
},
{
Expand Down

0 comments on commit c53c8ab

Please sign in to comment.