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

Commit

Permalink
Re-generate library using /synth.py
Browse files Browse the repository at this point in the history
  • Loading branch information
dpebot committed Aug 10, 2018
1 parent ca26078 commit b8a60f6
Show file tree
Hide file tree
Showing 26 changed files with 748 additions and 203 deletions.
17 changes: 8 additions & 9 deletions protos/google/monitoring/v3/alert.proto
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2018 Google Inc.
// Copyright 2018 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -142,15 +142,14 @@ message AlertPolicy {

// The amount of time that a time series must violate the
// threshold to be considered failing. Currently, only values
// that are a multiple of a minute--e.g. 60, 120, or 300
// that are a multiple of a minute--e.g., 0, 60, 120, or 300
// seconds--are supported. If an invalid value is given, an
// error will be returned. The `Duration.nanos` field is
// ignored. When choosing a duration, it is useful to keep in mind the
// frequency of the underlying time series data (which may also be
// affected by any alignments specified in the `aggregation` field);
// a good duration is long enough so that a single outlier does not
// generate spurious alerts, but short enough that unhealthy states
// are detected and alerted on quickly.
// error will be returned. When choosing a duration, it is useful to
// keep in mind the frequency of the underlying time series data
// (which may also be affected by any alignments specified in the
// `aggregations` field); a good duration is long enough so that a single
// outlier does not generate spurious alerts, but short enough that
// unhealthy states are detected and alerted on quickly.
google.protobuf.Duration duration = 6;

