1// Copyright Istio Authors 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 15/* 16Overview of what metric is etc.. 17*/ 18syntax = "proto3"; 19 20/* 21Additional overview of what metric is etc.. 22*/ 23package istio.mixer.adapter.metricEntry; 24 25import "mixer/adapter/model/v1beta1/extensions.proto"; 26import "policy/v1beta1/type.proto"; 27 28option (istio.mixer.adapter.model.v1beta1.template_variety) = TEMPLATE_VARIETY_REPORT; 29 30/* metric template is .. 31 aso it is... 32*/ 33message Template { 34 // value is ... 35 istio.policy.v1beta1.Value value = 1; 36 // dimensions are ... 37 map<string, istio.policy.v1beta1.Value> dimensions = 2; 38 39 int64 int64Primitive = 3; 40 41 bool boolPrimitive = 4; 42 43 double doublePrimitive = 5; 44 45 string stringPrimitive = 6; 46 47 istio.policy.v1beta1.Value anotherValueType = 7; 48 49 map<string, int64> dimensionsFixedInt64ValueDType = 8; 50 51 istio.policy.v1beta1.TimeStamp timeStamp = 9; 52 53 istio.policy.v1beta1.Duration duration = 10; 54 55 istio.policy.v1beta1.IPAddress ip_addr = 11; 56 57 istio.policy.v1beta1.DNSName dns_name = 12; 58 59 istio.policy.v1beta1.EmailAddress email_addr = 13; 60 61 istio.policy.v1beta1.Uri uri = 14; 62 63 repeated Resource3 res3_list = 15; 64 map<string, istio.mixer.adapter.metricEntry.Resource3> res3_map = 16; 65} 66 67message Resource1 { 68 string str = 1; 69 istio.mixer.adapter.metricEntry.Resource1 self_ref_res1 = 3; 70 Resource2 resRef2 = 2; 71} 72 73message Resource2 { 74 string str = 1; 75 Resource3 res3 = 2; 76 repeated Resource3 res3_list = 4; 77 map<string, Resource3> res3_map = 5; 78} 79 80// resource3 comment 81message Resource3 { 82 // value is ... 83 istio.policy.v1beta1.Value value = 1; 84 // dimensions are ... 85 map<string, istio.policy.v1beta1.Value> dimensions = 2; 86 87 int64 int64Primitive = 3; 88 89 bool boolPrimitive = 4; 90 91 double doublePrimitive = 5; 92 93 string stringPrimitive = 6; 94 95 istio.policy.v1beta1.Value anotherValueType = 7; 96 97 map<string, int64> dimensionsFixedInt64ValueDType = 8; 98 99 istio.policy.v1beta1.TimeStamp timeStamp = 9; 100 101 istio.policy.v1beta1.Duration duration = 10; 102} 103 104// Tests 105// - Ref template 106 107