From 867969749489ebce1a0ff9c45df7796d8028c9b4 Mon Sep 17 00:00:00 2001 From: DPE bot Date: Fri, 10 Aug 2018 07:47:38 -0700 Subject: [PATCH] feat: run the generator --- protos/google/monitoring/v3/alert.proto | 17 ++- .../google/monitoring/v3/alert_service.proto | 2 +- protos/google/monitoring/v3/common.proto | 4 +- .../google/monitoring/v3/dropped_labels.proto | 42 ++++++ protos/google/monitoring/v3/group.proto | 2 +- .../google/monitoring/v3/group_service.proto | 30 ++-- protos/google/monitoring/v3/metric.proto | 33 +++-- .../google/monitoring/v3/metric_service.proto | 58 +++++--- .../monitoring/v3/mutation_record.proto | 2 +- .../google/monitoring/v3/notification.proto | 4 +- .../monitoring/v3/notification_service.proto | 2 +- .../google/monitoring/v3/span_context.proto | 43 ++++++ protos/google/monitoring/v3/uptime.proto | 78 +++++++---- .../google/monitoring/v3/uptime_service.proto | 58 +++++--- src/v3/doc/google/monitoring/v3/doc_alert.js | 15 +- src/v3/doc/google/monitoring/v3/doc_metric.js | 31 +++-- .../monitoring/v3/doc_metric_service.js | 22 +-- src/v3/doc/google/monitoring/v3/doc_uptime.js | 92 +++++++----- .../monitoring/v3/doc_uptime_service.js | 30 ++-- src/v3/doc/google/protobuf/doc_any.js | 131 ++++++++++++++++++ src/v3/doc/google/protobuf/doc_struct.js | 112 +++++++++++++++ src/v3/doc/google/rpc/doc_status.js | 92 ++++++++++++ src/v3/group_service_client.js | 2 +- src/v3/metric_service_client.js | 10 +- src/v3/uptime_check_service_client.js | 31 ++--- test/gapic-v3.js | 8 ++ 26 files changed, 748 insertions(+), 203 deletions(-) create mode 100644 protos/google/monitoring/v3/dropped_labels.proto create mode 100644 protos/google/monitoring/v3/span_context.proto create mode 100644 src/v3/doc/google/protobuf/doc_any.js create mode 100644 src/v3/doc/google/protobuf/doc_struct.js create mode 100644 src/v3/doc/google/rpc/doc_status.js diff --git a/protos/google/monitoring/v3/alert.proto b/protos/google/monitoring/v3/alert.proto index 18d87174..4c995b13 100644 --- a/protos/google/monitoring/v3/alert.proto +++ b/protos/google/monitoring/v3/alert.proto @@ -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. @@ -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 diff --git a/protos/google/monitoring/v3/alert_service.proto b/protos/google/monitoring/v3/alert_service.proto index ca2839f9..4bcb9d36 100644 --- a/protos/google/monitoring/v3/alert_service.proto +++ b/protos/google/monitoring/v3/alert_service.proto @@ -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. diff --git a/protos/google/monitoring/v3/common.proto b/protos/google/monitoring/v3/common.proto index 84d8423f..3e9653a8 100644 --- a/protos/google/monitoring/v3/common.proto +++ b/protos/google/monitoring/v3/common.proto @@ -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. @@ -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; diff --git a/protos/google/monitoring/v3/dropped_labels.proto b/protos/google/monitoring/v3/dropped_labels.proto new file mode 100644 index 00000000..bc3b8545 --- /dev/null +++ b/protos/google/monitoring/v3/dropped_labels.proto @@ -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 label = 1; +} diff --git a/protos/google/monitoring/v3/group.proto b/protos/google/monitoring/v3/group.proto index 0c98bebe..bad5016c 100644 --- a/protos/google/monitoring/v3/group.proto +++ b/protos/google/monitoring/v3/group.proto @@ -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. diff --git a/protos/google/monitoring/v3/group_service.proto b/protos/google/monitoring/v3/group_service.proto index 3d7493cf..7cfae976 100644 --- a/protos/google/monitoring/v3/group_service.proto +++ b/protos/google/monitoring/v3/group_service.proto @@ -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. @@ -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 @@ -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" + }; } } diff --git a/protos/google/monitoring/v3/metric.proto b/protos/google/monitoring/v3/metric.proto index 80c59d50..9d2d8d72 100644 --- a/protos/google/monitoring/v3/metric.proto +++ b/protos/google/monitoring/v3/metric.proto @@ -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. @@ -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"; @@ -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. @@ -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. @@ -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 diff --git a/protos/google/monitoring/v3/metric_service.proto b/protos/google/monitoring/v3/metric_service.proto index de11cbde..170c4eae 100644 --- a/protos/google/monitoring/v3/metric_service.proto +++ b/protos/google/monitoring/v3/metric_service.proto @@ -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. @@ -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"; @@ -37,40 +38,55 @@ 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. @@ -78,7 +94,10 @@ service MetricService { // 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: "*" + }; } } @@ -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. @@ -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 @@ -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 @@ -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. diff --git a/protos/google/monitoring/v3/mutation_record.proto b/protos/google/monitoring/v3/mutation_record.proto index a3ba28a1..3c979a17 100644 --- a/protos/google/monitoring/v3/mutation_record.proto +++ b/protos/google/monitoring/v3/mutation_record.proto @@ -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. diff --git a/protos/google/monitoring/v3/notification.proto b/protos/google/monitoring/v3/notification.proto index 8cbca33f..ed6a56f7 100644 --- a/protos/google/monitoring/v3/notification.proto +++ b/protos/google/monitoring/v3/notification.proto @@ -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. @@ -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 diff --git a/protos/google/monitoring/v3/notification_service.proto b/protos/google/monitoring/v3/notification_service.proto index aa5d294b..745e3984 100644 --- a/protos/google/monitoring/v3/notification_service.proto +++ b/protos/google/monitoring/v3/notification_service.proto @@ -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. diff --git a/protos/google/monitoring/v3/span_context.proto b/protos/google/monitoring/v3/span_context.proto new file mode 100644 index 00000000..c099bbb6 --- /dev/null +++ b/protos/google/monitoring/v3/span_context.proto @@ -0,0 +1,43 @@ +// 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; + +option csharp_namespace = "Google.Cloud.Monitoring.V3"; +option go_package = "google.golang.org/genproto/googleapis/monitoring/v3;monitoring"; +option java_multiple_files = true; +option java_outer_classname = "SpanContextProto"; +option java_package = "com.google.monitoring.v3"; +option php_namespace = "Google\\Cloud\\Monitoring\\V3"; + + +// The context of a span, attached to google.api.Distribution.Exemplars +// in google.api.Distribution values during aggregation. +// +// It contains the name of a span with format: +// projects/[PROJECT_ID]/traces/[TRACE_ID]/spans/[SPAN_ID] +message SpanContext { + // The resource name of the span in the following format: + // + // projects/[PROJECT_ID]/traces/[TRACE_ID]/spans/[SPAN_ID] + // + // [TRACE_ID] is a unique identifier for a trace within a project; + // it is a 32-character hexadecimal encoding of a 16-byte array. + // + // [SPAN_ID] is a unique identifier for a span within a trace; it + // is a 16-character hexadecimal encoding of an 8-byte array. + string span_name = 1; +} diff --git a/protos/google/monitoring/v3/uptime.proto b/protos/google/monitoring/v3/uptime.proto index 24dd1d73..4c280e9b 100644 --- a/protos/google/monitoring/v3/uptime.proto +++ b/protos/google/monitoring/v3/uptime.proto @@ -1,4 +1,4 @@ -// Copyright 2017 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. @@ -27,6 +27,26 @@ option java_package = "com.google.monitoring.v3"; option php_namespace = "Google\\Cloud\\Monitoring\\V3"; +// Nimbus InternalCheckers. +message InternalChecker { + // The GCP project ID. Not necessarily the same as the project_id for the + // config. + string project_id = 1; + + // The internal network to perform this uptime check on. + string network = 2; + + // The GCP zone the uptime check should egress from. Only respected for + // internal uptime checks, where internal_network is specified. + string gcp_zone = 3; + + // The checker ID. + string checker_id = 4; + + // The checker's human-readable name. + string display_name = 5; +} + // This message configures which resources and services to monitor for // availability. message UptimeCheckConfig { @@ -86,6 +106,7 @@ message UptimeCheckConfig { // https://www.w3.org/Protocols/rfc2616/rfc2616.txt (page 31). // Entering two separate headers with the same key in a Create call will // cause the first to be overwritten by the second. + // The maximum number of headers allowed is 100. map headers = 6; } @@ -101,29 +122,10 @@ message UptimeCheckConfig { // content. In the future, it can be expanded to allow for regular expressions // and more complex matching. message ContentMatcher { - // String content to match + // String content to match (max 1024 bytes) string content = 1; } - // Nimbus InternalCheckers. - message InternalChecker { - // The GCP project ID. Not necessarily the same as the project_id for the config. - string project_id = 1; - - // The internal network to perform this uptime check on. - string network = 2; - - // The GCP zone the uptime check should egress from. Only respected for - // internal uptime checks, where internal_network is specified. - string gcp_zone = 3; - - // The checker ID. - string checker_id = 4; - - // The checker's human-readable name. - string display_name = 5; - } - // A unique resource name for this UptimeCheckConfig. The format is: // // @@ -141,7 +143,15 @@ message UptimeCheckConfig { // The resource the check is checking. Required. oneof resource { - // The monitored resource associated with the configuration. + // The [monitored + // resource](https://cloud.google.com/monitoring/api/resources) associated + // with the configuration. + // The following monitored resource types are supported for uptime checks: + // uptime_url + // gce_instance + // gae_app + // aws_ec2_instance + // aws_elb_load_balancer google.api.MonitoredResource monitored_resource = 3; // The group resource associated with the configuration. @@ -157,8 +167,10 @@ message UptimeCheckConfig { TcpCheck tcp_check = 6; } - // How often the uptime check is performed. - // Currently, only 1, 5, 10, and 15 minutes are supported. Required. + // How often, in seconds, the uptime check is performed. + // Currently, the only supported values are `60s` (1 minute), `300s` + // (5 minutes), `600s` (10 minutes), and `900s` (15 minutes). Optional, + // defaults to `300s`. google.protobuf.Duration period = 7; // The maximum amount of time to wait for the request to complete (must be @@ -179,7 +191,12 @@ message UptimeCheckConfig { // regions. repeated UptimeCheckRegion selected_regions = 10; - // The internal checkers that this check will egress from. + // Denotes whether this is a check that egresses from InternalCheckers. + bool is_internal = 15; + + // The internal checkers that this check will egress from. If `is_internal` is + // true and this list is empty, the check will egress from all + // InternalCheckers configured for the project that owns this CheckConfig. repeated InternalChecker internal_checkers = 14; } @@ -224,15 +241,18 @@ enum UptimeCheckRegion { } // The supported resource types that can be used as values of -// group_resource.resource_type. gae_app and uptime_url are not allowed -// because group checks on App Engine modules and URLs are not allowed. +// `group_resource.resource_type`. +// `INSTANCE` includes `gce_instance` and `aws_ec2_instance` resource types. +// The resource types `gae_app` and `uptime_url` are not valid here because +// group checks on App Engine modules and URLs are not allowed. enum GroupResourceType { // Default value (not valid). RESOURCE_TYPE_UNSPECIFIED = 0; - // A group of instances (could be either GCE or AWS_EC2). + // A group of instances from Google Cloud Platform (GCP) or + // Amazon Web Services (AWS). INSTANCE = 1; - // A group of AWS load balancers. + // A group of Amazon ELB load balancers. AWS_ELB_LOAD_BALANCER = 2; } diff --git a/protos/google/monitoring/v3/uptime_service.proto b/protos/google/monitoring/v3/uptime_service.proto index c3e04133..3293edae 100644 --- a/protos/google/monitoring/v3/uptime_service.proto +++ b/protos/google/monitoring/v3/uptime_service.proto @@ -1,4 +1,4 @@ -// Copyright 2017 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. @@ -41,17 +41,24 @@ service UptimeCheckService { // Lists the existing valid uptime check configurations for the project, // leaving out any invalid configurations. rpc ListUptimeCheckConfigs(ListUptimeCheckConfigsRequest) returns (ListUptimeCheckConfigsResponse) { - option (google.api.http) = { get: "/v3/{parent=projects/*}/uptimeCheckConfigs" }; + option (google.api.http) = { + get: "/v3/{parent=projects/*}/uptimeCheckConfigs" + }; } // Gets a single uptime check configuration. rpc GetUptimeCheckConfig(GetUptimeCheckConfigRequest) returns (UptimeCheckConfig) { - option (google.api.http) = { get: "/v3/{name=projects/*/uptimeCheckConfigs/*}" }; + option (google.api.http) = { + get: "/v3/{name=projects/*/uptimeCheckConfigs/*}" + }; } // Creates a new uptime check configuration. rpc CreateUptimeCheckConfig(CreateUptimeCheckConfigRequest) returns (UptimeCheckConfig) { - option (google.api.http) = { post: "/v3/{parent=projects/*}/uptimeCheckConfigs" body: "uptime_check_config" }; + option (google.api.http) = { + post: "/v3/{parent=projects/*}/uptimeCheckConfigs" + body: "uptime_check_config" + }; } // Updates an uptime check configuration. You can either replace the entire @@ -59,27 +66,33 @@ service UptimeCheckService { // configuration by specifying the fields to be updated via `"updateMask"`. // Returns the updated configuration. rpc UpdateUptimeCheckConfig(UpdateUptimeCheckConfigRequest) returns (UptimeCheckConfig) { - option (google.api.http) = { patch: "/v3/{uptime_check_config.name=projects/*/uptimeCheckConfigs/*}" body: "uptime_check_config" }; + option (google.api.http) = { + patch: "/v3/{uptime_check_config.name=projects/*/uptimeCheckConfigs/*}" + body: "uptime_check_config" + }; } // Deletes an uptime check configuration. Note that this method will fail // if the uptime check configuration is referenced by an alert policy or // other dependent configs that would be rendered invalid by the deletion. rpc DeleteUptimeCheckConfig(DeleteUptimeCheckConfigRequest) returns (google.protobuf.Empty) { - option (google.api.http) = { delete: "/v3/{name=projects/*/uptimeCheckConfigs/*}" }; + option (google.api.http) = { + delete: "/v3/{name=projects/*/uptimeCheckConfigs/*}" + }; } // Returns the list of IPs that checkers run from rpc ListUptimeCheckIps(ListUptimeCheckIpsRequest) returns (ListUptimeCheckIpsResponse) { - option (google.api.http) = { get: "/v3/uptimeCheckIps" }; + option (google.api.http) = { + get: "/v3/uptimeCheckIps" + }; } } // The protocol for the `ListUptimeCheckConfigs` request. message ListUptimeCheckConfigsRequest { - // The project whose uptime check configurations are listed. The format is - // - // `projects/[PROJECT_ID]`. + // The project whose uptime check configurations are listed. The format + // is `projects/[PROJECT_ID]`. string parent = 1; // The maximum number of results to return in a single response. The server @@ -105,21 +118,23 @@ message ListUptimeCheckConfigsResponse { // next_page_token is passed to the subsequent List method call (in the // request message's page_token field). string next_page_token = 2; + + // The total number of uptime check configurations for the project, + // irrespective of any pagination. + int32 total_size = 3; } // The protocol for the `GetUptimeCheckConfig` request. message GetUptimeCheckConfigRequest { - // The uptime check configuration to retrieve. The format is - // - // `projects/[PROJECT_ID]/uptimeCheckConfigs/[UPTIME_CHECK_ID]`. + // The uptime check configuration to retrieve. The format + // is `projects/[PROJECT_ID]/uptimeCheckConfigs/[UPTIME_CHECK_ID]`. string name = 1; } // The protocol for the `CreateUptimeCheckConfig` request. message CreateUptimeCheckConfigRequest { - // The project in which to create the uptime check. The format is: - // - // `projects/[PROJECT_ID]`. + // The project in which to create the uptime check. The format + // is `projects/[PROJECT_ID]`. string parent = 1; // The new uptime check configuration. @@ -137,18 +152,21 @@ message UpdateUptimeCheckConfigRequest { // Required. If an `"updateMask"` has been specified, this field gives // the values for the set of fields mentioned in the `"updateMask"`. If an // `"updateMask"` has not been given, this uptime check configuration replaces - // the current configuration. If a field is mentioned in `"updateMask`" but + // the current configuration. If a field is mentioned in `"updateMask"` but // the corresonding field is omitted in this partial uptime check // configuration, it has the effect of deleting/clearing the field from the // configuration on the server. + // + // The following fields can be updated: `display_name`, + // `http_check`, `tcp_check`, `timeout`, `content_matchers`, and + // `selected_regions`. UptimeCheckConfig uptime_check_config = 3; } // The protocol for the `DeleteUptimeCheckConfig` request. message DeleteUptimeCheckConfigRequest { - // The uptime check configuration to delete. The format is - // - // `projects/[PROJECT_ID]/uptimeCheckConfigs/[UPTIME_CHECK_ID]`. + // The uptime check configuration to delete. The format + // is `projects/[PROJECT_ID]/uptimeCheckConfigs/[UPTIME_CHECK_ID]`. string name = 1; } diff --git a/src/v3/doc/google/monitoring/v3/doc_alert.js b/src/v3/doc/google/monitoring/v3/doc_alert.js index b60323bc..1796929d 100644 --- a/src/v3/doc/google/monitoring/v3/doc_alert.js +++ b/src/v3/doc/google/monitoring/v3/doc_alert.js @@ -290,15 +290,14 @@ var AlertPolicy = { * @property {Object} duration * 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. * * This object should have the same structure as [Duration]{@link google.protobuf.Duration} * diff --git a/src/v3/doc/google/monitoring/v3/doc_metric.js b/src/v3/doc/google/monitoring/v3/doc_metric.js index 8ea16bf4..b2d8d3aa 100644 --- a/src/v3/doc/google/monitoring/v3/doc_metric.js +++ b/src/v3/doc/google/monitoring/v3/doc_metric.js @@ -19,14 +19,14 @@ * A single data point in a time series. * * @property {Object} interval - * 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. * * This object should have the same structure as [TimeInterval]{@link google.monitoring.v3.TimeInterval} * @@ -56,11 +56,18 @@ var Point = { * This object should have the same structure as [Metric]{@link google.api.Metric} * * @property {Object} resource - * 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. * * This object should have the same structure as [MonitoredResource]{@link google.api.MonitoredResource} * + * @property {Object} metadata + * 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. + * + * This object should have the same structure as [MonitoredResourceMetadata]{@link google.api.MonitoredResourceMetadata} + * * @property {number} metricKind * 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 @@ -85,8 +92,8 @@ var Point = { * The number should be among the values of [ValueType]{@link google.api.ValueType} * * @property {Object[]} points - * 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 diff --git a/src/v3/doc/google/monitoring/v3/doc_metric_service.js b/src/v3/doc/google/monitoring/v3/doc_metric_service.js index 63e6b603..97757a82 100644 --- a/src/v3/doc/google/monitoring/v3/doc_metric_service.js +++ b/src/v3/doc/google/monitoring/v3/doc_metric_service.js @@ -48,7 +48,7 @@ var ListMonitoredResourceDescriptorsRequest = { }; /** - * The `ListMonitoredResourcDescriptors` response. + * The `ListMonitoredResourceDescriptors` response. * * @property {Object[]} resourceDescriptors * The monitored resource descriptors that are available to this project @@ -227,9 +227,8 @@ var DeleteMetricDescriptorRequest = { * This object should have the same structure as [Aggregation]{@link google.monitoring.v3.Aggregation} * * @property {string} orderBy - * 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. * * @property {number} view * Specifies which information is returned about the time series. @@ -237,10 +236,11 @@ var DeleteMetricDescriptorRequest = { * The number should be among the values of [TimeSeriesView]{@link google.monitoring.v3.TimeSeriesView} * * @property {number} pageSize - * 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. * * @property {string} pageToken * If this field is not empty then it must contain the `nextPageToken` value @@ -289,6 +289,12 @@ var ListTimeSeriesRequest = { * to a non-empty value. To see the additional results, * use that value as `pageToken` in the next call to this method. * + * @property {Object[]} executionErrors + * Query execution errors that may have caused the time series data returned + * to be incomplete. + * + * This object should have the same structure as [Status]{@link google.rpc.Status} + * * @typedef ListTimeSeriesResponse * @memberof google.monitoring.v3 * @see [google.monitoring.v3.ListTimeSeriesResponse definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/monitoring/v3/metric_service.proto} diff --git a/src/v3/doc/google/monitoring/v3/doc_uptime.js b/src/v3/doc/google/monitoring/v3/doc_uptime.js index 27cf5252..f1415a32 100644 --- a/src/v3/doc/google/monitoring/v3/doc_uptime.js +++ b/src/v3/doc/google/monitoring/v3/doc_uptime.js @@ -15,6 +15,34 @@ // Note: this file is purely for documentation. Any contents are not expected // to be loaded as the JS file. +/** + * Nimbus InternalCheckers. + * + * @property {string} projectId + * The GCP project ID. Not necessarily the same as the project_id for the + * config. + * + * @property {string} network + * The internal network to perform this uptime check on. + * + * @property {string} gcpZone + * The GCP zone the uptime check should egress from. Only respected for + * internal uptime checks, where internal_network is specified. + * + * @property {string} checkerId + * The checker ID. + * + * @property {string} displayName + * The checker's human-readable name. + * + * @typedef InternalChecker + * @memberof google.monitoring.v3 + * @see [google.monitoring.v3.InternalChecker definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/monitoring/v3/uptime.proto} + */ +var InternalChecker = { + // This is for documentation. Actual contents will be loaded by gRPC. +}; + /** * This message configures which resources and services to monitor for * availability. @@ -35,7 +63,15 @@ * to identify; however, uniqueness is not enforced. Required. * * @property {Object} monitoredResource - * The monitored resource associated with the configuration. + * The [monitored + * resource](https://cloud.google.com/monitoring/api/resources) associated + * with the configuration. + * The following monitored resource types are supported for uptime checks: + * uptime_url + * gce_instance + * gae_app + * aws_ec2_instance + * aws_elb_load_balancer * * This object should have the same structure as [MonitoredResource]{@link google.api.MonitoredResource} * @@ -55,8 +91,10 @@ * This object should have the same structure as [TcpCheck]{@link google.monitoring.v3.TcpCheck} * * @property {Object} period - * How often the uptime check is performed. - * Currently, only 1, 5, 10, and 15 minutes are supported. Required. + * How often, in seconds, the uptime check is performed. + * Currently, the only supported values are `60s` (1 minute), `300s` + * (5 minutes), `600s` (10 minutes), and `900s` (15 minutes). Optional, + * defaults to `300s`. * * This object should have the same structure as [Duration]{@link google.protobuf.Duration} * @@ -84,8 +122,13 @@ * * The number should be among the values of [UptimeCheckRegion]{@link google.monitoring.v3.UptimeCheckRegion} * + * @property {boolean} isInternal + * Denotes whether this is a check that egresses from InternalCheckers. + * * @property {Object[]} internalCheckers - * The internal checkers that this check will egress from. + * The internal checkers that this check will egress from. If `is_internal` is + * true and this list is empty, the check will egress from all + * InternalCheckers configured for the project that owns this CheckConfig. * * This object should have the same structure as [InternalChecker]{@link google.monitoring.v3.InternalChecker} * @@ -155,6 +198,7 @@ var UptimeCheckConfig = { * https://www.w3.org/Protocols/rfc2616/rfc2616.txt (page 31). * Entering two separate headers with the same key in a Create call will * cause the first to be overwritten by the second. + * The maximum number of headers allowed is 100. * * @typedef HttpCheck * @memberof google.monitoring.v3 @@ -205,7 +249,7 @@ var UptimeCheckConfig = { * and more complex matching. * * @property {string} content - * String content to match + * String content to match (max 1024 bytes) * * @typedef ContentMatcher * @memberof google.monitoring.v3 @@ -213,33 +257,6 @@ var UptimeCheckConfig = { */ ContentMatcher: { // This is for documentation. Actual contents will be loaded by gRPC. - }, - - /** - * Nimbus InternalCheckers. - * - * @property {string} projectId - * The GCP project ID. Not necessarily the same as the project_id for the config. - * - * @property {string} network - * The internal network to perform this uptime check on. - * - * @property {string} gcpZone - * The GCP zone the uptime check should egress from. Only respected for - * internal uptime checks, where internal_network is specified. - * - * @property {string} checkerId - * The checker ID. - * - * @property {string} displayName - * The checker's human-readable name. - * - * @typedef InternalChecker - * @memberof google.monitoring.v3 - * @see [google.monitoring.v3.UptimeCheckConfig.InternalChecker definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/monitoring/v3/uptime.proto} - */ - InternalChecker: { - // This is for documentation. Actual contents will be loaded by gRPC. } }; @@ -311,8 +328,10 @@ var UptimeCheckRegion = { /** * The supported resource types that can be used as values of - * group_resource.resource_type. gae_app and uptime_url are not allowed - * because group checks on App Engine modules and URLs are not allowed. + * `group_resource.resource_type`. + * `INSTANCE` includes `gce_instance` and `aws_ec2_instance` resource types. + * The resource types `gae_app` and `uptime_url` are not valid here because + * group checks on App Engine modules and URLs are not allowed. * * @enum {number} * @memberof google.monitoring.v3 @@ -325,12 +344,13 @@ var GroupResourceType = { RESOURCE_TYPE_UNSPECIFIED: 0, /** - * A group of instances (could be either GCE or AWS_EC2). + * A group of instances from Google Cloud Platform (GCP) or + * Amazon Web Services (AWS). */ INSTANCE: 1, /** - * A group of AWS load balancers. + * A group of Amazon ELB load balancers. */ AWS_ELB_LOAD_BALANCER: 2 }; \ No newline at end of file diff --git a/src/v3/doc/google/monitoring/v3/doc_uptime_service.js b/src/v3/doc/google/monitoring/v3/doc_uptime_service.js index 565fe868..a948014d 100644 --- a/src/v3/doc/google/monitoring/v3/doc_uptime_service.js +++ b/src/v3/doc/google/monitoring/v3/doc_uptime_service.js @@ -19,9 +19,8 @@ * The protocol for the `ListUptimeCheckConfigs` request. * * @property {string} parent - * The project whose uptime check configurations are listed. The format is - * - * `projects/[PROJECT_ID]`. + * The project whose uptime check configurations are listed. The format + * is `projects/[PROJECT_ID]`. * * @property {number} pageSize * The maximum number of results to return in a single response. The server @@ -57,6 +56,10 @@ var ListUptimeCheckConfigsRequest = { * next_page_token is passed to the subsequent List method call (in the * request message's page_token field). * + * @property {number} totalSize + * The total number of uptime check configurations for the project, + * irrespective of any pagination. + * * @typedef ListUptimeCheckConfigsResponse * @memberof google.monitoring.v3 * @see [google.monitoring.v3.ListUptimeCheckConfigsResponse definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/monitoring/v3/uptime_service.proto} @@ -69,9 +72,8 @@ var ListUptimeCheckConfigsResponse = { * The protocol for the `GetUptimeCheckConfig` request. * * @property {string} name - * The uptime check configuration to retrieve. The format is - * - * `projects/[PROJECT_ID]/uptimeCheckConfigs/[UPTIME_CHECK_ID]`. + * The uptime check configuration to retrieve. The format + * is `projects/[PROJECT_ID]/uptimeCheckConfigs/[UPTIME_CHECK_ID]`. * * @typedef GetUptimeCheckConfigRequest * @memberof google.monitoring.v3 @@ -85,9 +87,8 @@ var GetUptimeCheckConfigRequest = { * The protocol for the `CreateUptimeCheckConfig` request. * * @property {string} parent - * The project in which to create the uptime check. The format is: - * - * `projects/[PROJECT_ID]`. + * The project in which to create the uptime check. The format + * is `projects/[PROJECT_ID]`. * * @property {Object} uptimeCheckConfig * The new uptime check configuration. @@ -117,11 +118,15 @@ var CreateUptimeCheckConfigRequest = { * Required. If an `"updateMask"` has been specified, this field gives * the values for the set of fields mentioned in the `"updateMask"`. If an * `"updateMask"` has not been given, this uptime check configuration replaces - * the current configuration. If a field is mentioned in `"updateMask`" but + * the current configuration. If a field is mentioned in `"updateMask"` but * the corresonding field is omitted in this partial uptime check * configuration, it has the effect of deleting/clearing the field from the * configuration on the server. * + * The following fields can be updated: `display_name`, + * `http_check`, `tcp_check`, `timeout`, `content_matchers`, and + * `selected_regions`. + * * This object should have the same structure as [UptimeCheckConfig]{@link google.monitoring.v3.UptimeCheckConfig} * * @typedef UpdateUptimeCheckConfigRequest @@ -136,9 +141,8 @@ var UpdateUptimeCheckConfigRequest = { * The protocol for the `DeleteUptimeCheckConfig` request. * * @property {string} name - * The uptime check configuration to delete. The format is - * - * `projects/[PROJECT_ID]/uptimeCheckConfigs/[UPTIME_CHECK_ID]`. + * The uptime check configuration to delete. The format + * is `projects/[PROJECT_ID]/uptimeCheckConfigs/[UPTIME_CHECK_ID]`. * * @typedef DeleteUptimeCheckConfigRequest * @memberof google.monitoring.v3 diff --git a/src/v3/doc/google/protobuf/doc_any.js b/src/v3/doc/google/protobuf/doc_any.js new file mode 100644 index 00000000..f55fa17f --- /dev/null +++ b/src/v3/doc/google/protobuf/doc_any.js @@ -0,0 +1,131 @@ +// 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 +// +// https://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. + +// Note: this file is purely for documentation. Any contents are not expected +// to be loaded as the JS file. + +/** + * `Any` contains an arbitrary serialized protocol buffer message along with a + * URL that describes the type of the serialized message. + * + * Protobuf library provides support to pack/unpack Any values in the form + * of utility functions or additional generated methods of the Any type. + * + * Example 1: Pack and unpack a message in C++. + * + * Foo foo = ...; + * Any any; + * any.PackFrom(foo); + * ... + * if (any.UnpackTo(&foo)) { + * ... + * } + * + * Example 2: Pack and unpack a message in Java. + * + * Foo foo = ...; + * Any any = Any.pack(foo); + * ... + * if (any.is(Foo.class)) { + * foo = any.unpack(Foo.class); + * } + * + * Example 3: Pack and unpack a message in Python. + * + * foo = Foo(...) + * any = Any() + * any.Pack(foo) + * ... + * if any.Is(Foo.DESCRIPTOR): + * any.Unpack(foo) + * ... + * + * Example 4: Pack and unpack a message in Go + * + * foo := &pb.Foo{...} + * any, err := ptypes.MarshalAny(foo) + * ... + * foo := &pb.Foo{} + * if err := ptypes.UnmarshalAny(any, foo); err != nil { + * ... + * } + * + * The pack methods provided by protobuf library will by default use + * 'type.googleapis.com/full.type.name' as the type URL and the unpack + * methods only use the fully qualified type name after the last '/' + * in the type URL, for example "foo.bar.com/x/y.z" will yield type + * name "y.z". + * + * + * # JSON + * + * The JSON representation of an `Any` value uses the regular + * representation of the deserialized, embedded message, with an + * additional field `@type` which contains the type URL. Example: + * + * package google.profile; + * message Person { + * string first_name = 1; + * string last_name = 2; + * } + * + * { + * "@type": "type.googleapis.com/google.profile.Person", + * "firstName": , + * "lastName": + * } + * + * If the embedded message type is well-known and has a custom JSON + * representation, that representation will be embedded adding a field + * `value` which holds the custom JSON in addition to the `@type` + * field. Example (for message google.protobuf.Duration): + * + * { + * "@type": "type.googleapis.com/google.protobuf.Duration", + * "value": "1.212s" + * } + * + * @property {string} typeUrl + * A URL/resource name whose content describes the type of the + * serialized protocol buffer message. + * + * For URLs which use the scheme `http`, `https`, or no scheme, the + * following restrictions and interpretations apply: + * + * * If no scheme is provided, `https` is assumed. + * * The last segment of the URL's path must represent the fully + * qualified name of the type (as in `path/google.protobuf.Duration`). + * The name should be in a canonical form (e.g., leading "." is + * not accepted). + * * An HTTP GET on the URL must yield a google.protobuf.Type + * value in binary format, or produce an error. + * * Applications are allowed to cache lookup results based on the + * URL, or have them precompiled into a binary to avoid any + * lookup. Therefore, binary compatibility needs to be preserved + * on changes to types. (Use versioned type names to manage + * breaking changes.) + * + * Schemes other than `http`, `https` (or the empty scheme) might be + * used with implementation specific semantics. + * + * @property {string} value + * Must be a valid serialized protocol buffer of the above specified type. + * + * @typedef Any + * @memberof google.protobuf + * @see [google.protobuf.Any definition in proto format]{@link https://github.com/google/protobuf/blob/master/src/google/protobuf/any.proto} + */ +var Any = { + // This is for documentation. Actual contents will be loaded by gRPC. +}; \ No newline at end of file diff --git a/src/v3/doc/google/protobuf/doc_struct.js b/src/v3/doc/google/protobuf/doc_struct.js new file mode 100644 index 00000000..efcd8ac5 --- /dev/null +++ b/src/v3/doc/google/protobuf/doc_struct.js @@ -0,0 +1,112 @@ +// 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 +// +// https://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. + +// Note: this file is purely for documentation. Any contents are not expected +// to be loaded as the JS file. + +/** + * `Struct` represents a structured data value, consisting of fields + * which map to dynamically typed values. In some languages, `Struct` + * might be supported by a native representation. For example, in + * scripting languages like JS a struct is represented as an + * object. The details of that representation are described together + * with the proto support for the language. + * + * The JSON representation for `Struct` is JSON object. + * + * @property {Object.} fields + * Unordered map of dynamically typed values. + * + * @typedef Struct + * @memberof google.protobuf + * @see [google.protobuf.Struct definition in proto format]{@link https://github.com/google/protobuf/blob/master/src/google/protobuf/struct.proto} + */ +var Struct = { + // This is for documentation. Actual contents will be loaded by gRPC. +}; + +/** + * `Value` represents a dynamically typed value which can be either + * null, a number, a string, a boolean, a recursive struct value, or a + * list of values. A producer of value is expected to set one of that + * variants, absence of any variant indicates an error. + * + * The JSON representation for `Value` is JSON value. + * + * @property {number} nullValue + * Represents a null value. + * + * The number should be among the values of [NullValue]{@link google.protobuf.NullValue} + * + * @property {number} numberValue + * Represents a double value. + * + * @property {string} stringValue + * Represents a string value. + * + * @property {boolean} boolValue + * Represents a boolean value. + * + * @property {Object} structValue + * Represents a structured value. + * + * This object should have the same structure as [Struct]{@link google.protobuf.Struct} + * + * @property {Object} listValue + * Represents a repeated `Value`. + * + * This object should have the same structure as [ListValue]{@link google.protobuf.ListValue} + * + * @typedef Value + * @memberof google.protobuf + * @see [google.protobuf.Value definition in proto format]{@link https://github.com/google/protobuf/blob/master/src/google/protobuf/struct.proto} + */ +var Value = { + // This is for documentation. Actual contents will be loaded by gRPC. +}; + +/** + * `ListValue` is a wrapper around a repeated field of values. + * + * The JSON representation for `ListValue` is JSON array. + * + * @property {Object[]} values + * Repeated field of dynamically typed values. + * + * This object should have the same structure as [Value]{@link google.protobuf.Value} + * + * @typedef ListValue + * @memberof google.protobuf + * @see [google.protobuf.ListValue definition in proto format]{@link https://github.com/google/protobuf/blob/master/src/google/protobuf/struct.proto} + */ +var ListValue = { + // This is for documentation. Actual contents will be loaded by gRPC. +}; + +/** + * `NullValue` is a singleton enumeration to represent the null value for the + * `Value` type union. + * + * The JSON representation for `NullValue` is JSON `null`. + * + * @enum {number} + * @memberof google.protobuf + */ +var NullValue = { + + /** + * Null value. + */ + NULL_VALUE: 0 +}; \ No newline at end of file diff --git a/src/v3/doc/google/rpc/doc_status.js b/src/v3/doc/google/rpc/doc_status.js new file mode 100644 index 00000000..7122f168 --- /dev/null +++ b/src/v3/doc/google/rpc/doc_status.js @@ -0,0 +1,92 @@ +// 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 +// +// https://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. + +// Note: this file is purely for documentation. Any contents are not expected +// to be loaded as the JS file. + +/** + * The `Status` type defines a logical error model that is suitable for different + * programming environments, including REST APIs and RPC APIs. It is used by + * [gRPC](https://github.com/grpc). The error model is designed to be: + * + * - Simple to use and understand for most users + * - Flexible enough to meet unexpected needs + * + * # Overview + * + * The `Status` message contains three pieces of data: error code, error message, + * and error details. The error code should be an enum value of + * google.rpc.Code, but it may accept additional error codes if needed. The + * error message should be a developer-facing English message that helps + * developers *understand* and *resolve* the error. If a localized user-facing + * error message is needed, put the localized message in the error details or + * localize it in the client. The optional error details may contain arbitrary + * information about the error. There is a predefined set of error detail types + * in the package `google.rpc` that can be used for common error conditions. + * + * # Language mapping + * + * The `Status` message is the logical representation of the error model, but it + * is not necessarily the actual wire format. When the `Status` message is + * exposed in different client libraries and different wire protocols, it can be + * mapped differently. For example, it will likely be mapped to some exceptions + * in Java, but more likely mapped to some error codes in C. + * + * # Other uses + * + * The error model and the `Status` message can be used in a variety of + * environments, either with or without APIs, to provide a + * consistent developer experience across different environments. + * + * Example uses of this error model include: + * + * - Partial errors. If a service needs to return partial errors to the client, + * it may embed the `Status` in the normal response to indicate the partial + * errors. + * + * - Workflow errors. A typical workflow has multiple steps. Each step may + * have a `Status` message for error reporting. + * + * - Batch operations. If a client uses batch request and batch response, the + * `Status` message should be used directly inside batch response, one for + * each error sub-response. + * + * - Asynchronous operations. If an API call embeds asynchronous operation + * results in its response, the status of those operations should be + * represented directly using the `Status` message. + * + * - Logging. If some API errors are stored in logs, the message `Status` could + * be used directly after any stripping needed for security/privacy reasons. + * + * @property {number} code + * The status code, which should be an enum value of google.rpc.Code. + * + * @property {string} message + * A developer-facing error message, which should be in English. Any + * user-facing error message should be localized and sent in the + * google.rpc.Status.details field, or localized by the client. + * + * @property {Object[]} details + * A list of messages that carry the error details. There is a common set of + * message types for APIs to use. + * + * This object should have the same structure as [Any]{@link google.protobuf.Any} + * + * @typedef Status + * @memberof google.rpc + * @see [google.rpc.Status definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/rpc/status.proto} + */ +var Status = { + // This is for documentation. Actual contents will be loaded by gRPC. +}; \ No newline at end of file diff --git a/src/v3/group_service_client.js b/src/v3/group_service_client.js index 4f22c4df..b6652770 100644 --- a/src/v3/group_service_client.js +++ b/src/v3/group_service_client.js @@ -23,7 +23,7 @@ const VERSION = require('../../package.json').version; /** * The Group API lets you inspect and manage your - * [groups](https://cloud.google.comgoogle.monitoring.v3.Group). + * [groups](https://cloud.google.com#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 diff --git a/src/v3/metric_service_client.js b/src/v3/metric_service_client.js index 27e48c2f..3d162551 100644 --- a/src/v3/metric_service_client.js +++ b/src/v3/metric_service_client.js @@ -806,9 +806,8 @@ class MetricServiceClient { * * This object should have the same structure as [Aggregation]{@link google.monitoring.v3.Aggregation} * @param {string} [request.orderBy] - * 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. * @param {number} [request.pageSize] * The maximum number of resources contained in the underlying API * response. If page streaming is performed per-resource, this @@ -957,9 +956,8 @@ class MetricServiceClient { * * This object should have the same structure as [Aggregation]{@link google.monitoring.v3.Aggregation} * @param {string} [request.orderBy] - * 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. * @param {number} [request.pageSize] * The maximum number of resources contained in the underlying API * response. If page streaming is performed per-resource, this diff --git a/src/v3/uptime_check_service_client.js b/src/v3/uptime_check_service_client.js index 8d4db920..d4e4b50f 100644 --- a/src/v3/uptime_check_service_client.js +++ b/src/v3/uptime_check_service_client.js @@ -221,9 +221,8 @@ class UptimeCheckServiceClient { * @param {Object} request * The request object that will be sent. * @param {string} request.parent - * The project whose uptime check configurations are listed. The format is - * - * `projects/[PROJECT_ID]`. + * The project whose uptime check configurations are listed. The format + * is `projects/[PROJECT_ID]`. * @param {number} [request.pageSize] * The maximum number of resources contained in the underlying API * response. If page streaming is performed per-resource, this @@ -331,9 +330,8 @@ class UptimeCheckServiceClient { * @param {Object} request * The request object that will be sent. * @param {string} request.parent - * The project whose uptime check configurations are listed. The format is - * - * `projects/[PROJECT_ID]`. + * The project whose uptime check configurations are listed. The format + * is `projects/[PROJECT_ID]`. * @param {number} [request.pageSize] * The maximum number of resources contained in the underlying API * response. If page streaming is performed per-resource, this @@ -378,9 +376,8 @@ class UptimeCheckServiceClient { * @param {Object} request * The request object that will be sent. * @param {string} request.name - * The uptime check configuration to retrieve. The format is - * - * `projects/[PROJECT_ID]/uptimeCheckConfigs/[UPTIME_CHECK_ID]`. + * The uptime check configuration to retrieve. The format + * is `projects/[PROJECT_ID]/uptimeCheckConfigs/[UPTIME_CHECK_ID]`. * @param {Object} [options] * Optional parameters. You can override the default settings for this call, e.g, timeout, * retries, paginations, etc. See [gax.CallOptions]{@link https://googleapis.github.io/gax-nodejs/global.html#CallOptions} for the details. @@ -426,9 +423,8 @@ class UptimeCheckServiceClient { * @param {Object} request * The request object that will be sent. * @param {string} request.parent - * The project in which to create the uptime check. The format is: - * - * `projects/[PROJECT_ID]`. + * The project in which to create the uptime check. The format + * is `projects/[PROJECT_ID]`. * @param {Object} request.uptimeCheckConfig * The new uptime check configuration. * @@ -493,11 +489,15 @@ class UptimeCheckServiceClient { * Required. If an `"updateMask"` has been specified, this field gives * the values for the set of fields mentioned in the `"updateMask"`. If an * `"updateMask"` has not been given, this uptime check configuration replaces - * the current configuration. If a field is mentioned in `"updateMask`" but + * the current configuration. If a field is mentioned in `"updateMask"` but * the corresonding field is omitted in this partial uptime check * configuration, it has the effect of deleting/clearing the field from the * configuration on the server. * + * The following fields can be updated: `display_name`, + * `http_check`, `tcp_check`, `timeout`, `content_matchers`, and + * `selected_regions`. + * * This object should have the same structure as [UptimeCheckConfig]{@link google.monitoring.v3.UptimeCheckConfig} * @param {Object} [request.updateMask] * Optional. If present, only the listed fields in the current uptime check @@ -557,9 +557,8 @@ class UptimeCheckServiceClient { * @param {Object} request * The request object that will be sent. * @param {string} request.name - * The uptime check configuration to delete. The format is - * - * `projects/[PROJECT_ID]/uptimeCheckConfigs/[UPTIME_CHECK_ID]`. + * The uptime check configuration to delete. The format + * is `projects/[PROJECT_ID]/uptimeCheckConfigs/[UPTIME_CHECK_ID]`. * @param {Object} [options] * Optional parameters. You can override the default settings for this call, e.g, timeout, * retries, paginations, etc. See [gax.CallOptions]{@link https://googleapis.github.io/gax-nodejs/global.html#CallOptions} for the details. diff --git a/test/gapic-v3.js b/test/gapic-v3.js index 1de1c7f5..749f50a2 100644 --- a/test/gapic-v3.js +++ b/test/gapic-v3.js @@ -1749,10 +1749,12 @@ describe('UptimeCheckServiceClient', () => { // Mock response var nextPageToken = ''; + var totalSize = 705419236; var uptimeCheckConfigsElement = {}; var uptimeCheckConfigs = [uptimeCheckConfigsElement]; var expectedResponse = { nextPageToken: nextPageToken, + totalSize: totalSize, uptimeCheckConfigs: uptimeCheckConfigs, }; @@ -1820,9 +1822,11 @@ describe('UptimeCheckServiceClient', () => { // Mock response var name2 = 'name2-1052831874'; var displayName = 'displayName1615086568'; + var isInternal = true; var expectedResponse = { name: name2, displayName: displayName, + isInternal: isInternal, }; // Mock Grpc layer @@ -1887,9 +1891,11 @@ describe('UptimeCheckServiceClient', () => { // Mock response var name = 'name3373707'; var displayName = 'displayName1615086568'; + var isInternal = true; var expectedResponse = { name: name, displayName: displayName, + isInternal: isInternal, }; // Mock Grpc layer @@ -1951,9 +1957,11 @@ describe('UptimeCheckServiceClient', () => { // Mock response var name = 'name3373707'; var displayName = 'displayName1615086568'; + var isInternal = true; var expectedResponse = { name: name, displayName: displayName, + isInternal: isInternal, }; // Mock Grpc layer