1// Copyright 2023 Google LLC 2// 3// Licensed under the Apache License, Version 2.0 (the "License"); 4// you may not use this file except in compliance with the License. 5// You may obtain a copy of the License at 6// 7// http://www.apache.org/licenses/LICENSE-2.0 8// 9// Unless required by applicable law or agreed to in writing, software 10// distributed under the License is distributed on an "AS IS" BASIS, 11// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12// See the License for the specific language governing permissions and 13// limitations under the License. 14 15syntax = "proto3"; 16 17package google.analytics.admin.v1alpha; 18 19import "google/api/field_behavior.proto"; 20import "google/api/resource.proto"; 21import "google/protobuf/timestamp.proto"; 22 23option go_package = "cloud.google.com/go/analytics/admin/apiv1alpha/adminpb;adminpb"; 24option java_multiple_files = true; 25option java_outer_classname = "ExpandedDataSetProto"; 26option java_package = "com.google.analytics.admin.v1alpha"; 27 28// A specific filter for a single dimension 29message ExpandedDataSetFilter { 30 // A filter for a string-type dimension that matches a particular pattern. 31 message StringFilter { 32 // The match type for the string filter. 33 enum MatchType { 34 // Unspecified 35 MATCH_TYPE_UNSPECIFIED = 0; 36 37 // Exact match of the string value. 38 EXACT = 1; 39 40 // Contains the string value. 41 CONTAINS = 2; 42 } 43 44 // Required. The match type for the string filter. 45 MatchType match_type = 1 [(google.api.field_behavior) = REQUIRED]; 46 47 // Required. The string value to be matched against. 48 string value = 2 [(google.api.field_behavior) = REQUIRED]; 49 50 // Optional. If true, the match is case-sensitive. If false, the match is 51 // case-insensitive. 52 // Must be true when match_type is EXACT. 53 // Must be false when match_type is CONTAINS. 54 bool case_sensitive = 3 [(google.api.field_behavior) = OPTIONAL]; 55 } 56 57 // A filter for a string dimension that matches a particular list of options. 58 message InListFilter { 59 // Required. The list of possible string values to match against. Must be 60 // non-empty. 61 repeated string values = 1 [(google.api.field_behavior) = REQUIRED]; 62 63 // Optional. If true, the match is case-sensitive. If false, the match is 64 // case-insensitive. 65 // Must be true. 66 bool case_sensitive = 2 [(google.api.field_behavior) = OPTIONAL]; 67 } 68 69 // One of the above filters. 70 oneof one_filter { 71 // A filter for a string-type dimension that matches a particular pattern. 72 StringFilter string_filter = 2; 73 74 // A filter for a string dimension that matches a particular list of 75 // options. 76 InListFilter in_list_filter = 3; 77 } 78 79 // Required. The dimension name to filter. 80 string field_name = 1 [(google.api.field_behavior) = REQUIRED]; 81} 82 83// A logical expression of EnhancedDataSet dimension filters. 84message ExpandedDataSetFilterExpression { 85 // The expression applied to a filter. 86 oneof expr { 87 // A list of expressions to be AND’ed together. It must contain a 88 // ExpandedDataSetFilterExpression with either not_expression or 89 // dimension_filter. This must be set for the top level 90 // ExpandedDataSetFilterExpression. 91 ExpandedDataSetFilterExpressionList and_group = 1; 92 93 // A filter expression to be NOT'ed (that is, inverted, complemented). It 94 // must include a dimension_filter. This cannot be set on the 95 // top level ExpandedDataSetFilterExpression. 96 ExpandedDataSetFilterExpression not_expression = 2; 97 98 // A filter on a single dimension. This cannot be set on the top 99 // level ExpandedDataSetFilterExpression. 100 ExpandedDataSetFilter filter = 3; 101 } 102} 103 104// A list of ExpandedDataSet filter expressions. 105message ExpandedDataSetFilterExpressionList { 106 // A list of ExpandedDataSet filter expressions. 107 repeated ExpandedDataSetFilterExpression filter_expressions = 1; 108} 109 110// A resource message representing a GA4 ExpandedDataSet. 111message ExpandedDataSet { 112 option (google.api.resource) = { 113 type: "analyticsadmin.googleapis.com/ExpandedDataSet" 114 pattern: "properties/{property}/expandedDataSets/{expanded_data_set}" 115 }; 116 117 // Output only. The resource name for this ExpandedDataSet resource. 118 // Format: properties/{property_id}/expandedDataSets/{expanded_data_set} 119 string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; 120 121 // Required. The display name of the ExpandedDataSet. 122 // Max 200 chars. 123 string display_name = 2 [(google.api.field_behavior) = REQUIRED]; 124 125 // Optional. The description of the ExpandedDataSet. 126 // Max 50 chars. 127 string description = 3 [(google.api.field_behavior) = OPTIONAL]; 128 129 // Immutable. The list of dimensions included in the ExpandedDataSet. 130 // See the [API 131 // Dimensions](https://developers.google.com/analytics/devguides/reporting/data/v1/api-schema#dimensions) 132 // for the list of dimension names. 133 repeated string dimension_names = 4 [(google.api.field_behavior) = IMMUTABLE]; 134 135 // Immutable. The list of metrics included in the ExpandedDataSet. 136 // See the [API 137 // Metrics](https://developers.google.com/analytics/devguides/reporting/data/v1/api-schema#metrics) 138 // for the list of dimension names. 139 repeated string metric_names = 5 [(google.api.field_behavior) = IMMUTABLE]; 140 141 // Immutable. A logical expression of ExpandedDataSet filters applied to 142 // dimension included in the ExpandedDataSet. This filter is used to reduce 143 // the number of rows and thus the chance of encountering `other` row. 144 ExpandedDataSetFilterExpression dimension_filter_expression = 6 145 [(google.api.field_behavior) = IMMUTABLE]; 146 147 // Output only. Time when expanded data set began (or will begin) collecing 148 // data. 149 google.protobuf.Timestamp data_collection_start_time = 7 150 [(google.api.field_behavior) = OUTPUT_ONLY]; 151} 152