@prefix ccprices:	<http://cookingbigdata.com/linkeddata/ccpricing#> .
@prefix gr:	<http://purl.org/goodrelations/v1#> .
@prefix rdfs: 	<http://www.w3.org/2000/01/rdf-schema#> .
@prefix ccinstances:	<http://cookingbigdata.com/linkeddata/ccinstances#> .
@prefix ccprices: 	<http://cookingbigdata.com/linkeddata/ccinstances#> .
@prefix ccregions: 	<http://cookingbigdata.com/linkeddata/ccregions#> .
@prefix sc: 	<https://schema.org/> .
@prefix xsd: 	<http://www.w3.org/2001/XMLSchema#> .

<http://example.org/cc/Plans> a ccprices:ServicePricing;
	ccprices:hasPricing _:FreePlan ,
	                    _:RegularPlan ;
	.

#Regular Plan
_:Regular a ccprices:PricesPlan;
	rdfs:label "Regular Prices plan";
	rdfs:comment "Regular prices Plan including cost per instance, regions, etc.";
	ccprices:hasComponentPrice 
		_:RegularPlanComponents;
	.
	
_:RegularPlanComponents a cprices:Compound;
	rdfs:label "Price Components";
	rdfs:comment "List of components and limits";
	ccprices:hasRegion _:RegionNVirginia;
	ccprices:hasInstances _:instance02;
  	ccprices:withMaxCompound [
  		 a gr:Offering;
  			gr:hasPriceSpecification [
  				a gr:PriceSpecification;
  					gr:hasCurrency "USD"^^xsd:string;
  					gr:hasCurrencyValue "0,0464 USD"^^xsd:float ;
  			];		
  		 	gr:includeObject [ 
  				a gr:TypeAndQuantityNode;
  					gr:amountOfThisGood "1"^^xsd:integer ;
  					gr:hasUnitOfMeasurement "HRS"^^xsd:string ;
  			];	
  	];					  
	.
	
#Free Plan
_:FreePlan a ccprices:PricesPlan;
	rdfs:label "PricesPlan Free";
	rdfs:comment "Limited Plan for simple users";
	ccprices:MaxPrice [
		 a gr:Offering;
			gr:hasPriceSpecification [
				a gr:PriceSpecification;
					gr:hasMaxValue 0.0;
					gr:priceCurrency "EUR";
				];
		];
	ccprices:hasComponentPrice 
		_:FreePlanComponents;
	.

_:FreePlanComponents a ccprices:Compound;
	rdfs:label "Price Components";
	rdfs:comment "List of components and limits";
	ccprices:hasRegion _:RegionNVirginia;
	ccprices:hasInstances _:instance01,
	                      _:instance02;
	ccprices:withMaxCompound [
		 a gr:Offering;
			gr:hasPriceSpecification [
				a gr:PriceSpecification;
					gr:hasCurrency "USD"^^xsd:string;
					gr:hasCurrencyValue "0.0"^^xsd:float ;
			];		
		 	gr:includeObject [ 
				a gr:TypeAndQuantityNode;
					gr:amountOfThisGood "250"^^xsd:integer ;
					gr:hasUnitOfMeasurement "HRS"^^xsd:string ;
			];	
	];
	.

_:instance01 a ccprices:instance;
	rdfs:label "Instance 01";
	ccinstances:code "T2"^^xsd:string ;
	ccinstances:model "t2.medium"^^xsd:string ;
	ccinstances:type "Medium User Instance"^^xsd:string ;
	ccinstances:hasCPU [ 
		a ccinstances:cpu;
			ccinstances:cpu_model "Intel Xeon E7-8893 v3"^^xsd:string ;
			ccinstances:cpu_code "E7-8893V3"^^xsd:string ;
			ccinstances:cpu_cores "2"^^xsd:integer;
			ccinstances:cpu_frecuency "3200"^^xsd:integer;
			ccinstances:max_frecuency "3500"^^xsd:integer;
			ccinstances:cpu_cache "45"^^xsd:integer;	
		];
	ccinstances:hasRAM [
		a ccinstances:ram;
			ccinstances:ram_size "4096"^^xsd:integer;
			ccinstances:ram_frecuency "2800"^^xsd:integer;
		];
	.
	
_:instance02 a ccprices:instance;
	rdfs:label "Instance 02";
	ccinstances:code "T2"^^xsd:string ;
	ccinstances:model "t2.large"^^xsd:string ;
	ccinstances:type "Medium User Instance"^^xsd:string ;
	ccinstances:hasCPU [
		a ccinstances:cpu;
			ccinstances:cpu_model "Intel Xeon E7-8893 v3"^^xsd:string ;
			ccinstances:cpu_code "E7-8893V3"^^xsd:string ;
			ccinstances:cpu_cores "2"^^xsd:integer;
			ccinstances:cpu_frecuency "3200"^^xsd:integer;
			ccinstances:max_frecuency "3500"^^xsd:integer;
			ccinstances:cpu_cache "45"^^xsd:integer;	
		];
	ccinstances:hasRAM [
		a ccinstances:ram ;
			ccinstances:ram_size "8192"^^xsd:integer;
			ccinstances:ram_frecuency "2800"^^xsd:integer;
		];
	.
	
_:RegionNVirginia a ccregions:Region;
		rdfs:label "Region and AZ.";
		rdfs:comment "Each region is completely independent. Each Availability Zone (AZ) is isolated, but connected";
		ccregions:region_code "us-east-1"^^xsd:string;
		ccregions:region_name "US East (N. Virginia)"^^xsd:string;
		ccregions:region_geocompilance "United States of America (USA) and Canada"^^xsd:string;
		ccregions:region_location [
			a sc:Place;
				sc:address [
					a sc:PostalAddress;
						sc:addressLocality "Springfield"^^xsd:string;
					    sc:addressRegion "VA"^^xsd:string;
					    sc:postalCode "22151"^^xsd:string;
					    sc:streetAddress "5617 Industrial Dr"^^xsd:string;
						sc:addressCountry "US"^^xsd:string;
				]
			];		 
		ccregions:hasAvailabilityZone [
			a ccregions:AvailabilityZone;
				ccregions:availabilityzone_name "US"^^xsd:string;
				ccregions:availabilityzone_status "true"^^xsd:boolean;
		];
	.
	
	
	
	