1// Copyright 2019 Istio Authors. All Rights Reserved. 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 istio.mixer.adapter.sample.myApa; 18 19import "mixer/adapter/model/v1beta1/extensions.proto"; 20import "policy/v1beta1/type.proto"; 21 22option (istio.mixer.adapter.model.v1beta1.template_variety) = TEMPLATE_VARIETY_ATTRIBUTE_GENERATOR; 23 24/* myapa template is .. 25*/ 26message Template { 27 int64 int64Primitive = 1; 28 29 bool boolPrimitive = 2; 30 31 double doublePrimitive = 3; 32 33 string stringPrimitive = 4; 34 35 map<string, int64> dimensionsFixedInt64ValueDType = 5; 36 37 istio.policy.v1beta1.TimeStamp timeStamp = 6; 38 39 istio.policy.v1beta1.Duration duration = 7; 40 41 map<string, Resource3> res3_map = 8; 42 43 istio.policy.v1beta1.IPAddress optionalIP = 9; 44 45 istio.policy.v1beta1.EmailAddress email = 10; 46} 47 48message OutputTemplate { 49 50 int64 int64Primitive = 1; 51 52 bool boolPrimitive = 2; 53 54 double doublePrimitive = 3; 55 56 string stringPrimitive = 4; 57 58 istio.policy.v1beta1.TimeStamp timeStamp = 6; 59 60 istio.policy.v1beta1.Duration duration = 7; 61 62 istio.policy.v1beta1.EmailAddress email = 10; 63 64 istio.policy.v1beta1.IPAddress out_ip = 11; 65 66 map<string, string> out_str_map = 12; 67} 68 69 70message Resource1 { 71 string str = 1; 72 Resource1 self_ref_res1 = 3; 73 Resource2 resRef2 = 2; 74} 75 76message Resource2 { 77 string str = 1; 78 Resource3 res3 = 2; 79 map<string, Resource3> res3_map = 3; 80} 81 82// resource3 comment 83message Resource3 { 84 85 int64 int64Primitive = 1; 86 87 bool boolPrimitive = 2; 88 89 double doublePrimitive = 3; 90 91 string stringPrimitive = 4; 92 93 map<string, int64> dimensionsFixedInt64ValueDType = 5; 94 95 istio.policy.v1beta1.TimeStamp timeStamp = 6; 96 97 istio.policy.v1beta1.Duration duration = 7; 98} 99