// The number/percent of time series for which the comparison must hold
Expand Down
2 changes: 1 addition & 1 deletion protos/google/monitoring/v3/alert_service.proto
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2018 Google Inc.
// Copyright 2018 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
Expand Down
4 changes: 3 additions & 1 deletion protos/google/monitoring/v3/common.proto
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2018 Google Inc.
// Copyright 2018 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -395,6 +395,8 @@ enum ComparisonType {
// [service tiers documentation](https://cloud.google.com/monitoring/accounts/tiers)
// for more details.
enum ServiceTier {
option deprecated = true;

// An invalid sentinel value, used to indicate that a tier has not
// been provided explicitly.
SERVICE_TIER_UNSPECIFIED = 0;
Expand Down
42 changes: 42 additions & 0 deletions protos/google/monitoring/v3/dropped_labels.proto
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
// Copyright 2018 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

syntax = "proto3";

package google.monitoring.v3;

import "google/api/annotations.proto";

option go_package = "google.golang.org/genproto/googleapis/monitoring/v3;monitoring";


// A set of (label, value) pairs which were dropped during aggregation, attached
// to google.api.Distribution.Exemplars in google.api.Distribution values during
// aggregation.
//
// These values are used in combination with the label values that remain on the
// aggregated Distribution timeseries to construct the full label set for the
// exemplar values. The resulting full label set may be used to identify the
// specific task/job/instance (for example) which may be contributing to a
// long-tail, while allowing the storage savings of only storing aggregated
// distribution values for a large group.
//
// Note that there are no guarantees on ordering of the labels from
// exemplar-to-exemplar and from distribution-to-distribution in the same
// stream, and there may be duplicates. It is up to clients to resolve any
// ambiguities.
message DroppedLabels {
// Map from label to its value, for all labels dropped in any aggregation.
map<string, string> label = 1;
}
2 changes: 1 addition & 1 deletion protos/google/monitoring/v3/group.proto
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2016 Google Inc.
// Copyright 2018 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
Expand Down
30 changes: 22 additions & 8 deletions protos/google/monitoring/v3/group_service.proto
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2016 Google Inc.
// Copyright 2018 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -31,7 +31,7 @@ option php_namespace = "Google\\Cloud\\Monitoring\\V3";


// The Group API lets you inspect and manage your
// [groups](google.monitoring.v3.Group).
// [groups](#google.monitoring.v3.Group).
//
// A group is a named filter that is used to identify
// a collection of monitored resources. Groups are typically used to
Expand All @@ -45,33 +45,47 @@ option php_namespace = "Google\\Cloud\\Monitoring\\V3";
service GroupService {
// Lists the existing groups.
rpc ListGroups(ListGroupsRequest) returns (ListGroupsResponse) {
option (google.api.http) = { get: "/v3/{name=projects/*}/groups" };
option (google.api.http) = {
get: "/v3/{name=projects/*}/groups"
};
}

// Gets a single group.
rpc GetGroup(GetGroupRequest) returns (Group) {
option (google.api.http) = { get: "/v3/{name=projects/*/groups/*}" };
option (google.api.http) = {
get: "/v3/{name=projects/*/groups/*}"
};
}

// Creates a new group.
rpc CreateGroup(CreateGroupRequest) returns (Group) {
option (google.api.http) = { post: "/v3/{name=projects/*}/groups" body: "group" };
option (google.api.http) = {
post: "/v3/{name=projects/*}/groups"
body: "group"
};
}

// Updates an existing group.
// You can change any group attributes except `name`.
rpc UpdateGroup(UpdateGroupRequest) returns (Group) {
option (google.api.http) = { put: "/v3/{group.name=projects/*/groups/*}" body: "group" };
option (google.api.http) = {
put: "/v3/{group.name=projects/*/groups/*}"
body: "group"
};
}

// Deletes an existing group.
rpc DeleteGroup(DeleteGroupRequest) returns (google.protobuf.Empty) {
option (google.api.http) = { delete: "/v3/{name=projects/*/groups/*}" };
option (google.api.http) = {
delete: "/v3/{name=projects/*/groups/*}"
};
}

// Lists the monitored resources that are members of a group.
rpc ListGroupMembers(ListGroupMembersRequest) returns (ListGroupMembersResponse) {
option (google.api.http) = { get: "/v3/{name=projects/*/groups/*}/members" };
option (google.api.http) = {
get: "/v3/{name=projects/*/groups/*}/members"
};
}
}

Expand Down
33 changes: 20 additions & 13 deletions protos/google/monitoring/v3/metric.proto
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2016 Google Inc.
// Copyright 2018 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
Expand All @@ -16,6 +16,8 @@ syntax = "proto3";

package google.monitoring.v3;

import "google/api/annotations.proto";
import "google/api/label.proto";
import "google/api/metric.proto";
import "google/api/monitored_resource.proto";
import "google/monitoring/v3/common.proto";
Expand All @@ -30,14 +32,14 @@ option php_namespace = "Google\\Cloud\\Monitoring\\V3";

// A single data point in a time series.
message Point {
// The time interval to which the data point applies. For GAUGE metrics, only
// the end time of the interval is used. For DELTA metrics, the start and end
// time should specify a non-zero interval, with subsequent points specifying
// contiguous and non-overlapping intervals. For CUMULATIVE metrics, the
// start and end time should specify a non-zero interval, with subsequent
// points specifying the same start time and increasing end times, until an
// event resets the cumulative value to zero and sets a new start time for the
// following points.
// The time interval to which the data point applies. For `GAUGE` metrics,
// only the end time of the interval is used. For `DELTA` metrics, the start
// and end time should specify a non-zero interval, with subsequent points
// specifying contiguous and non-overlapping intervals. For `CUMULATIVE`
// metrics, the start and end time should specify a non-zero interval, with
// subsequent points specifying the same start time and increasing end times,
// until an event resets the cumulative value to zero and sets a new start
// time for the following points.
TimeInterval interval = 1;

// The value of the data point.
Expand All @@ -53,10 +55,15 @@ message TimeSeries {
// series.
google.api.Metric metric = 1;

// The associated resource. A fully-specified monitored resource used to
// identify the time series.
// The associated monitored resource. Custom metrics can use only certain
// monitored resource types in their time series data.
google.api.MonitoredResource resource = 2;

// Output only. The associated monitored resource metadata. When reading a
// a timeseries, this field will include metadata labels that are explicitly
// named in the reduction. When creating a timeseries, this field is ignored.
google.api.MonitoredResourceMetadata metadata = 7;

// The metric kind of the time series. When listing time series, this metric
// kind might be different from the metric kind of the associated metric if
// this time series is an alignment or reduction of other time series.
Expand All @@ -76,8 +83,8 @@ message TimeSeries {
// the same as the type of the data in the `points` field.
google.api.MetricDescriptor.ValueType value_type = 4;

// The data points of this time series. When listing time series, the order of
// the points is specified by the list method.
// The data points of this time series. When listing time series, points are
// returned in reverse time order.
//
// When creating a time series, this field must contain exactly one point and
// the point's type must be the same as the value type of the associated
Expand Down
58 changes: 41 additions & 17 deletions protos/google/monitoring/v3/metric_service.proto
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2016 Google Inc.
// Copyright 2018 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
Expand All @@ -21,6 +21,7 @@ import "google/api/metric.proto";
import "google/api/monitored_resource.proto";
import "google/monitoring/v3/common.proto";
import "google/monitoring/v3/metric.proto";
import "google/protobuf/duration.proto";
import "google/protobuf/empty.proto";
import "google/rpc/status.proto";

Expand All @@ -37,48 +38,66 @@ option php_namespace = "Google\\Cloud\\Monitoring\\V3";
service MetricService {
// Lists monitored resource descriptors that match a filter. This method does not require a Stackdriver account.
rpc ListMonitoredResourceDescriptors(ListMonitoredResourceDescriptorsRequest) returns (ListMonitoredResourceDescriptorsResponse) {
option (google.api.http) = { get: "/v3/{name=projects/*}/monitoredResourceDescriptors" };
option (google.api.http) = {
get: "/v3/{name=projects/*}/monitoredResourceDescriptors"
};
}

// Gets a single monitored resource descriptor. This method does not require a Stackdriver account.
rpc GetMonitoredResourceDescriptor(GetMonitoredResourceDescriptorRequest) returns (google.api.MonitoredResourceDescriptor) {
option (google.api.http) = { get: "/v3/{name=projects/*/monitoredResourceDescriptors/*}" };
option (google.api.http) = {
get: "/v3/{name=projects/*/monitoredResourceDescriptors/*}"
};
}

// Lists metric descriptors that match a filter. This method does not require a Stackdriver account.
rpc ListMetricDescriptors(ListMetricDescriptorsRequest) returns (ListMetricDescriptorsResponse) {
option (google.api.http) = { get: "/v3/{name=projects/*}/metricDescriptors" };
option (google.api.http) = {
get: "/v3/{name=projects/*}/metricDescriptors"
};
}

// Gets a single metric descriptor. This method does not require a Stackdriver account.
rpc GetMetricDescriptor(GetMetricDescriptorRequest) returns (google.api.MetricDescriptor) {
option (google.api.http) = { get: "/v3/{name=projects/*/metricDescriptors/**}" };
option (google.api.http) = {
get: "/v3/{name=projects/*/metricDescriptors/**}"
};
}

// Creates a new metric descriptor.
// User-created metric descriptors define
// [custom metrics](/monitoring/custom-metrics).
rpc CreateMetricDescriptor(CreateMetricDescriptorRequest) returns (google.api.MetricDescriptor) {
option (google.api.http) = { post: "/v3/{name=projects/*}/metricDescriptors" body: "metric_descriptor" };
option (google.api.http) = {
post: "/v3/{name=projects/*}/metricDescriptors"
body: "metric_descriptor"
};
}

// Deletes a metric descriptor. Only user-created
// [custom metrics](/monitoring/custom-metrics) can be deleted.
rpc DeleteMetricDescriptor(DeleteMetricDescriptorRequest) returns (google.protobuf.Empty) {
option (google.api.http) = { delete: "/v3/{name=projects/*/metricDescriptors/**}" };
option (google.api.http) = {
delete: "/v3/{name=projects/*/metricDescriptors/**}"
};
}

// Lists time series that match a filter. This method does not require a Stackdriver account.
rpc ListTimeSeries(ListTimeSeriesRequest) returns (ListTimeSeriesResponse) {
option (google.api.http) = { get: "/v3/{name=projects/*}/timeSeries" };
option (google.api.http) = {
get: "/v3/{name=projects/*}/timeSeries"
};
}

// Creates or adds data to one or more time series.
// The response is empty if all time series in the request were written.
// If any time series could not be written, a corresponding failure message is
// included in the error response.
rpc CreateTimeSeries(CreateTimeSeriesRequest) returns (google.protobuf.Empty) {
option (google.api.http) = { post: "/v3/{name=projects/*}/timeSeries" body: "*" };
option (google.api.http) = {
post: "/v3/{name=projects/*}/timeSeries"
body: "*"
};
}
}

Expand Down Expand Up @@ -106,7 +125,7 @@ message ListMonitoredResourceDescriptorsRequest {
string page_token = 4;
}

// The `ListMonitoredResourcDescriptors` response.
// The `ListMonitoredResourceDescriptors` response.
message ListMonitoredResourceDescriptorsResponse {
// The monitored resource descriptors that are available to this project
// and that match `filter`, if present.
Expand Down Expand Up @@ -217,6 +236,7 @@ message ListTimeSeriesRequest {
//
// metric.type = "compute.googleapis.com/instance/cpu/usage_time" AND
// metric.label.instance_name = "my-instance-name"
//
string filter = 2;

// The time interval for which results should be returned. Only time series
Expand All @@ -229,18 +249,18 @@ message ListTimeSeriesRequest {
// views of the data.
Aggregation aggregation = 5;

// Specifies the order in which the points of the time series should
// be returned. By default, results are not ordered. Currently,
// this field must be left blank.
// Unsupported: must be left blank. The points in each time series are
// returned in reverse time order.
string order_by = 6;

// Specifies which information is returned about the time series.
TimeSeriesView view = 7;

// A positive number that is the maximum number of results to return.
// When `view` field sets to `FULL`, it limits the number of `Points` server
// will return; if `view` field is `HEADERS`, it limits the number of
// `TimeSeries` server will return.
// A positive number that is the maximum number of results to return. If
// `page_size` is empty or more than 100,000 results, the effective
// `page_size` is 100,000 results. If `view` is set to `FULL`, this is the
// maximum number of `Points` returned. If `view` is set to `HEADERS`, this is
// the maximum number of `TimeSeries` returned.
int32 page_size = 8;

// If this field is not empty then it must contain the `nextPageToken` value
Expand All @@ -258,6 +278,10 @@ message ListTimeSeriesResponse {
// to a non-empty value. To see the additional results,
// use that value as `pageToken` in the next call to this method.
string next_page_token = 2;

// Query execution errors that may have caused the time series data returned
// to be incomplete.
repeated google.rpc.Status execution_errors = 3;
}

// The `CreateTimeSeries` request.
Expand Down
2 changes: 1 addition & 1 deletion protos/google/monitoring/v3/mutation_record.proto
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2018 Google Inc.
// Copyright 2018 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
Expand Down
4 changes: 2 additions & 2 deletions protos/google/monitoring/v3/notification.proto
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2018 Google Inc.
// Copyright 2018 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -60,7 +60,7 @@ message NotificationChannelDescriptor {

// The tiers that support this notification channel; the project service tier
// must be one of the supported_tiers.
repeated ServiceTier supported_tiers = 5;
repeated ServiceTier supported_tiers = 5 [deprecated = true];
}

// A `NotificationChannel` is a medium through which an alert is
Expand Down
Loading

0 comments on commit b8a60f6

Please sign in to comment.