Skip to content

Commit

Permalink
feat!: GetMetadata method renamed to GetUniversalMetdata
Browse files Browse the repository at this point in the history
docs: documentation updates

PiperOrigin-RevId: 335470104
  • Loading branch information
Google APIs authored and Copybara-Service committed Oct 5, 2020
1 parent eabe7c0 commit c3c1296
Show file tree
Hide file tree
Showing 3 changed files with 64 additions and 45 deletions.
45 changes: 38 additions & 7 deletions google/analytics/data/v1alpha/BUILD.bazel
Expand Up @@ -28,7 +28,6 @@ proto_library(
"//google/api:annotations_proto",
"//google/api:client_proto",
"//google/api:field_behavior_proto",
"//google/api:resource_proto",
],
)

Expand Down Expand Up @@ -149,25 +148,57 @@ go_gapic_assembly_pkg(
##############################################################################
# Python
##############################################################################
# This library is using Python microgenerator.
# DO NOT OVERRIDE this Python section with autogenerated rules.
load(
"@com_google_googleapis_imports//:imports.bzl",
py_gapic_assembly_pkg = "py_gapic_assembly_pkg2",
py_gapic_library = "py_gapic_library2",
"moved_proto_library",
"py_gapic_assembly_pkg",
"py_gapic_library",
"py_grpc_library",
"py_proto_library",
)

moved_proto_library(
name = "data_moved_proto",
srcs = [":data_proto"],
deps = [
"//google/api:annotations_proto",
"//google/api:client_proto",
"//google/api:field_behavior_proto",
],
)

py_proto_library(
name = "data_py_proto",
plugin = "@protoc_docs_plugin//:docs_plugin",
deps = [":data_moved_proto"],
)

py_grpc_library(
name = "data_py_grpc",
srcs = [":data_moved_proto"],
deps = [":data_py_proto"],
)

py_gapic_library(
name = "data_py_gapic",
srcs = [":data_proto"],
src = ":data_proto_with_info",
gapic_yaml = "analyticsdata_gapic.yaml",
grpc_service_config = "analytics_data_grpc_service_config.json",
package = "google.analytics.data.v1alpha",
service_yaml = "analyticsdata_v1alpha.yaml",
deps = [
":data_py_grpc",
":data_py_proto",
],
)

# Open Source Packages
py_gapic_assembly_pkg(
name = "google-analytics-data-v1alpha-py",
deps = [
":data_py_gapic",
":data_py_grpc",
":data_py_proto",
],
)

Expand Down Expand Up @@ -312,8 +343,8 @@ csharp_grpc_library(
csharp_gapic_library(
name = "data_csharp_gapic",
srcs = [":data_proto_with_info"],
grpc_service_config = "analytics_data_grpc_service_config.json",
common_resources_config = "@gax_dotnet//:Google.Api.Gax/ResourceNames/CommonResourcesConfig.json",
grpc_service_config = "analytics_data_grpc_service_config.json",
deps = [
":data_csharp_grpc",
":data_csharp_proto",
Expand Down
60 changes: 23 additions & 37 deletions google/analytics/data/v1alpha/analytics_data_api.proto
Expand Up @@ -20,7 +20,6 @@ import "google/analytics/data/v1alpha/data.proto";
import "google/api/annotations.proto";
import "google/api/client.proto";
import "google/api/field_behavior.proto";
import "google/api/resource.proto";

option go_package = "google.golang.org/genproto/googleapis/analytics/data/v1alpha;data";
option java_multiple_files = true;
Expand Down Expand Up @@ -81,35 +80,16 @@ service AlphaAnalyticsData {
// Returns metadata for dimensions and metrics available in reporting methods.
// Used to explore the dimensions and metrics. Dimensions and metrics will be
// mostly added over time, but renames and deletions may occur.
rpc GetMetadata(GetMetadataRequest) returns (Metadata) {
//
// This method returns Universal Metadata. Universal Metadata are dimensions
// and metrics applicable to any property such as `country` and `totalUsers`.
rpc GetUniversalMetadata(GetUniversalMetadataRequest) returns (UniversalMetadata) {
option (google.api.http) = {
get: "/v1alpha/{name=metadata}"
additional_bindings {
get: "/v1alpha/{name=properties/*/metadata}"
}
get: "/v1alpha/universalMetadata"
};
option (google.api.method_signature) = "name";
}
}

// The dimensions and metrics currently accepted in reporting methods.
message Metadata {
option (google.api.resource) = {
type: "analyticsdata.googleapis.com/Metadata"
pattern: "metadata"
pattern: "properties/{property}/metadata"
};

// Resource name of this metadata.
string name = 3;

// The dimensions descriptions.
repeated DimensionMetadata dimensions = 1;

// The metric descriptions.
repeated MetricMetadata metrics = 2;
}

// The request to generate a report.
message RunReportRequest {
// A property whose events are tracked. Within a batch request, this entity
Expand Down Expand Up @@ -192,6 +172,12 @@ message RunReportResponse {
// If requested, the minimum values of metrics.
repeated Row minimums = 10;

// The total number of rows in the query result, regardless of the number of
// rows returned in the response. For example if a query returns 175 rows and
// includes limit = 50 in the API request, the response will contain row_count
// = 175 but only 50 rows.
int32 row_count = 12;

// Metadata for the report.
ResponseMetaData metadata = 6;

Expand Down Expand Up @@ -354,16 +340,16 @@ message BatchRunPivotReportsResponse {
repeated RunPivotReportResponse pivot_reports = 1;
}

// Request for dimension and metric metadata.
message GetMetadataRequest {
// Required. The name of the metadata to retrieve. Either has the form
// 'metadata' or 'properties/{property}/metadata'. This name field is
// specified in the URL path and not URL parameters. Property is a numeric
// Google Analytics App + Web Property Id.
string name = 1 [
(google.api.field_behavior) = REQUIRED,
(google.api.resource_reference) = {
type: "analyticsdata.googleapis.com/Metadata"
}
];
// Request for the universal dimension and metric metadata.
message GetUniversalMetadataRequest {

}

// The dimensions and metrics currently accepted in reporting methods.
message UniversalMetadata {
// The dimensions descriptions.
repeated DimensionMetadata dimensions = 1;

// The metric descriptions.
repeated MetricMetadata metrics = 2;
}
4 changes: 3 additions & 1 deletion google/analytics/data/v1alpha/data.proto
Expand Up @@ -486,7 +486,9 @@ message PivotHeader {
// combinations.
repeated PivotDimensionHeader pivot_dimension_headers = 1;

// The cardinality of the pivot as if offset = 0 and limit = -1.
// The cardinality of the pivot as if offset = 0 and limit = -1. The total
// number of rows for this pivot's fields regardless of how the parameters
// offset and limit are specified in the request.
int32 row_count = 2;
}

Expand Down

0 comments on commit c3c1296

Please sign in to comment.