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

Commit 66f4480

Browse files
docs: generate sample code in the Java microgenerator (#419)
This PR was generated using Autosynth. 🌈 Synth log will be available here: https://source.cloud.google.com/results/invocations/89565b2d-2643-4c84-a434-564a46601538/targets - [ ] To automatically regenerate this PR, check this box. PiperOrigin-RevId: 356341083 Source-Link: googleapis/googleapis@8d8c008
1 parent 7e18498 commit 66f4480

8 files changed

+3118
-3
lines changed

google-cloud-monitoring/src/main/java/com/google/cloud/monitoring/v3/AlertPolicyServiceClient.java

+319
Large diffs are not rendered by default.

google-cloud-monitoring/src/main/java/com/google/cloud/monitoring/v3/GroupServiceClient.java

+366
Large diffs are not rendered by default.

google-cloud-monitoring/src/main/java/com/google/cloud/monitoring/v3/MetricServiceClient.java

+606
Large diffs are not rendered by default.

google-cloud-monitoring/src/main/java/com/google/cloud/monitoring/v3/NotificationChannelServiceClient.java

+759
Large diffs are not rendered by default.

google-cloud-monitoring/src/main/java/com/google/cloud/monitoring/v3/ServiceMonitoringServiceClient.java

+622
Large diffs are not rendered by default.

google-cloud-monitoring/src/main/java/com/google/cloud/monitoring/v3/UptimeCheckServiceClient.java

+389
Large diffs are not rendered by default.

google-cloud-monitoring/src/main/java/com/google/cloud/monitoring/v3/package-info.java

+54
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,14 @@
2828
*
2929
* <p>Sample for AlertPolicyServiceClient:
3030
*
31+
* <pre>{@code
32+
* try (AlertPolicyServiceClient alertPolicyServiceClient = AlertPolicyServiceClient.create()) {
33+
* AlertPolicyName name =
34+
* AlertPolicyName.ofProjectAlertPolicyName("[PROJECT]", "[ALERT_POLICY]");
35+
* AlertPolicy response = alertPolicyServiceClient.getAlertPolicy(name);
36+
* }
37+
* }</pre>
38+
*
3139
* <p>======================= GroupServiceClient =======================
3240
*
3341
* <p>Service Description: The Group API lets you inspect and manage your
@@ -42,20 +50,48 @@
4250
*
4351
* <p>Sample for GroupServiceClient:
4452
*
53+
* <pre>{@code
54+
* try (GroupServiceClient groupServiceClient = GroupServiceClient.create()) {
55+
* GroupName name = GroupName.ofProjectGroupName("[PROJECT]", "[GROUP]");
56+
* Group response = groupServiceClient.getGroup(name);
57+
* }
58+
* }</pre>
59+
*
4560
* <p>======================= MetricServiceClient =======================
4661
*
4762
* <p>Service Description: Manages metric descriptors, monitored resource descriptors, and time
4863
* series data.
4964
*
5065
* <p>Sample for MetricServiceClient:
5166
*
67+
* <pre>{@code
68+
* try (MetricServiceClient metricServiceClient = MetricServiceClient.create()) {
69+
* MonitoredResourceDescriptorName name =
70+
* MonitoredResourceDescriptorName.ofProjectMonitoredResourceDescriptorName(
71+
* "[PROJECT]", "[MONITORED_RESOURCE_DESCRIPTOR]");
72+
* MonitoredResourceDescriptor response =
73+
* metricServiceClient.getMonitoredResourceDescriptor(name);
74+
* }
75+
* }</pre>
76+
*
5277
* <p>======================= NotificationChannelServiceClient =======================
5378
*
5479
* <p>Service Description: The Notification Channel API provides access to configuration that
5580
* controls how messages related to incidents are sent.
5681
*
5782
* <p>Sample for NotificationChannelServiceClient:
5883
*
84+
* <pre>{@code
85+
* try (NotificationChannelServiceClient notificationChannelServiceClient =
86+
* NotificationChannelServiceClient.create()) {
87+
* NotificationChannelDescriptorName name =
88+
* NotificationChannelDescriptorName.ofProjectChannelDescriptorName(
89+
* "[PROJECT]", "[CHANNEL_DESCRIPTOR]");
90+
* NotificationChannelDescriptor response =
91+
* notificationChannelServiceClient.getNotificationChannelDescriptor(name);
92+
* }
93+
* }</pre>
94+
*
5995
* <p>======================= ServiceMonitoringServiceClient =======================
6096
*
6197
* <p>Service Description: The Cloud Monitoring Service-Oriented Monitoring API has endpoints for
@@ -64,6 +100,15 @@
64100
*
65101
* <p>Sample for ServiceMonitoringServiceClient:
66102
*
103+
* <pre>{@code
104+
* try (ServiceMonitoringServiceClient serviceMonitoringServiceClient =
105+
* ServiceMonitoringServiceClient.create()) {
106+
* FolderName parent = FolderName.of("[FOLDER]");
107+
* Service service = Service.newBuilder().build();
108+
* Service response = serviceMonitoringServiceClient.createService(parent, service);
109+
* }
110+
* }</pre>
111+
*
67112
* <p>======================= UptimeCheckServiceClient =======================
68113
*
69114
* <p>Service Description: The UptimeCheckService API is used to manage (list, create, delete, edit)
@@ -74,6 +119,15 @@
74119
* the left-hand side to navigate to Stackdriver, and then clicking on "Uptime".
75120
*
76121
* <p>Sample for UptimeCheckServiceClient:
122+
*
123+
* <pre>{@code
124+
* try (UptimeCheckServiceClient uptimeCheckServiceClient = UptimeCheckServiceClient.create()) {
125+
* UptimeCheckConfigName name =
126+
* UptimeCheckConfigName.ofProjectUptimeCheckConfigName(
127+
* "[PROJECT]", "[UPTIME_CHECK_CONFIG]");
128+
* UptimeCheckConfig response = uptimeCheckServiceClient.getUptimeCheckConfig(name);
129+
* }
130+
* }</pre>
77131
*/
78132
@Generated("by gapic-generator-java")
79133
package com.google.cloud.monitoring.v3;

synth.metadata

+3-3
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,15 @@
44
"git": {
55
"name": ".",
66
"remote": "https://github.com/googleapis/java-monitoring.git",
7-
"sha": "e3cb4e23d62434a80f87ca603e6fb1df0646c9d4"
7+
"sha": "7e18498926d3c87d5f67b2db5c41be61f0d55084"
88
}
99
},
1010
{
1111
"git": {
1212
"name": "googleapis",
1313
"remote": "https://github.com/googleapis/googleapis.git",
14-
"sha": "ceaaf31b3d13badab7cf9d3b570f5639db5593d9",
15-
"internalRef": "352816749"
14+
"sha": "8d8c008e56f1af31d57f75561e0f1848ffb29eeb",
15+
"internalRef": "356341083"
1616
}
1717
},
1818
{

0 commit comments

Comments
 (0)