...
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17 package monitoring_test
18
19 import (
20 "context"
21
22 monitoring "cloud.google.com/go/monitoring/apiv3"
23 "cloud.google.com/go/monitoring/apiv3/v2/monitoringpb"
24 "google.golang.org/api/iterator"
25 )
26
27 func ExampleNewNotificationChannelClient() {
28 ctx := context.Background()
29 c, err := monitoring.NewNotificationChannelClient(ctx)
30 if err != nil {
31
32 }
33
34 _ = c
35 }
36
37 func ExampleNotificationChannelClient_ListNotificationChannelDescriptors() {
38
39
40
41 ctx := context.Background()
42 c, err := monitoring.NewNotificationChannelClient(ctx)
43 if err != nil {
44
45 }
46
47 req := &monitoringpb.ListNotificationChannelDescriptorsRequest{
48
49 }
50 it := c.ListNotificationChannelDescriptors(ctx, req)
51 for {
52 resp, err := it.Next()
53 if err == iterator.Done {
54 break
55 }
56 if err != nil {
57
58 }
59
60 _ = resp
61 }
62 }
63
64 func ExampleNotificationChannelClient_GetNotificationChannelDescriptor() {
65
66
67 ctx := context.Background()
68 c, err := monitoring.NewNotificationChannelClient(ctx)
69 if err != nil {
70
71 }
72
73 req := &monitoringpb.GetNotificationChannelDescriptorRequest{
74
75 }
76 resp, err := c.GetNotificationChannelDescriptor(ctx, req)
77 if err != nil {
78
79 }
80
81 _ = resp
82 }
83
84 func ExampleNotificationChannelClient_ListNotificationChannels() {
85
86
87
88 ctx := context.Background()
89 c, err := monitoring.NewNotificationChannelClient(ctx)
90 if err != nil {
91
92 }
93
94 req := &monitoringpb.ListNotificationChannelsRequest{
95
96 }
97 it := c.ListNotificationChannels(ctx, req)
98 for {
99 resp, err := it.Next()
100 if err == iterator.Done {
101 break
102 }
103 if err != nil {
104
105 }
106
107 _ = resp
108 }
109 }
110
111 func ExampleNotificationChannelClient_GetNotificationChannel() {
112
113
114 ctx := context.Background()
115 c, err := monitoring.NewNotificationChannelClient(ctx)
116 if err != nil {
117
118 }
119
120 req := &monitoringpb.GetNotificationChannelRequest{
121
122 }
123 resp, err := c.GetNotificationChannel(ctx, req)
124 if err != nil {
125
126 }
127
128 _ = resp
129 }
130
131 func ExampleNotificationChannelClient_CreateNotificationChannel() {
132
133
134 ctx := context.Background()
135 c, err := monitoring.NewNotificationChannelClient(ctx)
136 if err != nil {
137
138 }
139
140 req := &monitoringpb.CreateNotificationChannelRequest{
141
142 }
143 resp, err := c.CreateNotificationChannel(ctx, req)
144 if err != nil {
145
146 }
147
148 _ = resp
149 }
150
151 func ExampleNotificationChannelClient_UpdateNotificationChannel() {
152
153
154 ctx := context.Background()
155 c, err := monitoring.NewNotificationChannelClient(ctx)
156 if err != nil {
157
158 }
159
160 req := &monitoringpb.UpdateNotificationChannelRequest{
161
162 }
163 resp, err := c.UpdateNotificationChannel(ctx, req)
164 if err != nil {
165
166 }
167
168 _ = resp
169 }
170
171 func ExampleNotificationChannelClient_DeleteNotificationChannel() {
172 ctx := context.Background()
173 c, err := monitoring.NewNotificationChannelClient(ctx)
174 if err != nil {
175
176 }
177
178 req := &monitoringpb.DeleteNotificationChannelRequest{
179
180 }
181 err = c.DeleteNotificationChannel(ctx, req)
182 if err != nil {
183
184 }
185 }
186
187 func ExampleNotificationChannelClient_SendNotificationChannelVerificationCode() {
188 ctx := context.Background()
189 c, err := monitoring.NewNotificationChannelClient(ctx)
190 if err != nil {
191
192 }
193
194 req := &monitoringpb.SendNotificationChannelVerificationCodeRequest{
195
196 }
197 err = c.SendNotificationChannelVerificationCode(ctx, req)
198 if err != nil {
199
200 }
201 }
202
203 func ExampleNotificationChannelClient_GetNotificationChannelVerificationCode() {
204
205
206 ctx := context.Background()
207 c, err := monitoring.NewNotificationChannelClient(ctx)
208 if err != nil {
209
210 }
211
212 req := &monitoringpb.GetNotificationChannelVerificationCodeRequest{
213
214 }
215 resp, err := c.GetNotificationChannelVerificationCode(ctx, req)
216 if err != nil {
217
218 }
219
220 _ = resp
221 }
222
223 func ExampleNotificationChannelClient_VerifyNotificationChannel() {
224
225
226 ctx := context.Background()
227 c, err := monitoring.NewNotificationChannelClient(ctx)
228 if err != nil {
229
230 }
231
232 req := &monitoringpb.VerifyNotificationChannelRequest{
233
234 }
235 resp, err := c.VerifyNotificationChannel(ctx, req)
236 if err != nil {
237
238 }
239
240 _ = resp
241 }
242
View as plain text