// Copyright Istio Authors
//
// 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 istio.mixer.template.list;

import "mixer/adapter/model/v1beta1/extensions.proto";
import "policy/v1beta1/type.proto";

option (istio.mixer.adapter.model.v1beta1.template_variety) = TEMPLATE_VARIETY_CHECK;

message Template {
    // value is ...
    istio.policy.v1beta1.Value value = 1;
    // dimensions are ...
    map<string, istio.policy.v1beta1.Value> dimensions = 2;

    int64 int64Primitive = 3;

    bool boolPrimitive = 4;

    double doublePrimitive = 5;

    string stringPrimitive = 6;

    istio.policy.v1beta1.Value anotherValueType = 7;

    map<string, int64> dimensionsFixedInt64ValueDType = 8;

    string check_expression = 9;

    Res1 res1 = 11;
}

message Res1 {
    istio.policy.v1beta1.Value value = 1;
    map<string, istio.policy.v1beta1.Value> dimensions = 2;

    int64 int64Primitive = 3;

    bool boolPrimitive = 4;

    double doublePrimitive = 5;

    string stringPrimitive = 6;

    map<string, int64> int64Map = 7;

    istio.policy.v1beta1.TimeStamp timeStamp = 9;

    istio.policy.v1beta1.Duration duration = 10;

    Res2 res2 = 11;

    map<string, Res2> res2_map = 12;
}

message Res2 {
    istio.policy.v1beta1.Value value = 1;
    map<string, istio.policy.v1beta1.Value> dimensions = 2;

    int64 int64Primitive = 3;

    istio.policy.v1beta1.TimeStamp timeStamp = 9;

    istio.policy.v1beta1.Duration duration = 10;

    istio.policy.v1beta1.IPAddress ip_addr = 11;

    istio.policy.v1beta1.DNSName dns_name = 12;

    istio.policy.v1beta1.EmailAddress email_addr = 13;

    istio.policy.v1beta1.Uri uri = 14;
}
