{
  "id": "iagree-example-synthetic",
  "version": "1.0.0",
  "type": "agreement",
  "context": {
    "iAgree": "2.0",
    "provider": "ISA Research Group",
    "consumer": "Acme",
    "validity": {
      "initial": "2014-10-16",
      "timeZone": "Europe/Madrid"
    },
    "infrastructure": {
      "designer": "http://designer.governify.io",
      "portal": "http://portal.governify.io",
      "registry": "http://registry.governify.io"
    },
    "definitions": {
      "schemas": {
        "myMetric": {
          "description": "some gathered values",
          "type": "double",
          "unit": "%"
        }
      },
      "scopes": {
        "myGlobalScope": {
          "myScope": {
            "myPropertyName": "myPropertyValue"
          }
        }
      }
    }
  },
  "terms": {
    "pricing": {
      "cost": 50,
      "currency": "EUR",
      "billing": {
        "period": "monthly"
      }
    },
    "metrics": {
      "myMetric1": {
        "schema": {
          "$ref": "#/context/definitions/schemas/myMetric"
        },
        "type": "consumption",
        "scope": {
          "myScope": {
            "$ref": "#/context/definitions/scopes/myGlobalScope/myScope"
          }
        }
      },
      "myMetric1_evidence": {
        "schema": {
          "$ref": "#/context/definitions/schemas/myMetric"
        },
        "type": "consumption",
        "scope": {
          "myScope": {
            "$ref": "#/context/definitions/scopes/myGlobalScope/myScope"
          }
        }
      }
    },
    "guarantees": [
      {
        "id": "myGuarantee",
        "scope": {
          "myScope": {
            "$ref": "#/context/definitions/scopes/myGlobalScope/myScope"
          }
        },
        "of": [
          {
            "scope": {
              "myScope": "P1"
            },
            "objective": "myMetric <= 1.00",
            "with": {
              "myMetric": {}
            },
            "window": {
              "initial": "2009-10-16",
              "type": "static",
              "period": "monthly"
            },
            "evidences": [
              {
                "myMetric1_evidence": {
                  "$ref": "#/terms/metrics/myMetric1_evidence"
                }
              }
            ],
            "penalties": [
              {
                "over": {
                  "myMetric": {
                    "$ref": "#/context/definitions/schemas/myMetric"
                  }
                },
                "of": [
                  {
                    "value": "-2",
                    "condition": "myMetric >= 90.00"
                  }
                ],
                "aggregatedBy": "sum",
                "groupBy": {
                  "myScope": {
                    "$ref": "#/context/definitions/scopes/myGlobalScope/myScope"
                  }
                },
                "upTo": -10
              }
            ]
          }
        ]
      }
    ],
    "configurarions": {
      "myConfiguration1": {
        "scope": {
          "myScope": {
            "$ref": "#/context/definitions/scopes/myGlobalScope/myScope"
          }
        },
        "of": [
          {
            "scope": {
              "myScope": "*"
            },
            "value": "true"
          }
        ]
      }
    },
    "quotas": [
      {
        "id": "myQuota",
        "scope": {
          "myScope": {
            "$ref": "#/context/definitions/scopes/myGlobalScope/myScope"
          }
        },
        "over": {
          "myMetric": {
            "$ref": "#/terms/metrics/myMetric1"
          }
        },
        "of": [
          {
            "scope": {
              "myScope": {
                "$ref": "#/context/definitions/scopes/myGlobalScope/myScope"
              }
            },
            "limits": [
              {
                "max": 40,
                "period": "hourly"
              }
            ]
          }
        ]
      }
    ],
    "rates": [
      {
        "id": "myRate",
        "scope": {
          "myScope": {
            "$ref": "#/context/definitions/scopes/myGlobalScope/myScope"
          }
        },
        "over": {
          "myMetric1": {
            "$ref": "#/terms/metrics/myMetric1"
          }
        },
        "of": [
          {
            "scope": {
              "myScope": {
                "$ref": "#/context/definitions/scopes/myGlobalScope/myScope"
              }
            },
            "limits": [
              {
                "max": 40,
                "period": "hourly"
              }
            ]
          }
        ]
      }
    ]
  }
}