1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667
|
// Code generated by protoc-gen-go. DO NOT EDIT.
// source: google/monitoring/v3/alert_service.proto
package monitoring // import "google.golang.org/genproto/googleapis/monitoring/v3"
import proto "github.com/golang/protobuf/proto"
import fmt "fmt"
import math "math"
import empty "github.com/golang/protobuf/ptypes/empty"
import _ "google.golang.org/genproto/googleapis/api/annotations"
import field_mask "google.golang.org/genproto/protobuf/field_mask"
import (
context "golang.org/x/net/context"
grpc "google.golang.org/grpc"
)
// Reference imports to suppress errors if they are not otherwise used.
var _ = proto.Marshal
var _ = fmt.Errorf
var _ = math.Inf
// This is a compile-time assertion to ensure that this generated file
// is compatible with the proto package it is being compiled against.
// A compilation error at this line likely means your copy of the
// proto package needs to be updated.
const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package
// The protocol for the `CreateAlertPolicy` request.
type CreateAlertPolicyRequest struct {
// The project in which to create the alerting policy. The format is
// `projects/[PROJECT_ID]`.
//
// Note that this field names the parent container in which the alerting
// policy will be written, not the name of the created policy. The alerting
// policy that is returned will have a name that contains a normalized
// representation of this name as a prefix but adds a suffix of the form
// `/alertPolicies/[POLICY_ID]`, identifying the policy in the container.
Name string `protobuf:"bytes,3,opt,name=name,proto3" json:"name,omitempty"`
// The requested alerting policy. You should omit the `name` field in this
// policy. The name will be returned in the new policy, including
// a new [ALERT_POLICY_ID] value.
AlertPolicy *AlertPolicy `protobuf:"bytes,2,opt,name=alert_policy,json=alertPolicy,proto3" json:"alert_policy,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *CreateAlertPolicyRequest) Reset() { *m = CreateAlertPolicyRequest{} }
func (m *CreateAlertPolicyRequest) String() string { return proto.CompactTextString(m) }
func (*CreateAlertPolicyRequest) ProtoMessage() {}
func (*CreateAlertPolicyRequest) Descriptor() ([]byte, []int) {
return fileDescriptor_alert_service_4a748eee76dab644, []int{0}
}
func (m *CreateAlertPolicyRequest) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_CreateAlertPolicyRequest.Unmarshal(m, b)
}
func (m *CreateAlertPolicyRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_CreateAlertPolicyRequest.Marshal(b, m, deterministic)
}
func (dst *CreateAlertPolicyRequest) XXX_Merge(src proto.Message) {
xxx_messageInfo_CreateAlertPolicyRequest.Merge(dst, src)
}
func (m *CreateAlertPolicyRequest) XXX_Size() int {
return xxx_messageInfo_CreateAlertPolicyRequest.Size(m)
}
func (m *CreateAlertPolicyRequest) XXX_DiscardUnknown() {
xxx_messageInfo_CreateAlertPolicyRequest.DiscardUnknown(m)
}
var xxx_messageInfo_CreateAlertPolicyRequest proto.InternalMessageInfo
func (m *CreateAlertPolicyRequest) GetName() string {
if m != nil {
return m.Name
}
return ""
}
func (m *CreateAlertPolicyRequest) GetAlertPolicy() *AlertPolicy {
if m != nil {
return m.AlertPolicy
}
return nil
}
// The protocol for the `GetAlertPolicy` request.
type GetAlertPolicyRequest struct {
// The alerting policy to retrieve. The format is
//
// projects/[PROJECT_ID]/alertPolicies/[ALERT_POLICY_ID]
Name string `protobuf:"bytes,3,opt,name=name,proto3" json:"name,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *GetAlertPolicyRequest) Reset() { *m = GetAlertPolicyRequest{} }
func (m *GetAlertPolicyRequest) String() string { return proto.CompactTextString(m) }
func (*GetAlertPolicyRequest) ProtoMessage() {}
func (*GetAlertPolicyRequest) Descriptor() ([]byte, []int) {
return fileDescriptor_alert_service_4a748eee76dab644, []int{1}
}
func (m *GetAlertPolicyRequest) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_GetAlertPolicyRequest.Unmarshal(m, b)
}
func (m *GetAlertPolicyRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_GetAlertPolicyRequest.Marshal(b, m, deterministic)
}
func (dst *GetAlertPolicyRequest) XXX_Merge(src proto.Message) {
xxx_messageInfo_GetAlertPolicyRequest.Merge(dst, src)
}
func (m *GetAlertPolicyRequest) XXX_Size() int {
return xxx_messageInfo_GetAlertPolicyRequest.Size(m)
}
func (m *GetAlertPolicyRequest) XXX_DiscardUnknown() {
xxx_messageInfo_GetAlertPolicyRequest.DiscardUnknown(m)
}
var xxx_messageInfo_GetAlertPolicyRequest proto.InternalMessageInfo
func (m *GetAlertPolicyRequest) GetName() string {
if m != nil {
return m.Name
}
return ""
}
// The protocol for the `ListAlertPolicies` request.
type ListAlertPoliciesRequest struct {
// The project whose alert policies are to be listed. The format is
//
// projects/[PROJECT_ID]
//
// Note that this field names the parent container in which the alerting
// policies to be listed are stored. To retrieve a single alerting policy
// by name, use the
// [GetAlertPolicy][google.monitoring.v3.AlertPolicyService.GetAlertPolicy]
// operation, instead.
Name string `protobuf:"bytes,4,opt,name=name,proto3" json:"name,omitempty"`
// If provided, this field specifies the criteria that must be met by
// alert policies to be included in the response.
//
// For more details, see [sorting and
// filtering](/monitoring/api/v3/sorting-and-filtering).
Filter string `protobuf:"bytes,5,opt,name=filter,proto3" json:"filter,omitempty"`
// A comma-separated list of fields by which to sort the result. Supports
// the same set of field references as the `filter` field. Entries can be
// prefixed with a minus sign to sort by the field in descending order.
//
// For more details, see [sorting and
// filtering](/monitoring/api/v3/sorting-and-filtering).
OrderBy string `protobuf:"bytes,6,opt,name=order_by,json=orderBy,proto3" json:"order_by,omitempty"`
// The maximum number of results to return in a single response.
PageSize int32 `protobuf:"varint,2,opt,name=page_size,json=pageSize,proto3" json:"page_size,omitempty"`
// If this field is not empty then it must contain the `nextPageToken` value
// returned by a previous call to this method. Using this field causes the
// method to return more results from the previous method call.
PageToken string `protobuf:"bytes,3,opt,name=page_token,json=pageToken,proto3" json:"page_token,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *ListAlertPoliciesRequest) Reset() { *m = ListAlertPoliciesRequest{} }
func (m *ListAlertPoliciesRequest) String() string { return proto.CompactTextString(m) }
func (*ListAlertPoliciesRequest) ProtoMessage() {}
func (*ListAlertPoliciesRequest) Descriptor() ([]byte, []int) {
return fileDescriptor_alert_service_4a748eee76dab644, []int{2}
}
func (m *ListAlertPoliciesRequest) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_ListAlertPoliciesRequest.Unmarshal(m, b)
}
func (m *ListAlertPoliciesRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_ListAlertPoliciesRequest.Marshal(b, m, deterministic)
}
func (dst *ListAlertPoliciesRequest) XXX_Merge(src proto.Message) {
xxx_messageInfo_ListAlertPoliciesRequest.Merge(dst, src)
}
func (m *ListAlertPoliciesRequest) XXX_Size() int {
return xxx_messageInfo_ListAlertPoliciesRequest.Size(m)
}
func (m *ListAlertPoliciesRequest) XXX_DiscardUnknown() {
xxx_messageInfo_ListAlertPoliciesRequest.DiscardUnknown(m)
}
var xxx_messageInfo_ListAlertPoliciesRequest proto.InternalMessageInfo
func (m *ListAlertPoliciesRequest) GetName() string {
if m != nil {
return m.Name
}
return ""
}
func (m *ListAlertPoliciesRequest) GetFilter() string {
if m != nil {
return m.Filter
}
return ""
}
func (m *ListAlertPoliciesRequest) GetOrderBy() string {
if m != nil {
return m.OrderBy
}
return ""
}
func (m *ListAlertPoliciesRequest) GetPageSize() int32 {
if m != nil {
return m.PageSize
}
return 0
}
func (m *ListAlertPoliciesRequest) GetPageToken() string {
if m != nil {
return m.PageToken
}
return ""
}
// The protocol for the `ListAlertPolicies` response.
type ListAlertPoliciesResponse struct {
// The returned alert policies.
AlertPolicies []*AlertPolicy `protobuf:"bytes,3,rep,name=alert_policies,json=alertPolicies,proto3" json:"alert_policies,omitempty"`
// If there might be more results than were returned, then this field is set
// to a non-empty value. To see the additional results,
// use that value as `pageToken` in the next call to this method.
NextPageToken string `protobuf:"bytes,2,opt,name=next_page_token,json=nextPageToken,proto3" json:"next_page_token,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *ListAlertPoliciesResponse) Reset() { *m = ListAlertPoliciesResponse{} }
func (m *ListAlertPoliciesResponse) String() string { return proto.CompactTextString(m) }
func (*ListAlertPoliciesResponse) ProtoMessage() {}
func (*ListAlertPoliciesResponse) Descriptor() ([]byte, []int) {
return fileDescriptor_alert_service_4a748eee76dab644, []int{3}
}
func (m *ListAlertPoliciesResponse) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_ListAlertPoliciesResponse.Unmarshal(m, b)
}
func (m *ListAlertPoliciesResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_ListAlertPoliciesResponse.Marshal(b, m, deterministic)
}
func (dst *ListAlertPoliciesResponse) XXX_Merge(src proto.Message) {
xxx_messageInfo_ListAlertPoliciesResponse.Merge(dst, src)
}
func (m *ListAlertPoliciesResponse) XXX_Size() int {
return xxx_messageInfo_ListAlertPoliciesResponse.Size(m)
}
func (m *ListAlertPoliciesResponse) XXX_DiscardUnknown() {
xxx_messageInfo_ListAlertPoliciesResponse.DiscardUnknown(m)
}
var xxx_messageInfo_ListAlertPoliciesResponse proto.InternalMessageInfo
func (m *ListAlertPoliciesResponse) GetAlertPolicies() []*AlertPolicy {
if m != nil {
return m.AlertPolicies
}
return nil
}
func (m *ListAlertPoliciesResponse) GetNextPageToken() string {
if m != nil {
return m.NextPageToken
}
return ""
}
// The protocol for the `UpdateAlertPolicy` request.
type UpdateAlertPolicyRequest struct {
// Optional. A list of alerting policy field names. If this field is not
// empty, each listed field in the existing alerting policy is set to the
// value of the corresponding field in the supplied policy (`alert_policy`),
// or to the field's default value if the field is not in the supplied
// alerting policy. Fields not listed retain their previous value.
//
// Examples of valid field masks include `display_name`, `documentation`,
// `documentation.content`, `documentation.mime_type`, `user_labels`,
// `user_label.nameofkey`, `enabled`, `conditions`, `combiner`, etc.
//
// If this field is empty, then the supplied alerting policy replaces the
// existing policy. It is the same as deleting the existing policy and
// adding the supplied policy, except for the following:
//
// + The new policy will have the same `[ALERT_POLICY_ID]` as the former
// policy. This gives you continuity with the former policy in your
// notifications and incidents.
// + Conditions in the new policy will keep their former `[CONDITION_ID]` if
// the supplied condition includes the `name` field with that
// `[CONDITION_ID]`. If the supplied condition omits the `name` field,
// then a new `[CONDITION_ID]` is created.
UpdateMask *field_mask.FieldMask `protobuf:"bytes,2,opt,name=update_mask,json=updateMask,proto3" json:"update_mask,omitempty"`
// Required. The updated alerting policy or the updated values for the
// fields listed in `update_mask`.
// If `update_mask` is not empty, any fields in this policy that are
// not in `update_mask` are ignored.
AlertPolicy *AlertPolicy `protobuf:"bytes,3,opt,name=alert_policy,json=alertPolicy,proto3" json:"alert_policy,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *UpdateAlertPolicyRequest) Reset() { *m = UpdateAlertPolicyRequest{} }
func (m *UpdateAlertPolicyRequest) String() string { return proto.CompactTextString(m) }
func (*UpdateAlertPolicyRequest) ProtoMessage() {}
func (*UpdateAlertPolicyRequest) Descriptor() ([]byte, []int) {
return fileDescriptor_alert_service_4a748eee76dab644, []int{4}
}
func (m *UpdateAlertPolicyRequest) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_UpdateAlertPolicyRequest.Unmarshal(m, b)
}
func (m *UpdateAlertPolicyRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_UpdateAlertPolicyRequest.Marshal(b, m, deterministic)
}
func (dst *UpdateAlertPolicyRequest) XXX_Merge(src proto.Message) {
xxx_messageInfo_UpdateAlertPolicyRequest.Merge(dst, src)
}
func (m *UpdateAlertPolicyRequest) XXX_Size() int {
return xxx_messageInfo_UpdateAlertPolicyRequest.Size(m)
}
func (m *UpdateAlertPolicyRequest) XXX_DiscardUnknown() {
xxx_messageInfo_UpdateAlertPolicyRequest.DiscardUnknown(m)
}
var xxx_messageInfo_UpdateAlertPolicyRequest proto.InternalMessageInfo
func (m *UpdateAlertPolicyRequest) GetUpdateMask() *field_mask.FieldMask {
if m != nil {
return m.UpdateMask
}
return nil
}
func (m *UpdateAlertPolicyRequest) GetAlertPolicy() *AlertPolicy {
if m != nil {
return m.AlertPolicy
}
return nil
}
// The protocol for the `DeleteAlertPolicy` request.
type DeleteAlertPolicyRequest struct {
// The alerting policy to delete. The format is:
//
// projects/[PROJECT_ID]/alertPolicies/[ALERT_POLICY_ID]
//
// For more information, see [AlertPolicy][google.monitoring.v3.AlertPolicy].
Name string `protobuf:"bytes,3,opt,name=name,proto3" json:"name,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *DeleteAlertPolicyRequest) Reset() { *m = DeleteAlertPolicyRequest{} }
func (m *DeleteAlertPolicyRequest) String() string { return proto.CompactTextString(m) }
func (*DeleteAlertPolicyRequest) ProtoMessage() {}
func (*DeleteAlertPolicyRequest) Descriptor() ([]byte, []int) {
return fileDescriptor_alert_service_4a748eee76dab644, []int{5}
}
func (m *DeleteAlertPolicyRequest) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_DeleteAlertPolicyRequest.Unmarshal(m, b)
}
func (m *DeleteAlertPolicyRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_DeleteAlertPolicyRequest.Marshal(b, m, deterministic)
}
func (dst *DeleteAlertPolicyRequest) XXX_Merge(src proto.Message) {
xxx_messageInfo_DeleteAlertPolicyRequest.Merge(dst, src)
}
func (m *DeleteAlertPolicyRequest) XXX_Size() int {
return xxx_messageInfo_DeleteAlertPolicyRequest.Size(m)
}
func (m *DeleteAlertPolicyRequest) XXX_DiscardUnknown() {
xxx_messageInfo_DeleteAlertPolicyRequest.DiscardUnknown(m)
}
var xxx_messageInfo_DeleteAlertPolicyRequest proto.InternalMessageInfo
func (m *DeleteAlertPolicyRequest) GetName() string {
if m != nil {
return m.Name
}
return ""
}
func init() {
proto.RegisterType((*CreateAlertPolicyRequest)(nil), "google.monitoring.v3.CreateAlertPolicyRequest")
proto.RegisterType((*GetAlertPolicyRequest)(nil), "google.monitoring.v3.GetAlertPolicyRequest")
proto.RegisterType((*ListAlertPoliciesRequest)(nil), "google.monitoring.v3.ListAlertPoliciesRequest")
proto.RegisterType((*ListAlertPoliciesResponse)(nil), "google.monitoring.v3.ListAlertPoliciesResponse")
proto.RegisterType((*UpdateAlertPolicyRequest)(nil), "google.monitoring.v3.UpdateAlertPolicyRequest")
proto.RegisterType((*DeleteAlertPolicyRequest)(nil), "google.monitoring.v3.DeleteAlertPolicyRequest")
}
// Reference imports to suppress errors if they are not otherwise used.
var _ context.Context
var _ grpc.ClientConn
// This is a compile-time assertion to ensure that this generated file
// is compatible with the grpc package it is being compiled against.
const _ = grpc.SupportPackageIsVersion4
// AlertPolicyServiceClient is the client API for AlertPolicyService service.
//
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
type AlertPolicyServiceClient interface {
// Lists the existing alerting policies for the project.
ListAlertPolicies(ctx context.Context, in *ListAlertPoliciesRequest, opts ...grpc.CallOption) (*ListAlertPoliciesResponse, error)
// Gets a single alerting policy.
GetAlertPolicy(ctx context.Context, in *GetAlertPolicyRequest, opts ...grpc.CallOption) (*AlertPolicy, error)
// Creates a new alerting policy.
CreateAlertPolicy(ctx context.Context, in *CreateAlertPolicyRequest, opts ...grpc.CallOption) (*AlertPolicy, error)
// Deletes an alerting policy.
DeleteAlertPolicy(ctx context.Context, in *DeleteAlertPolicyRequest, opts ...grpc.CallOption) (*empty.Empty, error)
// Updates an alerting policy. You can either replace the entire policy with
// a new one or replace only certain fields in the current alerting policy by
// specifying the fields to be updated via `updateMask`. Returns the
// updated alerting policy.
UpdateAlertPolicy(ctx context.Context, in *UpdateAlertPolicyRequest, opts ...grpc.CallOption) (*AlertPolicy, error)
}
type alertPolicyServiceClient struct {
cc *grpc.ClientConn
}
func NewAlertPolicyServiceClient(cc *grpc.ClientConn) AlertPolicyServiceClient {
return &alertPolicyServiceClient{cc}
}
func (c *alertPolicyServiceClient) ListAlertPolicies(ctx context.Context, in *ListAlertPoliciesRequest, opts ...grpc.CallOption) (*ListAlertPoliciesResponse, error) {
out := new(ListAlertPoliciesResponse)
err := c.cc.Invoke(ctx, "/google.monitoring.v3.AlertPolicyService/ListAlertPolicies", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *alertPolicyServiceClient) GetAlertPolicy(ctx context.Context, in *GetAlertPolicyRequest, opts ...grpc.CallOption) (*AlertPolicy, error) {
out := new(AlertPolicy)
err := c.cc.Invoke(ctx, "/google.monitoring.v3.AlertPolicyService/GetAlertPolicy", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *alertPolicyServiceClient) CreateAlertPolicy(ctx context.Context, in *CreateAlertPolicyRequest, opts ...grpc.CallOption) (*AlertPolicy, error) {
out := new(AlertPolicy)
err := c.cc.Invoke(ctx, "/google.monitoring.v3.AlertPolicyService/CreateAlertPolicy", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *alertPolicyServiceClient) DeleteAlertPolicy(ctx context.Context, in *DeleteAlertPolicyRequest, opts ...grpc.CallOption) (*empty.Empty, error) {
out := new(empty.Empty)
err := c.cc.Invoke(ctx, "/google.monitoring.v3.AlertPolicyService/DeleteAlertPolicy", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *alertPolicyServiceClient) UpdateAlertPolicy(ctx context.Context, in *UpdateAlertPolicyRequest, opts ...grpc.CallOption) (*AlertPolicy, error) {
out := new(AlertPolicy)
err := c.cc.Invoke(ctx, "/google.monitoring.v3.AlertPolicyService/UpdateAlertPolicy", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
// AlertPolicyServiceServer is the server API for AlertPolicyService service.
type AlertPolicyServiceServer interface {
// Lists the existing alerting policies for the project.
ListAlertPolicies(context.Context, *ListAlertPoliciesRequest) (*ListAlertPoliciesResponse, error)
// Gets a single alerting policy.
GetAlertPolicy(context.Context, *GetAlertPolicyRequest) (*AlertPolicy, error)
// Creates a new alerting policy.
CreateAlertPolicy(context.Context, *CreateAlertPolicyRequest) (*AlertPolicy, error)
// Deletes an alerting policy.
DeleteAlertPolicy(context.Context, *DeleteAlertPolicyRequest) (*empty.Empty, error)
// Updates an alerting policy. You can either replace the entire policy with
// a new one or replace only certain fields in the current alerting policy by
// specifying the fields to be updated via `updateMask`. Returns the
// updated alerting policy.
UpdateAlertPolicy(context.Context, *UpdateAlertPolicyRequest) (*AlertPolicy, error)
}
func RegisterAlertPolicyServiceServer(s *grpc.Server, srv AlertPolicyServiceServer) {
s.RegisterService(&_AlertPolicyService_serviceDesc, srv)
}
func _AlertPolicyService_ListAlertPolicies_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(ListAlertPoliciesRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(AlertPolicyServiceServer).ListAlertPolicies(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/google.monitoring.v3.AlertPolicyService/ListAlertPolicies",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(AlertPolicyServiceServer).ListAlertPolicies(ctx, req.(*ListAlertPoliciesRequest))
}
return interceptor(ctx, in, info, handler)
}
func _AlertPolicyService_GetAlertPolicy_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(GetAlertPolicyRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(AlertPolicyServiceServer).GetAlertPolicy(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/google.monitoring.v3.AlertPolicyService/GetAlertPolicy",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(AlertPolicyServiceServer).GetAlertPolicy(ctx, req.(*GetAlertPolicyRequest))
}
return interceptor(ctx, in, info, handler)
}
func _AlertPolicyService_CreateAlertPolicy_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(CreateAlertPolicyRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(AlertPolicyServiceServer).CreateAlertPolicy(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/google.monitoring.v3.AlertPolicyService/CreateAlertPolicy",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(AlertPolicyServiceServer).CreateAlertPolicy(ctx, req.(*CreateAlertPolicyRequest))
}
return interceptor(ctx, in, info, handler)
}
func _AlertPolicyService_DeleteAlertPolicy_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(DeleteAlertPolicyRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(AlertPolicyServiceServer).DeleteAlertPolicy(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/google.monitoring.v3.AlertPolicyService/DeleteAlertPolicy",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(AlertPolicyServiceServer).DeleteAlertPolicy(ctx, req.(*DeleteAlertPolicyRequest))
}
return interceptor(ctx, in, info, handler)
}
func _AlertPolicyService_UpdateAlertPolicy_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(UpdateAlertPolicyRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(AlertPolicyServiceServer).UpdateAlertPolicy(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/google.monitoring.v3.AlertPolicyService/UpdateAlertPolicy",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(AlertPolicyServiceServer).UpdateAlertPolicy(ctx, req.(*UpdateAlertPolicyRequest))
}
return interceptor(ctx, in, info, handler)
}
var _AlertPolicyService_serviceDesc = grpc.ServiceDesc{
ServiceName: "google.monitoring.v3.AlertPolicyService",
HandlerType: (*AlertPolicyServiceServer)(nil),
Methods: []grpc.MethodDesc{
{
MethodName: "ListAlertPolicies",
Handler: _AlertPolicyService_ListAlertPolicies_Handler,
},
{
MethodName: "GetAlertPolicy",
Handler: _AlertPolicyService_GetAlertPolicy_Handler,
},
{
MethodName: "CreateAlertPolicy",
Handler: _AlertPolicyService_CreateAlertPolicy_Handler,
},
{
MethodName: "DeleteAlertPolicy",
Handler: _AlertPolicyService_DeleteAlertPolicy_Handler,
},
{
MethodName: "UpdateAlertPolicy",
Handler: _AlertPolicyService_UpdateAlertPolicy_Handler,
},
},
Streams: []grpc.StreamDesc{},
Metadata: "google/monitoring/v3/alert_service.proto",
}
func init() {
proto.RegisterFile("google/monitoring/v3/alert_service.proto", fileDescriptor_alert_service_4a748eee76dab644)
}
var fileDescriptor_alert_service_4a748eee76dab644 = []byte{
// 656 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x55, 0x41, 0x6f, 0xd3, 0x4c,
0x10, 0x95, 0x93, 0x36, 0x5f, 0xbb, 0xfd, 0x5a, 0x94, 0x15, 0x54, 0xae, 0x0b, 0x52, 0x30, 0x2a,
0x54, 0xad, 0xb0, 0xa5, 0xf8, 0x04, 0x15, 0x48, 0xa4, 0x85, 0xf6, 0x40, 0xa5, 0x28, 0x85, 0x1e,
0x50, 0xa4, 0x68, 0x93, 0x4c, 0xac, 0x25, 0x8e, 0xd7, 0x78, 0x37, 0x11, 0x29, 0xea, 0x85, 0x23,
0x12, 0xe2, 0xc0, 0x99, 0x03, 0x47, 0x38, 0x20, 0x7e, 0x07, 0x57, 0xfe, 0x02, 0x3f, 0x04, 0x79,
0xed, 0x34, 0x76, 0x6d, 0xab, 0x16, 0xb7, 0xcc, 0xce, 0xdb, 0x99, 0xb7, 0x6f, 0xde, 0x38, 0x68,
0xdb, 0x66, 0xcc, 0x76, 0xc0, 0x1c, 0x31, 0x97, 0x0a, 0xe6, 0x53, 0xd7, 0x36, 0x27, 0x96, 0x49,
0x1c, 0xf0, 0x45, 0x87, 0x83, 0x3f, 0xa1, 0x3d, 0x30, 0x3c, 0x9f, 0x09, 0x86, 0xaf, 0x87, 0x48,
0x63, 0x8e, 0x34, 0x26, 0x96, 0x76, 0x33, 0xba, 0x4f, 0x3c, 0x6a, 0x12, 0xd7, 0x65, 0x82, 0x08,
0xca, 0x5c, 0x1e, 0xde, 0xd1, 0x6a, 0xf9, 0xd5, 0x23, 0xc4, 0x66, 0x84, 0x90, 0x51, 0x77, 0x3c,
0x30, 0x61, 0xe4, 0x89, 0xe9, 0xa5, 0xeb, 0x17, 0xc9, 0x01, 0x05, 0xa7, 0xdf, 0x19, 0x11, 0x3e,
0x0c, 0x11, 0xba, 0x40, 0xea, 0xbe, 0x0f, 0x44, 0xc0, 0x93, 0xa0, 0x66, 0x93, 0x39, 0xb4, 0x37,
0x6d, 0xc1, 0x9b, 0x31, 0x70, 0x81, 0x31, 0x5a, 0x70, 0xc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