You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

668 lines
29 KiB

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